Verify message

Asks device to verify a message using the signer address and signature.

const result = await TrezorConnect.verifyMessage(params);

Params

Optional common params

VerifyMessage type

  • address - required string signer address,
  • message - required string signed message,
  • 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.
  • hex - optional boolean convert message from hex

Example

TrezorConnect.verifyMessage({
    address: '3BD8TL6iShVzizQzvo789SuynEKGpLTms9',
    message: 'example message',
    signature:
        'JO7vL3tOB1qQyfSeIVLvdEw9G1tCvL+lNj78XDAVM4t6UptADs3kXDTO2+2ZeEOLFL4/+wm+BBdSpo3kb3Cnsas=',
    coin: 'btc',
});

Result

Success type

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

Error

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