# Wallet

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.

# addmultisigaddress

addmultisigaddress nrequired [ "key", ... ] ( "account" )

The addmultisigaddress method adds a multi-signature address to the wallet, where nrequired indicates the number of keys (out of the total provided) required to execute a transaction.

The keys function as signatures, allowing multiple parties or entities to manage an account. Each key in the array can be an address or a hex-encoded public key.

TIP

DEPRECATED: If account is specified, the method assigns the multi-signature address to that account.

# Arguments

Name Type Description
nrequired (numeric, required) the number of required keys (out of the n submitted)
"keysobject" (string, required) a json array of addresses or hex-encoded public keys
"address" (string) the address or hex-encoded public key
"account" (string, optional) DEPRECATED: if provided, "account" MUST be set to the empty string "" to represent the default account; passing any other string will result in an error

# Response

Name Type Description
"address" (string) an address associated with the keys

# 📌 Examples

Add a multisig address from 2 addresses:

Command:

./tokel-cli addmultisigaddress 2 '["RSWwtqsNr9mW21UXRm6Lz4AzQnj4pVzzkp","RW8d8EChHTooVbwF3reqHYgkzWCnJFLXgh"]'

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": "addmultisigaddress", "params": [2, ["RL4CuA2MSAbBiqJKQEr2TKnKT2fSwK99mG","RBYVFCxpJdLgvUixhguxzuH1TJpoNLYCJ6"]] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# backupwallet

backupwallet "destination"

The backupwallet method safely copies the wallet.dat file to the indicated destination. The destination input accepts only alphanumeric characters.

TIP

This method requires that the coin daemon have the exportdir runtime parameter enabled.

# Arguments

Name Type Description
"destination" (string, required) the destination filename, saved in the directory set by the exportdir runtime parameter

# Response

Name Type Description
"path" (string) the full path of the destination file

# 📌 Examples

./tokel-cli backupwallet "mybackupdata"

/home/myusername/myexportdir/mybackupdata

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": "backupwallet", "params": ["backupdata"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# dumpprivkey

dumpprivkey "address"

The dumpprivkey method reveals the private key corresponding to the indicated address.

TIP

See also importprivkey.

# Arguments

Name Type Description
"address" (string, required) the address for the private key

# Response

Name Type Description
"data" (string) the private key

# 📌 Examples

Command:

./tokel-cli dumpprivkey "RTcwYaQPDVN7V9SdfFHARWnoB7vcpSfdvs"

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": "dumpprivkey", "params": ["RTcwYaQPDVN7V9SdfFHARWnoB7vcpSfdvs"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# dumpwallet

dumpwallet "filename"

The dumpwallet method dumps all transparent-address wallet keys into a file, using a human-readable format.

Overwriting an existing file is not permitted. The destination parameter accepts only alphanumeric characters.

TIP

This method requires that the coin daemon have the exportdir runtime parameter enabled.

# Arguments

Name Type Description
"filename" (string, required) the filename, saved in the folder set by the exportdir runtime parameter

# Response

Name Type Description
"path" (string) the full path of the destination file

# 📌 Examples

Command:

./tokel-cli dumpwallet "test"

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": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# encryptwallet

encryptwallet "passphrase"

WARNING

Using the encryptwallet method will shutdown the Komodo daemon (komodod).

TIP

This feature is available only on chains where -ac_public is enabled. Chains that feature private transactions cannot use this feature.

The encryptwallet method encrypts the wallet with the indicated passphrase.

For more information, please see these instructions: Encrypt Komodo's wallet.dat File (opens new window)

This method is for first-time encryption only. After the first encryption, any calls that interact with private keys will require the passphrase via walletpassphrase prior to calling the corresponding method. This includes methods that create a transaction, dump a private key for an address, sign a transaction, etc.

# Arguments

Name Type Description
passphrase (string) the passphrase for wallet encryption; the passphrase must be at least 1 character, but should be many

# Response

Text Response
wallet encrypted; Komodo server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.

# 📌 Examples

# Encrypt your wallet

