lbrycrd master
Methods and signatures provided by the lbrycrd blockchain daemon are documented below. To build, download, or run lbrycrd, see the project README.
Methods and signatures provided by the lbrycrd blockchain daemon are documented below. To build, download, or run lbrycrd, see the project README.
You can find the repo for this API on GitHub:
https://github.com/lbryio/lbrycrd
Create a transaction which spends a txout which assigned a value to a name, effectively abandoning that claim.
"transactionid" (string) The new transaction id.
// example(s) for abandonclaim to come later
Create a transaction which spends a txout which supported a name claim, effectively abandoning that support.
"transactionid" (string) The new transaction id.
// example(s) for abandonsupport to come later
Given an unnormalized name of a claim, return normalized version of it
"normalized" (string) fully normalized name
// example(s) for checknormalization to come later
Create a transaction which issues a claim assigning a value to a name. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no other greater unspent transactions issuing a claim over the same name. The amount is a real and is rounded to the nearest 0.00000001
"transactionid" (string) The transaction id.
// example(s) for claimname to come later
Get a claim by claim id
{
"name" (string) the original name of the claim (before normalization)
"normalized_name" (string) the name of this claim (after normalization)
"value" (string) metadata of the claim
"claimId" (string) the claimId of this claim
"txid" (string) the hash of the transaction which has successfully claimed this name
"n" (numeric) vout value
"amount" (numeric) txout value
"effective amount" (numeric) txout amount plus amount from all supports associated with the claim
"supports" (array of object) supports for this claim
[
"txid" (string) the txid of the support
"n" (numeric) the index of the support in the transaction's list of outputs
"height" (numeric) the height at which the support was included in the blockchain
"valid at height" (numeric) the height at which the support is valid
"amount" (numeric) the amount of the support
"value" (string) the metadata of the support if any
]
"height" (numeric) the height of the block in which this claim transaction is located
"valid at height" (numeric) the height at which the claim is valid
}
// example(s) for getclaimbyid to come later
Return all claims and supports for a name
{
"nLastTakeoverHeight" (numeric) the last height at which ownership of the name changed
"normalized_name" (string) the name of these claims after normalization
"claims": [ (array of object) claims for this name
{
"claimId" (string) the claimId of this claim
"txid" (string) the txid of this claim
"n" (numeric) the index of the claim in the transaction's list of outputs
"nHeight" (numeric) the height at which the claim was included in the blockchain
"nValidAtHeight" (numeric) the height at which the claim became/becomes valid
"nAmount" (numeric) the amount of the claim
"value" (string) the metadata of the claim
"nEffectiveAmount" (numeric) the total effective amount of the claim, taking into effect whether the claim or support has reached its nValidAtHeight
"supports" : [ (array of object) supports for this claim
"txid" (string) the txid of the support
"n" (numeric) the index of the support in the transaction's list of outputs
"nHeight" (numeric) the height at which the support was included in the blockchain
"nValidAtHeight" (numeric) the height at which the support became/becomes valid
"nAmount" (numeric) the amount of the support
"value" (string) the metadata of the support if any
]
"name" (string) the original name of this claim before normalization
}
],
"supports without claims": [ (array of object) supports that did not match a claim for this name
{
"txid" (string) the txid of the support
"n" (numeric) the index of the support in the transaction's list of outputs
"nHeight" (numeric) the height at which the support was included in the blockchain
"nValidAtHeight" (numeric) the height at which the support became/becomes valid
"nAmount" (numeric) the amount of the support
}
]
}
// example(s) for getclaimsforname to come later
Return any claims or supports found in a transaction
[
{
"nOut" (numeric) the index of the claim or support in the transaction's list of outputs
"claim type" (string) 'claim' or 'support'
"name" (string) the name claimed or supported
"claimId" (string) if a claim, its ID
"value" (string) if a name claim, the value of the claim
"supported txid" (string) if a support, the txid of the supported claim
"supported nout" (numeric) if a support, the index of the supported claim in its transaction
"depth" (numeric) the depth of the transaction in the main chain
"in claim trie" (boolean) if a name claim, whether the claim is active, i.e. has made it into the trie
"is controlling" (boolean) if a name claim, whether the claim is the current controlling claim for the name
"in support map" (boolean) if a support, whether the support is active, i.e. has made it into the support map
"in queue" (boolean) whether the claim is in a queue waiting to be inserted into the trie or support map
"blocks to valid" (numeric) if in a queue, the number of blocks until it's inserted into the trie or support map
}
]
// example(s) for getclaimsfortx to come later
Return all names in the trie.
"names" (array) all names in the trie that have claims
// example(s) for getclaimsintrie to come later
Return the cryptographic proof that a name maps to a value or doesn't.
{
"nodes" : [ (array of object) full nodes (i.e.
those which lead to
the requested name)
"children" : [ (array of object) the children of
this node
"child" : { (object) a child node, either leaf or
reference to a full node
"character" : "char" (string) the character which
leads from the parent
to this child node
"nodeHash" : "hash" (string, if exists) the hash of
the node if
this is a
leaf node
}
]
"valueHash" (string, if exists) the hash of this
node's value, if
it has one. If
this is the
requested name
this will not
exist whether
the node has a
value or not
]
"txhash" : "hash" (string, if exists) the txid of the
claim which controls
this name, if there
is one.
"nOut" : n, (numeric) the nOut of the claim which
controls this name, if there
is one.
"last takeover height" (numeric) the most recent height at
which the value of a name
changed other than through
an update to the winning
bid
}
}
// example(s) for getnameproof to come later
Return the total number of names that have been successfully claimed, and therefore exist in the trie
"total names" (numeric) the total number of
names in the trie
// example(s) for gettotalclaimednames to come later
Return the total number of active claims in the trie
"total claims" (numeric) the total number
of active claims
// example(s) for gettotalclaims to come later
Return the total value of the claims in the trie
"total value" (numeric) the total value of the
claims in the trie
// example(s) for gettotalvalueofclaims to come later
Return the winning value associated with a name, if one exists
"value" (string) the value of the name, if it exists
"claimId" (string) the claimId for this name claim
"txid" (string) the hash of the transaction which successfully claimed the name
"n" (numeric) vout value
"amount" (numeric) txout amount
"effective amount" (numeric) txout amount plus amount from all supports associated with the claim
"height" (numeric) the height of the block in which this transaction is located
"name" (string) the original name of this claim (before normalization)
// example(s) for getvalueforname to come later
Return a list of all transactions claiming names.
[
{
"name":"claimedname", (string) The name that is claimed.
"claimtype":"claimtype", (string) CLAIM or SUPPORT.
"claimId":"claimId", (string) The claimId of the claim.
"value":"value" (string) The value assigned to the name, if claimtype is CLAIM.
"account":"accountname", (string) The account name associated with the transaction.
It will be "" for the default account.
"address":"lbrycrdaddress", (string) The lbrycrd address of the transaction.
"category":"name" (string) Always name
"amount": x.xxx, (numeric) The amount in LBC.
"vout": n, (numeric) The vout value
"fee": x.xxx, (numeric) The amount of the fee in LBC.
"height": n (numeric) The height of the block in which this transaction was included.
"confirmations": n, (numeric) The number of confirmations for the transaction
"blockhash": "hashvalue", (string) The block hash containing the transaction.
"blockindex": n, (numeric) The block index containing the transaction.
"txid": "transactionid", (string) The transaction id.
"time": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
"timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT).
"comment": "...", (string) If a comment is associated with the transaction.
}
]
// example(s) for listnameclaims to come later
Increase the value of a claim. Whichever claim has the greatest value, including all support values, will be the authoritative claim, according to the rest of the rules. The name is the name which is claimed by the claim that will be supported, the txid is the txid of the claim that will be supported, nout is the transaction output which contains the claim to be supported, and amount is the amount which will be added to the value of the claim. If the claim is currently the authoritative claim, this support will go into effect immediately . Otherwise, it will go into effect after 100 blocks. The support will be in effect until it is spent, and will lose its effect when the claim is spent or expires. The amount is a real and is rounded to the nearest .00000001
"transactionid" (string) The transaction id of the support.
// example(s) for supportclaim to come later
Create a transaction which issues a claim assigning a value to a name, spending the previous txout which issued a claim over the same name and therefore superseding that claim. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no greater unspent transactions issuing a claim over the same name.
"transactionid" (string) The new transaction id.
// example(s) for updateclaim to come later
Returns the hash of the best (tip) block in the longest blockchain.
"hex" (string) the block hash hex encoded
> lbrycrd-cli getbestblockhash
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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
"data" (string) A string that is serialized, hex-encoded data for block 'hash'.
Result (for verbosity = 1):
{
"hash" : "hash", (string) the block hash (same as provided)
"confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
"size" : n, (numeric) The block size
"strippedsize" : n, (numeric) The block size excluding witness data
"weight" : n (numeric) The block weight as defined in BIP 141
"height" : n, (numeric) The block height or index
"version" : n, (numeric) The block version
"versionHex" : "00000000", (string) The block version formatted in hexadecimal
"merkleroot" : "xxxx", (string) The merkle root
"nameclaimroot" : "xxxx", (string) The hash of the root of the name claim trie
"tx" : [ (array of string) The transaction ids
"transactionid" (string) The transaction id
,...
],
"time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
"mediantime" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)
"nonce" : n, (numeric) The nonce
"bits" : "1d00ffff", (string) The bits
"difficulty" : x.xxx, (numeric) The difficulty
"chainwork" : "xxxx", (string) Expected number of hashes required to produce the chain up to this block (in hex)
"nTx" : n, (numeric) The number of transactions in the block.
"previousblockhash" : "hash", (string) The hash of the previous block
"nextblockhash" : "hash" (string) The hash of the next block
}
Result (for verbosity = 2):
{
..., Same output as verbosity = 1.
"tx" : [ (array of Objects) The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result.
,...
],
,... Same output as verbosity = 1.
}
> lbrycrd-cli getblock "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns an object containing various state info regarding blockchain processing.
{
"chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
"blocks": xxxxxx, (numeric) the current number of blocks processed in the server
"headers": xxxxxx, (numeric) the current number of headers we have validated
"bestblockhash": "...", (string) the hash of the currently best block
"difficulty": xxxxxx, (numeric) the current difficulty
"mediantime": xxxxxx, (numeric) median time for the current best block
"verificationprogress": xxxx, (numeric) estimate of verification progress [0..1]
"initialblockdownload": xxxx, (bool) (debug information) estimate of whether this node is in Initial Block Download mode.
"chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
"size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk
"pruned": xx, (boolean) if the blocks are subject to pruning
"pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled)
"automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
"prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
"softforks": [ (array) status of softforks in progress
{
"id": "xxxx", (string) name of softfork
"version": xx, (numeric) block version
"reject": { (object) progress toward rejecting pre-softfork blocks
"status": xx, (boolean) true if threshold reached
},
}, ...
],
"bip9_softforks": { (object) status of BIP9 softforks in progress
"xxxx" : { (string) name of the softfork
"status": "xxxx", (string) one of "defined", "started", "locked_in", "active", "failed"
"bit": xx, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status)
"startTime": xx, (numeric) the minimum median time past of a block at which the bit gains its meaning
"timeout": xx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
"since": xx, (numeric) height of the first block to which the status applies
"statistics": { (object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
"period": xx, (numeric) the length in blocks of the BIP9 signalling period
"threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature
"elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period
"count": xx, (numeric) the number of blocks with the version bit set in the current period
"possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
}
}
}
"warnings" : "...", (string) any network and blockchain warnings.
}
> lbrycrd-cli getblockchaininfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the number of blocks in the longest blockchain.
n (numeric) The current block count
> lbrycrd-cli getblockcount
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns hash of block in best-block-chain at height provided.
"hash" (string) The block hash
> lbrycrd-cli getblockhash 1000
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockhash", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'. If verbose is true, returns an Object with information about blockheader
{
"hash" : "hash", (string) the block hash (same as provided)
"confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
"height" : n, (numeric) The block height or index
"version" : n, (numeric) The block version
"versionHex" : "00000000", (string) The block version formatted in hexadecimal
"merkleroot" : "xxxx", (string) The merkle root
"nameclaimroot" : "xxxx", (string) The hash of the root of the name claim trie
"time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
"mediantime" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)
"nonce" : n, (numeric) The nonce
"bits" : "1d00ffff", (string) The bits
"difficulty" : x.xxx, (numeric) The difficulty
"chainwork" : "0000...1f3" (string) Expected number of hashes required to produce the current chain (in hex)
"nTx" : n, (numeric) The number of transactions in the block.
"previousblockhash" : "hash", (string) The hash of the previous block
"nextblockhash" : "hash", (string) The hash of the next block
}
Result (for verbose=false):
"data" (string) A string that is serialized, hex-encoded data for block 'hash'.
> lbrycrd-cli getblockheader "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Compute per block statistics for a given window. All amounts are in satoshis. It won't work for some heights with pruning. It won't work without -txindex for utxo_size_inc, *fee or *feerate stats.
{ (json object)
"avgfee": xxxxx, (numeric) Average fee in the block
"avgfeerate": xxxxx, (numeric) Average feerate (in satoshis per virtual byte)
"avgtxsize": xxxxx, (numeric) Average transaction size
"blockhash": xxxxx, (string) The block hash (to check for potential reorgs)
"feerate_percentiles": [ (array of numeric) Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte)
"10th_percentile_feerate", (numeric) The 10th percentile feerate
"25th_percentile_feerate", (numeric) The 25th percentile feerate
"50th_percentile_feerate", (numeric) The 50th percentile feerate
"75th_percentile_feerate", (numeric) The 75th percentile feerate
"90th_percentile_feerate", (numeric) The 90th percentile feerate
],
"height": xxxxx, (numeric) The height of the block
"ins": xxxxx, (numeric) The number of inputs (excluding coinbase)
"maxfee": xxxxx, (numeric) Maximum fee in the block
"maxfeerate": xxxxx, (numeric) Maximum feerate (in satoshis per virtual byte)
"maxtxsize": xxxxx, (numeric) Maximum transaction size
"medianfee": xxxxx, (numeric) Truncated median fee in the block
"mediantime": xxxxx, (numeric) The block median time past
"mediantxsize": xxxxx, (numeric) Truncated median transaction size
"minfee": xxxxx, (numeric) Minimum fee in the block
"minfeerate": xxxxx, (numeric) Minimum feerate (in satoshis per virtual byte)
"mintxsize": xxxxx, (numeric) Minimum transaction size
"outs": xxxxx, (numeric) The number of outputs
"subsidy": xxxxx, (numeric) The block subsidy
"swtotal_size": xxxxx, (numeric) Total size of all segwit transactions
"swtotal_weight": xxxxx, (numeric) Total weight of all segwit transactions divided by segwit scale factor (4)
"swtxs": xxxxx, (numeric) The number of segwit transactions
"time": xxxxx, (numeric) The block time
"total_out": xxxxx, (numeric) Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee])
"total_size": xxxxx, (numeric) Total size of all non-coinbase transactions
"total_weight": xxxxx, (numeric) Total weight of all non-coinbase transactions divided by segwit scale factor (4)
"totalfee": xxxxx, (numeric) The fee total
"txs": xxxxx, (numeric) The number of transactions (excluding coinbase)
"utxo_increase": xxxxx, (numeric) The increase/decrease in the number of unspent outputs
"utxo_size_inc": xxxxx, (numeric) The increase/decrease in size for the utxo index (not discounting op_return and similar)
}
> lbrycrd-cli getblockstats 1000 '["minfeerate","avgfeerate"]'
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockstats", "params": [1000 '["minfeerate","avgfeerate"]'] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Return information about all known tips in the block tree, including the main chain as well as orphaned branches.
[
{
"height": xxxx, (numeric) height of the chain tip
"hash": "xxxx", (string) block hash of the tip
"branchlen": 0 (numeric) zero for main chain
"status": "active" (string) "active" for the main chain
},
{
"height": xxxx,
"hash": "xxxx",
"branchlen": 1 (numeric) length of branch connecting the tip to the main chain
"status": "xxxx" (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)
}
]
Possible values for status:
1. "invalid" This branch contains at least one invalid block
2. "headers-only" Not all blocks for this branch are available, but the headers are valid
3. "valid-headers" All blocks are available for this branch, but they were never fully validated
4. "valid-fork" This branch is not part of the active chain, but is fully validated
5. "active" This is the tip of the active main chain, which is certainly valid
> lbrycrd-cli getchaintips
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintips", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Compute statistics about the total number and rate of transactions in the chain.
{
"time": xxxxx, (numeric) The timestamp for the final block in the window in UNIX format.
"txcount": xxxxx, (numeric) The total number of transactions in the chain up to that point.
"window_final_block_hash": "...", (string) The hash of the final block in the window.
"window_block_count": xxxxx, (numeric) Size of the window in number of blocks.
"window_tx_count": xxxxx, (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0.
"window_interval": xxxxx, (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0.
"txrate": x.xx, (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0.
}
> lbrycrd-cli getchaintxstats
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintxstats", "params": [2016] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.
> lbrycrd-cli getdifficulty
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
If txid is in the mempool, returns all in-mempool ancestors.
[ (json array of strings)
"transactionid" (string) The transaction id of an in-mempool ancestor transaction
,...
]
Result (for verbose=true):
{ (json object)
"transactionid" : { (json object)
"size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
"fee" : n, (numeric) transaction fee in LBC (DEPRECATED)
"modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
"time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
"height" : n, (numeric) block height when transaction entered pool
"descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
"descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
"descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
"wtxid" : hash, (string) hash of serialized transaction, including witness data
"fees" : {
"base" : n, (numeric) transaction fee in LBC
"modified" : n, (numeric) transaction fee with fee deltas used for mining priority in LBC
"ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in LBC
"descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in LBC
}
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
"transactionid", (string) parent transaction id
... ]
"spentby" : [ (array) unconfirmed transactions spending outputs from this transaction
"transactionid", (string) child transaction id
... ]
}, ...
}
> lbrycrd-cli getmempoolancestors "mytxid"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolancestors", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
If txid is in the mempool, returns all in-mempool descendants.
[ (json array of strings)
"transactionid" (string) The transaction id of an in-mempool descendant transaction
,...
]
Result (for verbose=true):
{ (json object)
"transactionid" : { (json object)
"size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
"fee" : n, (numeric) transaction fee in LBC (DEPRECATED)
"modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
"time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
"height" : n, (numeric) block height when transaction entered pool
"descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
"descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
"descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
"wtxid" : hash, (string) hash of serialized transaction, including witness data
"fees" : {
"base" : n, (numeric) transaction fee in LBC
"modified" : n, (numeric) transaction fee with fee deltas used for mining priority in LBC
"ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in LBC
"descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in LBC
}
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
"transactionid", (string) parent transaction id
... ]
"spentby" : [ (array) unconfirmed transactions spending outputs from this transaction
"transactionid", (string) child transaction id
... ]
}, ...
}
> lbrycrd-cli getmempooldescendants "mytxid"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempooldescendants", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns mempool data for given transaction
{ (json object)
"size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
"fee" : n, (numeric) transaction fee in LBC (DEPRECATED)
"modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
"time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
"height" : n, (numeric) block height when transaction entered pool
"descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
"descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
"descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
"wtxid" : hash, (string) hash of serialized transaction, including witness data
"fees" : {
"base" : n, (numeric) transaction fee in LBC
"modified" : n, (numeric) transaction fee with fee deltas used for mining priority in LBC
"ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in LBC
"descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in LBC
}
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
"transactionid", (string) parent transaction id
... ]
"spentby" : [ (array) unconfirmed transactions spending outputs from this transaction
"transactionid", (string) child transaction id
... ]
}
> lbrycrd-cli getmempoolentry "mytxid"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolentry", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns details on the active state of the TX memory pool.
{
"size": xxxxx, (numeric) Current tx count
"bytes": xxxxx, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
"usage": xxxxx, (numeric) Total memory usage for the mempool
"maxmempool": xxxxx, (numeric) Maximum memory usage for the mempool
"mempoolminfee": xxxxx (numeric) Minimum fee rate in LBC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee
"minrelaytxfee": xxxxx (numeric) Current minimum relay fee for transactions
}
> lbrycrd-cli getmempoolinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
[ (json array of string)
"transactionid" (string) The transaction id
,...
]
Result: (for verbose = true):
{ (json object)
"transactionid" : { (json object)
"size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
"fee" : n, (numeric) transaction fee in LBC (DEPRECATED)
"modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
"time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
"height" : n, (numeric) block height when transaction entered pool
"descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
"descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
"descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
"wtxid" : hash, (string) hash of serialized transaction, including witness data
"fees" : {
"base" : n, (numeric) transaction fee in LBC
"modified" : n, (numeric) transaction fee with fee deltas used for mining priority in LBC
"ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in LBC
"descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in LBC
}
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
"transactionid", (string) parent transaction id
... ]
"spentby" : [ (array) unconfirmed transactions spending outputs from this transaction
"transactionid", (string) child transaction id
... ]
}, ...
}
> lbrycrd-cli getrawmempool true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawmempool", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns details about an unspent transaction output.
{
"bestblock": "hash", (string) The hash of the block at the tip of the chain
"confirmations" : n, (numeric) The number of confirmations
"value" : x.xxx, (numeric) The transaction value in LBC
"scriptPubKey" : { (json object)
"asm" : "code", (string)
"hex" : "hex", (string)
"reqSigs" : n, (numeric) Number of required signatures
"type" : "pubkeyhash", (string) The type, eg pubkeyhash
"addresses" : [ (array of string) array of lbrycrd addresses
"address" (string) lbrycrd address
,...
]
},
"coinbase" : true|false (boolean) Coinbase or not
}
> lbrycrd-cli listunspent
> lbrycrd-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:9245/
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).
"data" (string) A string that is a serialized, hex-encoded data for the proof.
// example(s) for gettxoutproof to come later
Returns statistics about the unspent transaction output set. Note this call may take some time.
{
"height":n, (numeric) The current block height (index)
"bestblock": "hex", (string) The hash of the block at the tip of the chain
"transactions": n, (numeric) The number of transactions with unspent outputs
"txouts": n, (numeric) The number of unspent transaction outputs
"bogosize": n, (numeric) A meaningless metric for UTXO set size
"hash_serialized_2": "hash", (string) The serialized hash
"disk_size": n, (numeric) The estimated size of the chainstate on disk
"total_amount": x.xxx (numeric) The total amount
}
> lbrycrd-cli gettxoutsetinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
> lbrycrd-cli preciousblock "blockhash"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "preciousblock", "params": ["blockhash"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
n (numeric) Height of the last block pruned.
> lbrycrd-cli pruneblockchain 1000
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pruneblockchain", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Dumps the mempool to disk. It will fail until the previous dump is fully loaded.
> lbrycrd-cli savemempool
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "savemempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
EXPERIMENTAL warning: this call may be removed or changed in future releases. Scans the unspent transaction output set for entries that match certain output descriptors.
Verifies blockchain database.
true|false (boolean) Verified or not
> lbrycrd-cli verifychain
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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
["txid"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof can not be validated.
// example(s) for verifytxoutproof to come later
Returns an object containing information about memory usage.
{
"locked": { (json object) Information about locked memory manager
"used": xxxxx, (numeric) Number of bytes used
"free": xxxxx, (numeric) Number of bytes available in current arenas
"total": xxxxxxx, (numeric) Total number of bytes managed
"locked": xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
"chunks_used": xxxxx, (numeric) Number allocated chunks
"chunks_free": xxxxx, (numeric) Number unused chunks
}
}
Result (mode "mallocinfo"):
"..."
> lbrycrd-cli getmemoryinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
List all commands, or get help for a specified command.
"text" (string) The help text
// example(s) for help to come later
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.
{ (json object where keys are the logging categories, and values indicates its status
"category": 0|1, (numeric) if being debug logged or not. 0:inactive, 1:active
...
}
> lbrycrd-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:9245/
Stop lbrycrd server.
// example(s) for stop to come later
Returns the total uptime of the server.
ttt (numeric) The number of seconds that the server has been running
> lbrycrd-cli uptime
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "uptime", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.
[ blockhashes ] (array) hashes of blocks generated
> lbrycrd-cli generate 11
Mine blocks immediately to a specified address (before the RPC call returns)
[ blockhashes ] (array) hashes of blocks generated
> lbrycrd-cli generatetoaddress 11 "myaddress"
If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. It returns data needed to construct a block to work on. For full specification, see BIPs 22, 23, 9, and 145: https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki
{
"version" : n, (numeric) The preferred block version
"rules" : [ "rulename", ... ], (array of strings) specific block rules that are to be enforced
"vbavailable" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments
"rulename" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule
,...
},
"vbrequired" : n, (numeric) bit mask of versionbits the server requires set in submissions
"previousblockhash" : "xxxx", (string) The hash of current highest block
"transactions" : [ (array) contents of non-coinbase transactions that should be included in the next block
{
"data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte)
"txid" : "xxxx", (string) transaction id encoded in little-endian hexadecimal
"hash" : "xxxx", (string) hash encoded in little-endian hexadecimal (including witness data)
"depends" : [ (array) array of numbers
n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is
,...
],
"fee": n, (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one
"sigops" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero
"weight" : n, (numeric) total transaction weight, as counted for purposes of block limits
}
,...
],
"coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content
"flags" : "xx" (string) key name is to be ignored, and value included in scriptSig
},
"coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)
"coinbasetxn" : { ... }, (json object) information for coinbase transaction
"target" : "xxxx", (string) The hash target
"mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)
"mutable" : [ (array of string) list of ways the block template may be changed
"value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
,...
],
"noncerange" : "00000000ffffffff", (string) A range of valid nonces
"sigoplimit" : n, (numeric) limit of sigops in blocks
"sizelimit" : n, (numeric) limit of block size
"weightlimit" : n, (numeric) limit of block weight
"curtime" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)
"bits" : "xxxxxxxx", (string) compressed target of next block
"height" : n (numeric) The height of the next block
"claimtrie" : "00000000ffffffff", (string) The root hash of the claim trie in hex
}
> lbrycrd-cli getblocktemplate {"rules": ["segwit"]}
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [{"rules": ["segwit"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns a json object containing mining-related information.
{
"blocks": nnn, (numeric) The current block
"currentblockweight": nnn, (numeric) The last block weight
"currentblocktx": nnn, (numeric) The last block transaction
"difficulty": xxx.xxxxx (numeric) The current difficulty
"networkhashps": nnn, (numeric) The network hashes per second
"pooledtx": n (numeric) The size of the mempool
"chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
"warnings": "..." (string) any network and blockchain warnings
}
> lbrycrd-cli getmininginfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.
x (numeric) Hashes per second estimated
> lbrycrd-cli getnetworkhashps
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Accepts the transaction into mined blocks at a higher (or lower) priority
true (boolean) Returns true
> lbrycrd-cli prioritisetransaction "txid" 0.0 10000
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "prioritisetransaction", "params": ["txid", 0.0, 10000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Attempts to submit new block to network. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.
> lbrycrd-cli submitblock "mydata"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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).
> lbrycrd-cli addnode "192.168.0.6:8333" "onetry"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Clear all banned IPs.
> lbrycrd-cli clearbanned
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
> lbrycrd-cli disconnectnode "" 1
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)
[
{
"addednode" : "192.168.0.201", (string) The node IP address or name (as provided to addnode)
"connected" : true|false, (boolean) If connected
"addresses" : [ (list of objects) Only when connected = true
{
"address" : "192.168.0.201:8333", (string) The lbrycrd server IP and port we're connected to
"connected" : "outbound" (string) connection, inbound or outbound
}
]
}
,...
]
> lbrycrd-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:9245/
Returns the number of connections to other nodes.
n (numeric) The connection count
> lbrycrd-cli getconnectioncount
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns information about network traffic, including bytes in, bytes out, and current time.
{
"totalbytesrecv": n, (numeric) Total bytes received
"totalbytessent": n, (numeric) Total bytes sent
"timemillis": t, (numeric) Current UNIX time in milliseconds
"uploadtarget":
{
"timeframe": n, (numeric) Length of the measuring timeframe in seconds
"target": n, (numeric) Target in bytes
"target_reached": true|false, (boolean) True if target is reached
"serve_historical_blocks": true|false, (boolean) True if serving historical blocks
"bytes_left_in_cycle": t, (numeric) Bytes left in current time cycle
"time_left_in_cycle": t (numeric) Seconds left in current time cycle
}
}
> lbrycrd-cli getnettotals
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns an object containing various state info regarding P2P networking.
{
"version": xxxxx, (numeric) the server version
"subversion": "/Satoshi:x.x.x/", (string) the server subversion string
"protocolversion": xxxxx, (numeric) the protocol version
"localservices": "xxxxxxxxxxxxxxxx", (string) the services we offer to the network
"localrelay": true|false, (bool) true if transaction relay is requested from peers
"timeoffset": xxxxx, (numeric) the time offset
"connections": xxxxx, (numeric) the number of connections
"networkactive": true|false, (bool) whether p2p networking is enabled
"networks": [ (array) information per network
{
"name": "xxx", (string) network (ipv4, ipv6 or onion)
"limited": true|false, (boolean) is the network limited using -onlynet?
"reachable": true|false, (boolean) is the network reachable?
"proxy": "host:port" (string) the proxy that is used for this network, or empty if none
"proxy_randomize_credentials": true|false, (string) Whether randomized credentials are used
}
,...
],
"relayfee": x.xxxxxxxx, (numeric) minimum relay fee for transactions in LBC/kB
"incrementalfee": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in LBC/kB
"localaddresses": [ (array) list of local addresses
{
"address": "xxxx", (string) network address
"port": xxx, (numeric) network port
"score": xxx (numeric) relative score
}
,...
]
"warnings": "..." (string) any network and blockchain warnings
}
> lbrycrd-cli getnetworkinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns data about each connected network node as a json array of objects.
[
{
"id": n, (numeric) Peer index
"addr":"host:port", (string) The IP address and port of the peer
"addrbind":"ip:port", (string) Bind address of the connection to the peer
"addrlocal":"ip:port", (string) Local address as reported by the peer
"services":"xxxxxxxxxxxxxxxx", (string) The services offered
"relaytxes":true|false, (boolean) Whether peer has asked us to relay transactions to it
"lastsend": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send
"lastrecv": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive
"bytessent": n, (numeric) The total bytes sent
"bytesrecv": n, (numeric) The total bytes received
"conntime": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)
"timeoffset": ttt, (numeric) The time offset in seconds
"pingtime": n, (numeric) ping time (if available)
"minping": n, (numeric) minimum observed ping time (if any at all)
"pingwait": n, (numeric) ping wait (if non-zero)
"version": v, (numeric) The peer version, such as 70001
"subver": "/Satoshi:0.8.5/", (string) The string version
"inbound": true|false, (boolean) Inbound (true) or Outbound (false)
"addnode": true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection
"startingheight": n, (numeric) The starting height (block) of the peer
"banscore": n, (numeric) The ban score
"synced_headers": n, (numeric) The last header we have in common with this peer
"synced_blocks": n, (numeric) The last block we have in common with this peer
"inflight": [
n, (numeric) The heights of blocks we're currently asking from this peer
...
],
"whitelisted": true|false, (boolean) Whether the peer is whitelisted
"bytessent_per_msg": {
"addr": n, (numeric) The total bytes sent aggregated by message type
...
},
"bytesrecv_per_msg": {
"addr": n, (numeric) The total bytes received aggregated by message type
...
}
}
,...
]
> lbrycrd-cli getpeerinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
List all banned IPs/Subnets.
> lbrycrd-cli listbanned
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
> lbrycrd-cli ping
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "ping", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Attempts to add or remove an IP/Subnet from the banned list.
> lbrycrd-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:9245/
Disable/enable all p2p network activity.
// example(s) for setnetworkactive to come later
Combine multiple partially signed LBRY transactions into one transaction. Implements the Combiner role.
"psbt" (string) The base64-encoded partially signed transaction
> lbrycrd-cli combinepsbt ["mybase64_1", "mybase64_2", "mybase64_3"]
Combine multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.
"hex" (string) The hex-encoded raw transaction with signature(s)
> lbrycrd-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"]
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.
"psbt" (string) The resulting raw transaction (base64-encoded string)
> lbrycrd-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
> lbrycrd-cli converttopsbt "rawtransaction"
Creates a transaction in the Partially Signed Transaction format. Implements the Creator role.
"psbt" (string) The resulting raw transaction (base64-encoded string)
> lbrycrd-cli createpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
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.
"transaction" (string) hex string of the transaction
> lbrycrd-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}]", "[{\"data\":\"00010203\"}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Return a JSON object representing the serialized, base64-encoded partially signed LBRY transaction.
{
"tx" : { (json object) The decoded network-serialized unsigned transaction.
... The layout is the same as the output of decoderawtransaction.
},
"unknown" : { (json object) The unknown global fields
"key" : "value" (key-value pair) An unknown key-value pair
...
},
"inputs" : [ (array of json objects)
{
"non_witness_utxo" : { (json object, optional) Decoded network transaction for non-witness UTXOs
...
},
"witness_utxo" : { (json object, optional) Transaction output for witness UTXOs
"amount" : x.xxx, (numeric) The value in LBC
"scriptPubKey" : { (json object)
"asm" : "asm", (string) The asm
"hex" : "hex", (string) The hex
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
"address" : "address" (string) LBRY address if there is one
}
},
"partial_signatures" : { (json object, optional)
"pubkey" : "signature", (string) The public key and signature that corresponds to it.
,...
}
"sighash" : "type", (string, optional) The sighash type to be used
"redeem_script" : { (json object, optional)
"asm" : "asm", (string) The asm
"hex" : "hex", (string) The hex
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
}
"witness_script" : { (json object, optional)
"asm" : "asm", (string) The asm
"hex" : "hex", (string) The hex
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
}
"bip32_derivs" : { (json object, optional)
"pubkey" : { (json object, optional) The public key with the derivation path as the value.
"master_fingerprint" : "fingerprint" (string) The fingerprint of the master key
"path" : "path", (string) The path
}
,...
}
"final_scriptsig" : { (json object, optional)
"asm" : "asm", (string) The asm
"hex" : "hex", (string) The hex
}
"final_scriptwitness": ["hex", ...] (array of string) hex-encoded witness data (if any)
"unknown" : { (json object) The unknown global fields
"key" : "value" (key-value pair) An unknown key-value pair
...
},
}
,...
]
"outputs" : [ (array of json objects)
{
"redeem_script" : { (json object, optional)
"asm" : "asm", (string) The asm
"hex" : "hex", (string) The hex
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
}
"witness_script" : { (json object, optional)
"asm" : "asm", (string) The asm
"hex" : "hex", (string) The hex
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
}
"bip32_derivs" : [ (array of json objects, optional)
{
"pubkey" : "pubkey", (string) The public key this path corresponds to
"master_fingerprint" : "fingerprint" (string) The fingerprint of the master key
"path" : "path", (string) The path
}
}
,...
],
"unknown" : { (json object) The unknown global fields
"key" : "value" (key-value pair) An unknown key-value pair
...
},
}
,...
]
"fee" : fee (numeric, optional) The transaction fee paid if all UTXOs slots in the PSBT have been filled.
}
> lbrycrd-cli decodepsbt "psbt"
Return a JSON object representing the serialized, hex-encoded transaction.
{
"txid" : "id", (string) The transaction id
"hash" : "id", (string) The transaction hash (differs from txid for witness transactions)
"size" : n, (numeric) The transaction size
"vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions)
"weight" : n, (numeric) The transaction's weight (between vsize*4 - 3 and vsize*4)
"version" : n, (numeric) The version
"locktime" : ttt, (numeric) The lock time
"vin" : [ (array of json objects)
{
"txid": "id", (string) The transaction id
"vout": n, (numeric) The output number
"scriptSig": { (json object) The script
"asm": "asm", (string) asm
"hex": "hex" (string) hex
},
"txinwitness": ["hex", ...] (array of string) hex-encoded witness data (if any)
"sequence": n (numeric) The script sequence number
}
,...
],
"vout" : [ (array of json objects)
{
"value" : x.xxx, (numeric) The value in LBC
"n" : n, (numeric) index
"scriptPubKey" : { (json object)
"asm" : "asm", (string) the asm
"hex" : "hex", (string) the hex
"reqSigs" : n, (numeric) The required sigs
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
"addresses" : [ (json array of string)
"12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc" (string) lbry address
,...
]
}
}
,...
],
}
> lbrycrd-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:9245/
Decode a hex-encoded script.
{
"asm":"asm", (string) Script public key
"hex":"hex", (string) hex encoded public key
"type":"type", (string) The output type
"reqSigs": n, (numeric) The required signatures
"addresses": [ (json array of string)
"address" (string) lbry address
,...
],
"p2sh","address" (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).
}
> lbrycrd-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:9245/
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.
{
"psbt" : "value", (string) The base64-encoded partially signed transaction if not extracted
"hex" : "value", (string) The hex-encoded network transaction if extracted
"complete" : true|false, (boolean) If the transaction has a complete set of signatures
]
}
> lbrycrd-cli finalizepsbt "psbt"
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 signrawtransaction 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
{
"hex": "value", (string) The resulting raw transaction (hex-encoded string)
"fee": n, (numeric) Fee in LBC the resulting transaction pays
"changepos": n (numeric) The position of the added change output, or -1
}
> lbrycrd-cli createrawtransaction "[]" "{\"myaddress\":0.01}"
> lbrycrd-cli fundrawtransaction "rawtransactionhex"
> lbrycrd-cli signrawtransaction "fundedtransactionhex"
> lbrycrd-cli sendrawtransaction "signedtransactionhex"
NOTE: By default this function only works for mempool transactions. If the -txindex option is enabled, it also works for blockchain transactions. If the block which contains the transaction is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is provided, only that block will be searched and if the transaction is in the mempool or other blocks, or if this node does not have the given block available, the transaction will not be found. DEPRECATED: for now, it also works for transactions with unspent outputs. Return the raw transaction data. 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'.
"data" (string) The serialized, hex-encoded data for 'txid'
Result (if verbose is set to true):
{
"in_active_chain": b, (bool) Whether specified block is in the active chain or not (only present with explicit "blockhash" argument)
"hex" : "data", (string) The serialized, hex-encoded data for 'txid'
"txid" : "id", (string) The transaction id (same as provided)
"hash" : "id", (string) The transaction hash (differs from txid for witness transactions)
"size" : n, (numeric) The serialized transaction size
"vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions)
"weight" : n, (numeric) The transaction's weight (between vsize*4-3 and vsize*4)
"version" : n, (numeric) The version
"locktime" : ttt, (numeric) The lock time
"vin" : [ (array of json objects)
{
"txid": "id", (string) The transaction id
"vout": n, (numeric)
"scriptSig": { (json object) The script
"asm": "asm", (string) asm
"hex": "hex" (string) hex
},
"sequence": n (numeric) The script sequence number
"txinwitness": ["hex", ...] (array of string) hex-encoded witness data (if any)
}
,...
],
"vout" : [ (array of json objects)
{
"value" : x.xxx, (numeric) The value in LBC
"n" : n, (numeric) index
"scriptPubKey" : { (json object)
"asm" : "asm", (string) the asm
"hex" : "hex", (string) the hex
"reqSigs" : n, (numeric) The required sigs
"type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
"addresses" : [ (json array of string)
"address" (string) lbry address
,...
]
}
}
,...
],
"blockhash" : "hash", (string) the block hash
"confirmations" : n, (numeric) The confirmations
"time" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)
"blocktime" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
}
> lbrycrd-cli getrawtransaction "mytxid" true "myblockhash"
> 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:9245/
Submits raw transaction (serialized, hex-encoded) to local node and network. Also see createrawtransaction and signrawtransaction calls.
"hex" (string) The transaction hash in hex
> lbrycrd-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
> lbrycrd-cli signrawtransaction "myhex"
> lbrycrd-cli sendrawtransaction "signedhex"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
DEPRECATED. 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. The third optional argument (may be null) is an array of base58-encoded private keys that, if given, will be the only keys used to sign the transaction.
{
"hex" : "value", (string) The hex-encoded raw transaction with signature(s)
"complete" : true|false, (boolean) If the transaction has a complete set of signatures
"errors" : [ (json array of objects) Script verification errors (if there are any)
{
"txid" : "hash", (string) The hash of the referenced, previous transaction
"vout" : n, (numeric) The index of the output to spent and used as input
"scriptSig" : "hex", (string) The hex-encoded signature script
"sequence" : n, (numeric) Script sequence number
"error" : "text" (string) Verification or signing error related to the input
}
,...
]
}
> lbrycrd-cli signrawtransaction "myhex"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransaction", "params": ["myhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
{
"hex" : "value", (string) The hex-encoded raw transaction with signature(s)
"complete" : true|false, (boolean) If the transaction has a complete set of signatures
"errors" : [ (json array of objects) Script verification errors (if there are any)
{
"txid" : "hash", (string) The hash of the referenced, previous transaction
"vout" : n, (numeric) The index of the output to spent and used as input
"scriptSig" : "hex", (string) The hex-encoded signature script
"sequence" : n, (numeric) Script sequence number
"error" : "text" (string) Verification or signing error related to the input
}
,...
]
}
> lbrycrd-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:9245/
Returns 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.
[ (array) The result of the mempool acceptance test for each raw transaction in the input array.
Length is exactly one for now.
{
"txid" (string) The transaction hash in hex
"allowed" (boolean) If the mempool allows this tx to be inserted
"reject-reason" (string) Rejection string (only present when 'allowed' is false)
}
]
> lbrycrd-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
> lbrycrd-cli signrawtransaction "myhex"
> lbrycrd-cli testmempoolaccept ["signedhex"]
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "testmempoolaccept", "params": [["signedhex"]] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.
{
"address":"multisigaddress", (string) The value of the new multisig address.
"redeemScript":"script" (string) The string value of the hex-encoded redemption script.
}
> lbrycrd-cli createmultisig 2 "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createmultisig", "params": [2, "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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).
{
"feerate" : x.x, (numeric, optional) estimate fee rate in LBC/kB
"errors": [ str... ] (json array of strings, optional) Errors encountered during processing
"blocks" : n (numeric) block number where estimate was found
}
The request target will be clamped between 2 and the highest target
fee estimation is able to return based on how long it has been running.
An error is returned if not enough transactions and blocks
have been observed to make an estimate for any number of blocks.
> lbrycrd-cli estimatesmartfee 6
Sign a message with the private key of an address
"signature" (string) The signature of the message encoded in base 64
> lbrycrd-cli signmessagewithprivkey "privkey" "my message"
> lbrycrd-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
> 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:9245/
Return information about the given lbry address. DEPRECATION WARNING: Parts of this command have been deprecated and moved to getaddressinfo. Clients must transition to using getaddressinfo to access this information before upgrading to v0.18. The following deprecated fields have moved to getaddressinfo and will only be shown here with -deprecatedrpc=validateaddress: ismine, iswatchonly, script, hex, pubkeys, sigsrequired, pubkey, addresses, embedded, iscompressed, account, timestamp, hdkeypath, kdmasterkeyid.
{
"isvalid" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
"address" : "address", (string) The lbry address validated
"scriptPubKey" : "hex", (string) The hex encoded scriptPubKey generated by the address
"isscript" : true|false, (boolean) If the key is a script
"iswitness" : true|false, (boolean) If the address is a witness address
"witness_version" : version (numeric, optional) The version number of the witness program
"witness_program" : "hex" (string, optional) The hex value of the witness program
}
> lbrycrd-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Verify a signed message
true|false (boolean) If the signature is verified or not.
> lbrycrd-cli walletpassphrase "mypassphrase" 30
> lbrycrd-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
> lbrycrd-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifymessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "signature", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Mark in-wallet transaction
> lbrycrd-cli abandontransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.
> lbrycrd-cli importprivkey "mykey"
> lbrycrd-cli abortrescan
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abortrescan", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Add a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup. Each key is a Bitcoin 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.
{
"address":"multisigaddress", (string) The value of the new multisig address.
"redeemScript":"script" (string) The string value of the hex-encoded redemption script.
}
> lbrycrd-cli addmultisigaddress 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addmultisigaddress", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Safely copies current wallet file to destination, which can be a directory or a path with filename.
> lbrycrd-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:9245/
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.
{
"txid": "value", (string) The id of the new transaction
"origfee": n, (numeric) Fee of the replaced transaction
"fee": n, (numeric) Fee of the new transaction
"errors": [ str... ] (json array of strings) Errors encountered during processing (may be empty)
}
> lbrycrd-cli bumpfee
Creates and loads a new wallet.
{
"name" : , (string) The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path.
"warning" : , (string) Warning message if wallet was not loaded cleanly.
}
> lbrycrd-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:9245/
Reveals the private key corresponding to 'address'. Then the importprivkey can be used with this output
"key" (string) The private key
> lbrycrd-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:9245/
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).
{ (json object)
"filename" : { (string) The filename with full absolute path
}
> lbrycrd-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:9245/
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.
> lbrycrd-cli encryptwallet "my pass phrase"
> lbrycrd-cli walletpassphrase "my pass phrase"
> lbrycrd-cli signmessage "address" "test message"
> lbrycrd-cli walletlock
> 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:9245/
DEPRECATED. Returns the account associated with the given address.
"accountname" (string) the account address
> lbrycrd-cli getaccount "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
DEPRECATED. Returns the current Bitcoin address for receiving payments to this account.
"address" (string) The account bitcoin address
> lbrycrd-cli getaccountaddress "myaccount"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccountaddress", "params": ["myaccount"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
DEPRECATED. Returns the list of addresses for the given account.
[ (json array of string)
"address" (string) a bitcoin address associated with the given account
,...
]
> lbrycrd-cli getaddressesbyaccount "tabby"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressesbyaccount", "params": ["tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the list of addresses assigned the specified label.
{ (json object with addresses as keys)
"address": { (json object with information about address)
"purpose": "string" (string) Purpose of address ("send" for sending address, "receive" for receiving address)
},...
}
> lbrycrd-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:9245/
Return information about the given bitcoin address. Some information requires the address to be in the wallet.
{
"address" : "address", (string) The bitcoin address validated
"scriptPubKey" : "hex", (string) The hex encoded scriptPubKey generated by the address
"ismine" : true|false, (boolean) If the address is yours or not
"iswatchonly" : true|false, (boolean) If the address is watchonly
"isscript" : true|false, (boolean) If the key is a script
"iswitness" : true|false, (boolean) If the address is a witness address
"witness_version" : version (numeric, optional) The version number of the witness program
"witness_program" : "hex" (string, optional) The hex value of the witness program
"script" : "type" (string, optional) The output script type. Only if "isscript" is true and the redeemscript is known. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash, witness_unknown
"hex" : "hex", (string, optional) The redeemscript for the p2sh address
"pubkeys" (string, optional) Array of pubkeys associated with the known redeemscript (only if "script" is "multisig")
[
"pubkey"
,...
]
"sigsrequired" : xxxxx (numeric, optional) Number of signatures required to spend multisig output (only if "script" is "multisig")
"pubkey" : "publickeyhex", (string, optional) The hex value of the raw public key, for single-key addresses (possibly embedded in P2SH or P2WSH)
"embedded" : {...}, (object, optional) Information about the address embedded in P2SH or P2WSH, if relevant and known. It includes all getaddressinfo output fields for the embedded address, excluding metadata ("timestamp", "hdkeypath", "hdseedid") and relation to the wallet ("ismine", "iswatchonly", "account").
"iscompressed" : true|false, (boolean) If the address is compressed
"label" : "label" (string) The label associated with the address, "" is the default account
"account" : "account" (string) DEPRECATED. This field will be removed in V0.18. To see this deprecated field, start bitcoind with -deprecatedrpc=accounts. The account associated with the address, "" is the default account
"timestamp" : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT)
"hdkeypath" : "keypath" (string, optional) The HD keypath if the key is HD and available
"hdseedid" : "" (string, optional) The Hash160 of the HD seed
"hdmasterkeyid" : "" (string, optional) alias for hdseedid maintained for backwards compatibility. Will be removed in V0.18.
"labels" (object) Array of labels associated with the address.
[
{ (json object of label data)
"name": "labelname" (string) The label
"purpose": "string" (string) Purpose of address ("send" for sending address, "receive" for receiving address)
},...
]
}
> lbrycrd-cli getaddressinfo "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressinfo", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
If account is not specified, returns the server's 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. If account is specified (DEPRECATED), returns the balance in the account. Note that the account "" is not the same as leaving the parameter out. The server total may be different to the balance in the default "" account.
amount (numeric) The total amount in LBC received for this account.
> lbrycrd-cli getbalance
> lbrycrd-cli getbalance "*" 6
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns a new Bitcoin 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'.
"address" (string) The new bitcoin address
> lbrycrd-cli getnewaddress
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.
"address" (string) The address
> lbrycrd-cli getrawchangeaddress
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the total amount received by the given address in transactions with at least minconf confirmations.
amount (numeric) The total amount in LBC received at this address.
> lbrycrd-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX"
> lbrycrd-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" 0
> lbrycrd-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" 6
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the total amount received by addresses with
amount (numeric) The total amount in LBC received for this label.
> lbrycrd-cli getreceivedbylabel ""
> lbrycrd-cli getreceivedbylabel "tabby" 0
> lbrycrd-cli getreceivedbylabel "tabby" 6
> 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:9245/
Get detailed information about in-wallet transaction
{
"amount" : x.xxx, (numeric) The transaction amount in LBC
"fee": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the
'send' category of transactions.
"confirmations" : n, (numeric) The number of confirmations
"blockhash" : "hash", (string) The block hash
"blockindex" : xx, (numeric) The index of the transaction in the block that includes it
"blocktime" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)
"txid" : "transactionid", (string) The transaction id.
"time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
"timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
may be unknown for unconfirmed transactions not in the mempool
"details" : [
{
"account" : "accountname", (string) DEPRECATED. This field will be removed in a V0.18. To see this deprecated field, start bitcoind with -deprecatedrpc=accounts. The account name involved in the transaction, can be "" for the default account.
"address" : "address", (string) The bitcoin address involved in the transaction
"category" : "send|receive", (string) The category, either 'send' or 'receive'
"amount" : x.xxx, (numeric) The amount in LBC
"label" : "label", (string) A comment for the address/transaction, if any
"vout" : n, (numeric) the vout value
"fee": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the
'send' category of transactions.
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
'send' category of transactions.
}
,...
],
"hex" : "data" (string) Raw data for transaction
}
> lbrycrd-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the server's total unconfirmed balance
// example(s) for getunconfirmedbalance to come later
Returns an object containing various wallet state info.
{
"walletname": xxxxx, (string) the wallet name
"walletversion": xxxxx, (numeric) the wallet version
"balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in LBC
"unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in LBC
"immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in LBC
"txcount": xxxxxxx, (numeric) the total number of transactions in the wallet
"keypoololdest": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool
"keypoolsize": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)
"keypoolsize_hd_internal": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)
"unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
"paytxfee": x.xxxx, (numeric) the transaction fee configuration, set in LBC/kB
"hdseedid": "" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)
"hdmasterkeyid": "" (string, optional) alias for hdseedid retained for backwards-compatibility. Will be removed in V0.18.
"private_keys_enabled": true|false (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet)
}
> lbrycrd-cli getwalletinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
> lbrycrd-cli importaddress "myaddress"
> lbrycrd-cli importaddress "myaddress" "testing" false
> 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:9245/
Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options). Requires a new wallet backup.
> lbrycrd-cli importmulti '[{ "scriptPubKey": { "address": "" }, "timestamp":1455191478 }]' '{ "rescan": false}'
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.
> lbrycrd-cli dumpprivkey "myaddress"
> lbrycrd-cli importprivkey "mykey"
> lbrycrd-cli importprivkey "mykey" "testing" false
> lbrycrd-cli importprivkey "mykey" "" false
> 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:9245/
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.
// example(s) for importprunedfunds to come later
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.
> lbrycrd-cli importpubkey "mypubkey"
> lbrycrd-cli importpubkey "mypubkey" "testing" false
> 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:9245/
Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.
> lbrycrd-cli dumpwallet "test"
> lbrycrd-cli importwallet "test"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Fills the keypool.
> lbrycrd-cli keypoolrefill
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
DEPRECATED. Returns Object that has account names as keys, account balances as values.
{ (json object where keys are account names, and values are numeric balances
"account": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.
...
}
> lbrycrd-cli listaccounts
> lbrycrd-cli listaccounts 0
> lbrycrd-cli listaccounts 6
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaccounts", "params": [6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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
[
[
[
"address", (string) The bitcoin address
amount, (numeric) The amount in LBC
"label" (string, optional) The label
]
,...
]
,...
]
> lbrycrd-cli listaddressgroupings
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.
[ (json array of string)
"label", (string) Label name
...
]
> lbrycrd-cli listlabels
> lbrycrd-cli listlabels receive
> lbrycrd-cli listlabels send
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlabels", "params": [receive] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.
[
{
"txid" : "transactionid", (string) The transaction id locked
"vout" : n (numeric) The vout value
}
,...
]
> lbrycrd-cli listunspent
> lbrycrd-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
> lbrycrd-cli listlockunspent
> lbrycrd-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
List balances by receiving address.
[
{
"involvesWatchonly" : true, (bool) Only returned if imported addresses were involved in transaction
"address" : "receivingaddress", (string) The receiving address
"account" : "accountname", (string) DEPRECATED. Backwards compatible alias for label.
"amount" : x.xxx, (numeric) The total amount in LBC received by the address
"confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
"label" : "label", (string) The label of the receiving address. The default label is "".
"txids": [
"txid", (string) The ids of transactions received with the address
...
]
}
,...
]
> lbrycrd-cli listreceivedbyaddress 6 true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaddress", "params": [6, true, true, "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
List received transactions by label.
[
{
"involvesWatchonly" : true, (bool) Only returned if imported addresses were involved in transaction
"account" : "accountname", (string) DEPRECATED. Backwards compatible alias for label.
"amount" : x.xxx, (numeric) The total amount received by addresses with this label
"confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
"label" : "label" (string) The label of the receiving address. The default label is "".
}
,...
]
> lbrycrd-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:9245/
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.
{
"transactions": [
"account":"accountname", (string) DEPRECATED. This field will be removed in V0.18. To see this deprecated field, start bitcoind with -deprecatedrpc=accounts. The account name associated with the transaction. Will be "" for the default account.
"address":"address", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).
"category":"send|receive", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.
"amount": x.xxx, (numeric) The amount in LBC. This is negative for the 'send' category, and for the 'move' category for moves
outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.
"vout" : n, (numeric) the vout value
"fee": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions.
"confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.
When it's < 0, it means the transaction conflicted that many blocks ago.
"blockhash": "hashvalue", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.
"blockindex": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.
"blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
"txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
"time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
"timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
may be unknown for unconfirmed transactions not in the mempool
"abandoned": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
"comment": "...", (string) If a comment is associated with the transaction.
"label" : "label" (string) A comment for the address/transaction, if any
"to": "...", (string) If a comment to is associated with the transaction.
],
"removed": [
Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count.
],
"lastblock": "lastblockhash" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones
}
> lbrycrd-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsinceblock", "params": ["000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.
[
{
"account":"accountname", (string) DEPRECATED. This field will be removed in V0.18. The account name associated with the transaction.
It will be "" for the default account.
"address":"address", (string) The bitcoin address of the transaction. Not present for
move transactions (category = move).
"category":"send|receive|move", (string) The transaction category. 'move' is a local (off blockchain)
transaction between accounts, and not associated with an address,
transaction id or block. 'send' and 'receive' transactions are
associated with an address, transaction id and block details
"amount": x.xxx, (numeric) The amount in LBC. This is negative for the 'send' category, and for the
'move' category for moves outbound. It is positive for the 'receive' category,
and for the 'move' category for inbound funds.
"label": "label", (string) A comment for the address/transaction, if any
"vout": n, (numeric) the vout value
"fee": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the
'send' category of transactions.
"confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
'receive' category of transactions. Negative confirmations indicate the
transaction conflicts with the block chain
"trusted": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.
"blockhash": "hashvalue", (string) The block hash containing the transaction. Available for 'send' and 'receive'
category of transactions.
"blockindex": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive'
category of transactions.
"blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
"txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
"time": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
"timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
for 'send' and 'receive' category of transactions.
"comment": "...", (string) If a comment is associated with the transaction.
"otheraccount": "accountname", (string) DEPRECATED. This field will be removed in V0.18. For the 'move' category of transactions, the account the funds came
from (for receiving funds, positive amounts), or went to (for sending funds,
negative amounts).
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
may be unknown for unconfirmed transactions not in the mempool
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
'send' category of transactions.
}
]
> lbrycrd-cli listtransactions
> lbrycrd-cli listtransactions "*" 20 100
> 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:9245/
Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.
> lbrycrd-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:9245/
Returns a list of currently loaded wallets. For full information on the wallet, use "getwalletinfo"
[ (json array of strings)
"walletname" (string) the wallet name
...
]
> lbrycrd-cli listwallets
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwallets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Loads a wallet from a wallet file or directory. Note that all wallet command-line options used when starting bitcoind will be applied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).
{
"name" : , (string) The wallet name if loaded successfully.
"warning" : , (string) Warning message if wallet was not loaded cleanly.
}
> lbrycrd-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:9245/
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 bitcoins. 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
true|false (boolean) Whether the command was successful or not
> lbrycrd-cli listunspent
> lbrycrd-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
> lbrycrd-cli listlockunspent
> lbrycrd-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "lockunspent", "params": [false, "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
DEPRECATED. Move a specified amount from one account in your wallet to another.
true|false (boolean) true if successful.
> lbrycrd-cli move "" "tabby" 0.01
> lbrycrd-cli move "timotei" "akiko" 0.01 6 "happy birthday!"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko", 0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.
> lbrycrd-cli removeprunedfunds "a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "removeprunedfunds", "params": ["a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Rescan the local blockchain for wallet related transactions.
{
"start_height" (numeric) The block height where the rescan has started. If omitted, rescan started from the genesis block.
"stop_height" (numeric) The height of the last rescanned block. If omitted, rescan stopped at the chain tip.
}
> lbrycrd-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:9245/
DEPRECATED (use sendtoaddress). Sent an amount from an account to a bitcoin address.
"txid" (string) The transaction id.
> lbrycrd-cli sendfrom "" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.01
> lbrycrd-cli sendfrom "tabby" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.01 6 "donation" "seans outpost"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendfrom", "params": ["tabby", "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.01, 6, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Send multiple times. Amounts are double-precision floating point numbers.
"txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
the number of addresses.
> lbrycrd-cli sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}"
> lbrycrd-cli sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}" 6 "testing"
> lbrycrd-cli sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}" 1 "" "[\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\",\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\"]"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", {"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX":0.01,"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz":0.02}, 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Send an amount to a given address.
"txid" (string) The transaction id.
> lbrycrd-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1 "" "" true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendtoaddress", "params": ["1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
> lbrycrd-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:9245/
Sets the label associated with the given address.
> lbrycrd-cli setlabel "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "tabby"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setlabel", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.
> lbrycrd-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:9245/
Sign a message with the private key of an address
"signature" (string) The signature of the message encoded in base 64
> lbrycrd-cli walletpassphrase "mypassphrase" 30
> lbrycrd-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
> lbrycrd-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
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.
{
"hex" : "value", (string) The hex-encoded raw transaction with signature(s)
"complete" : true|false, (boolean) If the transaction has a complete set of signatures
"errors" : [ (json array of objects) Script verification errors (if there are any)
{
"txid" : "hash", (string) The hash of the referenced, previous transaction
"vout" : n, (numeric) The index of the output to spent and used as input
"scriptSig" : "hex", (string) The hex-encoded signature script
"sequence" : n, (numeric) Script sequence number
"error" : "text" (string) Verification or signing error related to the input
}
,...
]
}
> lbrycrd-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:9245/
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.
> lbrycrd-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:9245/
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.
{
"psbt": "value", (string) The resulting raw transaction (base64-encoded string)
"fee": n, (numeric) Fee in LBC the resulting transaction pays
"changepos": n (numeric) The position of the added change output, or -1
}
> lbrycrd-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
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.
> lbrycrd-cli walletpassphrase "my pass phrase" 120
> lbrycrd-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 1.0
> lbrycrd-cli walletlock
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletlock", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Stores the wallet decryption key in memory for 'timeout' seconds. This is needed prior to performing transactions related to private keys such as sending bitcoins
> lbrycrd-cli walletpassphrase "my pass phrase" 60
> lbrycrd-cli walletlock
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletpassphrase", "params": ["my pass phrase", 60] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.
> lbrycrd-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:9245/
Update a PSBT with input information from our wallet and then sign inputs that we can sign for.
{
"psbt" : "value", (string) The base64-encoded partially signed transaction
"complete" : true|false, (boolean) If the transaction has a complete set of signatures
]
}
> lbrycrd-cli walletprocesspsbt "psbt"
Returns information about the active ZeroMQ notifications.
[
{ (json object)
"type": "pubhashtx", (string) Type of notification
"address": "..." (string) Address of the publisher
},
...
]
> lbrycrd-cli getzmqnotifications
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getzmqnotifications", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/