On this page

latest contributor to this doc

Last Edit:

@smk762

Address Index

The following RPC calls interact with the komodod software, and are made available through the komodo-cli software.

getaddressbalance '{ "addresses" : [ "address" , ... ] }'

The getaddressbalance method returns the confirmed balance for an address, or addresses. It requires addressindex to be enabled.

NameTypeDescription
"address"(string)the address

NameTypeDescription
"balance"(number)the current confirmed balance in satoshis
"received"(number)the total confirmed number of satoshis received (including change)

Command:

./komodo-cli getaddressbalance '{"addresses":["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}'

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressbalance", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

getaddressdeltas '{ "addresses" : [ "address" , ... ] }'

getaddressdeltas '{ "addresses" : [ "address" , ... ] , "start": start, "end": end, "chainInfo": boolean }'

The getaddressdeltas method returns all confirmed balance changes of an address. The user can optionally limit the response to a given interval of blocks. The method requires addressindex to be enabled.

NameTypeDescription
"address"(string)the address
"start"(number)the start block height
"end"(number)the end block height
"chainInfo"(boolean)include chain info in results (only applies if start and end specified)

NameTypeDescription
"satoshis"(number)the difference in satoshis
"txid"(string)the related transaction id
"index"(number)the related input or output index
"height"(number)the block height
"address"(string)the address

Command:

./komodo-cli getaddressdeltas '{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}'

Command:

./komodo-cli getaddressdeltas '{"addresses":["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"],"start":1,"end":200,"chainInfo":true}'

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressdeltas", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressdeltas", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"],"start":1,"end":200,"chainInfo":true}]}' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

getaddressmempool '{ "addresses" : [ "address" , ... ] }'

The getaddressmempool method returns all mempool deltas for an address, or addresses. The method requires addressindex to be enabled.

NameTypeDescription
"address"(string)the address

NameTypeDescription
"address"(string)the address
"txid"(string)the related txid
"index"(number)the related input or output index
"satoshis"(number)the difference in satoshis
"timestamp"(number)the time the transaction entered the mempool (seconds)
"prevtxid"(string)the previous txid (if spending)
"prevout"(string)the previous transaction output index (if spending)

Command:

./komodo-cli getaddressmempool '{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}'

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressmempool", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

getaddresstxids '{ "addresses" : [ "address" , ... ] }'

The getaddresstxids method returns the txids for an address, or addresses. It requires addressindex to be enabled.

NameTypeDescription
"address"(string)the address
"start"(number)the start block height
"end"(number)the end block height

NameTypeDescription
"transaction_id"(string)the transaction id

Command:

komodo-cli getaddresstxids '{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb","RQUAkqRiRMqxcNrB29B4duTK4qkqfV9HVJ"]}'

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddresstxids", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

getaddressutxos '{ "addresses" : [ "address" , ... ], "chaininfo" }'

The getaddressutxos method returns all unspent outputs for an address. It requires addressindex to be enabled.

NameTypeDescription
"address"(string)the address
"chainInfo"(boolean)include chain info with results

NameTypeDescription
"address"(string)the address
"txid"(string)the output txid
"height"(number)the block height
"outputIndex"(number)the output index
"script"(string)the script hex encoded
"satoshis"(number)the number of satoshis of the output

Command:

./komodo-cli getaddressutxos '{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}'

Command:

./komodo-cli getaddressutxos '{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"], "chainInfo": true}'

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressutxos", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressutxos", "params": [{"addresses": ["RTTg3izdeVnqkTTxjzsPFrdUQexgqCy1qb"], "chainInfo": true}] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

getsnapshot top

The getsnapshot method returns a snapshot of addresses and their amounts at the Smart Chain's current height.

The method requires addressindex to be enabled.

NameTypeDescription
"top"(number, optional)Only return this many addresses, i.e. top N rich list

NameTypeDescription
"addresses"(array of jsons)the array containing the address and amount details
"addr"(string)an address
"amount"(number)the amount of coins in the above address
"total"(numeric)the total amount in snapshot
"average"(numeric)the average amount in each address
"utxos"(number)the total number of utxos in snapshot
"total_addresses"(number)the total number of addresses in snapshot,
"start_height"(number)the block height snapshot began
"ending_height"(number)the block height snapshot finished,
"start_time"(number)the unix epoch time snapshot started
"end_time"(number)the unix epoch time snapshot finished

Command:

./komodo-cli getsnapshot 5

You can find the rpcuser, rpcpassword, and rpcport in the coin's .conf file.

Command:

curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsnapshot", "params": ["5"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/