latest contributor to this doc

Last Edit: @gcharang ,

Control

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

getinfo

The getinfo method returns an object containing various state info.

NameTypeDescription
(none)

NameTypeDescription
"version"(numeric)the server version
"protocolversion"(numeric)the protocol version
"walletversion"(numeric)the wallet version
"balance"(numeric)the total balance of the wallet
"blocks"(numeric)the current number of blocks processed in the server
"timeoffset"(numeric)the time offset
"connections"(numeric)the number of connections
"proxy"(string, optional)the proxy used by the server
"difficulty"(numeric)the current difficulty
"testnet"(boolean)if the server is using testnet or not
"keypoololdest"(numeric)the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool
"keypoolsize"(numeric)how many new keys are pre-generated
"unlocked_until"(numeric)the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
"paytxfee"(numeric)the transaction fee set in COIN/kB
"relayfee"(numeric)minimum relay fee for non-free transactions in COIN/kB
"errors"(string)any error messages

Command:

./komodo-cli getinfo

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

Command:

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

help ( "command" )

The help method lists all commands, or all information for a specified command.

NameTypeDescription
"command"(string, optional)the command requiring assistance

NameTypeDescription
"command"(string, optional)the command requiring assistance

Command:

./komodo-cli help

Command:

./komodo-cli help getaddressbalance

stop

The stop method instructs the coin daemon to shut down.

The amount of time it takes to shut down the chain will vary depending on the chain's current state.

Forcefully stopping the chain should be avoided, as it may corrupt the local database. In the event of a corrupted database, the user will need to resync.

NameTypeDescription
(none)

NameTypeDescription
Komodo server stopping
[COIN] Komodo server stopping

Command:

./komodo-cli stop

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

Command:

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