Command:

./tokel-cli encryptwallet "mypassphrase"
# Unlock the wallet for 60 seconds

Command:

./tokel-cli walletpassphrase "mypassphrase" 60
# Lock the wallet again by removing the passphrase

Command:

./tokel-cli walletlock

As a json rpc call:

Command:

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

# getbalance

getbalance ( "account" minconf includeWatchonly )

The getbalance method returns the server's total available balance.

TIP

The account input is deprecated.

# Arguments

Name Type Description
"account" (string, optional) DEPRECATED if provided, it MUST be set to the empty string "" or to the string "*"
minconf (numeric, optional, default=1) only include transactions confirmed at least this many times
includeWatchonly (bool, optional, default=false) also include balance in watchonly addresses (see importaddress)

# Response

Name Type Description
amount (numeric) the total amount

# 📌 Examples

The total amount in the wallet:

Command:

./tokel-cli getbalance

The total amount in the wallet where at least five blocks are confirmed:

Command:

./tokel-cli getbalance "*" 5

As a json rpc call:

Command:

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

# getnewaddress

getnewaddress ( "account" )

The getnewaddress method returns a new address for receiving payments.

# Arguments

Name Type Description
"account" (string, optional) DEPRECATED: If provided, the account MUST be set to the empty string "" to represent the default account; passing any other string will result in an error

# Response

Name Type Description
"address" (string) the new address

# 📌 Examples

Command:

./tokel-cli getnewaddress

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": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# getrawchangeaddress

getrawchangeaddress

The getrawchangeaddress returns a new address that can be used to receive change.

TIP

This is for use with raw transactions, NOT normal use.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
"address" (string) the address

# 📌 Examples

Command:

./tokel-cli getrawchangeaddress

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": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# getreceivedbyaddress

getreceivedbyaddress "address" ( minconf )

The getreceivedbyaddress method returns the total amount received by the given address in transactions with at least minconf confirmations.

# Arguments

Name Type Description
"address" (string, required) the address for transactions
minconf (numeric, optional, default=1) only include transactions confirmed at least this many times

# Response

Name Type Description
amount (numeric) the total amount of the relevant coin received at this address

# 📌 Examples

Command:

./tokel-cli getreceivedbyaddress "RJSDZjp7kjBNhHsbECDE1jwYNK7af41pZN"

Command:

./tokel-cli getreceivedbyaddress "RJSDZjp7kjBNhHsbECDE1jwYNK7af41pZN" 0

Command:

./tokel-cli getreceivedbyaddress "RJSDZjp7kjBNhHsbECDE1jwYNK7af41pZN" 6

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": "getreceivedbyaddress", "params": ["RJSDZjp7kjBNhHsbECDE1jwYNK7af41pZN", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# gettransaction

gettransaction "txid" ( includeWatchonly )

The gettransaction method queries detailed information about transaction txid. This command applies only to txid's that are in the user's local wallet.

# Arguments

Name Type Description
"txid" (string, required) the transaction id
"includeWatchonly" (bool, optional, default=false) whether to include watchonly addresses in the returned balance calculation and in the details[] returned values

# Response

