Util RPCs

signmessagewithprivkey

Sign a message with the private key of an address

Method: POST

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

Example body (raw)

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

Example response: 200

{
    "result": {
        "isvalid": true,
        "address": "LfWA3u2GbDPnm6yAGeQztHR5fSBLcYf9bV",
        "scriptPubKey": "76a914de7302cb3dfcac8fe1725b8b087960722277eb1188ac",
        "isscript": false,
        "iswitness": false,
        "ismweb": false
    },
    "error": null,
    "id": "curltest"
}

verifymessage

Verify a signed message

Method: POST

https://ltc.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