Util RPCs

signmessagewithprivkey

Sign a message with the private key of an address

Method: POST

https://dgb.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://dgb.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "validateaddress",
    "params": [
        "DErXMnY9PjeDm6WHn7ZwBVnCUQDbNEEtQ4"
    ]
}

Example response: 200

{
    "result": {
        "isvalid": true,
        "address": "DErXMnY9PjeDm6WHn7ZwBVnCUQDbNEEtQ4",
        "scriptPubKey": "76a9146a8ee79b37bba6f86b14263aab410f91afafe14288ac",
        "isscript": false,
        "iswitness": false
    },
    "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": [
        "DErXMnY9PjeDm6WHn7ZwBVnCUQDbNEEtQ4",
        "signature",
        "my message"
    ]
}

Example response: 200

{
    "result": null,
    "error": {
        "code": -5,
        "message": "Malformed base64 encoding"
    },
    "id": "curltest"
}

Last updated