Name Type Description
"amount" (numeric) the transaction amount
"confirmations" (numeric) a confirmation number that is aware of the dPoW security service
"rawconfirmations" (numeric) the raw confirmations (number of blocks on top of this transaction's block)
"blockhash" (string) the block hash
"blockindex" (numeric) the block index
"blocktime" (numeric) the time in seconds since epoch (1 Jan 1970 GMT)
"txid" (string) the transaction id
"time" (numeric) the transaction time in seconds since epoch (1 Jan 1970 GMT)
"timereceived" (numeric) the time received in seconds since epoch (1 Jan 1970 GMT)
"details" : [ ... ] (array)
"account" (string) DEPRECATED the account name involved in the transaction; can be "" for the default account
"address" (string) the address involved in the transaction
"category" (string) the category - either send or receive
"amount" (numeric) the amount
"vout" (numeric) the vout value
"vjoinsplit" : [ ... ] (array of json objects)
"anchor" (string) merkle root of note commitment tree
"nullifiers" : [ ... ] (array of strings)
"hex" (string)
"commitments" : [ ... ] (array of strings)
"hex" (string)
"macs" : [ ... ] (array of strings)
"hex" (string)
"vpub_old" (numeric) the amount removed from the transparent value pool
"vpub_new" (numeric) the amount added to the transparent value pool
"hex" (string) transaction data translated into hex

# 📌 Examples

Command:

./tokel-cli gettransaction "34efdb82ec718dede04feccecdc44f119cb7263f11c56ec3d7bf6234c9d0e27a"

Command:

./tokel-cli gettransaction "34efdb82ec718dede04feccecdc44f119cb7263f11c56ec3d7bf6234c9d0e27a" true

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": "gettransaction", "params": ["34efdb82ec718dede04feccecdc44f119cb7263f11c56ec3d7bf6234c9d0e27a"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# getunconfirmedbalance

getunconfirmedbalance

The getunconfirmedbalance method returns the server's total unconfirmed balance.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
(none)

# 📌 Examples

Command:

./tokel-cli getunconfirmedbalance

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": "getunconfirmedbalance", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# getwalletinfo

getwalletinfo

The getwalletinfo method returns an object containing various information about the wallet state.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
"walletversion" (numeric) the wallet version
"balance" (numeric) the total confirmed balance of the wallet
"unconfirmed_balance" (numeric) the total unconfirmed balance of the wallet
"immature_balance" (numeric) the total immature balance of the wallet
"txcount" (numeric) the total number of transactions in the wallet
"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 configuration, given as the relevant COIN per KB

# 📌 Examples

Command:

./tokel-cli getwalletinfo

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": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# importaddress

importaddress "address" ( "label" rescan )

The importaddress method adds an address or script (in hex) that can be watched as if it were in your wallet, although it cannot be used to spend.

TIP

This call can take an increased amount of time to complete if rescan is true.

# Arguments

Name Type Description
"address" (string, required) the address to watch
"label" (string, optional, default="") an optional label
rescan (boolean, optional, default=true) rescan the wallet for transactions

# Response

Name Type Description
(none)

# 📌 Examples

Import an address with rescan:

Command:

./tokel-cli importaddress "RJSDZjp7kjBNhHsbECDE1jwYNK7af41pZN"

Command:

./tokel-cli importaddress "RJSDZjp7kjBNhHsbECDE1jwYNK7af41pZN" "testing" false

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": "importaddress", "params": ["R9z796AehK5b6NCPeVkGUHSpJnawerf8oP", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# importprivkey

importkey "komodoprivkey" ( "label" rescan )

The importprivkey method adds a private key to your wallet.

TIP

This call can take minutes to complete if rescan is true.

TIP

See also dumpprivkey.

# Arguments

Name Type Description
"privkey" (string, required) the private key (see dumpprivkey)
"label" (string, optional, default="") an optional label
rescan (boolean, optional, default=true) rescan the wallet for transactions
block (integer, optional) block height to rescan from

# Response

Name Type Description
addresses (string) the public address

# 📌 Examples

Command:

./tokel-cli importprivkey "DONOTUSExxxxxxxxxxxxxxxxxxxxj4Xu9jjinhLpffhdtoKg5gar2"

Command:

./tokel-cli importprivkey "DONOTUSExxxxxxxxxxxxxxxxxxxxj4Xu9jjinhLpffhdtoKg5gar2" "testing" false

Command:

./tokel-cli importprivkey "DONOTUSExxxxxxxxxxxxxxxxxxxxj4Xu9jjinhLpffhdtoKg5gar2" "testing" true 1762762

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": "importprivkey", "params": ["UwibHKsYfiM19BXQmcUwAfw331GzGQK8aoPqqYEbyoPrzc2965nE", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# importwallet

importwallet "filename"

The importwallet method imports transparent-address keys from a wallet-dump file (see dumpwallet).

# Arguments

Name Type Description
"filename" (string, required) the wallet file

# Response

Name Type Description
(none)

# 📌 Examples

Command:

./tokel-cli importwallet "path/to/exportdir/nameofbackup"

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": "importwallet", "params": ["path/to/exportdir/nameofbackup"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# keypoolrefill

keypoolrefill ( newsize )

The keypoolrefill method refills the keypool.

# Arguments

Name Type Description
newsize (numeric, optional, default=100) the new keypool size

# Response

Name Type Description
(none)

# 📌 Examples

Command:

./tokel-cli keypoolrefill

Command:

./tokel-cli keypoolrefill 100

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": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

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": "listaccounts", "params": [6] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# listaddressgroupings

listaddressgroupings

The listaddressgroupings method lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
"address", (string) the address
amount, (numeric) the amount

# 📌 Examples

Command:

./tokel-cli listaddressgroupings

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": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# listlockunspent

listlockunspent

The listlockunspent method returns a list of temporarily non-spendable outputs.

TIP

See the lockunspent call to lock and unlock transactions for spending.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
"txid" (string) the transaction id locked
"vout" (numeric) the vout value

# 📌 Examples

Command:

./tokel-cli listlockunspent

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": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# listreceivedbyaddress

listreceivedbyaddress ( minconf includeempty includeWatchonly)

The listreceivedbyaddress method lists balances by receiving address.

# Arguments

Name Type Description
minconf (numeric, optional, default=1) the minimum number of confirmations before payments are included
includeempty (numeric, optional, default=false) whether to include addresses that haven't received any payments
includeWatchonly (bool, optional, default=false) whether to include watchonly addresses (see 'importaddress')

# Response

Name Type Description
"involvesWatchonly" (bool) only returned if imported addresses were involved in transaction
"address" (string) the receiving address
"account" (string) DEPRECATED the account of the receiving address; the default account is ""
"amount" (numeric) the total amount received by the address
"confirmations" (numeric) a confirmation number that is aware of the dPoW security service
"rawconfirmations" (numeric) the raw confirmations of the most recent transaction included (number of blocks on top of this transaction's block)

# 📌 Examples

Command:

./tokel-cli listreceivedbyaddress

Command:

./tokel-cli listreceivedbyaddress 6 true

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": "listreceivedbyaddress", "params": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# listsinceblock

listsinceblock ( "blockhash" target-confirmations includeWatchonly )

The listsinceblock method queries all transactions in blocks since block blockhash, or all transactions if blockhash is omitted.

# Arguments

Name Type Description
"blockhash" (string, optional) the block hash from which to list transactions
target-confirmations (numeric, optional) the confirmations required (must be 1 or more)
includeWatchonly (bool, optional, default=false) include transactions to watchonly addresses (see also 'importaddress')

# Response

Name Type Description
"transactions":
"account" (string) DEPRECATED the account name associated with the transaction; will be "" for the default account
"address" (string) the address of the transaction (not present for move transactions -- category = move)
"category" (string) the transaction category; send has negative amounts, receive has positive amounts
"amount" (numeric) the amount of the relevant currency -- negative for the send category, and for the move category for moves outbound. It is positive for the receive category, and for the move category for inbound funds.
"vout" (numeric) the vout value
"fee" (numeric) the amount of the fee; this value is negative and only available for the send category of transactions
"confirmations" (numeric) a confirmation number that is aware of the dPoW security service
"rawconfirmations" (numeric) the raw confirmations of the transaction; available for send and receive category of transactions (number of blocks on top of this transaction's block)
"blockhash" (string) the block hash containing the transaction; available for the send and receive categories of transactions
"blockindex" (numeric) the block index containing the transaction; available for the send and receive categories of transactions
"blocktime" (numeric) the block time in seconds since epoch (1 Jan 1970 GMT)
"txid" (string) the transaction id; available for send and receive categories of transactions
"time" (numeric) the transaction time in seconds since epoch (Jan 1 1970 GMT)
"timereceived" (numeric) the time received in seconds since epoch (Jan 1 1970 GMT); available for send and receive category of transactions
"comment" (string) whether a comment is associated with the transaction
"to" (string) whether a 'to' comment is associated with the transaction
"lastblock" (string) the hash of the last block

# 📌 Examples

Command:

./tokel-cli listsinceblock

Command:

./tokel-cli listsinceblock "029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327" 6

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": "listsinceblock", "params": ["029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# listtransactions

listtransactions ( "account" count from includeWatchonly )

The listtransactions method returns up to count most recent transactions skipping the first from transactions for account.

# Arguments

Name Type Description
"account" (string, optional) DEPRECATED the account name; should be "*"
count (numeric, optional, default=10) the number of transactions to return
from (numeric, optional, default=0) the number of transactions to skip
includeWatchonly (bool, optional, default=false) include transactions to watchonly addresses (see importaddress)

# Response

Name Type Description
"account" (string) DEPRECATED the account name associated with the transaction; it will be "" for the default account
"address" (string) the address of the transaction; not present for move transactions (category = move)
"category" (string) The transaction category. This property can be send
"amount" (numeric) The amount. This value is negative for the send category, and for the move category for moves outbound. It is positive for the receive category and for the move category for inbound funds.
"vout" (numeric) the vout value
"fee" (numeric) the amount of the fee; this is negative and only available for the send category of transactions
"confirmations" (numeric) a confirmation number that is aware of the dPoW security service
"rawconfirmations" (numeric) the raw confirmations of the transaction; available for send and receive category of transactions (number of blocks on top of this transaction's block)
"blockhash" (string) the block hash containing the transaction; available for the send and receive categories of transactions
"blockindex" (numeric) the block index containing the transaction; available for the send and receive categories of transactions
"txid" (string) the transaction id; available for the send and receive categories of transactions
"time" (numeric) the transaction time in seconds since epoch (midnight Jan 1 1970 GMT)
"timereceived" (numeric) the time received in seconds since epoch (midnight Jan 1 1970 GMT); available for the send and receive categories of transactions
"comment" (string) whether a comment is associated with the transaction
"otheraccount" (string) for the move category of transactions; indicates the account which sent the funds (for receiving funds, positive amounts), or went to (for sending funds, negative amounts)
"size" (numeric) transaction size in bytes

# 📌 Examples

Command:

./tokel-cli listtransactions

Command:

./tokel-cli listtransactions "*" 20 100

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": "listtransactions", "params": ["*", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# listunspent

listunspent ( minconf maxconf ["address", ... ] )

The listunspent method returns an array of unspent transaction outputs, with a range between minconf and maxconf (inclusive) confirmations. The method can, optionally, filter to only include txouts paid to specified addresses.

# Arguments

Name Type Description
minconf (numeric, optional, default=1) the minimum confirmations to filter
maxconf (numeric, optional, default=9999999) the maximum confirmations to filter
"address" (string) a series of addresses

# Response

Name Type Description
"txid" (string) the transaction id
"vout" (numeric) the vout value
"generated" (boolean) true if txout is a coinbase transaction output
"address" (string) the address
"account" (string) DEPRECATED the associated account, or "" for the default account
"scriptPubKey" (string) the script key
"amount" (numeric) the transaction amount
"confirmations" (numeric) a confirmation number that is aware of the dPoW security service
"rawconfirmations" (numeric) the raw confirmations (number of blocks on top of this transaction's block)

# 📌 Examples

Command:

./tokel-cli listunspent

Command:

./tokel-cli listunspent 6 9999999 '["RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu","RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ"]'

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": "listunspent", "params": [6, 9999999, ["RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu","RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ"]] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# lockunspent

lockunspent unlock [{ "txid": "txid", "vout": n }, ... ]

The lockunspent method locks (unlock = false) or unlocks (unlock = true) specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection, when spending the relevant coin. The locks are stored in memory only; at runtime a node always starts with zero locked outputs, and the locked output list is always cleared when a node stops or fails.

TIP

See the listunspent and listlockunspent calls to determine local transaction state and info.

# Arguments

Name Type Description
unlock (boolean, required) whether to unlock (true) or lock (false) the specified transactions
"txid" (string) the transaction id
"vout" (numeric) the output number

# Response

Name Type Description
true/false (boolean) whether the command was successful

# 📌 Examples

Command:

./tokel-cli lockunspent false '[{"txid":"d7ba45296c66e16eb61f27a4eef8848c7f5579fe801f277c1b0e074a4f47d6fd","vout":0}]'

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": "lockunspent", "params": [false, [{"txid":"d7ba45296c66e16eb61f27a4eef8848c7f5579fe801f277c1b0e074a4f47d6fd","vout":0}]] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# resendwallettransactions

resendwallettransactions

The resendwallettransactions method immediately re-broadcasts unconfirmed wallet transactions to all peers. This method is intended only for testing; the wallet code periodically re-broadcasts automatically.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
"transaction_id" (string) an array of the rebroadcasted transaction id's

# 📌 Examples

Command:

./tokel-cli resendwallettransactions

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": "resendwallettransactions", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# sendmany

sendmany "account" { "address": amount, ... } ( minconf "comment" [ "address", ... ] )

The sendmany method can send multiple transactions at once. Amounts are double-precision floating point numbers.

# Arguments

Name Type Description
"account" (string, required) MUST be set to the empty string "" to represent the default account; passing any other string will result in an error
"amounts" { "address":amount, ... } ("string":numeric) the address (string) and the value (double-precision floating numeric)
minconf (numeric, optional, default=1) only use the balance confirmed at least this many times
"comment" (string, optional) a comment
subtractfeefromamount (string, optional) a json array with addresses. The fee will be equally deducted from the amount of each selected address; the recipients will receive less than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee.
"address" (string) subtract fee from this address

# Response

Name Type Description
"transaction_id" (string) the transaction id for the send; only 1 transaction is created regardless of the number of addresses

# 📌 Examples

Command:

./tokel-cli sendmany "" '{"RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ":0.01,"RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu":0.02}'

Command:

./tokel-cli sendmany "" '{"RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ":0.01,"RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu":0.02}' 6 "testing"

Command:

./tokel-cli sendmany "" '{"RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ":0.01,"RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu":0.02}' 1 "" '["RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ","RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu"]'

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": "sendmany", "params": ["", {"RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ":0.01,"RPS3xTZCzr6aQfoMw5Bu1rpQBF6iVCWsyu":0.02}, 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# sendtoaddress

sendtoaddress "address" amount ( "comment" "comment-to" subtractfeefromamount "OP_RETURN")

The sendtoaddress method sends an amount to a given address. The amount is real and is rounded to the nearest 0.00000001.

# Arguments

Name Type Description
"komodoaddress" (string, required) the receiving address
"amount" (numeric, required) the amount to send (json requires all decimals values less than 1 begin with the characters '0.')
"comment" (string, optional) a comment used to store what the transaction is for; this is not part of the transaction, just kept in your wallet
"comment-to" (string, optional) a comment to store the name of the person or organization to which you're sending the transaction; this is stored in your local wallet file only
subtractfeefromamount (boolean, optional, default=false) when true, the fee will be deducted from the amount being sent
OP_RETURN (string, optional) the hexdata to be stored as part of the OP_RETURN of the transaction; the number of characters must be even, the user may add a padding 0 at the beginning if necessary; available in master branch after the Notary Network Upgrade of 2020

# Response

Name Type Description
"transaction_id" (string) the transaction id

# 📌 Examples

Command:

./tokel-cli sendtoaddress "RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ" 0.1

Command:

./tokel-cli sendtoaddress "RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ" 0.1 "donation" "seans outpost"

Command:

./tokel-cli sendtoaddress "RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ" 0.1 "" "" true

Command:

./tokel-cli sendtoaddress "RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ" 0.1 "" "" false "c5727cafd7d6dfc888d4a0596dc58bfafb24859e29f827e1bf1443037d8461fc"

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": "sendtoaddress", "params": ["RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# setpubkey

setpubkey pubkey

The setpubkey method sets the indicated pubkey. This method can be used in place of the pubkey launch parameter, when necessary.

Visit the section pubkey to understand when it is essential to set a pubkey and the consequences of setting it.

WARNING

This method works only once per daemon start. It can't be used to change the pubkey that has already been set.

# Arguments

Name Type Description
pubkey (string) the desired pubkey

# Response

Name Type Description
pubkey (string) the pubkey
ismine (boolean) indicates whether the address belongs to the user
R-address (string) the public address associated with the pubkey

# 📌 Examples

Command:

./tokel-cli setpubkey 0260801166cebdc9be1e3460ba9e4959fb29feee7725f565ffc296fa4636aa706f

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

Command:

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

# settxfee

settxfee amount

The settxfee method sets the transaction fee per kB.

# Arguments

Name Type Description
amount (numeric, required) the transaction fee in COIN/kB rounded to the nearest 0.00000001

# Response

Name Type Description
true/false (boolean) returns true if successful

# 📌 Examples

Command:

./tokel-cli settxfee 0.00001

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": "settxfee", "params": [0.00001] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# signmessage

signmessage "address" "message"

The signmessage method signs a message via the private key of an address.

# Arguments

Name Type Description
"address" (string, required) the address to use for the private key
"message" (string, required) the message

# Response

Name Type Description
"signature" (string) the signature of the message encoded in base 64

# 📌 Examples

Create the signature:

Command:

./tokel-cli signmessage "RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ" "my message"

Verify the signature:

Command:

./tokel-cli verifymessage "RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ" "H1y0mn/wRv56r1bcfkbQtzjG6XeWSelAsyayBuCwEL9XGXs7ieU55dryt/cFWM9gnRFI7gS01AByuSqRs+o/AZs=" "my message"

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": "signmessage", "params": ["RBtNBJjWKVKPFG4To5Yce9TWWmc2AenzfZ", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:$rpcport/

# walletlock

walletlock

TIP

The walletlock method is neither active nor visible in the help method until the encryptwallet passphrase is set.

TIP

This feature is available only on chains where -ac_public is enabled. Chains that feature private transactions cannot use this feature.

The walletlock method re-locks a wallet that has a passphrase enabled via encryptwallet.

# Arguments

Name Type Description
(none)

# Response

Name Type Description
(none)

# 📌 Examples

Command:

./tokel-cli walletlock

# walletpassphrase

walletpassphrase "passphrase" (timeout)

TIP

The walletpassphrase method is neither active nor visible in the help method until the encryptwallet passphrase is set.

TIP

This feature is available only on chains where -ac_public is enabled. Chains that feature private transactions cannot use this feature.

The walletpassphrase method unlocks the wallet using the passphrase that was set by the encryptwallet method.

The timeout argument can be included to limit the length of time (in seconds) the wallet will remain unlocked.

# Arguments

Name Type Description
"passphrase" (string) the passphrase that was set by the encryptwallet method
timeout (number in seconds, optional) the amount of time for which the wallet should remember the passphrase

# Response

Name Type Description
(none)

# 📌 Examples

Command:

./tokel-cli walletpassphrase

# walletpassphrasechange

walletpassphrasechange "oldpassphrase" "newpassphrase"

TIP

The walletpassphrasechange method is neither active nor visible in the help method until the encryptwallet passphrase is set.

TIP

This feature is available only on chains where -ac_public is enabled. Chains that feature private transactions cannot use this feature.

The walletpassphrasechange method changes "oldpassphrase" to "newpassphrase".

# Arguments

Name Type Description
"oldpassphrase" (string) the old passphrase
"newpassphrase" (string) the new passphrase

# Response

Name Type Description
(none)

# 📌 Examples

Command:

./tokel-cli walletpassphrasechange "oldpassphrase" "newpassphrase"

# z_commands

WARNING

The Tokel blockchain does not have these commands enabled.

The Tokel blockchain inherits all Komodo smartchain RPC's, but not all RPC's are enabled. Tokel does not have Z transactions (private transaction) enabled.