Skip to main content

signMessageWithCustomOptions

Signs a message with custom options, allowing you to specify the address type and signing protocol. This is useful when you need more control over the signing process than the standard signMessage function provides.
Both options are ignored for embedded wallets, which have one address type and sign with BIP-322 only. The call still returns a valid signature. Use signMessage instead, or see Embedded Wallet Differences.

Usage

Parameters

Address Types

  • payment - Use the standard payment address
  • ordinals - Use the ordinals (inscriptions) address

Protocols

  • ecdsa - Standard ECDSA signature
  • bip322-simple - BIP-322 simple signature format
If the wallet provider does not support specifying an address type or protocol, it uses the default values. Embedded wallets ignore both, as described above.

Returns

Promise<{ signature: string }> - A promise that resolves to an object containing the signature.

Errors

Last modified on August 16, 2026