# Control

The following RPC calls interact with the Tokel blockchain daemon, and are made available through the tokel-cli software.

The Tokel blockchain inherits all Komodo smartchain RPC's, but not all RPC's are enabled. For simplicity, our documentation only shows those commands that are enabled and available for use.

# getinfo

getinfo

The getinfo method returns an object containing various state info.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
"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

# 📌 Examples

Command:

./tokel-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

help ( "command" )

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

# Arguments

Name Type Description
"command" (string, optional) the command requiring assistance

# Response

Name Type Description
"command" (string, optional) the command requiring assistance

# 📌 Examples

Command:

./tokel-cli help

Command:

./tokel-cli help getaddressbalance

# stop

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.

WARNING

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.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
Tokel server stopping

# 📌 Examples

Command:

./tokel-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/