btcSignMessage
Bitcoin: sign message
Asks device to sign a message using the private key derived by given BIP32 path.
const result = await HardwareSDK.btcSignMessage(connectId, deviceId, params);
Params
path
— requiredstring | Array<number>
minimum length is3
. read moremessageHex
- requiredstring
message from hexcoin
- optionalstring
Determines network definition specified in coins.json file. Coinshortcut
,name
orlabel
can be used. Ifcoin
is not set API will try to get network definition frompath
.noScriptType
- optionalboolean
For signatures without script types.
Example
HardwareSDK.btcSignMessage(connectId, deviceId, {
path: "m/44'/0'/0'",
messageHex: "6578616d706c65206d657373616765"
});
Result
{
success: true,
payload: {
address: string, // signer address
signature: string, // signature in base64 format
}
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}
Last updated
Was this helpful?