Message handlers

The message handlers let a Live App ask the user to sign an arbitrary message (for example an EIP-191 personal sign or an EIP-712 typed-data message) using one of the wallet’s accounts.

To sign a transaction instead, use the transaction handlers.

Method IDs

Method IDDirectionWallet handler required?Purpose
message.signLive App → WalletyesSign a message with the selected account’s key.

message.sign

The Live App passes the message as a hex string. The server decodes it to a Buffer before forwarding to the wallet’s message.sign handler. The result is encoded back to hex on the wire.

Parameters

ParameterTypeRequiredNotes
accountIdstringyesID of the account whose key signs the message.
hexMessagestringyesHex-encoded message to sign.
optionsobjectnoWallet-specific options. Currently: hwAppId?: string, dependencies?: string[].
metaobjectnoFree-form metadata, typed as Record<string, unknown>. Forwarded as-is to the wallet handler; useful for context such as the dApp identity.

Result

{
  hexSignedMessage: string
}

The signed message is hex-encoded.

Errors

ConditionError
accountId or hexMessage missing or wrong typeRpcError with code INVALID_PARAMS (-32602).
Wallet does not implement message.signRpcError with code SERVER_ERROR (-32000).
The user rejects the request on-deviceThe error thrown by the wallet handler is forwarded to the Live App.

See also

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Stax, Ledger Flex, Ledger Nano, Ledger Nano S, Ledger OS, Ledger Wallet, [LEDGER] (logo), [L] (logo) are trademarks owned by Ledger SAS.