开发人员和加密货币交易所的文档

RPC API Reference

tkeycoin-cli getbestblockhash

Returns the hash of the best (tip) block in the longest blockchain.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getblock

getblock "blockhash" ( verbosity )

If verbosity is 0, returns a string that is serialized, hex-encoded data for block ‘hash’.

If verbosity is 1, returns an Object with information about block hash.

If verbosity is 2, returns an Object with information about block hash and information about each transaction

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblock", "params": ["0000000059a2b0c0309ff6ed14c2510285c8ecc7a6f55d9d4d42d5ef2f32f575"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getblockcount

Returns the number of blocks in the longest blockchain.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getblockhash

tkeycoin-cli getblockhash 1000

Returns hash of block in best-block-chain at height provided.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockhash", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getblockheader

getblockheader "blockhash" ( verbose )

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’.

Argument #1 - blockhash

Type: string, required
The block hash

Argument #2 - verbose

Type: boolean, optional, default=true

true for a json object, false for the hex-encoded data

If verbose is true, returns an Object with information about blockheader hash.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getblockstats

Returns the hash of the best (tip) block in the longest blockchain.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getchaintips

Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintips", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getchaintxstats

getchaintxstats ( nblocks "blockhash" )

Compute statistics about the total number and rate of transactions in the chain.

Argument #1 - nblocks

Type: numeric, optional, default=one month
Size of the window in number of blocks

Argument #2 - blockhash

Type: string, optional, default=chain tip
The hash of the block that ends the window

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintxstats", "params": [2016] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getdifficulty

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getmempoolancestors

getmempoolancestors "txid" ( verbose )

If txid is in the mempool, returns all in-mempool ancestors.

Argument #1 - txid

Type: string, required
The transaction id (must be in mempool)

Argument #2 - verbose

Type: boolean, optional, default=false True for a json object, false for array of transaction ids

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolancestors", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getmempooldescendants

getmempooldescendants "txid" ( verbose )

If txid is in the mempool, returns all in-mempool descendants.

Argument #1 - txid Type: string, required
The transaction id (must be in mempool)

Argument #2 - verbose

Type: boolean, optional, default=false
True for a json object, false for array of transaction ids

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getmempoolentry

getmempoolentry "txid"

Returns mempool data for given transaction

Argument #1 - txid

Type: string, required

The transaction id (must be in mempool)

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolentry", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getmempoolinfo

Returns details on the active state of the TX memory pool.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getrawmempool

getrawmempool ( verbose )

Returns all transaction ids in memory pool as a json array of string transaction ids.

Hint: use getmempoolentry to fetch a specific transaction from the mempool.

Argument #1 - verbose

Type: boolean, optional, default=false
True for a json object, false for array of transaction ids

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawmempool", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli gettxout

gettxout "txid" n ( include_mempool )

Returns details about an unspent transaction output.

Argument #1 - txid

Type: string, required
The transaction id

Argument #2 - n

Type: numeric, required
vout number

Argument #3 - include_mempool

Type: boolean, optional, default=true
Whether to include the mempool. Note that an unspent output that is spent in the mempool won’t appear

Get unspent transactions:
tkeycoin-cli listunspent

View the details:
tkeycoin-cli gettxout "txid" 1 curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxout", "params": ["txid", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli gettxoutproof

gettxoutproof ["txid",...] ( "blockhash" )

Returns a hex-encoded proof that “txid” was included in a block.

NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included manually (by blockhash).

Argument #1 - txids

Type: json array, required
A json array of txids to filter

[
"txid", (string) A transaction hash
...
]


Argument #2 - blockhash

Type: string, optional
If specified, looks for txid in the block with this hash

tkeycoin-cli gettxoutsetinfo

Returns statistics about the unspent transaction output set.

Note this call may take some time.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli preciousblock

preciousblock "blockhash"

Treats a block as if it were received before others with the same work.

A later preciousblock call can override the effect of an earlier one.

The effects of preciousblock are not retained across restarts.

Argument #1 - blockhash

Type: string, required
the hash of the block to mark as precious

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "preciousblock", "params": ["blockhash"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli savemempool

Dumps the mempool to disk. It will fail until the previous dump is fully loaded.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "savemempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli verifychain

verifychain ( checklevel nblocks )

Verifies blockchain database.

Argument #1 - checklevel

Type: numeric, optional, default=3, range=0-4
How thorough the block verification is.

Argument #2 - nblocks

Type: numeric, optional, default=6, 0=all
The number of blocks to check.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli verifytxoutproof

verifytxoutproof "proof"

Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain

Argument #1 - proof

Type: string, required

The hex-encoded proof generated by gettxoutproof

tkeycoin-cli getmemoryinfo

getmemoryinfo ( "mode" )

Returns an object containing information about memory usage.

Argument #1 - mode

Type: string, optional, default=”stats”
determines what kind of information is returned.
“stats” returns general statistics about memory usage in the daemon.
“mallocinfo” returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+)

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getrpcinfo

Returns details of the RPC server.

tkeycoin-cli logging

logging ( ["include_category",...] ["exclude_category",...] )

Gets and sets the logging configuration.

When called without an argument, returns the list of categories with status that are currently being debug logged or not.

When called with arguments, adds or removes categories from debug logging and return the lists above.

The arguments are evaluated in order “include”, “exclude”.

If an item is both included and excluded, it will thus end up being excluded.

The valid logging categories are: net, tor, mempool, http, bench, zmq, db, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb In addition, the following are available as category names with special meanings:

“all”, “1” : represent all logging categories.

“none”, “0” : even if other logging categories are specified, ignore all of them.

Argument #1 - include

Type: json array, optional
A json array of categories to add debug logging

[
"include_category", (string) the valid logging category
...
]


Argument #2 - exclude

Type: json array, optional
A json array of categories to remove debug logging

[
"exclude_category", (string) the valid logging category
...
]


Result

{ (json object where keys are the logging categories, and values indicates its status
"category": true|false, (bool) if being debug logged or not. false:inactive, true:active
...
}


tkeycoin-cli logging "[\"all\"]" "[\"http\"]"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "logging", "params": [["all"], ["libevent"]] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoind stop

Stop Tkeycoin server.

tkeycoin-cli uptime

Returns the total uptime of the server.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "uptime", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli generate

generate nblocks ( maxtries )

Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.

Argument #1 - nblocks

Type: numeric, required
How many blocks are generated immediately.

Argument #2 - maxtries

Type: numeric, optional, default=1000000
How many iterations to try.

Generate 11 blocks:

tkeycoin-cli generate 11

tkeycoin-cli generatetoaddress

generatetoaddress nblocks "address" ( maxtries )

Mine blocks immediately to a specified address (before the RPC call returns)

Argument #1 - nblocks

Type: numeric, required

How many blocks are generated immediately.

Argument #2 - address

Type: string, required

The address to send the newly generated tkeycoin to.

Argument #3 - maxtries

Type: numeric, optional, default=1000000

How many iterations to try

Generate 11 blocks to myaddress:

tkeycoin-cli generatetoaddress 11 "myaddress"

If you are running the tkeycoin core wallet, you can get a new address to send the newly generated tkeycoin to with::

tkeycoin-cli getnewaddress

tkeycoin-cli addnode

addnode "node" "command"

Attempts to add or remove a node from the addnode list.

Or try a connection to a node once.

Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).

