Ethereum: sign message

Asks device to sign a message using the private key derived by given BIP32 path.

const result = await TrezorConnect.ethereumSignMessage(params);

Params

Optional common params EthereumSignMessage type

  • pathrequired string | Array<number> minimum length is 3. read more
  • message - required string message to sign in plain text
  • hex - optional boolean convert message from hex

Example

TrezorConnect.ethereumSignMessage({
    path: "m/44'/60'/0'",
    message: 'example message',
});

Result

MessageSignature type

{
    success: true,
    payload: {
        address: string,
        signature: string,
    }
}

Error

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