mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-20 06:08:39 +01:00
1.2 KiB
1.2 KiB
Verify message
Asks device to verify a message using the signer address and signature.
const result = await TrezorConnect.verifyMessage(params);
Params
flowtype
address- requiredstringsigner address,message- requiredstringsigned message,signature- requiredstringsignature in base64 format,coin- requiredstringDetermines network definition specified in coins.json file. Coinshortcut,nameorlabelcan be used.hex- optionalbooleanconvert message from hex
Example
TrezorConnect.verifyMessage({
address: '3BD8TL6iShVzizQzvo789SuynEKGpLTms9',
message: 'example message',
signature:
'JO7vL3tOB1qQyfSeIVLvdEw9G1tCvL+lNj78XDAVM4t6UptADs3kXDTO2+2ZeEOLFL4/+wm+BBdSpo3kb3Cnsas=',
coin: 'btc',
});
Result
flowtype
{
success: true,
payload: {
message: "Message verified"
}
}
Error
{
success: false,
payload: {
error: string // error message
}
}