lbrycrd/contrib/devtools/generated/api_jrgen.json
Brannon King 9a67b514c9 flattening prefix trie work
put getclaimsintrie back as deprecated


added test for adding a lot of data to the claimtrie


updated unit test to dodge expiration fork
2019-07-01 14:44:28 -06:00

7283 lines
348 KiB
JSON

{
"$schema": "https://rawgit.com/mzernetsch/jrgen/master/jrgen-spec.schema.json",
"jrgen": "1.1",
"jsonrpc": "1.0",
"info": {
"title": "lbrycrd RPC API",
"version": "LBRYcrd Core RPC client version v0.17.1.0-ab5c074ba-dirty",
"description": []
},
"definitions": {},
"methods": {
"abandonclaim": {
"summary": "Create a transaction which spends a txout which assigned a value to a name, effectively abandoning that claim.",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction containing the unspent txout which should be spent."
},
"address": {
"type": "string",
"description": "The lbrycrd address to send to."
}
},
"required": [
"txid",
"address"
]
},
"result": {
"type": "string",
"description": "The new transaction id."
}
},
"abandonsupport": {
"summary": "Create a transaction which spends a txout which supported a name claim, effectively abandoning that support.",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction containing the unspent txout which should be spent."
},
"address": {
"type": "string",
"description": "The lbrycrd address to send to."
}
},
"required": [
"txid",
"address"
]
},
"result": {
"type": "string",
"description": "The new transaction id."
}
},
"checknormalization": {
"summary": "Given an unnormalized name of a claim, return normalized version of it",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "the name to normalize"
}
},
"required": [
"name"
]
},
"result": {
"type": "string",
"description": "fully normalized name"
}
},
"claimname": {
"summary": "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",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name to be assigned the value."
},
"value": {
"type": "string",
"description": "The value to assign to the name encoded in hexadecimal."
},
"amount": {
"type": "number",
"description": "The amount in LBRYcrd to send. eg 0.1"
}
},
"required": [
"name",
"value",
"amount"
]
},
"result": {
"type": "string",
"description": "The transaction id."
}
},
"getclaimbyid": {
"summary": "Get a claim by claim id",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"claimId": {
"type": "string",
"description": "the claimId of this claim"
}
},
"required": [
"claimId"
]
},
"result": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "the original name of the claim (before normalization)"
},
"normalized_name": {
"type": "string",
"description": "the name of this claim (after normalization)"
},
"value": {
"type": "string",
"description": "metadata of the claim"
},
"claimId": {
"type": "string",
"description": "the claimId of this claim"
},
"txid": {
"type": "string",
"description": "the hash of the transaction which has successfully claimed this name"
},
"n": {
"type": "number",
"description": "vout value"
},
"amount": {
"type": "number",
"description": "txout value"
},
"effective amount": {
"type": "number",
"description": "txout amount plus amount from all supports associated with the claim"
},
"supports": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "the txid of the support"
},
"n": {
"type": "number",
"description": "the index of the support in the transaction's list of outputs"
},
"height": {
"type": "number",
"description": "the height at which the support was included in the blockchain"
},
"valid at height": {
"type": "number",
"description": "the height at which the support is valid"
},
"amount": {
"type": "number",
"description": "the amount of the support"
},
"value": {
"type": "string",
"description": "the metadata of the support if any"
}
}
}
},
"height": {
"type": "number",
"description": "the height of the block in which this claim transaction is located"
},
"valid at height": {
"type": "number",
"description": "the height at which the claim is valid"
}
}
}
},
"getclaimsforname": {
"summary": "Return all claims and supports for a name",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "the name for which to get claims and supports"
},
"blockhash": {
"type": "string",
"description": "get claims for name at the block specified by this block hash. If none is given, the latest active block will be used."
}
},
"required": [
"name"
]
},
"result": {
"type": "object",
"properties": {
"nLastTakeoverHeight": {
"type": "number",
"description": "the last height at which ownership of the name changed"
},
"normalized_name": {
"type": "string",
"description": "the name of these claims after normalization"
},
"claims": {
"type": "array",
"items": {
"type": "object",
"properties": {
"claimId": {
"type": "string",
"description": "the claimId of this claim"
},
"txid": {
"type": "string",
"description": "the txid of this claim"
},
"n": {
"type": "number",
"description": "the index of the claim in the transaction's list of outputs"
},
"nHeight": {
"type": "number",
"description": "the height at which the claim was included in the blockchain"
},
"nValidAtHeight": {
"type": "number",
"description": "the height at which the claim became/becomes valid"
},
"nAmount": {
"type": "number",
"description": "the amount of the claim"
},
"value": {
"type": "string",
"description": "the metadata of the claim"
},
"nEffectiveAmount": {
"type": "number",
"description": "the total effective amount of the claim, taking into effect whether the claim or support has reached its nValidAtHeight"
},
"supports": {
"type": "array",
"items": {
"type": "array",
"properties": {
"txid": {
"type": "string",
"description": "the txid of the support"
},
"n": {
"type": "number",
"description": "the index of the support in the transaction's list of outputs"
},
"nHeight": {
"type": "number",
"description": "the height at which the support was included in the blockchain"
},
"nValidAtHeight": {
"type": "number",
"description": "the height at which the support became/becomes valid"
},
"nAmount": {
"type": "number",
"description": "the amount of the support"
},
"value": {
"type": "string",
"description": "the metadata of the support if any"
}
}
}
},
"name": {
"type": "string",
"description": "the original name of this claim before normalization"
}
}
}
},
"supports without claims": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "the txid of the support"
},
"n": {
"type": "number",
"description": "the index of the support in the transaction's list of outputs"
},
"nHeight": {
"type": "number",
"description": "the height at which the support was included in the blockchain"
},
"nValidAtHeight": {
"type": "number",
"description": "the height at which the support became/becomes valid"
},
"nAmount": {
"type": "number",
"description": "the amount of the support"
}
}
}
}
}
}
},
"getclaimsfortx": {
"summary": "Return any claims or supports found in a transaction",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "the txid of the transaction to check for unspent claims"
}
},
"required": [
"txid"
]
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"nOut": {
"type": "number",
"description": "the index of the claim or support in the transaction's list of outputs"
},
"claim type": {
"type": "string",
"description": "'claim' or 'support'"
},
"name": {
"type": "string",
"description": "the name claimed or supported"
},
"claimId": {
"type": "string",
"description": "if a claim, its ID"
},
"value": {
"type": "string",
"description": "if a name claim, the value of the claim"
},
"supported txid": {
"type": "string",
"description": "if a support, the txid of the supported claim"
},
"supported nout": {
"type": "number",
"description": "if a support, the index of the supported claim in its transaction"
},
"depth": {
"type": "number",
"description": "the depth of the transaction in the main chain"
},
"in claim trie": {
"type": "boolean",
"description": "if a name claim, whether the claim is active, i.e. has made it into the trie"
},
"is controlling": {
"type": "boolean",
"description": "if a name claim, whether the claim is the current controlling claim for the name"
},
"in support map": {
"type": "boolean",
"description": "if a support, whether the support is active, i.e. has made it into the support map"
},
"in queue": {
"type": "boolean",
"description": "whether the claim is in a queue waiting to be inserted into the trie or support map"
},
"blocks to valid": {
"type": "number",
"description": "if in a queue, the number of blocks until it's inserted into the trie or support map"
}
}
}
}
},
"getclaimsintrie": {
"summary": "Return all names in the trie.",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"blockhash": {
"type": "string",
"description": "get claims in the trie at the block specified by this block hash. If none is given, the latest active block will be used."
}
},
"required": []
},
"result": {
"type": "array",
"description": "all names in the trie that have claims"
}
},
"getnameproof": {
"summary": "Return the cryptographic proof that a name maps to a value or doesn't.",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "the name to get a proof for"
},
"blockhash": {
"type": "string",
"description": "the hash of the block which is the basis of the proof. If none is given, the latest block will be used."
}
},
"required": [
"name"
]
},
"result": {
"type": "object",
"properties": {
"nodes": {
"type": "array",
"items": {
"type": "array",
"properties": {
"valueHash": {
"type": "string",
"description": "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": {
"type": "string",
"description": "the txid of the claim which controls this name, if there is one."
},
"nOut": {
"type": "number",
"description": "the nOut of the claim which controls this name, if there is one."
},
"last takeover height": {
"type": "number",
"description": "the most recent height at which the value of a name changed other than through an update to the winning bid"
}
}
}
},
"gettotalclaimednames": {
"summary": "Return the total number of names that have been successfully claimed, and therefore exist in the trie",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "number",
"description": "the total number of names in the trie"
}
},
"gettotalclaims": {
"summary": "Return the total number of active claims in the trie",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "number",
"description": "the total number of active claims"
}
},
"gettotalvalueofclaims": {
"summary": "Return the total value of the claims in the trie",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"controlling_only": {
"type": "boolean",
"description": "only include the value of controlling claims"
}
},
"required": [
"controlling_only"
]
},
"result": {
"type": "number",
"description": "the total value of the claims in the trie"
}
},
"getvalueforname": {
"summary": "Return the winning value associated with a name, if one exists",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "the name to look up"
},
"blockhash": {
"type": "string",
"description": "get the value associated with the name at the block specified by this block hash. If none is given, the latest active block will be used."
}
},
"required": [
"name"
]
},
"result": {
"type": "string",
"description": "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)"
}
},
"listnameclaims": {
"summary": "Return a list of all transactions claiming names.",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"includesupports": {
"type": "boolean",
"description": "Whether to also include claim supports. Default is true."
},
"activeonly": {
"type": "boolean",
"description": "Whether to only include transactions which are still active, i.e. have not been spent. Default is false."
},
"minconf": {
"type": "number",
"description": "Only include transactions confirmed at least this many times.",
"default": 1
}
},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name that is claimed."
},
"claimtype": {
"type": "string",
"description": "CLAIM or SUPPORT."
},
"claimId": {
"type": "string",
"description": "The claimId of the claim."
},
"value": {
"type": "string",
"description": "The value assigned to the name, if claimtype is CLAIM."
},
"account": {
"type": "string",
"description": "The account name associated with the transaction. It will be \"\" for the default account."
},
"address": {
"type": "string",
"description": "The lbrycrd address of the transaction."
},
"category": {
"type": "string",
"description": "Always name"
},
"amount": {
"type": "number",
"description": "The amount in LBC."
},
"vout": {
"type": "number",
"description": "The vout value"
},
"fee": {
"type": "number",
"description": "The amount of the fee in LBC."
},
"height": {
"type": "number",
"description": "The height of the block in which this transaction was included."
},
"confirmations": {
"type": "number",
"description": "The number of confirmations for the transaction"
},
"blockhash": {
"type": "string",
"description": "The block hash containing the transaction."
},
"blockindex": {
"type": "number",
"description": "The block index containing the transaction."
},
"txid": {
"type": "string",
"description": "The transaction id."
},
"time": {
"type": "number",
"description": "The transaction time in seconds since epoch (midnight Jan 1 1970 GMT)."
},
"timereceived": {
"type": "number",
"description": "The time received in seconds since epoch (midnight Jan 1 1970 GMT)."
},
"comment": {
"type": "string",
"description": "If a comment is associated with the transaction."
}
}
}
}
},
"supportclaim": {
"summary": "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",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name claimed by the claim to support."
},
"claimid": {
"type": "string",
"description": "The claimid of the claim to support. This can be obtained by TODO PUT IN PLACE THAT SHOWS THIS."
},
"amount": {
"type": "number",
"description": "The amount in LBC to use to support the claim."
},
"value": {
"type": "string",
"description": "The metadata of the support encoded in hexadecimal."
}
},
"required": [
"name",
"claimid",
"amount"
]
},
"result": {
"type": "string",
"description": "The transaction id of the support."
}
},
"updateclaim": {
"summary": "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.",
"description": [],
"tags": [
"Claimtrie"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction containing the unspent txout which should be spent."
},
"value": {
"type": "string",
"description": "The value to assign to the name encoded in hexadecimal."
},
"amount": {
"type": "number",
"description": "The amount in LBRYcrd to use to bid for the name. eg 0.1"
}
},
"required": [
"txid",
"value",
"amount"
]
},
"result": {
"type": "string",
"description": "The new transaction id."
}
},
"getbestblockhash": {
"summary": "Returns the hash of the best (tip) block in the longest blockchain.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "string",
"description": "the block hash hex encoded"
}
},
"getblock": {
"summary": "If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'. If verbosity is 1, returns an Object with information about block <hash>. If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"blockhash": {
"type": "string",
"description": "The block hash"
},
"verbosity": {
"type": "number",
"description": "0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data",
"default": 1
}
},
"required": [
"blockhash"
]
},
"result": {
"type": "string",
"description": "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. }"
}
},
"getblockchaininfo": {
"summary": "Returns an object containing various state info regarding blockchain processing.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"description": "current network name as defined in BIP70 (main, test, regtest)"
},
"blocks": {
"type": "number",
"description": "the current number of blocks processed in the server"
},
"headers": {
"type": "number",
"description": "the current number of headers we have validated"
},
"bestblockhash": {
"type": "string",
"description": "the hash of the currently best block"
},
"difficulty": {
"type": "number",
"description": "the current difficulty"
},
"mediantime": {
"type": "number",
"description": "median time for the current best block"
},
"verificationprogress": {
"type": "number",
"description": "estimate of verification progress [0..1]"
},
"initialblockdownload": {
"type": "boolean",
"description": "(debug information) estimate of whether this node is in Initial Block Download mode."
},
"chainwork": {
"type": "string",
"description": "total amount of work in active chain, in hexadecimal"
},
"size_on_disk": {
"type": "number",
"description": "the estimated size of the block and undo files on disk"
},
"pruned": {
"type": "boolean",
"description": "if the blocks are subject to pruning"
},
"pruneheight": {
"type": "number",
"description": "lowest-height complete block stored (only present if pruning is enabled)"
},
"automatic_pruning": {
"type": "boolean",
"description": "whether automatic pruning is enabled (only present if pruning is enabled)"
},
"prune_target_size": {
"type": "number",
"description": "the target size used by pruning (only present if automatic pruning is enabled)"
},
"softforks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "name of softfork"
},
"version": {
"type": "number",
"description": "block version"
},
"reject": {
"type": "object",
"properties": {
"status": {
"type": "boolean",
"description": "true if threshold reached"
}
}
}
}
}
},
"bip9_softforks": {
"type": "object",
"properties": {
"xxxx": {
"type": "string",
"description": "name of the softfork"
},
"bip9_softforks": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "one of \"defined\", \"started\", \"locked_in\", \"active\", \"failed\""
},
"bit": {
"type": "number",
"description": "the bit (0-28) in the block version field used to signal this softfork (only for \"started\" status)"
},
"startTime": {
"type": "number",
"description": "the minimum median time past of a block at which the bit gains its meaning"
},
"timeout": {
"type": "number",
"description": "the median time past of a block at which the deployment is considered failed if not yet locked in"
},
"since": {
"type": "number",
"description": "height of the first block to which the status applies"
},
"statistics": {
"type": "object",
"properties": {
"period": {
"type": "number",
"description": "the length in blocks of the BIP9 signalling period"
},
"threshold": {
"type": "number",
"description": "the number of blocks with the version bit set required to activate the feature"
},
"elapsed": {
"type": "number",
"description": "the number of blocks elapsed since the beginning of the current period"
},
"count": {
"type": "number",
"description": "the number of blocks with the version bit set in the current period"
},
"possible": {
"type": "boolean",
"description": "returns false if there are not enough blocks left in this period to pass activation threshold"
}
}
}
}
}
}
},
"warnings": {
"type": "string",
"description": "any network and blockchain warnings."
}
}
}
},
"getblockcount": {
"summary": "Returns the number of blocks in the longest blockchain.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "number",
"description": "The current block count"
}
},
"getblockhash": {
"summary": "Returns hash of block in best-block-chain at height provided.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"height": {
"type": "number",
"description": "The height index"
}
},
"required": [
"height"
]
},
"result": {
"type": "string",
"description": "The block hash"
}
},
"getblockheader": {
"summary": "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>.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "The block hash"
},
"verbose": {
"type": "boolean",
"description": "true for a json object, false for the hex encoded data",
"default": true
}
},
"required": [
"hash"
]
},
"result": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "the block hash (same as provided)"
},
"confirmations": {
"type": "number",
"description": "The number of confirmations, or -1 if the block is not on the main chain"
},
"height": {
"type": "number",
"description": "The block height or index"
},
"version": {
"type": "number",
"description": "The block version"
},
"versionHex": {
"type": "string",
"description": "The block version formatted in hexadecimal"
},
"merkleroot": {
"type": "string",
"description": "The merkle root"
},
"nameclaimroot": {
"type": "string",
"description": "The hash of the root of the name claim trie"
},
"time": {
"type": "number",
"description": "The block time in seconds since epoch (Jan 1 1970 GMT)"
},
"mediantime": {
"type": "number",
"description": "The median block time in seconds since epoch (Jan 1 1970 GMT)"
},
"nonce": {
"type": "number",
"description": "The nonce"
},
"bits": {
"type": "string",
"description": "The bits"
},
"difficulty": {
"type": "number",
"description": "The difficulty"
},
"chainwork": {
"type": "string",
"description": "Expected number of hashes required to produce the current chain (in hex)"
},
"nTx": {
"type": "number",
"description": "The number of transactions in the block."
},
"previousblockhash": {
"type": "string",
"description": "The hash of the previous block"
},
"nextblockhash": {
"type": "string",
"description": "The hash of the next block"
}
}
}
},
"getblockstats": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"hash_or_height": {
"type": "number",
"description": "The block hash or height of the target block"
},
"stats": {
"type": "array",
"description": "Values to plot, by default all values (see result below)\n [\n \"height\", (string, optional) Selected statistic\n \"time\", (string, optional) Selected statistic\n ,...\n ]"
}
},
"required": [
"hash_or_height"
]
},
"result": {
"type": "object",
"properties": {
"avgfee": {
"type": "number",
"description": "Average fee in the block"
},
"avgfeerate": {
"type": "number",
"description": "Average feerate (in satoshis per virtual byte)"
},
"avgtxsize": {
"type": "number",
"description": "Average transaction size"
},
"blockhash": {
"type": "string",
"description": "The block hash (to check for potential reorgs)"
},
"feerate_percentiles": {
"type": "array",
"items": {
"type": "array"
}
},
"height": {
"type": "number",
"description": "The height of the block"
},
"ins": {
"type": "number",
"description": "The number of inputs (excluding coinbase)"
},
"maxfee": {
"type": "number",
"description": "Maximum fee in the block"
},
"maxfeerate": {
"type": "number",
"description": "Maximum feerate (in satoshis per virtual byte)"
},
"maxtxsize": {
"type": "number",
"description": "Maximum transaction size"
},
"medianfee": {
"type": "number",
"description": "Truncated median fee in the block"
},
"mediantime": {
"type": "number",
"description": "The block median time past"
},
"mediantxsize": {
"type": "number",
"description": "Truncated median transaction size"
},
"minfee": {
"type": "number",
"description": "Minimum fee in the block"
},
"minfeerate": {
"type": "number",
"description": "Minimum feerate (in satoshis per virtual byte)"
},
"mintxsize": {
"type": "number",
"description": "Minimum transaction size"
},
"outs": {
"type": "number",
"description": "The number of outputs"
},
"subsidy": {
"type": "number",
"description": "The block subsidy"
},
"swtotal_size": {
"type": "number",
"description": "Total size of all segwit transactions"
},
"swtotal_weight": {
"type": "number",
"description": "Total weight of all segwit transactions divided by segwit scale factor (4)"
},
"swtxs": {
"type": "number",
"description": "The number of segwit transactions"
},
"time": {
"type": "number",
"description": "The block time"
},
"total_out": {
"type": "number",
"description": "Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee])"
},
"total_size": {
"type": "number",
"description": "Total size of all non-coinbase transactions"
},
"total_weight": {
"type": "number",
"description": "Total weight of all non-coinbase transactions divided by segwit scale factor (4)"
},
"totalfee": {
"type": "number",
"description": "The fee total"
},
"txs": {
"type": "number",
"description": "The number of transactions (excluding coinbase)"
},
"utxo_increase": {
"type": "number",
"description": "The increase/decrease in the number of unspent outputs"
},
"utxo_size_inc": {
"type": "number",
"description": "The increase/decrease in size for the utxo index (not discounting op_return and similar)"
}
}
}
},
"getchaintips": {
"summary": "Return information about all known tips in the block tree, including the main chain as well as orphaned branches.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"branchlen": {
"type": "number",
"description": "length of branch connecting the tip to the main chain"
},
"status": {
"type": "string",
"description": "status of the chain (active, valid-fork, valid-headers, headers-only, invalid)"
}
}
}
}
},
"getchaintxstats": {
"summary": "Compute statistics about the total number and rate of transactions in the chain.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"nblocks": {
"type": "number",
"description": "Size of the window in number of blocks (default: one month)."
},
"blockhash": {
"type": "string",
"description": "The hash of the block that ends the window."
}
},
"required": []
},
"result": {
"type": "object",
"properties": {
"time": {
"type": "number",
"description": "The timestamp for the final block in the window in UNIX format."
},
"txcount": {
"type": "number",
"description": "The total number of transactions in the chain up to that point."
},
"window_final_block_hash": {
"type": "string",
"description": "The hash of the final block in the window."
},
"window_block_count": {
"type": "number",
"description": "Size of the window in number of blocks."
},
"window_tx_count": {
"type": "number",
"description": "The number of transactions in the window. Only returned if \"window_block_count\" is > 0."
},
"window_interval": {
"type": "number",
"description": "The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0."
},
"txrate": {
"type": "number",
"description": "The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0."
}
}
}
},
"getdifficulty": {
"summary": "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "number",
"description": "the proof-of-work difficulty as a multiple of the minimum difficulty."
}
},
"getmempoolancestors": {
"summary": "If txid is in the mempool, returns all in-mempool ancestors.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id (must be in mempool)"
},
"verbose": {
"type": "boolean",
"description": "True for a json object, false for array of transaction ids",
"default": false
}
},
"required": [
"txid"
]
},
"result": {
"type": "object",
"items": {
"type": "object",
"properties": {
"transactionid": {
"type": "string",
"description": "The transaction id of an in-mempool ancestor transaction"
}
}
},
"properties": {
"transactionid": {
"type": "object",
"properties": {
"size": {
"type": "number",
"description": "virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."
},
"fee": {
"type": "number",
"description": "transaction fee in LBC (DEPRECATED)"
},
"modifiedfee": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority (DEPRECATED)"
},
"time": {
"type": "number",
"description": "local time transaction entered pool in seconds since 1 Jan 1970 GMT"
},
"height": {
"type": "number",
"description": "block height when transaction entered pool"
},
"descendantcount": {
"type": "number",
"description": "number of in-mempool descendant transactions (including this one)"
},
"descendantsize": {
"type": "number",
"description": "virtual transaction size of in-mempool descendants (including this one)"
},
"descendantfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)"
},
"ancestorcount": {
"type": "number",
"description": "number of in-mempool ancestor transactions (including this one)"
},
"ancestorsize": {
"type": "number",
"description": "virtual transaction size of in-mempool ancestors (including this one)"
},
"ancestorfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)"
},
"wtxid": {
"type": "string",
"description": "hash of serialized transaction, including witness data"
},
"fees": {
"type": "object",
"properties": {
"base": {
"type": "number",
"description": "transaction fee in LBC"
},
"modified": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority in LBC"
},
"ancestor": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) in LBC"
},
"descendant": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) in LBC"
}
}
},
"depends": {
"type": "array",
"items": {
"type": "array"
}
},
"spentby": {
"type": "array",
"items": {
"type": "array"
}
}
}
}
}
}
},
"getmempooldescendants": {
"summary": "If txid is in the mempool, returns all in-mempool descendants.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id (must be in mempool)"
},
"verbose": {
"type": "boolean",
"description": "True for a json object, false for array of transaction ids",
"default": false
}
},
"required": [
"txid"
]
},
"result": {
"type": "object",
"items": {
"type": "object",
"properties": {
"transactionid": {
"type": "string",
"description": "The transaction id of an in-mempool descendant transaction"
}
}
},
"properties": {
"transactionid": {
"type": "object",
"properties": {
"size": {
"type": "number",
"description": "virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."
},
"fee": {
"type": "number",
"description": "transaction fee in LBC (DEPRECATED)"
},
"modifiedfee": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority (DEPRECATED)"
},
"time": {
"type": "number",
"description": "local time transaction entered pool in seconds since 1 Jan 1970 GMT"
},
"height": {
"type": "number",
"description": "block height when transaction entered pool"
},
"descendantcount": {
"type": "number",
"description": "number of in-mempool descendant transactions (including this one)"
},
"descendantsize": {
"type": "number",
"description": "virtual transaction size of in-mempool descendants (including this one)"
},
"descendantfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)"
},
"ancestorcount": {
"type": "number",
"description": "number of in-mempool ancestor transactions (including this one)"
},
"ancestorsize": {
"type": "number",
"description": "virtual transaction size of in-mempool ancestors (including this one)"
},
"ancestorfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)"
},
"wtxid": {
"type": "string",
"description": "hash of serialized transaction, including witness data"
},
"fees": {
"type": "object",
"properties": {
"base": {
"type": "number",
"description": "transaction fee in LBC"
},
"modified": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority in LBC"
},
"ancestor": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) in LBC"
},
"descendant": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) in LBC"
}
}
},
"depends": {
"type": "array",
"items": {
"type": "array"
}
},
"spentby": {
"type": "array",
"items": {
"type": "array"
}
}
}
}
}
}
},
"getmempoolentry": {
"summary": "Returns mempool data for given transaction",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id (must be in mempool)"
}
},
"required": [
"txid"
]
},
"result": {
"type": "object",
"properties": {
"size": {
"type": "number",
"description": "virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."
},
"fee": {
"type": "number",
"description": "transaction fee in LBC (DEPRECATED)"
},
"modifiedfee": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority (DEPRECATED)"
},
"time": {
"type": "number",
"description": "local time transaction entered pool in seconds since 1 Jan 1970 GMT"
},
"height": {
"type": "number",
"description": "block height when transaction entered pool"
},
"descendantcount": {
"type": "number",
"description": "number of in-mempool descendant transactions (including this one)"
},
"descendantsize": {
"type": "number",
"description": "virtual transaction size of in-mempool descendants (including this one)"
},
"descendantfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)"
},
"ancestorcount": {
"type": "number",
"description": "number of in-mempool ancestor transactions (including this one)"
},
"ancestorsize": {
"type": "number",
"description": "virtual transaction size of in-mempool ancestors (including this one)"
},
"ancestorfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)"
},
"wtxid": {
"type": "string",
"description": "hash of serialized transaction, including witness data"
},
"fees": {
"type": "object",
"properties": {
"base": {
"type": "number",
"description": "transaction fee in LBC"
},
"modified": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority in LBC"
},
"ancestor": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) in LBC"
},
"descendant": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) in LBC"
}
}
},
"depends": {
"type": "array",
"items": {
"type": "array"
}
},
"spentby": {
"type": "array",
"items": {
"type": "array"
}
}
}
}
},
"getmempoolinfo": {
"summary": "Returns details on the active state of the TX memory pool.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"size": {
"type": "number",
"description": "Current tx count"
},
"bytes": {
"type": "number",
"description": "Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted"
},
"usage": {
"type": "number",
"description": "Total memory usage for the mempool"
},
"maxmempool": {
"type": "number",
"description": "Maximum memory usage for the mempool"
},
"mempoolminfee": {
"type": "number",
"description": "Minimum fee rate in LBC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee"
},
"minrelaytxfee": {
"type": "number",
"description": "Current minimum relay fee for transactions"
}
}
}
},
"getrawmempool": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"verbose": {
"type": "boolean",
"description": "True for a json object, false for array of transaction ids",
"default": false
}
},
"required": []
},
"result": {
"type": "object",
"items": {
"type": "object",
"properties": {
"transactionid": {
"type": "string",
"description": "The transaction id"
}
}
},
"properties": {
"transactionid": {
"type": "object",
"properties": {
"size": {
"type": "number",
"description": "virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."
},
"fee": {
"type": "number",
"description": "transaction fee in LBC (DEPRECATED)"
},
"modifiedfee": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority (DEPRECATED)"
},
"time": {
"type": "number",
"description": "local time transaction entered pool in seconds since 1 Jan 1970 GMT"
},
"height": {
"type": "number",
"description": "block height when transaction entered pool"
},
"descendantcount": {
"type": "number",
"description": "number of in-mempool descendant transactions (including this one)"
},
"descendantsize": {
"type": "number",
"description": "virtual transaction size of in-mempool descendants (including this one)"
},
"descendantfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)"
},
"ancestorcount": {
"type": "number",
"description": "number of in-mempool ancestor transactions (including this one)"
},
"ancestorsize": {
"type": "number",
"description": "virtual transaction size of in-mempool ancestors (including this one)"
},
"ancestorfees": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)"
},
"wtxid": {
"type": "string",
"description": "hash of serialized transaction, including witness data"
},
"fees": {
"type": "object",
"properties": {
"base": {
"type": "number",
"description": "transaction fee in LBC"
},
"modified": {
"type": "number",
"description": "transaction fee with fee deltas used for mining priority in LBC"
},
"ancestor": {
"type": "number",
"description": "modified fees (see above) of in-mempool ancestors (including this one) in LBC"
},
"descendant": {
"type": "number",
"description": "modified fees (see above) of in-mempool descendants (including this one) in LBC"
}
}
},
"depends": {
"type": "array",
"items": {
"type": "array"
}
},
"spentby": {
"type": "array",
"items": {
"type": "array"
}
}
}
}
}
}
},
"gettxout": {
"summary": "Returns details about an unspent transaction output.",
"description": [
"",
"",
"Get unspent transactions",
"> lbrycrd-cli listunspent ",
"",
"View the details",
"> lbrycrd-cli gettxout \"txid\" 1",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id"
},
"n": {
"type": "number",
"description": "vout number"
},
"include_mempool": {
"type": "boolean",
"description": "Whether to include the mempool. Default: true. Note that an unspent output that is spent in the mempool won't appear."
}
},
"required": [
"txid",
"n"
]
},
"result": {
"type": "object",
"properties": {
"bestblock": {
"type": "string",
"description": "The hash of the block at the tip of the chain"
},
"confirmations": {
"type": "number",
"description": "The number of confirmations"
},
"value": {
"type": "number",
"description": "The transaction value in LBC"
},
"scriptPubKey": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": ""
},
"hex": {
"type": "string",
"description": ""
},
"reqSigs": {
"type": "number",
"description": "Number of required signatures"
},
"type": {
"type": "string",
"description": "The type, eg pubkeyhash"
},
"addresses": {
"type": "array",
"items": {
"type": "array",
"properties": {
"address": {
"type": "string",
"description": "lbrycrd address"
}
}
}
}
}
},
"coinbase": {
"type": "boolean",
"description": "Coinbase or not"
}
}
}
},
"gettxoutproof": {
"summary": "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).",
"description": [],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"txids": {
"type": "string",
"description": "A json array of txids to filter [ \"txid\" (string) A transaction hash ,... ]"
},
"blockhash": {
"type": "string",
"description": "If specified, looks for txid in the block with this hash"
}
},
"required": [
"txids"
]
},
"result": {
"type": "string",
"description": "A string that is a serialized, hex-encoded data for the proof."
}
},
"gettxoutsetinfo": {
"summary": "Returns statistics about the unspent transaction output set. Note this call may take some time.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"height": {
"type": "number",
"description": "The current block height (index)"
},
"bestblock": {
"type": "string",
"description": "The hash of the block at the tip of the chain"
},
"transactions": {
"type": "number",
"description": "The number of transactions with unspent outputs"
},
"txouts": {
"type": "number",
"description": "The number of unspent transaction outputs"
},
"bogosize": {
"type": "number",
"description": "A meaningless metric for UTXO set size"
},
"hash_serialized_2": {
"type": "string",
"description": "The serialized hash"
},
"disk_size": {
"type": "number",
"description": "The estimated size of the chainstate on disk"
},
"total_amount": {
"type": "number",
"description": "The total amount"
}
}
}
},
"preciousblock": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"blockhash": {
"type": "string",
"description": "the hash of the block to mark as precious"
}
},
"required": [
"blockhash"
]
}
},
"pruneblockchain": {
"summary": "",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"height": {
"type": "number",
"description": "The block height to prune up to. May be set to a discrete height, or a unix timestamp to prune blocks whose block time is at least 2 hours older than the provided timestamp."
}
},
"required": [
"height"
]
},
"result": {
"type": "number",
"description": "Height of the last block pruned."
}
},
"savemempool": {
"summary": "Dumps the mempool to disk. It will fail until the previous dump is fully loaded.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"scantxoutset": {
"summary": "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.",
"description": [
"",
" addr(<address>) Outputs whose scriptPubKey corresponds to the specified address (does not include P2PK)",
" raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts",
" combo(<pubkey>) P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs for the given pubkey",
" pkh(<pubkey>) P2PKH outputs for the given pubkey",
" sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys",
"",
"In the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one",
"or more path elements separated by \"/\", and optionally ending in \"/*\" (unhardened), or \"/*'\" or \"/*h\" (hardened) to specify all",
"unhardened or hardened child keys.",
"In the latter case, a range needs to be specified by below if different from 1000.",
"For more information on output descriptors, see the documentation in the doc/descriptors.md file.",
"",
"Arguments:",
"1. \"action\" (string, required) The action to execute",
" \"start\" for starting a scan",
" \"abort\" for aborting the current scan (returns true when abort was successful)",
" \"status\" for progress report (in %) of the current scan",
"2. \"scanobjects\" (array, required) Array of scan objects",
" [ Every scan object is either a string descriptor or an object:",
" \"descriptor\", (string, optional) An output descriptor",
" { (object, optional) An object with output descriptor and metadata",
" \"desc\": \"descriptor\", (string, required) An output descriptor",
" \"range\": n, (numeric, optional) Up to what child index HD chains should be explored (default: 1000)",
" },",
" ...",
" ]",
"",
"Result:",
"{",
" \"unspents\": [",
" {",
" \"txid\" : \"transactionid\", (string) The transaction id",
" \"vout\": n, (numeric) the vout value",
" \"scriptPubKey\" : \"script\", (string) the script key",
" \"amount\" : x.xxx, (numeric) The total amount in LBC of the unspent output",
" \"height\" : n, (numeric) Height of the unspent transaction output",
" }",
" ,...], ",
" \"total_amount\" : x.xxx, (numeric) The total amount of all found unspent outputs in LBC",
"]",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"verifychain": {
"summary": "Verifies blockchain database.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"checklevel": {
"type": "number",
"description": "How thorough the block verification is.",
"default": 3
},
"nblocks": {
"type": "number",
"description": "The number of blocks to check.",
"default": 24
}
},
"required": []
},
"result": {
"type": "boolean",
"description": "Verified or not"
}
},
"verifytxoutproof": {
"summary": "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",
"description": [],
"tags": [
"Blockchain"
],
"params": {
"type": "object",
"properties": {
"proof": {
"type": "string",
"description": "The hex-encoded proof generated by gettxoutproof"
}
},
"required": [
"proof"
]
}
},
"getmemoryinfo": {
"summary": "Returns an object containing information about memory usage.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Control"
],
"params": {
"type": "object",
"properties": {
"null": {
"type": "object",
"description": "\"mode\" determines what kind of information is returned. This argument is optional, the default mode is \"stats\".\n - \"stats\" returns general statistics about memory usage in the daemon.\n - \"mallocinfo\" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+)."
}
},
"required": [
null
]
},
"result": {
"type": "object",
"properties": {
"locked": {
"type": "object",
"properties": {
"used": {
"type": "number",
"description": "Number of bytes used"
},
"free": {
"type": "number",
"description": "Number of bytes available in current arenas"
},
"total": {
"type": "number",
"description": "Total number of bytes managed"
},
"locked": {
"type": "number",
"description": "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": {
"type": "number",
"description": "Number allocated chunks"
},
"chunks_free": {
"type": "number",
"description": "Number unused chunks"
}
}
}
}
}
},
"help": {
"summary": "List all commands, or get help for a specified command.",
"description": [],
"tags": [
"Control"
],
"params": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "The command to get help on"
}
},
"required": []
},
"result": {
"type": "string",
"description": "The help text"
}
},
"logging": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Control"
],
"params": {
"type": "object",
"properties": {
"include": {
"type": "array",
"description": "A json array of categories to add debug logging\n [\n \"category\" (string) the valid logging category\n ,...\n ]"
},
"exclude": {
"type": "array",
"description": "A json array of categories to remove debug logging\n [\n \"category\" (string) the valid logging category\n ,...\n ]"
}
},
"required": []
},
"result": {
"type": "object",
"properties": {
"category": {
"type": "number",
"description": "if being debug logged or not. 0:inactive, 1:active"
}
}
}
},
"stop": {
"summary": "Stop lbrycrd server.",
"description": [],
"tags": [
"Control"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"uptime": {
"summary": "Returns the total uptime of the server.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Control"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "number",
"description": "The number of seconds that the server has been running"
}
},
"generate": {
"summary": "Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.",
"description": [
"",
"",
"Generate 11 blocks",
"> lbrycrd-cli generate 11",
""
],
"tags": [
"Generating"
],
"params": {
"type": "object",
"properties": {
"nblocks": {
"type": "number",
"description": "How many blocks are generated immediately."
},
"maxtries": {
"type": "number",
"description": "How many iterations to try (default = 1000000)."
}
},
"required": [
"nblocks"
]
}
},
"generatetoaddress": {
"summary": "Mine blocks immediately to a specified address (before the RPC call returns)",
"description": [
"",
"",
"Generate 11 blocks to myaddress",
"> lbrycrd-cli generatetoaddress 11 \"myaddress\"",
""
],
"tags": [
"Generating"
],
"params": {
"type": "object",
"properties": {
"nblocks": {
"type": "number",
"description": "How many blocks are generated immediately."
},
"address": {
"type": "string",
"description": "The address to send the newly generated lbry to."
},
"maxtries": {
"type": "number",
"description": "How many iterations to try (default = 1000000)."
}
},
"required": [
"nblocks",
"address"
]
}
},
"getblocktemplate": {
"summary": "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",
"description": [
"",
"> 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/",
""
],
"tags": [
"Mining"
],
"params": {
"type": "object",
"properties": {
"template_request": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "This must be set to \"template\", \"proposal\" (see BIP 23), or omitted"
},
"capabilities": {
"type": "array",
"items": {
"type": "array",
"properties": {
"support": {
"type": "string",
"description": "client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'"
}
}
}
},
"rules": {
"type": "array",
"items": {
"type": "array",
"properties": {
"support": {
"type": "string",
"description": "client side supported softfork deployment"
}
}
}
}
}
}
},
"required": []
},
"result": {
"type": "object",
"properties": {
"version": {
"type": "number",
"description": "The preferred block version"
},
"vbavailable": {
"type": "object",
"properties": {
"rulename": {
"type": "number",
"description": "identifies the bit number as indicating acceptance and readiness for the named softfork rule"
}
}
},
"vbrequired": {
"type": "number",
"description": "bit mask of versionbits the server requires set in submissions"
},
"previousblockhash": {
"type": "string",
"description": "The hash of current highest block"
},
"transactions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "transaction data encoded in hexadecimal (byte-for-byte)"
},
"txid": {
"type": "string",
"description": "transaction id encoded in little-endian hexadecimal"
},
"hash": {
"type": "string",
"description": "hash encoded in little-endian hexadecimal (including witness data)"
},
"depends": {
"type": "array",
"items": {
"type": "array",
"properties": {
"n": {
"type": "number",
"description": "transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is"
}
}
}
},
"fee": {
"type": "number",
"description": "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": {
"type": "number",
"description": "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": {
"type": "number",
"description": "total transaction weight, as counted for purposes of block limits"
}
}
}
},
"coinbaseaux": {
"type": "object",
"properties": {
"flags": {
"type": "string",
"description": "key name is to be ignored, and value included in scriptSig"
}
}
},
"coinbasevalue": {
"type": "number",
"description": "maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)"
},
"target": {
"type": "string",
"description": "The hash target"
},
"mintime": {
"type": "number",
"description": "The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)"
},
"mutable": {
"type": "array",
"items": {
"type": "array",
"properties": {
"value": {
"type": "string",
"description": "A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'"
}
}
}
},
"noncerange": {
"type": "string",
"description": "A range of valid nonces"
},
"sigoplimit": {
"type": "number",
"description": "limit of sigops in blocks"
},
"sizelimit": {
"type": "number",
"description": "limit of block size"
},
"weightlimit": {
"type": "number",
"description": "limit of block weight"
},
"curtime": {
"type": "number",
"description": "current timestamp in seconds since epoch (Jan 1 1970 GMT)"
},
"bits": {
"type": "string",
"description": "compressed target of next block"
},
"height": {
"type": "number",
"description": "The height of the next block"
},
"claimtrie": {
"type": "string",
"description": "The root hash of the claim trie in hex"
}
}
}
},
"getmininginfo": {
"summary": "Returns a json object containing mining-related information.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Mining"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"blocks": {
"type": "number",
"description": "The current block"
},
"currentblockweight": {
"type": "number",
"description": "The last block weight"
},
"currentblocktx": {
"type": "number",
"description": "The last block transaction"
},
"difficulty": {
"type": "number",
"description": "The current difficulty"
},
"networkhashps": {
"type": "number",
"description": "The network hashes per second"
},
"pooledtx": {
"type": "number",
"description": "The size of the mempool"
},
"chain": {
"type": "string",
"description": "current network name as defined in BIP70 (main, test, regtest)"
},
"warnings": {
"type": "string",
"description": "any network and blockchain warnings"
}
}
}
},
"getnetworkhashps": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Mining"
],
"params": {
"type": "object",
"properties": {
"nblocks": {
"type": "number",
"description": "The number of blocks, or -1 for blocks since last difficulty change.",
"default": 120
},
"height": {
"type": "number",
"description": "To estimate at the time of the given height.",
"default": -1
}
},
"required": []
},
"result": {
"type": "number",
"description": "Hashes per second estimated"
}
},
"prioritisetransaction": {
"summary": "Accepts the transaction into mined blocks at a higher (or lower) priority",
"description": [
"",
"> 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/",
""
],
"tags": [
"Mining"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id."
},
"dummy": {
"type": "number",
"description": "API-Compatibility for previous API. Must be zero or null. DEPRECATED. For forward compatibility use named arguments and omit this parameter."
},
"fee_delta": {
"type": "number",
"description": "The fee value (in satoshis) to add (or subtract, if negative). Note, that this value is not a fee rate. It is a value to modify absolute fee of the TX. The fee is not actually paid, only the algorithm for selecting transactions into a block considers the transaction as it would have paid a higher (or lower) fee."
}
},
"required": [
"txid",
"fee_delta"
]
},
"result": {
"type": "boolean",
"description": "Returns true"
}
},
"submitblock": {
"summary": "Attempts to submit new block to network. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Mining"
],
"params": {
"type": "object",
"properties": {
"hexdata": {
"type": "string",
"description": "the hex-encoded block data to submit"
},
"dummy": {
"type": "optional",
"description": "dummy value, for compatibility with BIP"
},
"null": {
"type": "object",
"description": "This value is ignored."
}
},
"required": [
"hexdata",
null
]
}
},
"addnode": {
"summary": "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).",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "The node (see getpeerinfo for nodes)"
},
"command": {
"type": "string",
"description": "'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once"
}
},
"required": [
"node",
"command"
]
}
},
"clearbanned": {
"summary": "Clear all banned IPs.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"disconnectnode": {
"summary": "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.",
"description": [
"",
"> lbrycrd-cli disconnectnode \"192.168.0.6:8333\"",
"> lbrycrd-cli disconnectnode \"\" 1",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"disconnectnode\", \"params\": [\"192.168.0.6:8333\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The IP address/port of the node"
},
"nodeid": {
"type": "number",
"description": "The node ID (see getpeerinfo for node IDs)"
}
},
"required": []
}
},
"getaddednodeinfo": {
"summary": "Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "If provided, return information about this specific node, otherwise all nodes are returned."
}
},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"addednode": {
"type": "string",
"description": "The node IP address or name (as provided to addnode)"
},
"connected": {
"type": "boolean",
"description": "If connected"
},
"addresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The lbrycrd server IP and port we're connected to"
},
"connected": {
"type": "string",
"description": "connection, inbound or outbound"
}
}
}
}
}
}
}
},
"getconnectioncount": {
"summary": "Returns the number of connections to other nodes.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "number",
"description": "The connection count"
}
},
"getnettotals": {
"summary": "Returns information about network traffic, including bytes in, bytes out, and current time.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"totalbytesrecv": {
"type": "number",
"description": "Total bytes received"
},
"totalbytessent": {
"type": "number",
"description": "Total bytes sent"
},
"timemillis": {
"type": "number",
"description": "Current UNIX time in milliseconds"
},
"uploadtarget": {
"type": "object",
"properties": {
"timeframe": {
"type": "number",
"description": "Length of the measuring timeframe in seconds"
},
"target": {
"type": "number",
"description": "Target in bytes"
},
"target_reached": {
"type": "boolean",
"description": "True if target is reached"
},
"serve_historical_blocks": {
"type": "boolean",
"description": "True if serving historical blocks"
},
"bytes_left_in_cycle": {
"type": "number",
"description": "Bytes left in current time cycle"
},
"time_left_in_cycle": {
"type": "number",
"description": "Seconds left in current time cycle"
}
}
}
}
}
},
"getnetworkinfo": {
"summary": "Returns an object containing various state info regarding P2P networking.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"version": {
"type": "number",
"description": "the server version"
},
"subversion": {
"type": "string",
"description": "the server subversion string"
},
"protocolversion": {
"type": "number",
"description": "the protocol version"
},
"localservices": {
"type": "string",
"description": "the services we offer to the network"
},
"localrelay": {
"type": "boolean",
"description": "true if transaction relay is requested from peers"
},
"timeoffset": {
"type": "number",
"description": "the time offset"
},
"connections": {
"type": "number",
"description": "the number of connections"
},
"networkactive": {
"type": "boolean",
"description": "whether p2p networking is enabled"
},
"networks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "network (ipv4, ipv6 or onion)"
},
"limited": {
"type": "boolean",
"description": "is the network limited using -onlynet?"
},
"reachable": {
"type": "boolean",
"description": "is the network reachable?"
},
"proxy": {
"type": "string",
"description": "the proxy that is used for this network, or empty if none"
},
"proxy_randomize_credentials": {
"type": "string",
"description": "Whether randomized credentials are used"
}
}
}
},
"relayfee": {
"type": "number",
"description": "minimum relay fee for transactions in LBC/kB"
},
"incrementalfee": {
"type": "number",
"description": "minimum fee increment for mempool limiting or BIP 125 replacement in LBC/kB"
},
"localaddresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "network address"
},
"port": {
"type": "number",
"description": "network port"
},
"score": {
"type": "number",
"description": "relative score"
}
}
}
},
"warnings": {
"type": "string",
"description": "any network and blockchain warnings"
}
}
}
},
"getpeerinfo": {
"summary": "Returns data about each connected network node as a json array of objects.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Peer index"
},
"addr": {
"type": "string",
"description": "The IP address and port of the peer"
},
"addrbind": {
"type": "string",
"description": "Bind address of the connection to the peer"
},
"addrlocal": {
"type": "string",
"description": "Local address as reported by the peer"
},
"services": {
"type": "string",
"description": "The services offered"
},
"relaytxes": {
"type": "boolean",
"description": "Whether peer has asked us to relay transactions to it"
},
"lastsend": {
"type": "number",
"description": "The time in seconds since epoch (Jan 1 1970 GMT) of the last send"
},
"lastrecv": {
"type": "number",
"description": "The time in seconds since epoch (Jan 1 1970 GMT) of the last receive"
},
"bytessent": {
"type": "number",
"description": "The total bytes sent"
},
"bytesrecv": {
"type": "number",
"description": "The total bytes received"
},
"conntime": {
"type": "number",
"description": "The connection time in seconds since epoch (Jan 1 1970 GMT)"
},
"timeoffset": {
"type": "number",
"description": "The time offset in seconds"
},
"pingtime": {
"type": "number",
"description": "ping time (if available)"
},
"minping": {
"type": "number",
"description": "minimum observed ping time (if any at all)"
},
"pingwait": {
"type": "number",
"description": "ping wait (if non-zero)"
},
"version": {
"type": "number",
"description": "The peer version, such as 70001"
},
"subver": {
"type": "string",
"description": "The string version"
},
"inbound": {
"type": "boolean",
"description": "Inbound (true) or Outbound (false)"
},
"addnode": {
"type": "boolean",
"description": "Whether connection was due to addnode/-connect or if it was an automatic/inbound connection"
},
"startingheight": {
"type": "number",
"description": "The starting height (block) of the peer"
},
"banscore": {
"type": "number",
"description": "The ban score"
},
"synced_headers": {
"type": "number",
"description": "The last header we have in common with this peer"
},
"synced_blocks": {
"type": "number",
"description": "The last block we have in common with this peer"
},
"inflight": {
"type": "array",
"items": {
"type": "object",
"properties": {
"n,": {
"type": "number",
"description": "The heights of blocks we're currently asking from this peer"
}
}
}
},
"whitelisted": {
"type": "boolean",
"description": "Whether the peer is whitelisted"
},
"bytessent_per_msg": {
"type": "object",
"properties": {
"addr": {
"type": "number",
"description": "The total bytes sent aggregated by message type"
}
}
},
"bytesrecv_per_msg": {
"type": "object",
"properties": {
"addr": {
"type": "number",
"description": "The total bytes received aggregated by message type"
}
}
}
}
}
}
},
"listbanned": {
"summary": "List all banned IPs/Subnets.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"ping": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"setban": {
"summary": "Attempts to add or remove an IP/Subnet from the banned list.",
"description": [
"",
"> lbrycrd-cli setban \"192.168.0.6\" \"add\" 86400",
"> 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/",
""
],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {
"subnet": {
"type": "string",
"description": "The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)"
},
"command": {
"type": "string",
"description": "'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list"
},
"bantime": {
"type": "number",
"description": "time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)"
},
"absolute": {
"type": "boolean",
"description": "If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)"
}
},
"required": [
"subnet",
"command"
]
}
},
"setnetworkactive": {
"summary": "Disable/enable all p2p network activity.",
"description": [],
"tags": [
"Network"
],
"params": {
"type": "object",
"properties": {
"state": {
"type": "boolean",
"description": "true to enable networking, false to disable"
}
},
"required": [
"state"
]
}
},
"combinepsbt": {
"summary": "Combine multiple partially signed LBRY transactions into one transaction. Implements the Combiner role.",
"description": [
"",
"> lbrycrd-cli combinepsbt [\"mybase64_1\", \"mybase64_2\", \"mybase64_3\"]",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"txs": {
"type": "string",
"description": "A json array of base64 strings of partially signed transactions [ \"psbt\" (string) A base64 string of a PSBT ,... ]"
}
},
"required": [
"txs"
]
},
"result": {
"type": "string",
"description": "The base64-encoded partially signed transaction"
}
},
"combinerawtransaction": {
"summary": "Combine multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.",
"description": [
"",
"> lbrycrd-cli combinerawtransaction [\"myhex1\", \"myhex2\", \"myhex3\"]",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"txs": {
"type": "string",
"description": "A json array of hex strings of partially signed transactions [ \"hexstring\" (string) A transaction hash ,... ]"
}
},
"required": [
"txs"
]
},
"result": {
"type": "string",
"description": "The hex-encoded raw transaction with signature(s)"
}
},
"converttopsbt": {
"summary": "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.",
"description": [
"",
"",
"Create a transaction",
"> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"",
"",
"Convert the transaction to a PSBT",
"> lbrycrd-cli converttopsbt \"rawtransaction\"",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The hex string of a raw transaction"
},
"permitsigdata": {
"type": "boolean",
"description": "If true, any signatures in the input will be discarded and conversion. will continue. If false, RPC will fail if any signatures are present.",
"default": false
},
"iswitness": {
"type": "boolean",
"description": "Whether the transaction hex is a serialized witness transaction. If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserializaion will be tried. If false, only non-witness deserialization wil be tried. Only has an effect if permitsigdata is true."
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "string",
"description": "The resulting raw transaction (base64-encoded string)"
}
},
"createpsbt": {
"summary": "Creates a transaction in the Partially Signed Transaction format. Implements the Creator role.",
"description": [
"",
"> lbrycrd-cli createpsbt \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"inputs": {
"type": "array",
"description": "A json array of json objects\n [\n {\n \"txid\":\"id\", (string, required) The transaction id\n \"vout\":n, (numeric, required) The output number\n \"sequence\":n (numeric, optional) The sequence number\n } \n ,...\n ]"
},
"outputs": {
"type": "array",
"description": "a json array with outputs (key-value pairs), where none of the keys are duplicated.\nThat is, each address can only appear once and there can only be one 'data' object.\n [\n {\n \"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the lbry address, the value (float or string) is the amount in LBC\n },\n {\n \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex encoded data\n }\n ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n accepted as second parameter.\n ]"
},
"locktime": {
"type": "number",
"description": "Raw locktime. Non-0 value also locktime-activates inputs",
"default": 0
},
"replaceable": {
"type": "boolean",
"description": "Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.",
"default": false
}
},
"required": [
"inputs",
"outputs"
]
},
"result": {
"type": "string",
"description": "The resulting raw transaction (base64-encoded string)"
}
},
"createrawtransaction": {
"summary": "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.",
"description": [
"",
"> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"address\\\":0.01}]\"",
"> 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}]\", \"[{\\\"address\\\":0.01}]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
"> 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/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"inputs": {
"type": "array",
"description": "A json array of json objects\n [\n {\n \"txid\":\"id\", (string, required) The transaction id\n \"vout\":n, (numeric, required) The output number\n \"sequence\":n (numeric, optional) The sequence number\n } \n ,...\n ]"
},
"outputs": {
"type": "array",
"description": "a json array with outputs (key-value pairs), where none of the keys are duplicated.\nThat is, each address can only appear once and there can only be one 'data' object.\n [\n {\n \"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the lbry address, the value (float or string) is the amount in LBC\n },\n {\n \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex encoded data\n }\n ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n accepted as second parameter.\n ]"
},
"locktime": {
"type": "number",
"description": "Raw locktime. Non-0 value also locktime-activates inputs",
"default": 0
},
"replaceable": {
"type": "boolean",
"description": "Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.",
"default": false
}
},
"required": [
"inputs",
"outputs"
]
},
"result": {
"type": "string",
"description": "hex string of the transaction"
}
},
"decodepsbt": {
"summary": "Return a JSON object representing the serialized, base64-encoded partially signed LBRY transaction.",
"description": [
"",
"> lbrycrd-cli decodepsbt \"psbt\"",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"psbt": {
"type": "string",
"description": "The PSBT base64 string"
}
},
"required": [
"psbt"
]
},
"result": {
"type": "object",
"properties": {
"tx": {
"type": "object"
},
"unknown": {
"type": "object",
"properties": {
"key": {
"type": null,
"description": "An unknown key-value pair"
}
}
},
"inputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"non_witness_utxo": {
"type": "object"
},
"witness_utxo": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The value in LBC"
},
"scriptPubKey": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "The asm"
},
"hex": {
"type": "string",
"description": "The hex"
},
"type": {
"type": "string",
"description": "The type, eg 'pubkeyhash'"
},
"address": {
"type": "string",
"description": "LBRY address if there is one"
}
}
}
}
},
"partial_signatures": {
"type": "object",
"properties": {
"pubkey": {
"type": "string",
"description": "The public key and signature that corresponds to it."
}
}
},
"sighash": {
"type": "string",
"description": "The sighash type to be used"
},
"redeem_script": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "The asm"
},
"hex": {
"type": "string",
"description": "The hex"
},
"type": {
"type": "string",
"description": "The type, eg 'pubkeyhash'"
}
}
},
"witness_script": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "The asm"
},
"hex": {
"type": "string",
"description": "The hex"
},
"type": {
"type": "string",
"description": "The type, eg 'pubkeyhash'"
}
}
},
"bip32_derivs": {
"type": "object",
"properties": {
"pubkey": {
"type": "object",
"properties": {
"master_fingerprint": {
"type": "string",
"description": "The fingerprint of the master key"
},
"path": {
"type": "string",
"description": "The path"
}
}
}
}
},
"final_scriptsig": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "The asm"
},
"hex": {
"type": "string",
"description": "The hex"
}
}
},
"unknown": {
"type": "object",
"properties": {
"key": {
"type": null,
"description": "An unknown key-value pair"
}
}
}
}
}
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": null,
"description": "An unknown key-value pair"
}
}
}
}
}
}
},
"decoderawtransaction": {
"summary": "Return a JSON object representing the serialized, hex-encoded transaction.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The transaction hex string"
},
"iswitness": {
"type": "boolean",
"description": "Whether the transaction hex is a serialized witness transaction If iswitness is not present, heuristic tests will be used in decoding"
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id"
},
"hash": {
"type": "string",
"description": "The transaction hash (differs from txid for witness transactions)"
},
"size": {
"type": "number",
"description": "The transaction size"
},
"vsize": {
"type": "number",
"description": "The virtual transaction size (differs from size for witness transactions)"
},
"weight": {
"type": "number",
"description": "The transaction's weight (between vsize*4 - 3 and vsize*4)"
},
"version": {
"type": "number",
"description": "The version"
},
"locktime": {
"type": "number",
"description": "The lock time"
},
"vin": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id"
},
"vout": {
"type": "number",
"description": "The output number"
},
"scriptSig": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "asm"
},
"hex": {
"type": "string",
"description": "hex"
}
}
},
"sequence": {
"type": "number",
"description": "The script sequence number"
}
}
}
},
"vout": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "The value in LBC"
},
"n": {
"type": "number",
"description": "index"
},
"scriptPubKey": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "the asm"
},
"hex": {
"type": "string",
"description": "the hex"
},
"reqSigs": {
"type": "number",
"description": "The required sigs"
},
"type": {
"type": "string",
"description": "The type, eg 'pubkeyhash'"
},
"addresses": {
"type": "array",
"items": {
"type": "array",
"properties": {
"12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc": {
"type": "string",
"description": "lbry address"
}
}
}
}
}
}
}
}
}
}
}
},
"decodescript": {
"summary": "Decode a hex-encoded script.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "the hex encoded script"
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "object",
"properties": {
"asm": {
"type": "string",
"description": "Script public key"
},
"hex": {
"type": "string",
"description": "hex encoded public key"
},
"type": {
"type": "string",
"description": "The output type"
},
"reqSigs": {
"type": "number",
"description": "The required signatures"
},
"addresses": {
"type": "array",
"items": {
"type": "array",
"properties": {
"address": {
"type": "string",
"description": "lbry address"
}
}
}
},
"p2sh\",\"address": {
"type": "string",
"description": "address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH)."
}
}
}
},
"finalizepsbt": {
"summary": "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.",
"description": [
"",
"> lbrycrd-cli finalizepsbt \"psbt\"",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"psbt": {
"type": "string",
"description": "A base64 string of a PSBT"
},
"extract": {
"type": "boolean",
"description": "If true and the transaction is complete, extract and return the complete transaction in normal network serialization instead of the PSBT.",
"default": true
}
},
"required": [
"psbt"
]
},
"result": {
"type": "object",
"properties": {
"psbt": {
"type": "string",
"description": "The base64-encoded partially signed transaction if not extracted"
},
"hex": {
"type": "string",
"description": "The hex-encoded network transaction if extracted"
},
"complete": {
"type": "boolean",
"description": "If the transaction has a complete set of signatures"
}
}
}
},
"fundrawtransaction": {
"summary": "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",
"description": [
"",
"",
"Create a transaction with no inputs",
"> lbrycrd-cli createrawtransaction \"[]\" \"{\\\"myaddress\\\":0.01}\"",
"",
"Add sufficient unsigned inputs to meet the output value",
"> lbrycrd-cli fundrawtransaction \"rawtransactionhex\"",
"",
"Sign the transaction",
"> lbrycrd-cli signrawtransaction \"fundedtransactionhex\"",
"",
"Send the transaction",
"> lbrycrd-cli sendrawtransaction \"signedtransactionhex\"",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The hex string of the raw transaction"
},
"options": {
"type": "object",
"properties": {
"changeAddress": {
"type": "string",
"description": "The bitcoin address to receive the change"
},
"changePosition": {
"type": "number",
"description": "The index of the change output"
},
"change_type": {
"type": "string",
"description": "The output type to use. Only valid if changeAddress is not specified. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -changetype."
},
"includeWatching": {
"type": "boolean",
"description": "Also select inputs which are watch only"
},
"lockUnspents": {
"type": "boolean",
"description": "Lock selected unspent outputs"
},
"feeRate": {
"type": "number",
"description": "Set a specific fee rate in LBC/kB"
},
"replaceable": {
"type": "boolean",
"description": "Marks this transaction as BIP125 replaceable."
},
"conf_target": {
"type": "number",
"description": "Confirmation target (in blocks)"
},
"estimate_mode": {
"type": "string",
"description": "The fee estimate mode, must be one of:"
}
}
},
"iswitness": {
"type": "boolean",
"description": "Whether the transaction hex is a serialized witness transaction If iswitness is not present, heuristic tests will be used in decoding"
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "object",
"properties": {
"hex": {
"type": "string",
"description": "The resulting raw transaction (hex-encoded string)"
},
"fee": {
"type": "number",
"description": "Fee in LBC the resulting transaction pays"
},
"changepos": {
"type": "number",
"description": "The position of the added change output, or -1"
}
}
}
},
"getrawtransaction": {
"summary": "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'.",
"description": [
"",
"> lbrycrd-cli getrawtransaction \"mytxid\"",
"> lbrycrd-cli getrawtransaction \"mytxid\" true",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawtransaction\", \"params\": [\"mytxid\", true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
"> lbrycrd-cli getrawtransaction \"mytxid\" false \"myblockhash\"",
"> lbrycrd-cli getrawtransaction \"mytxid\" true \"myblockhash\"",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id"
},
"verbose": {
"type": "boolean",
"description": "If false, return a string, otherwise return a json object",
"default": false
},
"blockhash": {
"type": "string",
"description": "The block in which to look for the transaction"
}
},
"required": [
"txid"
]
},
"result": {
"type": "string",
"description": "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) }"
}
},
"sendrawtransaction": {
"summary": "Submits raw transaction (serialized, hex-encoded) to local node and network. Also see createrawtransaction and signrawtransaction calls.",
"description": [
"",
"",
"Create a transaction",
"> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" \"{\\\"myaddress\\\":0.01}\"",
"Sign the transaction, and get back the hex",
"> lbrycrd-cli signrawtransaction \"myhex\"",
"",
"Send the transaction (signed hex)",
"> lbrycrd-cli sendrawtransaction \"signedhex\"",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendrawtransaction\", \"params\": [\"signedhex\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The hex string of the raw transaction)"
},
"allowhighfees": {
"type": "boolean",
"description": "Allow high fees",
"default": false
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "string",
"description": "The transaction hash in hex"
}
},
"signrawtransaction": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The transaction hex string"
},
"prevtxs": {
"type": "string",
"description": "An json array of previous dependent transaction outputs [ (json array of json objects, or 'null' if none provided) { \"txid\":\"id\", (string, required) The transaction id \"vout\":n, (numeric, required) The output number \"scriptPubKey\": \"hex\", (string, required) script key \"redeemScript\": \"hex\", (string, required for P2SH or P2WSH) redeem script \"amount\": value (numeric, required) The amount spent } ,... ]"
},
"privkeys": {
"type": "string",
"description": "A json array of base58-encoded private keys for signing [ (json array of strings, or 'null' if none provided) \"privatekey\" (string) private key in base58-encoding ,... ]"
},
"sighashtype": {
"type": "string",
"description": "The signature hash type. Must be one of \"ALL\" \"NONE\" \"SINGLE\" \"ALL|ANYONECANPAY\" \"NONE|ANYONECANPAY\" \"SINGLE|ANYONECANPAY\"",
"default": "ALL"
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "object",
"properties": {
"hex": {
"type": "string",
"description": "The hex-encoded raw transaction with signature(s)"
},
"complete": {
"type": "boolean",
"description": "If the transaction has a complete set of signatures"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The hash of the referenced, previous transaction"
},
"vout": {
"type": "number",
"description": "The index of the output to spent and used as input"
},
"scriptSig": {
"type": "string",
"description": "The hex-encoded signature script"
},
"sequence": {
"type": "number",
"description": "Script sequence number"
},
"error": {
"type": "string",
"description": "Verification or signing error related to the input"
}
}
}
}
}
}
},
"signrawtransactionwithkey": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The transaction hex string"
},
"privkeys": {
"type": "string",
"description": "A json array of base58-encoded private keys for signing [ (json array of strings) \"privatekey\" (string) private key in base58-encoding ,... ]"
},
"prevtxs": {
"type": "string",
"description": "An json array of previous dependent transaction outputs [ (json array of json objects, or 'null' if none provided) { \"txid\":\"id\", (string, required) The transaction id \"vout\":n, (numeric, required) The output number \"scriptPubKey\": \"hex\", (string, required) script key \"redeemScript\": \"hex\", (string, required for P2SH or P2WSH) redeem script \"amount\": value (numeric, required) The amount spent } ,... ]"
},
"sighashtype": {
"type": "string",
"description": "The signature hash type. Must be one of \"ALL\" \"NONE\" \"SINGLE\" \"ALL|ANYONECANPAY\" \"NONE|ANYONECANPAY\" \"SINGLE|ANYONECANPAY\"",
"default": "ALL"
}
},
"required": [
"hexstring",
"privkeys"
]
},
"result": {
"type": "object",
"properties": {
"hex": {
"type": "string",
"description": "The hex-encoded raw transaction with signature(s)"
},
"complete": {
"type": "boolean",
"description": "If the transaction has a complete set of signatures"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The hash of the referenced, previous transaction"
},
"vout": {
"type": "number",
"description": "The index of the output to spent and used as input"
},
"scriptSig": {
"type": "string",
"description": "The hex-encoded signature script"
},
"sequence": {
"type": "number",
"description": "Script sequence number"
},
"error": {
"type": "string",
"description": "Verification or signing error related to the input"
}
}
}
}
}
}
},
"testmempoolaccept": {
"summary": "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.",
"description": [
"",
"",
"Create a transaction",
"> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" \"{\\\"myaddress\\\":0.01}\"",
"Sign the transaction, and get back the hex",
"> lbrycrd-cli signrawtransaction \"myhex\"",
"",
"Test acceptance of the transaction (signed hex)",
"> lbrycrd-cli testmempoolaccept [\"signedhex\"]",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"testmempoolaccept\", \"params\": [[\"signedhex\"]] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Rawtransactions"
],
"params": {
"type": "object",
"properties": {
"allowhighfees": {
"type": "boolean",
"description": "Allow high fees",
"default": false
}
},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction hash in hex"
},
"allowed": {
"type": "boolean",
"description": "If the mempool allows this tx to be inserted"
},
"reject-reason": {
"type": "string",
"description": "Rejection string (only present when 'allowed' is false)"
}
}
}
}
},
"createmultisig": {
"summary": "Creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.",
"description": [
"",
"",
"Create a multisig address from 2 public keys",
"> lbrycrd-cli createmultisig 2 \"[\\\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\\\",\\\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\\\"]\"",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Util"
],
"params": {
"type": "object",
"properties": {
"nrequired": {
"type": "number",
"description": "The number of required signatures out of the n keys."
},
"keys": {
"type": "string",
"description": "A json array of hex-encoded public keys [ \"key\" (string) The hex-encoded public key ,... ]"
},
"address_type": {
"type": "string",
"description": "The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is legacy."
}
},
"required": [
"nrequired",
"keys"
]
},
"result": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The value of the new multisig address."
},
"redeemScript": {
"type": "string",
"description": "The string value of the hex-encoded redemption script."
}
}
}
},
"estimatesmartfee": {
"summary": "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).",
"description": [
"",
"> lbrycrd-cli estimatesmartfee 6",
""
],
"tags": [
"Util"
],
"params": {
"type": "object",
"properties": {
"conf_target": {
"type": "number",
"description": "Confirmation target in blocks (1 - 1008)"
},
"estimate_mode": {
"type": "string",
"description": "The fee estimate mode. Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. Must be one of: \"UNSET\" (defaults to CONSERVATIVE) \"ECONOMICAL\" \"CONSERVATIVE\"",
"default": "CONSERVATIVE"
}
},
"required": [
"conf_target"
]
},
"result": {
"type": "object",
"properties": {
"feerate": {
"type": "number",
"description": "estimate fee rate in LBC/kB"
},
"blocks": {
"type": "number",
"description": "block number where estimate was found"
}
}
}
},
"signmessagewithprivkey": {
"summary": "Sign a message with the private key of an address",
"description": [
"",
"",
"Create the signature",
"> lbrycrd-cli signmessagewithprivkey \"privkey\" \"my message\"",
"",
"Verify the signature",
"> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"",
"",
"As json rpc",
"> 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/",
""
],
"tags": [
"Util"
],
"params": {
"type": "object",
"properties": {
"privkey": {
"type": "string",
"description": "The private key to sign the message with."
},
"message": {
"type": "string",
"description": "The message to create a signature of."
}
},
"required": [
"privkey",
"message"
]
},
"result": {
"type": "string",
"description": "The signature of the message encoded in base 64"
}
},
"validateaddress": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Util"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The lbry address to validate"
}
},
"required": [
"address"
]
},
"result": {
"type": "object",
"properties": {
"isvalid": {
"type": "boolean",
"description": "If the address is valid or not. If not, this is the only property returned."
},
"address": {
"type": "string",
"description": "The lbry address validated"
},
"scriptPubKey": {
"type": "string",
"description": "The hex encoded scriptPubKey generated by the address"
},
"isscript": {
"type": "boolean",
"description": "If the key is a script"
},
"iswitness": {
"type": "boolean",
"description": "If the address is a witness address"
},
"witness_version": {
"type": "number",
"description": "The version number of the witness program"
},
"witness_program": {
"type": "string",
"description": "The hex value of the witness program"
}
}
}
},
"verifymessage": {
"summary": "Verify a signed message",
"description": [
"",
"",
"Unlock the wallet for 30 seconds",
"> lbrycrd-cli walletpassphrase \"mypassphrase\" 30",
"",
"Create the signature",
"> lbrycrd-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"",
"",
"Verify the signature",
"> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"",
"",
"As json rpc",
"> 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/",
""
],
"tags": [
"Util"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The lbry address to use for the signature."
},
"signature": {
"type": "string",
"description": "The signature provided by the signer in base 64 encoding (see signmessage)."
},
"message": {
"type": "string",
"description": "The message that was signed."
}
},
"required": [
"address",
"signature",
"message"
]
},
"result": {
"type": "boolean",
"description": "If the signature is verified or not."
}
},
"abandontransaction": {
"summary": "Mark in-wallet transaction <txid> as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions. It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already abandoned.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id"
}
},
"required": [
"txid"
]
}
},
"abortrescan": {
"summary": "Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.",
"description": [
"",
"",
"Import a private key",
"> lbrycrd-cli importprivkey \"mykey\"",
"",
"Abort the running wallet rescan",
"> lbrycrd-cli abortrescan ",
"",
"As a JSON-RPC call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"abortrescan\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"addmultisigaddress": {
"summary": "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.",
"description": [
"",
"",
"Add a multisig address from 2 addresses",
"> lbrycrd-cli addmultisigaddress 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"",
"",
"As json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"nrequired": {
"type": "number",
"description": "The number of required signatures out of the n keys or addresses."
},
"keys": {
"type": "string",
"description": "A json array of bitcoin addresses or hex-encoded public keys [ \"address\" (string) bitcoin address or hex-encoded public key ..., ]"
},
"label": {
"type": "string",
"description": "A label to assign the addresses to."
},
"address_type": {
"type": "string",
"description": "The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -addresstype."
}
},
"required": [
"nrequired",
"keys"
]
},
"result": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The value of the new multisig address."
},
"redeemScript": {
"type": "string",
"description": "The string value of the hex-encoded redemption script."
}
}
}
},
"backupwallet": {
"summary": "Safely copies current wallet file to destination, which can be a directory or a path with filename.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"destination": {
"type": "string",
"description": "The destination directory or file"
}
},
"required": [
"destination"
]
}
},
"bumpfee": {
"summary": "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.",
"description": [
"",
"",
"Bump the fee, get the new transaction's txid",
"> lbrycrd-cli bumpfee <txid>",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The txid to be bumped"
},
"options": {
"type": "object",
"properties": {
"confTarget": {
"type": "number",
"description": "Confirmation target (in blocks)"
},
"totalFee": {
"type": "number",
"description": "Total fee (NOT feerate) to pay, in satoshis."
},
"replaceable": {
"type": "boolean",
"description": "Whether the new transaction should still be"
},
"estimate_mode": {
"type": "string",
"description": "The fee estimate mode, must be one of:"
}
}
}
},
"required": [
"txid"
]
},
"result": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The id of the new transaction"
},
"origfee": {
"type": "number",
"description": "Fee of the replaced transaction"
},
"fee": {
"type": "number",
"description": "Fee of the new transaction"
}
}
}
},
"createwallet": {
"summary": "Creates and loads a new wallet.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"wallet_name": {
"type": "string",
"description": "The name for the new wallet. If this is a path, the wallet will be created at the path location."
},
"disable_private_keys": {
"type": "boolean",
"description": "Disable the possibility of private keys (only watchonlys are possible in this mode)."
}
},
"required": [
"wallet_name"
]
},
"result": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path."
},
"warning": {
"type": "string",
"description": "Warning message if wallet was not loaded cleanly."
}
}
}
},
"dumpprivkey": {
"summary": "Reveals the private key corresponding to 'address'. Then the importprivkey can be used with this output",
"description": [
"",
"> lbrycrd-cli dumpprivkey \"myaddress\"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address for the private key"
}
},
"required": [
"address"
]
},
"result": {
"type": "string",
"description": "The private key"
}
},
"dumpwallet": {
"summary": "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).",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename with path (either absolute or relative to bitcoind)"
}
},
"required": [
"filename"
]
}
},
"encryptwallet": {
"summary": "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.",
"description": [
"",
"",
"Encrypt your wallet",
"> lbrycrd-cli encryptwallet \"my pass phrase\"",
"",
"Now set the passphrase to use the wallet, such as for signing or sending bitcoin",
"> lbrycrd-cli walletpassphrase \"my pass phrase\"",
"",
"Now we can do something like sign",
"> lbrycrd-cli signmessage \"address\" \"test message\"",
"",
"Now lock the wallet again by removing the passphrase",
"> lbrycrd-cli walletlock ",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"encryptwallet\", \"params\": [\"my pass phrase\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"passphrase": {
"type": "string",
"description": "The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long."
}
},
"required": [
"passphrase"
]
}
},
"getaccount": {
"summary": "DEPRECATED. Returns the account associated with the given address.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address for account lookup."
}
},
"required": [
"address"
]
},
"result": {
"type": "string",
"description": "the account address"
}
},
"getaccountaddress": {
"summary": "DEPRECATED. Returns the current Bitcoin address for receiving payments to this account.",
"description": [
"",
"> lbrycrd-cli getaccountaddress ",
"> lbrycrd-cli getaccountaddress \"\"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "The account for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name."
}
},
"required": [
"account"
]
},
"result": {
"type": "string",
"description": "The account bitcoin address"
}
},
"getaddressesbyaccount": {
"summary": "DEPRECATED. Returns the list of addresses for the given account.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "The account name."
}
},
"required": [
"account"
]
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "a bitcoin address associated with the given account"
}
}
}
}
},
"getaddressesbylabel": {
"summary": "Returns the list of addresses assigned the specified label.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "The label."
}
},
"required": [
"label"
]
},
"result": {
"type": "object",
"properties": {
"address": {
"type": "object",
"properties": {
"purpose": {
"type": "string",
"description": "Purpose of address (\"send\" for sending address, \"receive\" for receiving address)"
}
}
}
}
}
},
"getaddressinfo": {
"summary": "Return information about the given bitcoin address. Some information requires the address to be in the wallet.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address to get the information of."
}
},
"required": [
"address"
]
}
},
"getbalance": {
"summary": "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.",
"description": [
"",
"",
"The total amount in the wallet with 1 or more confirmations",
"> lbrycrd-cli getbalance ",
"",
"The total amount in the wallet at least 6 blocks confirmed",
"> lbrycrd-cli getbalance \"*\" 6",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getbalance\", \"params\": [\"*\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "DEPRECATED. This argument will be removed in V0."
},
"To use this deprecated argument, start bitcoind with -deprecatedrpc=accounts. The account string may be given as a\n specific account name to find the balance associated with wallet keys in\n a named account, or as the empty string": {
"type": null,
"description": "to find the balance associated with wallet keys not in any named account, or as \"*\" to find the balance associated with all wallet keys regardless of account. When this option is specified, it calculates the balance in a different way than when it is not specified, and which can count spends twice when there are conflicting pending transactions (such as those created by the bumpfee command), temporarily resulting in low or even negative balances. In general, account balance calculation is not considered reliable and has resulted in confusing outcomes, so it is recommended to avoid passing this argument."
},
"minconf": {
"type": "number",
"description": "Only include transactions confirmed at least this many times. The default is 1 if an account is provided or 0 if no account is provided"
},
"include_watchonly": {
"type": "boolean",
"description": "Also include balance in watch-only addresses (see 'importaddress')",
"default": false
}
},
"required": []
},
"result": {
"type": "number",
"description": "The total amount in LBC received for this account."
}
},
"getnewaddress": {
"summary": "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'.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "The label name for the address to be linked to. If not provided, the default label \"\" is used. It can also be set to the empty string \"\" to represent the default label. The label does not need to exist, it will be created if there is no label by the given name."
},
"address_type": {
"type": "string",
"description": "The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -addresstype."
}
},
"required": []
},
"result": {
"type": "string",
"description": "The new bitcoin address"
}
},
"getrawchangeaddress": {
"summary": "Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address_type": {
"type": "string",
"description": "The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -changetype."
}
},
"required": []
},
"result": {
"type": "string",
"description": "The address"
}
},
"getreceivedbyaddress": {
"summary": "Returns the total amount received by the given address in transactions with at least minconf confirmations.",
"description": [
"",
"",
"The amount from transactions with at least 1 confirmation",
"> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\"",
"",
"The amount including unconfirmed transactions, zero confirmations",
"> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" 0",
"",
"The amount with at least 6 confirmations",
"> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" 6",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address for transactions."
},
"minconf": {
"type": "number",
"description": "Only include transactions confirmed at least this many times.",
"default": 1
}
},
"required": [
"address"
]
},
"result": {
"type": "number",
"description": "The total amount in LBC received at this address."
}
},
"getreceivedbylabel": {
"summary": "Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.",
"description": [
"",
"",
"Amount received by the default label with at least 1 confirmation",
"> lbrycrd-cli getreceivedbylabel \"\"",
"",
"Amount received at the tabby label including unconfirmed amounts with zero confirmations",
"> lbrycrd-cli getreceivedbylabel \"tabby\" 0",
"",
"The amount with at least 6 confirmations",
"> lbrycrd-cli getreceivedbylabel \"tabby\" 6",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getreceivedbylabel\", \"params\": [\"tabby\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "The selected label, may be the default label using \"\"."
},
"minconf": {
"type": "number",
"description": "Only include transactions confirmed at least this many times.",
"default": 1
}
},
"required": [
"label"
]
},
"result": {
"type": "number",
"description": "The total amount in LBC received for this label."
}
},
"gettransaction": {
"summary": "Get detailed information about in-wallet transaction <txid>",
"description": [
"",
"> lbrycrd-cli gettransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id"
},
"include_watchonly": {
"type": "boolean",
"description": "Whether to include watch-only addresses in balance calculation and details[]",
"default": false
}
},
"required": [
"txid"
]
},
"result": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The transaction amount in LBC"
},
"fee": {
"type": "number",
"description": "The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions."
},
"confirmations": {
"type": "number",
"description": "The number of confirmations"
},
"blockhash": {
"type": "string",
"description": "The block hash"
},
"blockindex": {
"type": "number",
"description": "The index of the transaction in the block that includes it"
},
"blocktime": {
"type": "number",
"description": "The time in seconds since epoch (1 Jan 1970 GMT)"
},
"txid": {
"type": "string",
"description": "The transaction id."
},
"time": {
"type": "number",
"description": "The transaction time in seconds since epoch (1 Jan 1970 GMT)"
},
"timereceived": {
"type": "number",
"description": "The time received in seconds since epoch (1 Jan 1970 GMT)"
},
"bip125-replaceable": {
"type": "string",
"description": "Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "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": {
"type": "string",
"description": "The bitcoin address involved in the transaction"
},
"category": {
"type": "string",
"description": "The category, either 'send' or 'receive'"
},
"amount": {
"type": "number",
"description": "The amount in LBC"
},
"label": {
"type": "string",
"description": "A comment for the address/transaction, if any"
},
"vout": {
"type": "number",
"description": "the vout value"
},
"fee": {
"type": "number",
"description": "The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions."
},
"abandoned": {
"type": "boolean",
"description": "'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions."
}
}
}
},
"hex": {
"type": "string",
"description": "Raw data for transaction"
}
}
}
},
"getunconfirmedbalance": {
"summary": "Returns the server's total unconfirmed balance",
"description": [],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"getwalletinfo": {
"summary": "Returns an object containing various wallet state info.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "object",
"properties": {
"walletname": {
"type": "string",
"description": "the wallet name"
},
"walletversion": {
"type": "number",
"description": "the wallet version"
},
"balance": {
"type": "number",
"description": "the total confirmed balance of the wallet in LBC"
},
"unconfirmed_balance": {
"type": "number",
"description": "the total unconfirmed balance of the wallet in LBC"
},
"immature_balance": {
"type": "number",
"description": "the total immature balance of the wallet in LBC"
},
"txcount": {
"type": "number",
"description": "the total number of transactions in the wallet"
},
"keypoololdest": {
"type": "number",
"description": "the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool"
},
"keypoolsize": {
"type": "number",
"description": "how many new keys are pre-generated (only counts external keys)"
},
"keypoolsize_hd_internal": {
"type": "number",
"description": "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": {
"type": "number",
"description": "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": {
"type": "number",
"description": "the transaction fee configuration, set in LBC/kB"
},
"hdseedid": {
"type": "string",
"description": "the Hash160 of the HD seed (only present when HD is enabled)"
},
"hdmasterkeyid": {
"type": "string",
"description": "alias for hdseedid retained for backwards-compatibility. Will be removed in V0.18."
},
"private_keys_enabled": {
"type": "boolean",
"description": "false if privatekeys are disabled for this wallet (enforced watch-only wallet)"
}
}
}
},
"importaddress": {
"summary": "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.",
"description": [
"",
"",
"Import an address with rescan",
"> lbrycrd-cli importaddress \"myaddress\"",
"",
"Import using a label without rescan",
"> lbrycrd-cli importaddress \"myaddress\" \"testing\" false",
"",
"As a JSON-RPC call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importaddress\", \"params\": [\"myaddress\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The Bitcoin address (or hex-encoded script)"
},
"label": {
"type": "string",
"description": "An optional label",
"default": "\"\""
},
"rescan": {
"type": "boolean",
"description": "Rescan the wallet for transactions",
"default": true
},
"p2sh": {
"type": "boolean",
"description": "Add the P2SH version of the script as well Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes. If you have the full public key, you should call importpubkey instead of this. Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs.",
"default": false
}
},
"required": [
"address"
]
}
},
"importmulti": {
"summary": "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.",
"description": [
"",
"> lbrycrd-cli importmulti '[{ \"scriptPubKey\": { \"address\": \"<my address>\" }, \"timestamp\":1455191478 }, { \"scriptPubKey\": { \"address\": \"<my 2nd address>\" }, \"label\": \"example 2\", \"timestamp\": 1455191480 }]'",
"> lbrycrd-cli importmulti '[{ \"scriptPubKey\": { \"address\": \"<my address>\" }, \"timestamp\":1455191478 }]' '{ \"rescan\": false}'",
"",
"Response is an array with the same size as the input that has the execution result :",
" [{ \"success\": true } , { \"success\": false, \"error\": { \"code\": -1, \"message\": \"Internal Server Error\"} }, ... ]",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"requests": {
"type": "array",
"description": "Data to be imported\n [ (array of json objects)\n {\n \"scriptPubKey\": \"<script>\" | { \"address\":\"<address>\" }, (string / json, required) Type of scriptPubKey (string for script, json for address)\n \"timestamp\": timestamp | \"now\" , (integer / string, required) Creation time of the key in seconds since epoch (Jan 1 1970 GMT),\n or the string \"now\" to substitute the current synced blockchain time. The timestamp of the oldest\n key will determine how far back blockchain rescans need to begin for missing wallet transactions.\n \"now\" can be specified to bypass scanning, for keys which are known to never have been used, and\n 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key\n creation time of all keys being imported by the importmulti call will be scanned.\n \"redeemscript\": \"<script>\" , (string, optional) Allowed only if the scriptPubKey is a P2SH address or a P2SH scriptPubKey\n \"pubkeys\": [\"<pubKey>\", ... ] , (array, optional) Array of strings giving pubkeys that must occur in the output or redeemscript\n \"keys\": [\"<key>\", ... ] , (array, optional) Array of strings giving private keys whose corresponding public keys must occur in the output or redeemscript\n \"internal\": <true> , (boolean, optional, default: false) Stating whether matching outputs should be treated as not incoming payments aka change\n \"watchonly\": <true> , (boolean, optional, default: false) Stating whether matching outputs should be considered watched even when they're not spendable, only allowed if keys are empty\n \"label\": <label> , (string, optional, default: '') Label to assign to the address (aka account name, for now), only allowed with internal=false\n }\n ,...\n ]"
},
"options": {
"type": "json",
"description": "{ \"rescan\": <false>, (boolean, optional, default: true) Stating if should rescan the blockchain after all imports } Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported keys, addresses or scripts exists but related transactions are still missing."
}
},
"required": [
"requests"
]
}
},
"importprivkey": {
"summary": "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.",
"description": [
"",
"",
"Dump a private key",
"> lbrycrd-cli dumpprivkey \"myaddress\"",
"",
"Import the private key with rescan",
"> lbrycrd-cli importprivkey \"mykey\"",
"",
"Import using a label and without rescan",
"> lbrycrd-cli importprivkey \"mykey\" \"testing\" false",
"",
"Import using default blank label and without rescan",
"> lbrycrd-cli importprivkey \"mykey\" \"\" false",
"",
"As a JSON-RPC call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importprivkey\", \"params\": [\"mykey\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"privkey": {
"type": "string",
"description": "The private key (see dumpprivkey)"
},
"label": {
"type": "string",
"description": "An optional label",
"default": "\"\""
},
"rescan": {
"type": "boolean",
"description": "Rescan the wallet for transactions Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.",
"default": true
}
},
"required": [
"privkey"
]
}
},
"importprunedfunds": {
"summary": "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.",
"description": [],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"rawtransaction": {
"type": "string",
"description": "A raw transaction in hex funding an already-existing address in wallet"
},
"txoutproof": {
"type": "string",
"description": "The hex output from gettxoutproof that contains the transaction"
}
},
"required": [
"rawtransaction",
"txoutproof"
]
}
},
"importpubkey": {
"summary": "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.",
"description": [
"",
"",
"Import a public key with rescan",
"> lbrycrd-cli importpubkey \"mypubkey\"",
"",
"Import using a label without rescan",
"> lbrycrd-cli importpubkey \"mypubkey\" \"testing\" false",
"",
"As a JSON-RPC call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importpubkey\", \"params\": [\"mypubkey\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"pubkey": {
"type": "string",
"description": "The hex-encoded public key"
},
"label": {
"type": "string",
"description": "An optional label",
"default": "\"\""
},
"rescan": {
"type": "boolean",
"description": "Rescan the wallet for transactions Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported pubkey exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.",
"default": true
}
},
"required": [
"pubkey"
]
}
},
"importwallet": {
"summary": "Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.",
"description": [
"",
"",
"Dump the wallet",
"> lbrycrd-cli dumpwallet \"test\"",
"",
"Import the wallet",
"> lbrycrd-cli importwallet \"test\"",
"",
"Import using the json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importwallet\", \"params\": [\"test\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The wallet file"
}
},
"required": [
"filename"
]
}
},
"keypoolrefill": {
"summary": "Fills the keypool.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"newsize": {
"type": "number",
"description": "The new keypool size",
"default": 100
}
},
"required": []
}
},
"listaccounts": {
"summary": "DEPRECATED. Returns Object that has account names as keys, account balances as values.",
"description": [
"",
"",
"List account balances where there at least 1 confirmation",
"> lbrycrd-cli listaccounts ",
"",
"List account balances including zero confirmation transactions",
"> lbrycrd-cli listaccounts 0",
"",
"List account balances for 6 or more confirmations",
"> lbrycrd-cli listaccounts 6",
"",
"As json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"minconf": {
"type": "number",
"description": "Only include transactions with at least this many confirmations",
"default": 1
},
"include_watchonly": {
"type": "boolean",
"description": "Include balances in watch-only addresses (see 'importaddress')",
"default": false
}
},
"required": []
},
"result": {
"type": "object",
"properties": {
"account": {
"type": "number",
"description": "The property name is the account name, and the value is the total balance for the account."
}
}
}
},
"listaddressgroupings": {
"summary": "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",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "array"
}
}
},
"listlabels": {
"summary": "Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.",
"description": [
"",
"",
"List all labels",
"> lbrycrd-cli listlabels ",
"",
"List labels that have receiving addresses",
"> lbrycrd-cli listlabels receive",
"",
"List labels that have sending addresses",
"> lbrycrd-cli listlabels send",
"",
"As json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listlabels\", \"params\": [receive] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"purpose": {
"type": "string",
"description": "Address purpose to list labels for ('send','receive'). An empty string is the same as not providing this argument."
}
},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object"
}
}
},
"listlockunspent": {
"summary": "Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.",
"description": [
"",
"",
"List the unspent transactions",
"> lbrycrd-cli listunspent ",
"",
"Lock an unspent transaction",
"> lbrycrd-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"",
"",
"List the locked transactions",
"> lbrycrd-cli listlockunspent ",
"",
"Unlock the transaction again",
"> lbrycrd-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listlockunspent\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The transaction id locked"
},
"vout": {
"type": "number",
"description": "The vout value"
}
}
}
}
},
"listreceivedbyaddress": {
"summary": "List balances by receiving address.",
"description": [
"",
"> lbrycrd-cli listreceivedbyaddress ",
"> lbrycrd-cli listreceivedbyaddress 6 true",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaddress\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"minconf": {
"type": "number",
"description": "The minimum number of confirmations before payments are included.",
"default": 1
},
"include_empty": {
"type": "boolean",
"description": "Whether to include addresses that haven't received any payments.",
"default": false
},
"include_watchonly": {
"type": "boolean",
"description": "Whether to include watch-only addresses (see 'importaddress').",
"default": false
},
"address_filter": {
"type": "string",
"description": "If present, only return information on this address."
}
},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"involvesWatchonly": {
"type": "boolean",
"description": "Only returned if imported addresses were involved in transaction"
},
"address": {
"type": "string",
"description": "The receiving address"
},
"account": {
"type": "string",
"description": "DEPRECATED. Backwards compatible alias for label."
},
"amount": {
"type": "number",
"description": "The total amount in LBC received by the address"
},
"confirmations": {
"type": "number",
"description": "The number of confirmations of the most recent transaction included"
},
"label": {
"type": "string",
"description": "The label of the receiving address. The default label is \"\"."
},
"txids": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
},
"listreceivedbylabel": {
"summary": "List received transactions by label.",
"description": [
"",
"> lbrycrd-cli listreceivedbylabel ",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"minconf": {
"type": "number",
"description": "The minimum number of confirmations before payments are included.",
"default": 1
},
"include_empty": {
"type": "boolean",
"description": "Whether to include labels that haven't received any payments.",
"default": false
},
"include_watchonly": {
"type": "boolean",
"description": "Whether to include watch-only addresses (see 'importaddress').",
"default": false
}
},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"involvesWatchonly": {
"type": "boolean",
"description": "Only returned if imported addresses were involved in transaction"
},
"account": {
"type": "string",
"description": "DEPRECATED. Backwards compatible alias for label."
},
"amount": {
"type": "number",
"description": "The total amount received by addresses with this label"
},
"confirmations": {
"type": "number",
"description": "The number of confirmations of the most recent transaction included"
},
"label": {
"type": "string",
"description": "The label of the receiving address. The default label is \"\"."
}
}
}
}
},
"listsinceblock": {
"summary": "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.",
"description": [
"",
"> lbrycrd-cli listsinceblock ",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"blockhash": {
"type": "string",
"description": "The block hash to list transactions since"
},
"target_confirmations": {
"type": "number",
"description": "Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value",
"default": 1
},
"include_watchonly": {
"type": "boolean",
"description": "Include transactions to watch-only addresses (see 'importaddress')",
"default": false
},
"include_removed": {
"type": "boolean",
"description": "Show transactions that were removed due to a reorg in the \"removed\" array (not guaranteed to work on pruned nodes)",
"default": true
}
},
"required": []
},
"result": {
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "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": {
"type": "string",
"description": "The bitcoin address of the transaction. Not present for move transactions (category = move)."
},
"category": {
"type": "string",
"description": "The transaction category. 'send' has negative amounts, 'receive' has positive amounts."
},
"amount": {
"type": "number",
"description": "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": {
"type": "number",
"description": "the vout value"
},
"fee": {
"type": "number",
"description": "The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions."
},
"confirmations": {
"type": "number",
"description": "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": {
"type": "string",
"description": "The block hash containing the transaction. Available for 'send' and 'receive' category of transactions."
},
"blockindex": {
"type": "number",
"description": "The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions."
},
"blocktime": {
"type": "number",
"description": "The block time in seconds since epoch (1 Jan 1970 GMT)."
},
"txid": {
"type": "string",
"description": "The transaction id. Available for 'send' and 'receive' category of transactions."
},
"time": {
"type": "number",
"description": "The transaction time in seconds since epoch (Jan 1 1970 GMT)."
},
"timereceived": {
"type": "number",
"description": "The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions."
},
"bip125-replaceable": {
"type": "string",
"description": "Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool"
},
"abandoned": {
"type": "boolean",
"description": "'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions."
},
"comment": {
"type": "string",
"description": "If a comment is associated with the transaction."
},
"label": {
"type": "string",
"description": "A comment for the address/transaction, if any"
},
"to": {
"type": "string",
"description": "If a comment to is associated with the transaction."
}
}
}
},
"removed": {
"type": "array",
"items": {
"type": "object"
}
},
"lastblock": {
"type": "string",
"description": "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"
}
}
}
},
"listtransactions": {
"summary": "Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.",
"description": [
"",
"",
"List the most recent 10 transactions in the systems",
"> lbrycrd-cli listtransactions ",
"",
"List transactions 100 to 120",
"> lbrycrd-cli listtransactions \"*\" 20 100",
"",
"As a json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listtransactions\", \"params\": [\"*\", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "DEPRECATED. This argument will be removed in V0."
},
"null": {
"type": "object",
"description": "The account name. Should be \"*\"."
},
"count": {
"type": "number",
"description": "The number of transactions to return",
"default": 10
},
"skip": {
"type": "number",
"description": "The number of transactions to skip",
"default": 0
},
"include_watchonly": {
"type": "boolean",
"description": "Include transactions to watch-only addresses (see 'importaddress')",
"default": false
}
},
"required": [
null
]
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "DEPRECATED. This field will be removed in V0.18. The account name associated with the transaction. It will be \"\" for the default account."
},
"address": {
"type": "string",
"description": "The bitcoin address of the transaction. Not present for move transactions (category = move)."
},
"category": {
"type": "string",
"description": "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": {
"type": "number",
"description": "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": {
"type": "string",
"description": "A comment for the address/transaction, if any"
},
"vout": {
"type": "number",
"description": "the vout value"
},
"fee": {
"type": "number",
"description": "The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions."
},
"confirmations": {
"type": "number",
"description": "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": {
"type": "boolean",
"description": "Whether we consider the outputs of this unconfirmed transaction safe to spend."
},
"blockhash": {
"type": "string",
"description": "The block hash containing the transaction. Available for 'send' and 'receive' category of transactions."
},
"blockindex": {
"type": "number",
"description": "The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions."
},
"blocktime": {
"type": "number",
"description": "The block time in seconds since epoch (1 Jan 1970 GMT)."
},
"txid": {
"type": "string",
"description": "The transaction id. Available for 'send' and 'receive' category of transactions."
},
"time": {
"type": "number",
"description": "The transaction time in seconds since epoch (midnight Jan 1 1970 GMT)."
},
"timereceived": {
"type": "number",
"description": "The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions."
},
"comment": {
"type": "string",
"description": "If a comment is associated with the transaction."
},
"otheraccount": {
"type": "string",
"description": "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": {
"type": "string",
"description": "Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool"
},
"abandoned": {
"type": "boolean",
"description": "'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions."
}
}
}
}
},
"listunspent": {
"summary": "Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.",
"description": [
"",
"> lbrycrd-cli listunspent ",
"> lbrycrd-cli listunspent 6 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listunspent\", \"params\": [6, 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"minconf": {
"type": "number",
"description": "The minimum confirmations to filter",
"default": 1
},
"maxconf": {
"type": "number",
"description": "The maximum confirmations to filter",
"default": 9999999
},
"addresses": {
"type": "string",
"description": "A json array of bitcoin addresses to filter [ \"address\" (string) bitcoin address ,... ]"
},
"include_unsafe": {
"type": "boolean",
"description": "Include outputs that are not safe to spend See description of \"safe\" attribute below.",
"default": true
},
"query_options": {
"type": "json",
"description": "JSON with query options { \"minimumAmount\" (numeric or string, default=0) Minimum value of each UTXO in LBC \"maximumAmount\" (numeric or string, default=unlimited) Maximum value of each UTXO in LBC \"maximumCount\" (numeric or string, default=unlimited) Maximum number of UTXOs \"minimumSumAmount\" (numeric or string, default=unlimited) Minimum sum value of all UTXOs in LBC } Result [ (array of json object) { \"txid\" : \"txid\", (string) the transaction id \"vout\" : n, (numeric) the vout value \"address\" : \"address\", (string) the bitcoin address \"label\" : \"label\", (string) The associated label, or \"\" for the default label \"account\" : \"account\", (string) DEPRECATED. This field will be removed in V0."
},
"To see this deprecated field, start bitcoind with -deprecatedrpc=accounts. The associated account, or \"\" for the default account\n \"scriptPubKey\"": {
"type": "string",
"description": "the script key \"amount\" : x.xxx, (numeric) the transaction output amount in LBC \"confirmations\" : n, (numeric) The number of confirmations \"redeemScript\" : n (string) The redeemScript if scriptPubKey is P2SH \"spendable\" : xxx, (bool) Whether we have the private keys to spend this output \"solvable\" : xxx, (bool) Whether we know how to spend this output, ignoring the lack of keys \"safe\" : xxx (bool) Whether this output is considered safe to spend. Unconfirmed transactions from outside keys and unconfirmed replacement transactions are considered unsafe and are not eligible for spending by fundrawtransaction and sendtoaddress. } ,... ]"
}
},
"required": [
"addresses",
"To see this deprecated field, start bitcoind with -deprecatedrpc=accounts. The associated account, or \"\" for the default account\n \"scriptPubKey\""
]
}
},
"listwallets": {
"summary": "Returns a list of currently loaded wallets. For full information on the wallet, use \"getwalletinfo\"",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"walletname": {
"type": "string",
"description": "the wallet name"
}
}
}
}
},
"loadwallet": {
"summary": "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).",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The wallet directory or .dat file."
}
},
"required": [
"filename"
]
},
"result": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The wallet name if loaded successfully."
},
"warning": {
"type": "string",
"description": "Warning message if wallet was not loaded cleanly."
}
}
}
},
"lockunspent": {
"summary": "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",
"description": [
"",
"",
"List the unspent transactions",
"> lbrycrd-cli listunspent ",
"",
"Lock an unspent transaction",
"> lbrycrd-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"",
"",
"List the locked transactions",
"> lbrycrd-cli listlockunspent ",
"",
"Unlock the transaction again",
"> lbrycrd-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"unlock": {
"type": "boolean",
"description": "Whether to unlock (true) or lock (false) the specified transactions"
},
"transactions": {
"type": "string",
"description": "A json array of objects. Each object the txid (string) vout (numeric) [ (json array of json objects) { \"txid\":\"id\", (string) The transaction id \"vout\": n (numeric) The output number } ,... ]"
}
},
"required": [
"unlock"
]
},
"result": {
"type": "boolean",
"description": "Whether the command was successful or not"
}
},
"move": {
"summary": "DEPRECATED. Move a specified amount from one account in your wallet to another.",
"description": [
"",
"",
"Move 0.01 LBC from the default account to the account named tabby",
"> lbrycrd-cli move \"\" \"tabby\" 0.01",
"",
"Move 0.01 LBC timotei to akiko with a comment and funds have 6 confirmations",
"> lbrycrd-cli move \"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"fromaccount": {
"type": "string",
"description": "The name of the account to move funds from. May be the default account using \"\"."
},
"toaccount": {
"type": "string",
"description": "The name of the account to move funds to. May be the default account using \"\"."
},
"amount": {
"type": "number",
"description": "Quantity of LBC to move between accounts."
},
"null": {
"type": "object",
"description": "(dummy) (numeric, optional) Ignored. Remains for backward compatibility."
},
"comment": {
"type": "string",
"description": "An optional comment, stored in the wallet only."
}
},
"required": [
"fromaccount",
"toaccount",
"amount",
null
]
},
"result": {
"type": "boolean",
"description": "true if successful."
}
},
"removeprunedfunds": {
"summary": "Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.",
"description": [
"",
"> lbrycrd-cli removeprunedfunds \"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5\"",
"",
"As a JSON-RPC call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The hex-encoded id of the transaction you are deleting"
}
},
"required": [
"txid"
]
}
},
"rescanblockchain": {
"summary": "Rescan the local blockchain for wallet related transactions.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"start_height": {
"type": "number",
"description": "block height where the rescan should start"
},
"stop_height": {
"type": "number",
"description": "the last block height that should be scanned"
}
},
"required": []
},
"result": {
"type": "object",
"properties": {
"start_height": {
"type": "number",
"description": "The block height where the rescan has started. If omitted, rescan started from the genesis block."
},
"stop_height": {
"type": "number",
"description": "The height of the last rescanned block. If omitted, rescan stopped at the chain tip."
}
}
}
},
"sendfrom": {
"summary": "DEPRECATED (use sendtoaddress). Sent an amount from an account to a bitcoin address.",
"description": [
"",
"",
"Send 0.01 LBC from the default account to the address, must have at least 1 confirmation",
"> lbrycrd-cli sendfrom \"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01",
"",
"Send 0.01 from the tabby account to the given address, funds must have at least 6 confirmations",
"> lbrycrd-cli sendfrom \"tabby\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"fromaccount": {
"type": "string",
"description": "The name of the account to send funds from. May be the default account using \"\". Specifying an account does not influence coin selection, but it does associate the newly created transaction with the account, so the account's balance computation and transaction history can reflect the spend."
},
"toaddress": {
"type": "string",
"description": "The bitcoin address to send funds to."
},
"amount": {
"type": "number",
"description": "The amount in LBC (transaction fee is added on top)."
},
"minconf": {
"type": "number",
"description": "Only use funds with at least this many confirmations.",
"default": 1
},
"comment": {
"type": "string",
"description": "A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet."
},
"comment_to": {
"type": "string",
"description": "An optional comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, it is just kept in your wallet."
}
},
"required": [
"fromaccount",
"toaddress",
"amount"
]
},
"result": {
"type": "string",
"description": "The transaction id."
}
},
"sendmany": {
"summary": "Send multiple times. Amounts are double-precision floating point numbers.",
"description": [
"",
"",
"Send two amounts to two different addresses:",
"> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"",
"",
"Send two amounts to two different addresses setting the confirmation and comment:",
"> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"",
"",
"Send two amounts to two different addresses, subtract fee from amount:",
"> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\\\",\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"",
"",
"As a json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"fromaccount": {
"type": "string",
"description": "DEPRECATED. The account to send the funds from. Should be \"\" for the default account"
},
"amounts": {
"type": "string",
"description": "A json object with addresses and amounts { \"address\":amount (numeric or string) The bitcoin address is the key, the numeric amount (can be string) in LBC is the value ,... }"
},
"minconf": {
"type": "number",
"description": "Only use the balance confirmed at least this many times.",
"default": 1
},
"comment": {
"type": "string",
"description": "A comment"
},
"subtractfeefrom": {
"type": "array",
"description": "A json array with addresses.\n The fee will be equally deducted from the amount of each selected address.\n Those recipients will receive less bitcoins than you enter in their corresponding amount field.\n If no addresses are specified here, the sender pays the fee.\n [\n \"address\" (string) Subtract fee from this address\n ,...\n ]"
},
"replaceable": {
"type": "boolean",
"description": "Allow this transaction to be replaced by a transaction with higher fees via BIP 125"
},
"conf_target": {
"type": "number",
"description": "Confirmation target (in blocks)"
},
"estimate_mode": {
"type": "string",
"description": "The fee estimate mode, must be one of: \"UNSET\" \"ECONOMICAL\" \"CONSERVATIVE\"",
"default": "UNSET"
}
},
"required": [
"fromaccount",
"amounts"
]
},
"result": {
"type": "string",
"description": "The transaction id for the send. Only 1 transaction is created regardless of the number of addresses."
}
},
"sendtoaddress": {
"summary": "Send an amount to a given address.",
"description": [
"",
"> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1",
"> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address to send to."
},
"amount": {
"type": "number",
"description": "The amount in LBC to send. eg 0.1"
},
"comment": {
"type": "string",
"description": "A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet."
},
"comment_to": {
"type": "string",
"description": "A comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, just kept in your wallet."
},
"subtractfeefromamount": {
"type": "boolean",
"description": "The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field.",
"default": false
},
"replaceable": {
"type": "boolean",
"description": "Allow this transaction to be replaced by a transaction with higher fees via BIP 125"
},
"conf_target": {
"type": "number",
"description": "Confirmation target (in blocks)"
},
"estimate_mode": {
"type": "string",
"description": "The fee estimate mode, must be one of: \"UNSET\" \"ECONOMICAL\" \"CONSERVATIVE\"",
"default": "UNSET"
}
},
"required": [
"address",
"amount"
]
},
"result": {
"type": "string",
"description": "The transaction id."
}
},
"sethdseed": {
"summary": "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.",
"description": [
"",
"> lbrycrd-cli sethdseed ",
"> lbrycrd-cli sethdseed false",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"newkeypool": {
"type": "boolean",
"description": "Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it. If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed. If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing keypool will be used until it has been depleted.",
"default": true
},
"seed": {
"type": "string",
"description": "The WIF private key to use as the new HD seed; if not provided a random seed will be used. The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1"
}
},
"required": []
}
},
"setlabel": {
"summary": "Sets the label associated with the given address.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address to be associated with a label."
},
"label": {
"type": "string",
"description": "The label to assign to the address."
}
},
"required": [
"address",
"label"
]
}
},
"settxfee": {
"summary": "Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The transaction fee in LBC/kB Result true|false (boolean) Returns true if successful"
}
},
"required": [
"amount"
]
}
},
"signmessage": {
"summary": "Sign a message with the private key of an address",
"description": [
"",
"",
"Unlock the wallet for 30 seconds",
"> lbrycrd-cli walletpassphrase \"mypassphrase\" 30",
"",
"Create the signature",
"> lbrycrd-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"",
"",
"Verify the signature",
"> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"",
"",
"As json rpc",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The bitcoin address to use for the private key."
},
"message": {
"type": "string",
"description": "The message to create a signature of."
}
},
"required": [
"address",
"message"
]
},
"result": {
"type": "string",
"description": "The signature of the message encoded in base 64"
}
},
"signrawtransactionwithwallet": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"hexstring": {
"type": "string",
"description": "The transaction hex string"
},
"prevtxs": {
"type": "string",
"description": "An json array of previous dependent transaction outputs [ (json array of json objects, or 'null' if none provided) { \"txid\":\"id\", (string, required) The transaction id \"vout\":n, (numeric, required) The output number \"scriptPubKey\": \"hex\", (string, required) script key \"redeemScript\": \"hex\", (string, required for P2SH or P2WSH) redeem script \"amount\": value (numeric, required) The amount spent } ,... ]"
},
"sighashtype": {
"type": "string",
"description": "The signature hash type. Must be one of \"ALL\" \"NONE\" \"SINGLE\" \"ALL|ANYONECANPAY\" \"NONE|ANYONECANPAY\" \"SINGLE|ANYONECANPAY\"",
"default": "ALL"
}
},
"required": [
"hexstring"
]
},
"result": {
"type": "object",
"properties": {
"hex": {
"type": "string",
"description": "The hex-encoded raw transaction with signature(s)"
},
"complete": {
"type": "boolean",
"description": "If the transaction has a complete set of signatures"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "The hash of the referenced, previous transaction"
},
"vout": {
"type": "number",
"description": "The index of the output to spent and used as input"
},
"scriptSig": {
"type": "string",
"description": "The hex-encoded signature script"
},
"sequence": {
"type": "number",
"description": "Script sequence number"
},
"error": {
"type": "string",
"description": "Verification or signing error related to the input"
}
}
}
}
}
}
},
"unloadwallet": {
"summary": "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.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"wallet_name": {
"type": "string",
"description": "The name of the wallet to unload."
}
},
"required": []
}
},
"walletcreatefundedpsbt": {
"summary": "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.",
"description": [
"",
"",
"Create a transaction with no inputs",
"> lbrycrd-cli walletcreatefundedpsbt \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"inputs": {
"type": "array",
"description": "A json array of json objects\n [\n {\n \"txid\":\"id\", (string, required) The transaction id\n \"vout\":n, (numeric, required) The output number\n \"sequence\":n (numeric, optional) The sequence number\n } \n ,...\n ]"
},
"outputs": {
"type": "array",
"description": "a json array with outputs (key-value pairs), where none of the keys are duplicated.\nThat is, each address can only appear once and there can only be one 'data' object.\n [\n {\n \"address\": x.xxx, (obj, optional) A key-value pair. The key (string) is the bitcoin address, the value (float or string) is the amount in LBC\n },\n {\n \"data\": \"hex\" (obj, optional) A key-value pair. The key must be \"data\", the value is hex encoded data\n }\n ,... More key-value pairs of the above form. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also\n accepted as second parameter.\n ]"
},
"locktime": {
"type": "number",
"description": "Raw locktime. Non-0 value also locktime-activates inputs",
"default": 0
},
"options": {
"type": "object",
"properties": {
"changeAddress": {
"type": "string",
"description": "The bitcoin address to receive the change"
},
"changePosition": {
"type": "number",
"description": "The index of the change output"
},
"change_type": {
"type": "string",
"description": "The output type to use. Only valid if changeAddress is not specified. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -changetype."
},
"includeWatching": {
"type": "boolean",
"description": "Also select inputs which are watch only"
},
"lockUnspents": {
"type": "boolean",
"description": "Lock selected unspent outputs"
},
"feeRate": {
"type": "number",
"description": "Set a specific fee rate in LBC/kB"
},
"replaceable": {
"type": "boolean",
"description": "Marks this transaction as BIP125 replaceable."
},
"conf_target": {
"type": "number",
"description": "Confirmation target (in blocks)"
},
"estimate_mode": {
"type": "string",
"description": "The fee estimate mode, must be one of:"
}
}
},
"bip32derivs": {
"type": "boolean",
"description": "If true, includes the BIP 32 derivation paths for public keys if we know them",
"default": false
}
},
"required": [
"inputs",
"outputs"
]
},
"result": {
"type": "object",
"properties": {
"psbt": {
"type": "string",
"description": "The resulting raw transaction (base64-encoded string)"
},
"fee": {
"type": "number",
"description": "Fee in LBC the resulting transaction pays"
},
"changepos": {
"type": "number",
"description": "The position of the added change output, or -1"
}
}
}
},
"walletlock": {
"summary": "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.",
"description": [
"",
"",
"Set the passphrase for 2 minutes to perform a transaction",
"> lbrycrd-cli walletpassphrase \"my pass phrase\" 120",
"",
"Perform a send (requires passphrase set)",
"> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 1.0",
"",
"Clear the passphrase since we are done before 2 minutes is up",
"> lbrycrd-cli walletlock ",
"",
"As json rpc call",
"> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"walletlock\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {},
"required": []
}
},
"walletpassphrase": {
"summary": "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",
"description": [
"",
"",
"Unlock the wallet for 60 seconds",
"> lbrycrd-cli walletpassphrase \"my pass phrase\" 60",
"",
"Lock the wallet again (before 60 seconds)",
"> lbrycrd-cli walletlock ",
"",
"As json rpc call",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"passphrase": {
"type": "string",
"description": "The wallet passphrase"
},
"timeout": {
"type": "number",
"description": "The time to keep the decryption key in seconds; capped at 100000000 (~3 years). Note: Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one."
}
},
"required": [
"passphrase",
"timeout"
]
}
},
"walletpassphrasechange": {
"summary": "Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"oldpassphrase": {
"type": "string",
"description": "The current passphrase"
},
"newpassphrase": {
"type": "string",
"description": "The new passphrase"
}
},
"required": [
"oldpassphrase",
"newpassphrase"
]
}
},
"walletprocesspsbt": {
"summary": "Update a PSBT with input information from our wallet and then sign inputs that we can sign for.",
"description": [
"",
"> lbrycrd-cli walletprocesspsbt \"psbt\"",
""
],
"tags": [
"Wallet"
],
"params": {
"type": "object",
"properties": {
"psbt": {
"type": "string",
"description": "The transaction base64 string"
},
"sign": {
"type": "boolean",
"description": "Also sign the transaction when updating",
"default": true
},
"sighashtype": {
"type": "string",
"description": "The signature hash type to sign with if not specified by the PSBT. Must be one of \"ALL\" \"NONE\" \"SINGLE\" \"ALL|ANYONECANPAY\" \"NONE|ANYONECANPAY\" \"SINGLE|ANYONECANPAY\"",
"default": "ALL"
},
"bip32derivs": {
"type": "boolean",
"description": "If true, includes the BIP 32 derivation paths for public keys if we know them",
"default": false
}
},
"required": [
"psbt"
]
},
"result": {
"type": "object",
"properties": {
"psbt": {
"type": "string",
"description": "The base64-encoded partially signed transaction"
},
"complete": {
"type": "boolean",
"description": "If the transaction has a complete set of signatures"
}
}
}
},
"getzmqnotifications": {
"summary": "Returns information about the active ZeroMQ notifications.",
"description": [
"",
"> 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/",
""
],
"tags": [
"Zmq"
],
"params": {
"type": "object",
"properties": {},
"required": []
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of notification"
},
"address": {
"type": "string",
"description": "Address of the publisher"
}
}
}
}
}
}
}