signmessage

Back to wallet

Wallet

Summary

Sign a message with the private key of an address

Description

Sign a message with the private key of an address Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Arguments

  • address (STR, required): The qbit address to use for the private key.
  • message (STR, required): The message to create a signature of.

Results

  • signature (STR): The signature of the message encoded in base 64

Examples

Unlock the wallet for 30 seconds
qbit-cli walletpassphrase "mypassphrase" 30
Create the signature
qbit-cli signmessage "QbURpsSa6XFTg61KScF1yntyVDVb1742e2" "my message"
Verify the signature
qbit-cli verifymessage "QbURpsSa6XFTg61KScF1yntyVDVb1742e2" "signature" "my message"
As a JSON-RPC call
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "signmessage", "params": ["QbURpsSa6XFTg61KScF1yntyVDVb1742e2", "my message"]}' -H 'content-type: application/json' http://127.0.0.1:8352/