Argument #1 - node

Type: string, required
The node (see getpeerinfo for nodes)

Argument #2 - command

Type: string, required

‘add’ to add a node to the list, ‘remove’ to remove a node from the list, ‘onetry’ to try a connection to the node once

tkeycoin-cli addnode "192.168.0.6:20045" "onetry"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addnode", "params": ["192.168.0.6:20045", "onetry"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli clearbanned

Clear all banned IPs.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli disconnectnode

disconnectnode ( "address" nodeid )

Immediately disconnects from the specified peer node.

Strictly one out of ‘address’ and ‘nodeid’ can be provided to identify the node.

To disconnect by nodeid, either set ‘address’ to the empty string, or call using the named ‘nodeid’ argument only.

Argument #1 - address

Type: string, optional, default=fallback to nodeid
The IP address/port of the node

Argument #2 - nodeid

Type: numeric, optional, default=fallback to address

The node ID (see getpeerinfo for node IDs)

tkeycoin-cli disconnectnode "192.168.0.6:20045"

tkeycoin-cli disconnectnode "" 1

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["192.168.0.6:20045"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getaddednodeinfo

getaddednodeinfo ( "node" )

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)

Argument #1 - node

Type: string, optional, default=all nodes

If provided, return information about this specific node, otherwise all nodes are returned.

tkeycoin-cli getaddednodeinfo "192.168.0.201"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddednodeinfo", "params": ["192.168.0.201"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getconnectioncount

Returns the number of connections to other nodes.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getnettotals

Returns information about network traffic, including bytes in, bytes out, and current time.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getnetworkinfo

Returns an object containing various state info regarding P2P networking.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getnodeaddresses

getnodeaddresses ( count )

Return known addresses which can potentially be used to find new nodes in the network

Argument #1 - count

Type: numeric, optional, default=1

How many addresses to return. Limited to the smaller of 2500 or 23% of all known addresses.

tkeycoin-cli getnodeaddresses 8

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnodeaddresses", "params": [8] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getpeerinfo

Returns data about each connected network node as a json array of objects.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listbanned

List all banned IPs/Subnets.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli ping

Requests that a ping be sent to all other nodes, to measure ping time.

Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.

Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "ping", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli setban

setban "subnet" "command" ( bantime absolute )

Attempts to add or remove an IP/Subnet from the banned list.

Argument #1 - subnet

Type: string, required
The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)

Argument #2 - command

Type: string, required
‘add’ to add an IP/Subnet to the list, ‘remove’ to remove an IP/Subnet from the list

Argument #3 - bantime

Type: numeric, optional, default=0
time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)

Argument #4 - absolute

Type: boolean, optional, default=false
If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT).

tkeycoin-cli setban "192.168.0.6" "add" 86400

tkeycoin-cli setban "192.168.0.0/24" "add"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setban", "params": ["192.168.0.6", "add", 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli setnetworkactive

setnetworkactive state

Disable/enable all p2p network activity.

Argument #1 - state

Type: boolean, required

true to enable networking, false to disable

tkeycoin-cli analyzepsbt

analyzepsbt "psbt"

Analyzes and provides information about the current status of a PSBT and its inputs

Argument #1 - psbt

Type: string, required

A base64 string of a PSBT

tkeycoin-cli analyzepsbt "psbt"

tkeycoin-cli combinepsbt

combinepsbt ["psbt",...]

Combine multiple partially signed tkeycoin transactions into one transaction.

Implements the Combiner role.

Argument #1 - txs

Type: json array, required

A json array of base64 strings of partially signed transactions

[
"psbt", (string) A base64 string of a PSBT
...
]


tkeycoin-cli combinepsbt ["mybase64_1", "mybase64_2", "mybase64_3"]

tkeycoin-cli combinerawtransaction

combinerawtransaction ["hexstring",...]

Combine multiple partially signed transactions into one transaction.

The combined transaction may be another partially signed transaction or a fully signed transaction.

Argument #1 - txs

Type: json array, required

A json array of hex strings of partially signed transactions

[
"hexstring", (string) A transaction hash
...
]


tkeycoin-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"]

tkeycoin-cli converttopsbt

converttopsbt "hexstring" ( permitsigdata iswitness )

Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction createpsbt and walletcreatefundedpsbt should be used for new applications.

Argument #1 - hexstring

Type: string, required
The hex string of a raw transaction

Argument #2 - permitsigdata

Type: boolean, optional, default=false
If true, any signatures in the input will be discarded and conversion.
will continue. If false, RPC will fail if any signatures are present.

Argument #3 - iswitness

Type: boolean, optional, default=depends on heuristic tests
Whether the transaction hex is a serialized witness transaction.
If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserializaion will be tried. If false, only non-witness deserialization will be tried. Only has an effect if permitsigdata is true

Create a transaction:

tkeycoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

Convert the transaction to a PSBT:

tkeycoin-cli converttopsbt "rawtransaction"

tkeycoin-cli createpsbt

createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )

Creates a transaction in the Partially Signed Transaction format.

Implements the Creator role.

Argument #1 - inputs

Type: json array, required

A json array of json objects

