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 standardsignMessage 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 addressordinals- Use the ordinals (inscriptions) address
Protocols
ecdsa- Standard ECDSA signaturebip322-simple- BIP-322 simple signature format
Returns
Promise<{ signature: string }> - A promise that resolves to an object containing the signature.
Errors
Related functions
- signPsbt - Sign a PSBT
- sendBitcoin - Send a Bitcoin transaction
- Embedded Wallet Differences - How these options behave with embedded wallets