Method Reference

Complete JSON-RPC method catalog with parameters, return types, and examples.

getinfo

Node
Parameters
(none)
Returns
Object with height, peers, version, difficulty
Example Request
{"jsonrpc":"2.0","method":"getinfo","params":[],"id":1}

getblockcount

Chain
Parameters
(none)
Returns
Integer — current block height
Example Request
{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}

getbestblockhash

Chain
Parameters
(none)
Returns
String — hash of the tip block
Example Request
{"jsonrpc":"2.0","method":"getbestblockhash","params":[],"id":1}

getblock

Chain
Parameters
hash: String
Returns
Block object with transactions
Example Request
{"jsonrpc":"2.0","method":"getblock","params":["<hash>"],"id":1}

getblockbynumber

Chain
Parameters
height: Integer
Returns
Block object
Example Request
{"jsonrpc":"2.0","method":"getblockbynumber","params":[0],"id":1}

gettx

Chain
Parameters
txid: String
Returns
Transaction object
Example Request
{"jsonrpc":"2.0","method":"gettx","params":["<txid>"],"id":1}

getbalance

Wallet
Parameters
address: String
Returns
Object: {confirmed, unconfirmed}
Example Request
{"jsonrpc":"2.0","method":"getbalance","params":["<address>"],"id":1}

getnewaddress

Wallet
Parameters
(none)
Returns
String — new KBC address
Example Request
{"jsonrpc":"2.0","method":"getnewaddress","params":[],"id":1}

getmininginfo

Mining
Parameters
(none)
Returns
Object: difficulty, hashrate, blocks
Example Request
{"jsonrpc":"2.0","method":"getmininginfo","params":[],"id":1}

getpeerinfo

Network
Parameters
(none)
Returns
Array of peer objects
Example Request
{"jsonrpc":"2.0","method":"getpeerinfo","params":[],"id":1}

getconnectioncount

Network
Parameters
(none)
Returns
Integer — number of connections
Example Request
{"jsonrpc":"2.0","method":"getconnectioncount","params":[],"id":1}

getnetworkinfo

Network
Parameters
(none)
Returns
Object: version, subversion, connections
Example Request
{"jsonrpc":"2.0","method":"getnetworkinfo","params":[],"id":1}

getmempool

Mempool
Parameters
(none)
Returns
Array of mempool transactions
Example Request
{"jsonrpc":"2.0","method":"getmempool","params":[],"id":1}

estimatefee

Util
Parameters
blocks: Integer
Returns
Number — sat/vB fee estimate
Example Request
{"jsonrpc":"2.0","method":"estimatefee","params":[6],"id":1}

validateaddress

Util
Parameters
address: String
Returns
Object: {isvalid, address, scriptPubKey}
Example Request
{"jsonrpc":"2.0","method":"validateaddress","params":["<addr>"],"id":1}

signmessage

Util
Parameters
address: String, message: String
Returns
String — base64 signature
Example Request
{"jsonrpc":"2.0","method":"signmessage","params":["<addr>","hello"],"id":1}

verifymessage

Util
Parameters
address: String, signature: String, message: String
Returns
Boolean
Example Request
{"jsonrpc":"2.0","method":"verifymessage","params":["<addr>","<sig>","hello"],"id":1}