Help Center

Developer Docs

signMessage API method

May 22, 2025

Leather does not verify message intent or validate downstream use. Developers are responsible for safe implementation and signature verification.

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 sign
  • paymentType (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.