btcVerifyMessage
Bitcoin: verify message
Asks device to verify a message using the signer address and signature.
const result = await HardwareSDK.btcVerifyMessage(connectId, deviceId, params);
Params
address- requiredstringsigner address,messageHex- requiredstringsigned message from hex,signature- requiredstringsignature in base64 format,coin- requiredstringDetermines network definition specified in coins.json file. Coinshortcut,nameorlabelcan be used.
Example
HardwareSDK.btcVerifyMessage(connectId, deviceId, {
address: "1BoatSLRHtKNngkdXEeobR76b53LETtpyT",
messageHex: "48656c6c6f20426974636f696e",
signature: "MEUCIQDLuQ1x9Fq2d1w2w9xY3u5Q8J4N2Q8v6v1g7Yk8z0mYgAIgQf9yXvQ7Y0f0c5Q8x7oYQJ7VhX6n1j3QwU3L8l9sF0xk=",
coin: "btc",
});
Result
{
success: true,
payload: {
message: "Message verified"
}
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}