evmVerifyMessage
Ethereum: verify message
Asks device to verify a message using the signer address and signature.
const result = await HardwareSDK.evmVerifyMessage(connectId, deviceId, params);Params
address- requiredstringsigner address. "0x" prefix is optionalmessageHex- requiredstringsigned message in hex textsignature- requiredstringsignature in hexadecimal format. "0x" prefix is optionalchainId- optionalnumberThe ChainId in ETH is a unique identifier for a specific Ethereum network, used to distinguish different versions of the blockchain. Reference.
Example
HardwareSDK.evmVerifyMessage(connectId, deviceId, {
address: "0xdA0b608bdb1a4A154325C854607c68950b4F1a34",
message: "Example message",
signature: "11dc86c631ef5d9388c5e245501d571b864af1a717cbbb3ca1f6dacbf330742957242aa52b36bbe7bb46dce6ff0ead0548cc5a5ce76d0aaed166fd40cb3fc6e51c",
chainId: 1
});Result
{
success: true,
payload: {
message: "Message verified"
}
}Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}Last updated
Was this helpful?