Util RPCs

createmultisig

Creates a multi-signature address with n signature of m keys required.

It returns a json object with the address and redeemScript.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "createmultisig",
    "params": [
        2,
        "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"
    ]
}

Example response: 200

{
    "result": null,
    "error": {
        "code": -1,
        "message": "JSON value is not an array as expected"
    },
    "id": "curltest"
}

signmessagewithprivkey

Sign a message with the private key of an address

Method: POST

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

Example body (raw)

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

Example response: 200

{
    "result": {
        "isvalid": true,
        "address": "XjszN1jZJthEoaQDhGthRkaHL9AqaG3Vzw",
        "scriptPubKey": "76a91464d4d4127bbce4b888bb4af080fa4de863b02b3f88ac",
        "isscript": false
    },
    "error": null,
    "id": "curltest"
}

verifymessage

Verify a signed message

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "verifymessage",
    "params": [
        "XjszN1jZJthEoaQDhGthRkaHL9AqaG3Vzw",
        "signature",
        "my message"
    ]
}

Example response: 200

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

Last updated