signMessage function provides.
Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message to sign |
walletAccount | BitcoinWalletAccount | The wallet account to sign with |
addressType | 'ordinals' | 'payment' (optional) | The address type to use for signing |
protocol | 'ecdsa' | 'bip322-simple' (optional) | The signing protocol to use |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
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
| Error | Description |
|---|---|
NotBitcoinProviderError | Thrown if the wallet account’s provider is not a Bitcoin provider |
MethodNotImplementedError | Thrown if the wallet provider does not implement the signMessage method |
Related functions
- signPsbt - Sign a PSBT
- sendBitcoin - Send a Bitcoin transaction