[
{ (json object)
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
"sequence": n, (numeric, optional, default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number
},
...
]


Argument #2 - outputs

Type: json array, required

a json array with outputs (key-value pairs), where none of the keys are duplicated.
That is, each address can only appear once and there can only be one ‘data’ object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.

[
{ (json object)
"address": amount, (numeric or string, required) A key-value pair. The key (string) is the tkeycoin address, the value (float or string) is the amount in TKEY
},
{ (json object)
"data": "hex", (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
},
...
]


Argument #3 - locktime

Type: numeric, optional, default=0
Raw locktime. Non-0 value also locktime-activates inputs

Argument #4 - replaceable

Type: boolean, optional, default=false

Marks this transaction as BIP125 replaceable.
Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible

tkeycoin-cli createpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

tkeycoin-cli createrawtransaction

createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )

Create a transaction spending the given inputs and creating new outputs.

Outputs can be addresses or data.

Returns hex-encoded raw transaction.

Note that the transaction’s inputs are not signed, and it is not stored in the wallet or transmitted to the network.

Argument #1 - inputs

Type: json array, required

A json array of json objects

[
{ (json object)
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
"sequence": n, (numeric, optional, default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number
},
...
]


Argument #2 - outputs

Type: json array, required

a json array with outputs (key-value pairs), where none of the keys are duplicated.
That is, each address can only appear once and there can only be one ‘data’ object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.

[
{ (json object)
"address": amount, (numeric or string, required) A key-value pair. The key (string) is the tkeycoin address, the value (float or string) is the amount in TKEY
},
{ (json object)
"data": "hex", (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
},
...
]


Argument #3 - locktime

Type: numeric, optional, default=0

Raw locktime. Non-0 value also locktime-activates inputs

Argument #4 - replaceable

Type: boolean, optional, default=false

Marks this transaction as BIP125-replaceable.
Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible

tkeycoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"address\":0.01}]"

tkeycoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"address\":0.01}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"data\":\"00010203\"}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli decodepsbt

decodepsbt "psbt"

Return a JSON object representing the serialized, base64-encoded partially signed tkeycoin transaction.

Argument #1 - psbt

Type: string, required

The PSBT base64 string

tkeycoin-cli decodepsbt "psbt"

tkeycoin-cli decoderawtransaction

decoderawtransaction "hexstring" ( iswitness )

Return a JSON object representing the serialized, hex-encoded transaction.

Argument #1 - hexstring

Type: string, required

The transaction hex string

Argument #2 - iswitness

Type: boolean, optional, default=depends on heuristic tests

Whether the transaction hex is a serialized witness transaction
If iswitness is not present, heuristic tests will be used in decoding

tkeycoin-cli decoderawtransaction "hexstring"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decoderawtransaction", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli decodescript

decodescript "hexstring"

Decode a hex-encoded script.

Argument #1 - hexstring

Type: string, required

the hex-encoded script

tkeycoin-cli decodescript "hexstring"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli finalizepsbt

finalizepsbt "psbt" ( extract )

Finalize the inputs of a PSBT. If the transaction is fully signed, it will produce a network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete.

Implements the Finalizer and Extractor roles.

Argument #1 - psbt

Type: string, required

A base64 string of a PSBT

Argument #2 - extract

Type: boolean, optional, default=true

If true and the transaction is complete,
extract and return the complete transaction in normal network serialization instead of the PSBT.

tkeycoin-cli finalizepsbt "psbt"

tkeycoin-cli fundrawtransaction

fundrawtransaction "hexstring" ( options iswitness )

Add inputs to a transaction until it has enough in value to meet its out value.

This will not modify existing inputs, and will add at most one change output to the outputs.

No existing outputs will be modified unless “subtractFeeFromOutputs” is specified.

Note that inputs which were signed may need to be resigned after completion since in/outputs have been added.

The inputs added will not be signed, use signrawtransactionwithkey or signrawtransactionwithwallet for that.
Note that all existing inputs must have their previous output transaction be in the wallet.

Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees).

You can see whether this is the case by checking the “solvable” field in the listunspent output.

Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only

Argument #1 - hexstring

Type: string, required

The hex string of the raw transaction

Argument #2 - options

Type: json object, optional

for backward compatibility: passing in a true instead of an object will result in {“includeWatching”:true}

“replaceable”: bool, (boolean, optional, default=fallback to wallet’s default) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees “conf_target”: n, (numeric, optional, default=fallback to wallet’s default) Confirmation target (in blocks) “estimate_mode”: “str”, (string, optional, default=UNSET) The fee estimate mode, must be one of: “UNSET” “ECONOMICAL” “CONSERVATIVE” }
{
"changeAddress": "str", (string, optional, default=pool address) The tkeycoin address to receive the change
"changePosition": n, (numeric, optional, default=random) The index of the change output
"change_type": "str", (string, optional, default=set by -changetype) The output type to use. Only valid if changeAddress is not specified. Options are "legacy", "p2sh-segwit", and "bech32".
"includeWatching": bool, (boolean, optional, default=false) Also select inputs which are watch only
"lockUnspents": bool, (boolean, optional, default=false) Lock selected unspent outputs
"feeRate": amount, (numeric or string, optional, default=not set: makes wallet determine the fee) Set a specific fee rate in TKEY/kB
"subtractFeeFromOutputs": [ (json array, optional, default=empty array) A json array of integers.
The fee will be equally deducted from the amount of each specified output.
Those recipients will receive less tkeycoins than you enter in their corresponding amount field.
If no outputs are specified here, the sender pays the fee.
vout_index, (numeric) The zero-based output index, before a change output is added.
...
],


Argument #3 - iswitness

Type: boolean, optional, default=depends on heuristic tests

Whether the transaction hex is a serialized witness transaction
If iswitness is not present, heuristic tests will be used in decoding

Create a transaction with no inputs:

tkeycoin-cli createrawtransaction "[]" "{\"myaddress\":0.01}"

Add sufficient unsigned inputs to meet the output value:

tkeycoin-cli fundrawtransaction "rawtransactionhex"

Sign the transaction:

tkeycoin-cli signrawtransactionwithwallet "fundedtransactionhex"

Send the transaction:

tkeycoin-cli sendrawtransaction "signedtransactionhex"

tkeycoin-cli getrawtransaction

getrawtransaction "txid" ( verbose "blockhash" )

Return the raw transaction data.

By default this function only works for mempool transactions. When called with a blockhash argument, getrawtransaction will return the transaction if the specified block is available and the transaction is found in that block. When called without a blockhash argument, getrawtransaction will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction is in a block in the blockchain.

Hint: Use gettransaction for wallet transactions.

If verbose is ‘true’, returns an Object with information about ‘txid’.

If verbose is ‘false’ or omitted, returns a string that is serialized, hex-encoded data for ‘txid’.

Argument #1 - txid

Type: string, required
The transaction id

Argument #2 - verbose

Type: boolean, optional, default=false

If false, return a string, otherwise return a json object

Argument #3 - blockhash

Type: string, optional

The block in which to look for the transaction.

tkeycoin-cli getrawtransaction "mytxid"

tkeycoin-cli getrawtransaction "mytxid" true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawtransaction", "params": ["mytxid", true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getrawtransaction "mytxid" false "myblockhash"

tkeycoin-cli getrawtransaction "mytxid" true "myblockhash"

tkeycoin-cli joinpsbts

joinpsbts ["psbt",...]

Joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs No input in any of the PSBTs can be in more than one of the PSBTs.

Argument #1 - txs

Type: json array, required

A json array of base64 strings of partially signed transactions

[
"psbt", (string, required) A base64 string of a PSBT
...
]


tkeycoin-cli joinpsbts "psbt"

tkeycoin-cli sendrawtransaction

sendrawtransaction "hexstring" ( allowhighfees )

Submits raw transaction (serialized, hex-encoded) to local node and network.

Also see createrawtransaction and signrawtransactionwithkey calls.

Argument #1 - hexstring

Type: string, required

The hex string of the raw transaction

Argument #2 - allowhighfees

Type: boolean, optional, default=false

Allow high fees.

Create a transaction:

tkeycoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"

Sign the transaction, and get back the hex:

tkeycoin-cli signrawtransactionwithwallet "myhex"

Send the transaction (signed hex):

tkeycoin-cli sendrawtransaction "signedhex"

As a JSON-RPC call: curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli signrawtransactionwithkey

signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )

Sign inputs for raw transaction (serialized, hex-encoded).

The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction.

The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

Argument #1 - hexstring

Type: string, required

The transaction hex string

Argument #2 - privkeys

Type: json array, required

A json array of base58-encoded private keys for signing

[
"privatekey", (string) private key in base58-encoding
...
]


Argument #3 - prevtxs

Type: json array, optional

A json array of previous dependent transaction outputs

[
{ (json object)
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
"scriptPubKey": "hex", (string, required) script key
"redeemScript": "hex", (string) (required for P2SH) redeem script
"witnessScript": "hex", (string) (required for P2WSH or P2SH-P2WSH) witness script
"amount": amount, (numeric or string, required) The amount spent
},
...
]


Argument #4 - sighashtype

Type: string, optional, default=ALL

The signature hash type. Must be one of:

“ALL” “NONE” “SINGLE” “ALL|ANYONECANPAY” “NONE|ANYONECANPAY” “SINGLE|ANYONECANPAY”

tkeycoin-cli signrawtransactionwithkey "myhex"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransactionwithkey", "params": ["myhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli testmempoolaccept

testmempoolaccept ["rawtx",...] ( allowhighfees )

Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool.

This checks if the transaction violates the consensus or policy rules.

See sendrawtransaction call.

Argument #1 - rawtxs

Type: json array, required

An array of hex strings of raw transactions.

Length must be one for now.

[
"rawtx", (string)
...
]


Argument #2 - allowhighfees

Type: boolean, optional, default=false

Allow high fees.

Create a transaction:

tkeycoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"

Sign the transaction, and get back the hex:

tkeycoin-cli signrawtransactionwithwallet "myhex"

Test acceptance of the transaction (signed hex):

tkeycoin-cli testmempoolaccept ["signedhex"]

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "testmempoolaccept", "params": [["signedhex"]] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli utxoupdatepsbt

utxoupdatepsbt "psbt"

Updates a PSBT with witness UTXOs retrieved from the UTXO set or the mempool.

Argument #1 - psbt

Type: string, required

A base64 string of a PSBT.

tkeycoin-cli utxoupdatepsbt "psbt"

tkeycoin-cli createmultisig

createmultisig nrequired ["key",...] ( "address_type" )

Creates a multi-signature address with n signature of m keys required.

It returns a json object with the address and redeemScript.

Argument #1 - nrequired
Type: numeric, required

The number of required signatures out of the n keys.

Argument #2 - keys
Type: json array, required

A json array of hex-encoded public keys.

[
"key", (string) The hex-encoded public key
...
]


Argument #3 - address_type
Type: string, optional, default=legacy

The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

Create a multisig address from 2 public keys:

tkeycoin-cli createmultisig 2 "[\"a914c6d65452ff4a36be11c9a96a895975ee632c83fa87\",\"a91416dbfcfba35828f2191d356a795c9bc1e7333f7d87\"]"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createmultisig", "params": [2, "[\"a914c6d65452ff4a36be11c9a96a895975ee632c83fa87\",\"a91416dbfcfba35828f2191d356a795c9bc1e7333f7d87\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli estimatesmartfee

estimatesmartfee conf_target ( "estimate_mode" )

Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible and return the number of blocks for which the estimate is valid. Uses virtual transaction size as defined in BIP 141 (witness data is discounted).

Argument #1 - conf_target

Type: numeric, required

Confirmation target in blocks (1 - 1008)

Argument #2 - estimate_mode

Type: string, optional, default=CONSERVATIVE

The fee estimate mode.

Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. Must be one of: “UNSET” “ECONOMICAL” “CONSERVATIVE”.

tkeycoin-cli estimatesmartfee 6

tkeycoin-cli signmessagewithprivkey

signmessagewithprivkey "privkey" "message"

Sign a message with the private key of an address

Argument #1 - privkey

Type: string, required

The private key to sign the message with.

Argument #2 - message

Type: string, required

The message to create a signature of.

Create the signature:

tkeycoin-cli signmessagewithprivkey "privkey" "my message"

Verify the signature:

tkeycoin-cli verifymessage "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" "signature" "my message"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessagewithprivkey", "params": ["privkey", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli validateaddress

validateaddress "address"

Return information about the given tkeycoin address.

Argument #1 - address

Type: string, required

The tkeycoin address to validate.

tkeycoin-cli validateaddress "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["qbgjht3fii17FRgSum1xMDBrYQMysPn9c1"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli verifymessage

verifymessage "address" "signature" "message"

Verify a signed message

Argument #1 - address

Type: string, required

The tkeycoin address to use for the signature.

Argument #2 - signature

Type: string, required

The signature provided by the signer in base 64 encoding (see signmessage).

Argument #3 - message

Type: string, required

The message that was signed.

Unlock the wallet for 30 seconds:

tkeycoin-cli walletpassphrase "mypassphrase" 30

Create the signature:

tkeycoin-cli signmessage "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" "my message"

Verify the signature:

tkeycoin-cli verifymessage "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" "signature" "my message"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifymessage", "params": ["qbgjht3fii17FRgSum1xMDBrYQMysPn9c1", "signature", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli abandontransaction

abandontransaction "txid"

Mark in-wallet transaction as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace “stuck” or evicted transactions.

It only works on transactions which are not included in a block and are not currently in the mempool.

It has no effect on transactions which are already abandoned.

Argument #1 - txid

Type: string, required

The transaction id.

tkeycoin-cli abandontransaction "63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abandontransaction", "params": ["63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli abortrescan

Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.

Import a private key:

tkeycoin-cli importprivkey "mykey"

Abort the running wallet rescan:

tkeycoin-cli abortrescan

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abortrescan", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli addmultisigaddress

addmultisigaddress nrequired ["key",...] ( "label" "address_type" )

Add a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup.

Each key is a tkeycoin address or hex-encoded public key.

This functionality is only intended for use with non-watchonly addresses.

See importaddress for watchonly p2sh address support.

If ‘label’ is specified, assign address to that label.

Argument #1 - nrequired

Type: numeric, required

The number of required signatures out of the n keys or addresses.

Argument #2 - keys

Type: json array, required

A json array of tkeycoin addresses or hex-encoded public keys

[
"key", (string) tkeycoin address or hex-encoded public key
...
]


Argument #3 - label

Type: string, optional

A label to assign the addresses to.

Argument #4 - address_type

Type: string, optional, default=set by -addresstype

The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

Add a multisig address from 2 addresses:

tkeycoin-cli addmultisigaddress 2 "[\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\",\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\"]"\

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addmultisigaddress", "params": [2, "[\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\",\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli backupwallet

backupwallet "destination"

Safely copies current wallet file to destination, which can be a directory or a path with filename.

Argument #1 - destination

Type: string, required

The destination directory or file.

tkeycoin-cli backupwallet "backup.dat"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "backupwallet", "params": ["backup.dat"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli bumpfee

bumpfee "txid" ( options )

Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

An opt-in RBF transaction with the given txid must be in the wallet.

The command will pay the additional fee by decreasing (or perhaps removing) its change output.

If the change output is not big enough to cover the increased fee, the command will currently fail instead of adding new inputs to compensate. (A future implementation could improve this.) The command will fail if the wallet or mempool contains a transaction that spends one of T’s outputs.

By default, the new fee will be calculated automatically using estimatesmartfee.

The user can specify a confirmation target for estimatesmartfee.

Alternatively, the user can specify totalFee, or use RPC settxfee to set a higher fee rate.

At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node’s mempool.

Argument #1 - txid

Type: string, required

The txid to be bumped

Argument #2 - options

Type: json object, optional

{
"confTarget": n, (numeric, optional, default=fallback to wallet's default) Confirmation target (in blocks)
"totalFee": n, (numeric, optional, default=fallback to 'confTarget') Total fee (NOT feerate) to pay, in cryptogramms.
In rare cases, the actual fee paid might be slightly higher than the specified
totalFee if the tx change output has to be removed because it is too close to
the dust threshold.
"replaceable": bool, (boolean, optional, default=true) Whether the new transaction should still be
marked bip-125 replaceable. If true, the sequence numbers in the transaction will
be left unchanged from the original. If false, any input sequence numbers in the
original transaction that were less than 0xfffffffe will be increased to 0xfffffffe
so the new transaction will not be explicitly bip-125 replaceable (though it may
still be replaceable in practice, for example if it has unconfirmed ancestors which
are replaceable).
"estimate_mode": "str", (string, optional, default=UNSET) The fee estimate mode, must be one of:
"UNSET"
"ECONOMICAL"
"CONSERVATIVE"
}


tkeycoin-cli bumpfee txid

tkeycoin-cli createwallet

createwallet "wallet_name" ( disable_private_keys blank )

Creates and loads a new wallet.

Argument #1 - wallet_name

Type: string, required

The name for the new wallet. If this is a path, the wallet will be created at the path location.

Argument #2 - disable_private_keys

Type: boolean, optional, default=false

Disable the possibility of private keys (only watchonlys are possible in this mode).

Argument #3 - blank

Type: boolean, optional, default=false

Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed.

tkeycoin-cli createwallet "testwallet"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createwallet", "params": ["testwallet"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli dumpprivkey

dumpprivkey "address"

Reveals the private key corresponding to ‘address’.

Then the importprivkey can be used with this output

Argument #1 - address

Type: string, required

The tkeycoin address for the private key.

tkeycoin-cli dumpprivkey "myaddress"

tkeycoin-cli importprivkey "mykey"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpprivkey", "params": ["myaddress"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli dumpwallet

dumpwallet "filename"

Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.

Imported scripts are included in the dumpfile, but corresponding BIP173 addresses, etc. may not be added automatically by importwallet.

Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).

Argument #1 - filename

Type: string, required

The filename with path (either absolute or relative to tkeycoind).

tkeycoin-cli dumpwallet "test"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli encryptwallet

encryptwallet "passphrase"

Encrypts the wallet with ‘passphrase’. This is for first time encryption.

After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior the making these calls.

Use the walletpassphrase call for this, and then walletlock call.

If the wallet is already encrypted, use the walletpassphrasechange call.

Argument #1 - passphrase

Type: string, required

The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.



Encrypt your wallet:

tkeycoin-cli encryptwallet "my pass phrase"

Now set the passphrase to use the wallet, such as for signing or sending tkeycoin:

tkeycoin-cli walletpassphrase "my pass phrase"

Now we can do something like sign:

tkeycoin-cli signmessage "address" "test message"

Now lock the wallet again by removing the passphrase:

tkeycoin-cli walletlock

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "encryptwallet", "params": ["my pass phrase"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getaddressesbylabel

getaddressesbylabel "label"

Returns the list of addresses assigned the specified label.

Argument #1 - label

Type: string, required

The label.

tkeycoin-cli getaddressesbylabel "tabby"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressesbylabel", "params": ["tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getaddressinfo

getaddressinfo "address"

Return information about the given tkeycoin address. Some information requires the address to be in the wallet.

Argument #1 - address

Type: string, required

The tkeycoin address to get the information of.

tkeycoin-cli getaddressinfo "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressinfo", "params": ["qbgjht3fii17FRgSum1xMDBrYQMysPn9c1"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getbalance

getbalance ( "dummy" minconf include_watchonly )

Returns the total available balance.

The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.

Argument #1 - dummy

Type: string, optional

Remains for backward compatibility. Must be excluded or set to “*”.

Argument #2 - minconf

Type: numeric, optional, default=0

Only include transactions confirmed at least this many times.

Argument #3 - include_watchonly

Type: boolean, optional, default=false

Also include balance in watch-only addresses (see ‘importaddress’).

The total amount in the wallet with 1 or more confirmations:

tkeycoin-cli getbalance

The total amount in the wallet at least 6 blocks confirmed:

tkeycoin-cli getbalance "*" 6

As a JSON-RPC call:

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

tkeycoin-cli getnewaddress

getnewaddress ( "label" "address_type" )

Returns a new tkeycoin address for receiving payments.

If ‘label’ is specified, it is added to the address book so payments received with the address will be associated with ‘label’.

Argument #1 - label

Type: string, optional, default=”“

The label name for the address to be linked to. It can also be set to the empty string “” to represent the default label. The label does not need to exist, it will be created if there is no label by the given name.

Argument #2 - address_type

Type: string, optional, default=set by -addresstype

The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getrawchangeaddress

getrawchangeaddress ( "address_type" )

Returns a new tkeycoin address, for receiving change.

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

Argument #1 - address_type

Type: string, optional, default=set by -changetype

The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getreceivedbyaddress

getreceivedbyaddress "address" ( minconf )

Returns the total amount received by the given address in transactions with at least minconf confirmations.

Argument #1 - address

Type: string, required

The tkeycoin address for transactions.

Argument #2 - minconf

Type: numeric, optional, default=1

Only include transactions confirmed at least this many times.

The amount from transactions with at least 1 confirmation:

tkeycoin-cli getreceivedbyaddress "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1"

The amount including unconfirmed transactions, zero confirmations:

tkeycoin-cli getreceivedbyaddress "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" 0

The amount with at least 6 confirmations:

tkeycoin-cli getreceivedbyaddress "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" 6

As a JSON-RPC call: curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["qbgjht3fii17FRgSum1xMDBrYQMysPn9c1", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getreceivedbylabel

getreceivedbylabel "label" ( minconf )

Returns the total amount received by addresses with label in transactions with at least [minconf] confirmations.

Argument #1 - label

Type: string, required

The selected label, may be the default label using “”.

Argument #2 - minconf

Type: numeric, optional, default=1

Only include transactions confirmed at least this many times

Amount received by the default label with at least 1 confirmation:

tkeycoin-cli getreceivedbylabel ""

Amount received at the tabby label including unconfirmed amounts with zero confirmations:

tkeycoin-cli getreceivedbylabel "tabby" 0

The amount with at least 6 confirmations:

tkeycoin-cli getreceivedbylabel "tabby" 6

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbylabel", "params": ["tabby", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli gettransaction

gettransaction "txid" ( include_watchonly )

Get detailed information about in-wallet transaction txid

Argument #1 - txid

Type: string, required

The transaction id

Argument #2 - include_watchonly

Type: boolean, optional, default=false

Whether to include watch-only addresses in balance calculation and details[].

tkeycoin-cli gettransaction "63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3"

tkeycoin-cli gettransaction "63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3" true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli getunconfirmedbalance

Returns the server’s total unconfirmed balance.

tkeycoin-cli getwalletinfo

Returns an object containing various wallet state info.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli importaddress

importaddress "address" ( "label" rescan p2sh )

Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

If you have the full public key, you should call importpubkey instead of this.

Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs.

Argument #1 - address

Type: string, required

The tkeycoin address (or hex-encoded script)

Argument #2 - label

Type: string, optional, default=”“

An optional label

Argument #3 - rescan

Type: boolean, optional, default=true

Rescan the wallet for transactions

Argument #4 - p2sh

Type: boolean, optional, default=false

Add the P2SH version of the script as well

Import an address with rescan:

tkeycoin-cli importaddress "myaddress"

Import using a label without rescan:

tkeycoin-cli importaddress "myaddress" "testing" false

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ["myaddress", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli importmulti

importmulti "requests" ( "options" )

Import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts. Requires a new wallet backup.

If an address/script is imported without all of the private keys required to spend from that address, it will be watchonly. The ‘watchonly’ option must be set to true in this case or a warning will be returned.

Conversely, if all the private keys are provided and the address/script is spendable, the watchonly option must be set to false, or a warning will be returned.

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported keys, addresses or scripts exists but related transactions are still missing.

Argument #1 - requests

Type: json array, required

Data to be imported “range”: n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import “internal”: bool, (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) “watchonly”: bool, (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. “label”: “str”, (string, optional, default=’‘) Label to assign to the address, only allowed with internal=false “keypool”: bool, (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled }, … ]

Argument #2 - options

Type: json object, optional

{
"rescan": bool, (boolean, optional, default=true) Stating if should rescan the blockchain after all imports
}



tkeycoin-cli importmulti '[{ "scriptPubKey": { "address": "my address" }, "timestamp":1455191478 }, { "scriptPubKey": { "address": "my 2nd address" }, "label": "example 2", "timestamp": 1455191480 }]'

tkeycoin-cli importmulti '[{ "scriptPubKey": { "address": "my address" }, "timestamp":1455191478 }]' '{ "rescan": false}'

tkeycoin-cli importprivkey

importprivkey "privkey" ( "label" rescan )

Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.

Hint: use importmulti to import more than one private key.

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

Argument #1 - privkey

Type: string, required

The private key (see dumpprivkey)

Argument #2 - label

Type: string, optional, default=current label if address exists, otherwise “”

An optional label

Argument #3 - rescan

Type: boolean, optional, default=true

Rescan the wallet for transactions

Dump a private key:

tkeycoin-cli dumpprivkey "myaddress"

Import the private key with rescan:

tkeycoin-cli importprivkey "mykey"

Import using a label and without rescan:

tkeycoin-cli importprivkey "mykey" "testing" false

Import using default blank label and without rescan:

tkeycoin-cli importprivkey "mykey" "" false As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importprivkey", "params": ["mykey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli importprunedfunds

importprunedfunds "rawtransaction" "txoutproof"

Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

Argument #1 - rawtransaction

Type: string, required

A raw transaction in hex funding an already-existing address in wallet

Argument #2 - txoutproof

Type: string, required

The hex output from gettxoutproof that contains the transaction

tkeycoin-cli importpubkey

importpubkey "pubkey" ( "label" rescan )

Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported pubkey exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

Argument #1 - pubkey

Type: string, required

The hex-encoded public key

Argument #2 - label

Type: string, optional, default=”“

An optional label

Argument #3 - rescan

Type: boolean, optional, default=true

Rescan the wallet for transactions

Import a public key with rescan:

tkeycoin-cli importpubkey "mypubkey"

Import using a label without rescan:

tkeycoin-cli importpubkey "mypubkey" "testing" false

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importpubkey", "params": ["mypubkey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli importwallet

importwallet "filename"

Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.

Argument #1 - filename

Type: string, required

The wallet file

Dump the wallet:

tkeycoin-cli dumpwallet "test"

Import the wallet:

tkeycoin-cli importwallet "test"

Import using the json rpc call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli keypoolrefill

keypoolrefill ( newsize )

Fills the keypool.

Argument #1 - newsize

Type: numeric, optional, default=100

The new keypool size.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listaddressgroupings

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.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listlabels

listlabels ( "purpose" )

Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

Argument #1 - purpose

Type: string, optional

Address purpose to list labels for (‘send’,’receive’). An empty string is the same as not providing this argument.

List all labels:

tkeycoin-cli listlabels

List labels that have receiving addresses:

tkeycoin-cli listlabels receive

List labels that have sending addresses:

tkeycoin-cli listlabels send

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlabels", "params": [receive] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listlockunspent

Returns list of temporarily unspendable outputs.

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

List the unspent transactions:

tkeycoin-cli listunspent

Lock an unspent transaction:

tkeycoin-cli lockunspent false "[{\"txid\":\"63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3\",\"vout\":1}]"

List the locked transactions:

tkeycoin-cli listlockunspent

Unlock the transaction again:

tkeycoin-cli lockunspent true "[{\"txid\":\"63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3\",\"vout\":1}]"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listreceivedbyaddress

listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" )

List balances by receiving address.

Argument #1 - minconf

Type: numeric, optional, default=1

The minimum number of confirmations before payments are included.

Argument #2 - include_empty

Type: boolean, optional, default=false

Whether to include addresses that haven’t received any payments.

Argument #3 - include_watchonly

Type: boolean, optional, default=false

Whether to include watch-only addresses (see ‘importaddress’).

Argument #4 - address_filter

Type: string, optional

If present, only return information on this address.

tkeycoin-cli listreceivedbyaddress

tkeycoin-cli listreceivedbyaddress 6 true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaddress", "params": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaddress", "params": [6, true, true, "qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listreceivedbylabel

listreceivedbylabel ( minconf include_empty include_watchonly )

List received transactions by label.

Argument #1 - minconf

Type: numeric, optional, default=1

The minimum number of confirmations before payments are included.

Argument #2 - include_empty

Type: boolean, optional, default=false

Whether to include labels that haven’t received any payments.

Argument #3 - include_watchonly

Type: boolean, optional, default=false

Whether to include watch-only addresses (see ‘importaddress’).

tkeycoin-cli listreceivedbylabel

tkeycoin-cli listreceivedbylabel 6 true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbylabel", "params": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listsinceblock

listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )

Get all transactions in blocks since block [blockhash], or all transactions if omitted.

If “blockhash” is no longer a part of the main chain, transactions from the fork point onward are included.

Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the “removed” array.

Argument #1 - blockhash

Type: string, optional

If set, the block hash to list transactions since, otherwise list all transactions.

Argument #2 - target_confirmations

Type: numeric, optional, default=1

Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value

Argument #3 - include_watchonly

Type: boolean, optional, default=false

Include transactions to watch-only addresses (see ‘importaddress’)

Argument #4 - include_removed

Type: boolean, optional, default=true

Show transactions that were removed due to a reorg in the “removed” array (not guaranteed to work on pruned nodes).

tkeycoin-cli listsinceblock

tkeycoin-cli listsinceblock "0000000000074831806189f7cb1351e844284281b5517966a9a1053aa5f3b63a" 6

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsinceblock", "params": ["0000000000074831806189f7cb1351e844284281b5517966a9a1053aa5f3b63a", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listtransactions

listtransactions ( "label" count skip include_watchonly )

If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

Returns up to ‘count’ most recent transactions skipping the first ‘from’ transactions.

Argument #1 - label

Type: string, optional

If set, should be a valid label name to return only incoming transactions with the specified label, or “*” to disable filtering and return all transactions.

Argument #2 - count

Type: numeric, optional, default=10

The number of transactions to return

Argument #3 - skip

Type: numeric, optional, default=0

The number of transactions to skip

Argument #4 - include_watchonly

Type: boolean, optional, default=false

Include transactions to watch-only addresses (see ‘importaddress’).

List the most recent 10 transactions in the systems:

tkeycoin-cli listtransactions

List transactions 100 to 120:

tkeycoin-cli listtransactions "*" 20 100

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listtransactions", "params": ["*", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listunspent

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

Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations.

Optionally filter to only include txouts paid to specified addresses.

Argument #1 - minconf

Type: numeric, optional, default=1

The minimum confirmations to filter

Argument #2 - maxconf

Type: numeric, optional, default=9999999

The maximum confirmations to filter

Argument #3 - addresses

Type: json array, optional, default=empty array

A json array of tkeycoin addresses to filter

[
"address", (string) tkeycoin address
...
]


Argument #4 - include_unsafe

Type: boolean, optional, default=true

Include outputs that are not safe to spend See description of “safe” attribute below.

Argument #5 - query_options

Type: json object, optional

JSON with query options

{
"minimumAmount": amount, (numeric or string, optional, default=0) Minimum value of each UTXO in TKEY
"maximumAmount": amount, (numeric or string, optional, default=unlimited) Maximum value of each UTXO in TKEY
"maximumCount": n, (numeric, optional, default=unlimited) Maximum number of UTXOs
"minimumSumAmount": amount, (numeric or string, optional, default=unlimited) Minimum sum value of all UTXOs in TKEY
}

tkeycoin-cli listunspent

tkeycoin-cli listunspent 6 9999999 "[\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\",\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\"]"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999 "[\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\",\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listwalletdir

Returns a list of wallets in the wallet directory.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwalletdir", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli listwallets

Returns a list of currently loaded wallets.

For full information on the wallet, use “getwalletinfo”

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwallets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli loadwallet

loadwallet "filename"

Loads a wallet from a wallet file or directory.

Note that all wallet command-line options used when starting tkeycoind will be applied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).

Argument #1 - filename

Type: string, required

The wallet directory or .dat file.

tkeycoin-cli loadwallet "test.dat"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "loadwallet", "params": ["test.dat"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli lockunspent

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

Updates list of temporarily unspendable outputs.

Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.

If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.

A locked transaction output will not be chosen by automatic coin selection, when spending tkeycoins.

Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails.

Also see the listunspent call

Argument #1 - unlock

Type: boolean, required

Whether to unlock (true) or lock (false) the specified transactions

Argument #2 - transactions

Type: json array, optional, default=empty array

A json array of objects. Each object the txid (string) vout (numeric).

[
{ (json object)
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
},
...
]


List the unspent transactions:

tkeycoin-cli listunspent

Lock an unspent transaction:

tkeycoin-cli lockunspent false "[{\"txid\":\"63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3\",\"vout\":1}]"

List the locked transactions:

tkeycoin-cli listlockunspent

Unlock the transaction again:

tkeycoin-cli lockunspent true "[{\"txid\":\"63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3\",\"vout\":1}]"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "lockunspent", "params": [false, "[{\"txid\":\"63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3\",\"vout\":1}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli removeprunedfunds

removeprunedfunds "txid"

Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.

Argument #1 - txid

Type: string, required

The hex-encoded id of the transaction you are deleting

tkeycoin-cli removeprunedfunds "63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "removeprunedfunds", "params": ["63714ae0feeddad414b888a7fb685c9e1508c8ecb548112dfacaf647927f83a3"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli rescanblockchain

rescanblockchain ( start_height stop_height )

Rescan the local blockchain for wallet related transactions.

Argument #1 - start_height

Type: numeric, optional, default=0

block height where the rescan should start

Argument #2 - stop_height

Type: numeric, optional

the last block height that should be scanned. If none is provided it will rescan up to the tip at return time of this call.

tkeycoin-cli rescanblockchain 100000 120000

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "rescanblockchain", "params": [100000, 120000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli sendmany

sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" )

Send multiple times. Amounts are double-precision floating point numbers.

Argument #1 - dummy

Type: string, required

Must be set to “” for backwards compatibility.

Argument #2 - amounts

Type: json object, required

A json object with addresses and amounts

{ "address": amount, (numeric or string, required) The tkeycoin address is the key, the numeric amount (can be string) in TKEY is the value }

Argument #3 - minconf

Type: numeric, optional, default=1

Only use the balance confirmed at least this many times.

Argument #4 - comment

Type: string, optional

A comment

Argument #5 - subtractfeefrom

Type: json array, optional

A json array with addresses.

The fee will be equally deducted from the amount of each selected address. Those recipients will receive less tkeycoins 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 ... ]

Argument #6 - replaceable

Type: boolean, optional, default=fallback to wallet’s default

Allow this transaction to be replaced by a transaction with higher fees via BIP 125

Argument #7 - conf_target

Type: numeric, optional, default=fallback to wallet’s default

Confirmation target (in blocks)

Argument #8 - estimate_mode

Type: string, optional, default=UNSET

The fee estimate mode, must be one of: “UNSET” “ECONOMICAL” “CONSERVATIVE”.

Send two amounts to two different addresses::

tkeycoin-cli sendmany "" "{\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\":0.01,\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\":0.02}"

Send two amounts to two different addresses setting the confirmation and comment::

tkeycoin-cli sendmany "" "{\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\":0.01,\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\":0.02}" 6 "testing"

Send two amounts to two different addresses, subtract fee from amount::

tkeycoin-cli sendmany "" "{\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\":0.01,\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\":0.02}" 1 "" "[\"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1\",\"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk\"]"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", {"qbgjht3fii17FRgSum1xMDBrYQMysPn9c1":0.01,"qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk":0.02}, 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli sendtoaddress

sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" )

Send an amount to a given address.

Argument #1 - address

Type: string, required

The tkeycoin address to send to.

Argument #2 - amount

Type: numeric or string, required

The amount in TKEY to send. eg 0.1

Argument #3 - comment

Type: string, optional

A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.

Argument #4 - comment_to

Type: string, optional

A comment to store the name of the person or organization to which you’re sending the transaction. This is not part of the transaction, just kept in your wallet.

Argument #5 - subtractfeefromamount

Type: boolean, optional, default=false

The fee will be deducted from the amount being sent. The recipient will receive less tkeycoins than you enter in the amount field.

Argument #6 - replaceable

Type: boolean, optional, default=fallback to wallet’s default

Allow this transaction to be replaced by a transaction with higher fees via BIP 125

Argument #7 - conf_target

Type: numeric, optional, default=fallback to wallet’s default

Confirmation target (in blocks)

Argument #8 - estimate_mode

Type: string, optional, default=UNSET

The fee estimate mode, must be one of:

“UNSET” “ECONOMICAL” “CONSERVATIVE”.

tkeycoin-cli sendtoaddress "qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk" 0.1

tkeycoin-cli sendtoaddress "qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk" 0.1 "donation" "seans outpost"

tkeycoin-cli sendtoaddress "qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk" 0.1 "" "" true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendtoaddress", "params": ["qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli sethdseed

sethdseed ( newkeypool "seed" )

Set or generate a new HD wallet seed. Non-HD wallets will not be upgraded to being a HD wallet. Wallets that are already HD will have a new HD seed set so that new keys added to the keypool will be derived from this new seed.

Note that you will need to MAKE A NEW BACKUP of your wallet after setting the HD wallet seed.

Argument #1 - newkeypool

Type: boolean, optional, default=true

Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it. If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed. If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing keypool will be used until it has been depleted.

Argument #2 - seed

Type: string, optional, default=random seed

The WIF private key to use as the new HD seed. The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1.

tkeycoin-cli sethdseed

tkeycoin-cli sethdseed false

tkeycoin-cli sethdseed true "wifkey"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sethdseed", "params": [true, "wifkey"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli setlabel

setlabel "address" "label"

Sets the label associated with the given address.

Argument #1 - address

Type: string, required

The tkeycoin address to be associated with a label.

Argument #2 - label

Type: string, required

The label to assign to the address.

tkeycoin-cli setlabel "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" "tabby"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setlabel", "params": ["qbgjht3fii17FRgSum1xMDBrYQMysPn9c1", "tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli settxfee

settxfee amount

Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.

Argument #1 - amount

Type: numeric or string, required

The transaction fee in TKEY/kB.

tkeycoin-cli settxfee 0.00001

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "settxfee", "params": [0.00001] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli signmessage

signmessage "address" "message"

Sign a message with the private key of an address

Argument #1 - address

Type: string, required

The tkeycoin address to use for the private key.

Argument #2 - message

Type: string, required

The message to create a signature of.

Unlock the wallet for 30 seconds:

tkeycoin-cli walletpassphrase "mypassphrase" 30

Create the signature:

tkeycoin-cli signmessage "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" "my message"

Verify the signature:

tkeycoin-cli verifymessage "qbgjht3fii17FRgSum1xMDBrYQMysPn9c1" "signature" "my message"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessage", "params": ["qbgjht3fii17FRgSum1xMDBrYQMysPn9c1", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli signrawtransactionwithwallet

signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )

Sign inputs for raw transaction (serialized, hex-encoded).

The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

Argument #1 - hexstring

Type: string, required

The transaction hex string

Argument #2 - prevtxs

Type: json array, optional

A json array of previous dependent transaction outputs

[
{ (json object)
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
"scriptPubKey": "hex", (string, required) script key
"redeemScript": "hex", (string) (required for P2SH) redeem script
"witnessScript": "hex", (string) (required for P2WSH or P2SH-P2WSH) witness script
"amount": amount, (numeric or string, required) The amount spent
},
...
]


Argument #3 - sighashtype

Type: string, optional, default=ALL

The signature hash type. Must be one of

“ALL” “NONE” “SINGLE” “ALL|ANYONECANPAY” “NONE|ANYONECANPAY” “SINGLE|ANYONECANPAY”.

tkeycoin-cli signrawtransactionwithwallet "myhex"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransactionwithwallet", "params": ["myhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli unloadwallet

unloadwallet ( "wallet_name" )

Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.

Specifying the wallet name on a wallet endpoint is invalid.

Argument #1 - wallet_name

Type: string, optional, default=the wallet name from the RPC request

The name of the wallet to unload.

tkeycoin-cli unloadwallet wallet_name

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unloadwallet", "params": [wallet_name] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli walletcreatefundedpsbt

walletcreatefundedpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs )

Creates and funds a transaction in the Partially Signed Transaction format. Inputs will be added if supplied inputs are not enough Implements the Creator and Updater roles.

Argument #1 - inputs Type: json array, required

A json array of json objects

[
{ (json object)
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
"sequence": n, (numeric, required) The sequence number
},
...
]


Argument #2 - outputs

Type: json array, required

a json array with outputs (key-value pairs), where none of the keys are duplicated.
That is, each address can only appear once and there can only be one ‘data’ object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.

[
{ (json object)
"address": amount, (numeric or string, required) A key-value pair. The key (string) is the tkeycoin address, the value (float or string) is the amount in TKEY
},
{ (json object)
"data": "hex", (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
},
...
]


Argument #3 - locktime

Type: numeric, optional, default=0

Raw locktime. Non-0 value also locktime-activates inputs

Argument #4 - options

Type: json object, optional

“replaceable”: bool, (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.

Allows this transaction to be replaced by a transaction with higher fees “conf_target”: n, (numeric, optional, default=Fallback to wallet’s confirmation target) Confirmation target (in blocks) “estimate_mode”: “str”, (string, optional, default=UNSET) The fee estimate mode, must be one of: “UNSET” “ECONOMICAL” “CONSERVATIVE” }

{ "changeAddress": "hex", (string, optional, default=pool address) The tkeycoin address to receive the change "changePosition": n, (numeric, optional, default=random) The index of the change output "change_type": "str", (string, optional, default=set by -changetype) The output type to use. Only valid if changeAddress is not specified. Options are "legacy", "p2sh-segwit", and "bech32". "includeWatching": bool, (boolean, optional, default=false) Also select inputs which are watch only "lockUnspents": bool, (boolean, optional, default=false) Lock selected unspent outputs "feeRate": amount, (numeric or string, optional, default=not set: makes wallet determine the fee) Set a specific fee rate in TKEY/kB "subtractFeeFromOutputs": [ (json array, optional, default=empty array) A json array of integers. The fee will be equally deducted from the amount of each specified output. Those recipients will receive less tkeycoins than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee. vout_index, (numeric) The zero-based output index, before a change output is added. ... ],

Argument #5 - bip32derivs

Type: boolean, optional, default=false

If true, includes the BIP 32 derivation paths for public keys if we know them

Create a transaction with no inputs:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli walletlock

Removes the wallet encryption key from memory, locking the wallet.

After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.

Set the passphrase for 2 minutes to perform a transaction:

tkeycoin-cli walletpassphrase "my pass phrase" 120

Perform a send (requires passphrase set):

tkeycoin-cli sendtoaddress "qKeFZJPocHu5QBCJeVtYCAqWpNyyNJtatk" 1.0

Clear the passphrase since we are done before 2 minutes is up:

tkeycoin-cli walletlock

As a JSON-RPC call:.

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletlock", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli walletpassphrase

walletpassphrase "passphrase" timeout

Stores the wallet decryption key in memory for ‘timeout’ seconds.

This is needed prior to performing transactions related to private keys such as sending tkeycoins Note:

Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one.

Argument #1 - passphrase

Type: string, required

The wallet passphrase

Argument #2 - timeout

Type: numeric, required

The time to keep the decryption key in seconds; capped at 100000000 (~3 years).

Unlock the wallet for 60 seconds:

tkeycoin-cli walletpassphrase "my pass phrase" 60

Lock the wallet again (before 60 seconds):

tkeycoin-cli walletlock

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli walletpassphrasechange

walletpassphrasechange "oldpassphrase" "newpassphrase"

Changes the wallet passphrase from ‘oldpassphrase’ to ‘newpassphrase’.

Argument #1 - oldpassphrase

Type: string, required

The current passphrase

Argument #2 - newpassphrase

Type: string, required

The new passphrase.

tkeycoin-cli walletpassphrasechange "old one" "new one"



curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletpassphrasechange", "params": ["old one", "new one"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

tkeycoin-cli walletprocesspsbt

walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )

Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

Argument #1 - psbt

Type: string, required

The transaction base64 string

Argument #2 - sign

Type: boolean, optional, default=true

Also sign the transaction when updating

Argument #3 - sighashtype

Type: string, optional, default=ALL

The signature hash type to sign with if not specified by the PSBT. Must be one of “ALL” “NONE” “SINGLE” “ALL|ANYONECANPAY” “NONE|ANYONECANPAY” “SINGLE|ANYONECANPAY”

Argument #4 - bip32derivs

Type: boolean, optional, default=false

If true, includes the BIP 32 derivation paths for public keys if we know them.

tkeycoin-cli walletprocesspsbt "psbt"