signmessagebip322
signmessagebip322 "address" "message" Sign a message using BIP-322 format for any address type (P2WPKH, P2WSH, P2TR, etc.) This produces a signature that can be verified with verifymessagebip322. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. Arguments: 1. address (string, required) The bitcoin address to use for signing. 2. message (string, required) The message to sign. Result: "str" (string) The BIP-322 signature encoded in base64 Examples: Unlock the wallet for 30 seconds > bitcoin-cli walletpassphrase "mypassphrase" 30 Create the signature > bitcoin-cli signmessagebip322 "bc1q..." "TENSORCASH_GOVERNANCE:..." Verify the signature > bitcoin-cli verifymessagebip322 "bc1q..." "<signature>" "TENSORCASH_GOVERNANCE:..." As a JSON-RPC call > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "signmessagebip322", "params": ["bc1q...", "TENSORCASH_GOVERNANCE:..."]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
signmessagebip322(address: string, message: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"signmessagebip322","params":["\"<address>\"","\"<message>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| address | string | yes | The bitcoin address to use for signing. |
| message | string | yes | The message to sign. |
Result
Type: any
"str" (string) The BIP-322 signature encoded in base64
Source: services/core-node/bcore/src/wallet/rpc/signmessage.cpp:80
C++ symbol: signmessagebip322