Util RPCs
signmessagewithprivkey
Sign a message with the private key of an address
Method: POST
https://btc.nownodes.io
Example body (raw)
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "signmessagewithprivkey",
"params": [
"privkey",
"my message"
]
}
Example response: 200
{
"result": null,
"error": {
"code": -5,
"message": "Invalid private key"
},
"id": "curltest"
}
validateaddress
Return information about the given bitcoin address.
Method: POST
https://btc.nownodes.io
Example body (raw)
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "validateaddress",
"params": [
"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
]
}
Example response: 200
{
"result": {
"isvalid": false,
"error_locations": [
35,
36
],
"error": "Invalid Bech32 checksum"
},
"error": null,
"id": "curltest"
}
verifymessage
Verify a signed message
Method: POST
https://btc.nownodes.io
Example body (raw)
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "verifymessage",
"params": [
"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX",
"signature",
"my message"
]
}
Example response: 200
{
"result": null,
"error": {
"code": -5,
"message": "Invalid address"
},
"id": "curltest"
}
Last updated