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

Optional common params

  • address - required string signer address,

  • messageHex - required string signed message from hex,

  • signature - required string signature in base64 format,

  • coin - required string Determines network definition specified in coins.json file. Coin shortcut, name or label can be used.

Example

HardwareSDK.btcVerifyMessage(connectId, deviceId, {
    address: "3BD8TL6iShVzizQzvo789SuynEKGpLTms9",
    messageHex: "6578616d706c65206d657373616765"
    signature: "JO7vL3tOB1qQyfSeIVLvdEw9G1tCvL+lNj78XDAVM4t6UptADs3kXDTO2+2ZeEOLFL4/+wm+BBdSpo3kb3Cnsas=",
    coin: "btc"
});

Result

{
    success: true,
    payload: {
        message: "Message verified"
    }
}

Error

{
    success: false,
    payload: {
        error: string, // error message
        code: number // error code
    }
}

Last updated