signMessage API method
The
May 22, 2025
Request the signature of an arbitrary message with the first Bitcoin address (Native SegWit or Taproot) of an account.
Method name
signMessage
Parameters
message(string, required): Arbitrary message to signpaymentType(string, optional): Address type to use; "p2wpkh" (default) or "p2tr"network(string, optional): Signing network; supports "mainnet" (default), "testnet", "signet", "sbtcDevenv", or "devnet"account(number, optional): Account index to sign from; defaults to active account
Example request
[Unsupported block type: code]
Example response
[Unsupported block type: code]
Sandbox
To try this live in a prebuilt example, open the signMessage sandbox on CodeSandbox.
Make sure the Leather extension is installed and running.
Disclaimer
Leather does not verify message intent or validate downstream use. Developers are responsible for safe implementation and signature verification.