2017-02-27 23:36:29 +01:00
|
|
|
# LBRY JSON-RPC API Documentation
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## blob_announce
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Announce blobs to the DHT
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'announce_all' (optional) : (bool) announce all the blobs possessed by user
|
|
|
|
'blob_hash' (optional) : (str) announce a blob, specified by blob_hash
|
|
|
|
'stream_hash' (optional) : (str) announce all blobs associated with
|
|
|
|
stream_hash
|
|
|
|
'sd_hash' (optional) : (str) announce all blobs associated with
|
|
|
|
sd_hash and the sd_hash itself
|
|
|
|
|
2017-02-28 18:31:55 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(bool) true if successful
|
|
|
|
```
|
|
|
|
|
|
|
|
## blob_availability
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get blob availability
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'blob_hash' (optional) : (str) check availability for this blob hash
|
|
|
|
'search_timeout' (optional) : (int) how long to search for peers for the blob
|
|
|
|
in the dht
|
|
|
|
'blob_timeout' (optional) : (int) how long to try downloading from a peer
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(dict) {
|
|
|
|
"is_available": <bool, true if blob is available from a peer from peer list>
|
|
|
|
"reachable_peers": ["<ip>:<port>"],
|
|
|
|
"unreachable_peers": ["<ip>:<port>"]
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2017-02-28 18:31:55 +01:00
|
|
|
## blob_delete
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2017-02-28 18:31:55 +01:00
|
|
|
Delete a blob
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'blob_hash' (optional) : (str) blob hash of the blob to delete
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(str) Success/fail message
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## blob_get
|
|
|
|
|
|
|
|
```text
|
2017-02-28 18:31:55 +01:00
|
|
|
Download and return a blob
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'blob_hash' : (str) blob hash of the blob to get
|
|
|
|
'timeout' (optional) : (int) timeout in number of seconds
|
|
|
|
'encoding' (optional) : (str) by default no attempt at decoding
|
|
|
|
is made, can be set to one of the
|
|
|
|
following decoders:
|
|
|
|
'json'
|
|
|
|
'payment_rate_manager' (optional) : (str) if not given the default payment rate
|
|
|
|
manager will be used.
|
|
|
|
supported alternative rate managers:
|
|
|
|
'only-free'
|
2017-02-28 18:31:55 +01:00
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(str) Success/Fail message or (dict) decoded data
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## blob_list
|
|
|
|
|
|
|
|
```text
|
2017-03-14 00:14:11 +01:00
|
|
|
Returns blob hashes. If not given filters, returns all blobs known by the blob manager
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'needed' (optional) : (bool) only return needed blobs
|
|
|
|
'finished' (optional) : (bool) only return finished blobs
|
|
|
|
'uri' (optional) : (str) filter blobs by stream in a uri
|
|
|
|
'stream_hash' (optional) : (str) filter blobs by stream hash
|
|
|
|
'sd_hash' (optional) : (str) filter blobs by sd hash
|
|
|
|
'page_size' (optional) : (int) results page size
|
|
|
|
'page' (optional) : (int) page of results to return
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(list) List of blob hashes
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## blob_reflect_all
|
|
|
|
|
|
|
|
```text
|
|
|
|
Reflects all saved blobs
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(bool) true if successful
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## block_show
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get contents of a block
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'blockhash' : (str) hash of the block to look up
|
|
|
|
'height' : (int) height of the block to look up
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Requested block
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## channel_export
|
2017-04-21 21:14:33 +02:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Export serialized channel signing information for a given certificate claim id
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'claim_id' : (str) Claim ID to export information about
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(str) Serialized certificate information
|
|
|
|
```
|
|
|
|
|
|
|
|
## channel_import
|
|
|
|
|
|
|
|
```text
|
|
|
|
Import serialized channel signing information (to allow signing new claims to the channel)
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'serialized_certificate_info' (optional) : (str) certificate info
|
2017-04-21 21:14:33 +02:00
|
|
|
|
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(dict) Result dictionary
|
|
|
|
```
|
|
|
|
|
|
|
|
## channel_list
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get certificate claim infos for channels that can be published to
|
|
|
|
|
|
|
|
Args:
|
|
|
|
None
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim
|
|
|
|
is in the wallet.
|
2017-04-21 21:14:33 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## channel_new
|
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Generate a publisher key and create a new '@' prefixed certificate claim
|
2017-04-21 21:14:33 +02:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'channel_name' : (str) name of the channel prefixed with '@'
|
|
|
|
'amount' : (float) bid amount on the channel
|
2017-04-21 21:14:33 +02:00
|
|
|
|
|
|
|
Returns:
|
|
|
|
(dict) Dictionary containing result of the claim
|
|
|
|
{
|
|
|
|
'tx' : (str) hex encoded transaction
|
|
|
|
'txid' : (str) txid of resulting claim
|
|
|
|
'nout' : (int) nout of the resulting claim
|
|
|
|
'fee' : (float) fee paid for the claim transaction
|
|
|
|
'claim_id' : (str) claim ID of the resulting claim
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## claim_abandon
|
|
|
|
|
|
|
|
```text
|
|
|
|
Abandon a name and reclaim credits from the claim
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'claim_id' (optional) : (str) claim_id of the claim to abandon
|
|
|
|
'txid' (optional) : (str) txid of the claim to abandon
|
|
|
|
'nout' (optional) : (int) nout of the claim to abandon
|
|
|
|
|
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Dictionary containing result of the claim
|
|
|
|
{
|
|
|
|
txid : (str) txid of resulting transaction
|
|
|
|
fee : (float) fee paid for the transaction
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## claim_list
|
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
List current claims and information about them for a given name
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'name' : (str) name of the claim to list info about
|
|
|
|
|
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) State of claims assigned for the name
|
2017-03-11 22:04:10 +01:00
|
|
|
{
|
2017-03-14 00:14:11 +01:00
|
|
|
'claims': (list) list of claims for the name
|
2017-03-11 22:04:10 +01:00
|
|
|
[
|
|
|
|
{
|
2017-03-14 00:14:11 +01:00
|
|
|
'amount': (float) amount assigned to the claim
|
|
|
|
'effective_amount': (float) total amount assigned to the claim,
|
|
|
|
including supports
|
|
|
|
'claim_id': (str) claim ID of the claim
|
|
|
|
'height': (int) height of block containing the claim
|
|
|
|
'txid': (str) txid of the claim
|
|
|
|
'nout': (int) nout of the claim
|
2018-02-24 19:13:29 +01:00
|
|
|
'permanent_url': (str) permanent url of the claim,
|
2017-03-14 00:14:11 +01:00
|
|
|
'supports': (list) a list of supports attached to the claim
|
|
|
|
'value': (str) the value of the claim
|
2017-03-11 22:04:10 +01:00
|
|
|
},
|
|
|
|
]
|
2017-03-14 00:14:11 +01:00
|
|
|
'supports_without_claims': (list) supports without any claims attached to them
|
|
|
|
'last_takeover_height': (int) the height of last takeover for the name
|
2017-03-11 22:04:10 +01:00
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## claim_list_by_channel
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get paginated claims in a channel specified by a channel uri
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'uri' : (str) uri of the channel
|
|
|
|
'uris' (optional) : (list) uris of the channel
|
|
|
|
'page' (optional) : (int) which page of results to return where page 1 is the first
|
|
|
|
page, defaults to no pages
|
|
|
|
'page_size' (optional) : (int) number of results in a page, default of 10
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
{
|
|
|
|
resolved channel uri: {
|
|
|
|
If there was an error:
|
|
|
|
'error': (str) error message
|
|
|
|
|
|
|
|
'claims_in_channel': the total number of results for the channel,
|
|
|
|
|
|
|
|
If a page of results was requested:
|
|
|
|
'returned_page': page number returned,
|
|
|
|
'claims_in_channel': [
|
|
|
|
{
|
|
|
|
'absolute_channel_position': (int) claim index number in sorted list of
|
|
|
|
claims which assert to be part of the
|
|
|
|
channel
|
|
|
|
'address': (str) claim address,
|
|
|
|
'amount': (float) claim amount,
|
|
|
|
'effective_amount': (float) claim amount including supports,
|
|
|
|
'claim_id': (str) claim id,
|
|
|
|
'claim_sequence': (int) claim sequence number,
|
|
|
|
'decoded_claim': (bool) whether or not the claim value was decoded,
|
|
|
|
'height': (int) claim height,
|
|
|
|
'depth': (int) claim depth,
|
|
|
|
'has_signature': (bool) included if decoded_claim
|
|
|
|
'name': (str) claim name,
|
|
|
|
'supports: (list) list of supports [{'txid': (str) txid,
|
|
|
|
'nout': (int) nout,
|
|
|
|
'amount': (float) amount}],
|
|
|
|
'txid': (str) claim txid,
|
|
|
|
'nout': (str) claim nout,
|
|
|
|
'signature_is_valid': (bool), included if has_signature,
|
|
|
|
'value': ClaimDict if decoded, otherwise hex string
|
|
|
|
}
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## claim_list_mine
|
|
|
|
|
|
|
|
```text
|
|
|
|
List my name claims
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(list) List of name claims owned by user
|
2017-03-11 22:04:10 +01:00
|
|
|
[
|
|
|
|
{
|
2017-03-14 00:14:11 +01:00
|
|
|
'address': (str) address that owns the claim
|
|
|
|
'amount': (float) amount assigned to the claim
|
|
|
|
'blocks_to_expiration': (int) number of blocks until it expires
|
|
|
|
'category': (str) "claim", "update" , or "support"
|
|
|
|
'claim_id': (str) claim ID of the claim
|
|
|
|
'confirmations': (int) number of blocks of confirmations for the claim
|
|
|
|
'expiration_height': (int) the block height which the claim will expire
|
|
|
|
'expired': (bool) true if expired, false otherwise
|
|
|
|
'height': (int) height of the block containing the claim
|
|
|
|
'is_spent': (bool) true if claim is abandoned, false otherwise
|
|
|
|
'name': (str) name of the claim
|
2018-02-24 19:13:29 +01:00
|
|
|
'permanent_url': (str) permanent url of the claim,
|
2017-03-14 00:14:11 +01:00
|
|
|
'txid': (str) txid of the cliam
|
|
|
|
'nout': (int) nout of the claim
|
|
|
|
'value': (str) value of the claim
|
2017-03-11 22:04:10 +01:00
|
|
|
},
|
|
|
|
]
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## claim_new_support
|
|
|
|
|
|
|
|
```text
|
|
|
|
Support a name claim
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'name' : (str) name of the claim to support
|
|
|
|
'claim_id' : (str) claim_id of the claim to support
|
|
|
|
'amount' : (float) amount of support
|
|
|
|
|
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Dictionary containing result of the claim
|
|
|
|
{
|
|
|
|
txid : (str) txid of resulting support claim
|
|
|
|
nout : (int) nout of the resulting support claim
|
|
|
|
fee : (float) fee paid for the transaction
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## claim_renew
|
|
|
|
|
|
|
|
```text
|
|
|
|
Renew claim(s) or support(s)
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'outpoint' : (str) outpoint of the claim to renew
|
|
|
|
'height' : (str) update claims expiring before or at this block height
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(dict) Dictionary where key is the the original claim's outpoint and
|
|
|
|
value is the result of the renewal
|
|
|
|
{
|
|
|
|
outpoint:{
|
|
|
|
|
|
|
|
'tx' : (str) hex encoded transaction
|
|
|
|
'txid' : (str) txid of resulting claim
|
|
|
|
'nout' : (int) nout of the resulting claim
|
|
|
|
'fee' : (float) fee paid for the claim transaction
|
|
|
|
'claim_id' : (str) claim ID of the resulting claim
|
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## claim_send_to_address
|
|
|
|
|
|
|
|
```text
|
|
|
|
Send a name claim to an address
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'claim_id' : (str) claim_id to send
|
|
|
|
'address' : (str) address to send the claim to
|
|
|
|
'amount' (optional) : (int) Amount of credits to claim name for, defaults to the current amount
|
|
|
|
on the claim
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(dict) Dictionary containing result of the claim
|
|
|
|
{
|
|
|
|
'tx' : (str) hex encoded transaction
|
|
|
|
'txid' : (str) txid of resulting claim
|
|
|
|
'nout' : (int) nout of the resulting claim
|
|
|
|
'fee' : (float) fee paid for the claim transaction
|
|
|
|
'claim_id' : (str) claim ID of the resulting claim
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## claim_show
|
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Resolve claim info from txid/nout or with claim ID
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'txid' (optional) : (str) look for claim with this txid, nout must
|
|
|
|
also be specified
|
|
|
|
'nout' (optional) : (int) look for claim with this nout, txid must
|
|
|
|
also be specified
|
|
|
|
'claim_id' (optional) : (str) look for claim with this claim id
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(dict) Dictionary containing claim info as below,
|
2017-03-11 22:04:10 +01:00
|
|
|
|
2017-03-14 00:14:11 +01:00
|
|
|
{
|
|
|
|
'txid': (str) txid of claim
|
|
|
|
'nout': (int) nout of claim
|
|
|
|
'amount': (float) amount of claim
|
|
|
|
'value': (str) value of claim
|
|
|
|
'height' : (int) height of claim takeover
|
|
|
|
'claim_id': (str) claim ID of claim
|
|
|
|
'supports': (list) list of supports associated with claim
|
|
|
|
}
|
2018-02-24 19:13:29 +01:00
|
|
|
|
|
|
|
if claim cannot be resolved, dictionary as below will be returned
|
|
|
|
|
|
|
|
{
|
|
|
|
'error': (str) reason for error
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## cli_test_command
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
This command is only for testing the CLI argument parsing
|
|
|
|
Args:
|
|
|
|
'a_arg' (optional) : a arg
|
|
|
|
'b_arg' (optional) : b arg
|
|
|
|
'pos_arg' : pos arg
|
|
|
|
'pos_args' (optional) : pos args
|
|
|
|
'pos_arg2' (optional) : pos arg 2
|
|
|
|
'pos_arg3' (optional) : pos arg 3
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
pos args
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## commands
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Return a list of available commands
|
|
|
|
|
|
|
|
Args:
|
|
|
|
None
|
2017-02-27 23:36:29 +01:00
|
|
|
|
2017-02-28 18:31:55 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(list) list of available commands
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## daemon_stop
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Stop lbrynet-daemon
|
2017-02-27 23:36:29 +01:00
|
|
|
|
2017-02-28 18:31:55 +01:00
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
2017-02-28 18:31:55 +01:00
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
Returns:
|
|
|
|
(string) Shutdown message
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## file_delete
|
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Delete a LBRY file
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'delete_from_download_dir' (optional) : (bool) delete file from download directory,
|
|
|
|
instead of just deleting blobs
|
|
|
|
'delete_all' (optional) : (bool) if there are multiple matching files,
|
|
|
|
allow the deletion of multiple files.
|
|
|
|
Otherwise do not delete anything.
|
|
|
|
'sd_hash' (optional) : (str) delete by file sd hash
|
|
|
|
'file_name' (optional) : (str) delete by file name in downloads folder
|
|
|
|
'stream_hash' (optional) : (str) delete by file stream hash
|
|
|
|
'rowid' (optional) : (int) delete by file row id
|
|
|
|
'claim_id' (optional) : (str) delete by file claim id
|
|
|
|
'txid' (optional) : (str) delete by file claim txid
|
|
|
|
'nout' (optional) : (int) delete by file claim nout
|
|
|
|
'claim_name' (optional) : (str) delete by file claim name
|
|
|
|
'channel_claim_id' (optional) : (str) delete by file channel claim id
|
|
|
|
'channel_name' (optional) : (str) delete by file channel claim name
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(bool) true if deletion was successful
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## file_list
|
|
|
|
|
|
|
|
```text
|
2017-03-11 22:04:10 +01:00
|
|
|
List files limited by optional filters
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'sd_hash' (optional) : (str) get file with matching sd hash
|
|
|
|
'file_name' (optional) : (str) get file with matching file name in the
|
|
|
|
downloads folder
|
|
|
|
'stream_hash' (optional) : (str) get file with matching stream hash
|
|
|
|
'rowid' (optional) : (int) get file with matching row id
|
|
|
|
'claim_id' (optional) : (str) get file with matching claim id
|
|
|
|
'outpoint' (optional) : (str) get file with matching claim outpoint
|
|
|
|
'txid' (optional) : (str) get file with matching claim txid
|
|
|
|
'nout' (optional) : (int) get file with matching claim nout
|
|
|
|
'channel_claim_id' (optional) : (str) get file with matching channel claim id
|
|
|
|
'channel_name' (optional) : (str) get file with matching channel name
|
|
|
|
'claim_name' (optional) : (str) get file with matching claim name
|
|
|
|
'full_status' (optional) : (bool) full status, populate the
|
|
|
|
'message' and 'size' fields
|
2017-03-11 22:04:10 +01:00
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(list) List of files
|
|
|
|
|
2017-03-11 22:04:10 +01:00
|
|
|
[
|
|
|
|
{
|
2017-03-14 00:14:11 +01:00
|
|
|
'completed': (bool) true if download is completed,
|
|
|
|
'file_name': (str) name of file,
|
|
|
|
'download_directory': (str) download directory,
|
|
|
|
'points_paid': (float) credit paid to download file,
|
|
|
|
'stopped': (bool) true if download is stopped,
|
|
|
|
'stream_hash': (str) stream hash of file,
|
|
|
|
'stream_name': (str) stream name ,
|
|
|
|
'suggested_file_name': (str) suggested file name,
|
|
|
|
'sd_hash': (str) sd hash of file,
|
|
|
|
'download_path': (str) download path of file,
|
|
|
|
'mime_type': (str) mime type of file,
|
|
|
|
'key': (str) key attached to file,
|
2018-02-24 19:13:29 +01:00
|
|
|
'total_bytes': (int) file size in bytes, None if full_status is false,
|
|
|
|
'written_bytes': (int) written size in bytes,
|
|
|
|
'blobs_completed': (int) num_completed, None if full_status is false,
|
|
|
|
'blobs_in_stream': (int) None if full_status is false,
|
|
|
|
'status': (str) downloader status, None if full_status is false,
|
|
|
|
'claim_id': (str) None if full_status is false or if claim is not found,
|
|
|
|
'outpoint': (str) None if full_status is false or if claim is not found,
|
|
|
|
'txid': (str) None if full_status is false or if claim is not found,
|
|
|
|
'nout': (int) None if full_status is false or if claim is not found,
|
|
|
|
'metadata': (dict) None if full_status is false or if claim is not found,
|
|
|
|
'channel_claim_id': (str) None if full_status is false or if claim is not found or signed,
|
|
|
|
'channel_name': (str) None if full_status is false or if claim is not found or signed,
|
|
|
|
'claim_name': (str) None if full_status is false or if claim is not found
|
2017-03-14 00:14:11 +01:00
|
|
|
},
|
2017-03-11 22:04:10 +01:00
|
|
|
]
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## file_reflect
|
|
|
|
|
|
|
|
```text
|
|
|
|
Reflect all the blobs in a file matching the filter criteria
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'sd_hash' (optional) : (str) get file with matching sd hash
|
|
|
|
'file_name' (optional) : (str) get file with matching file name in the
|
|
|
|
downloads folder
|
|
|
|
'stream_hash' (optional) : (str) get file with matching stream hash
|
|
|
|
'rowid' (optional) : (int) get file with matching row id
|
|
|
|
'reflector' (optional) : (str) reflector server, ip address or url
|
|
|
|
by default choose a server from the config
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(list) list of blobs reflected
|
|
|
|
```
|
|
|
|
|
2017-03-27 18:51:19 +02:00
|
|
|
## file_set_status
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2017-03-27 18:51:19 +02:00
|
|
|
Start or stop downloading a file
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'status' : (str) one of "start" or "stop"
|
|
|
|
'sd_hash' (optional) : (str) set status of file with matching sd hash
|
|
|
|
'file_name' (optional) : (str) set status of file with matching file name in the
|
|
|
|
downloads folder
|
|
|
|
'stream_hash' (optional) : (str) set status of file with matching stream hash
|
|
|
|
'rowid' (optional) : (int) set status of file with matching row id
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(str) Confirmation message
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## get
|
|
|
|
|
|
|
|
```text
|
2017-03-11 22:04:10 +01:00
|
|
|
Download stream from a LBRY name.
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'uri' (optional) : (str) uri of the content to download
|
|
|
|
'file_name' (optional) : (str) specified name for the downloaded file
|
|
|
|
'timeout' (optional) : (int) download timeout in number of seconds
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-09-12 15:41:11 +02:00
|
|
|
(dict) Dictionary containing information about the stream
|
2017-03-11 22:04:10 +01:00
|
|
|
{
|
2017-03-14 00:14:11 +01:00
|
|
|
'completed': (bool) true if download is completed,
|
|
|
|
'file_name': (str) name of file,
|
|
|
|
'download_directory': (str) download directory,
|
|
|
|
'points_paid': (float) credit paid to download file,
|
|
|
|
'stopped': (bool) true if download is stopped,
|
|
|
|
'stream_hash': (str) stream hash of file,
|
2018-02-24 19:13:29 +01:00
|
|
|
'stream_name': (str) stream name ,
|
2017-03-14 00:14:11 +01:00
|
|
|
'suggested_file_name': (str) suggested file name,
|
|
|
|
'sd_hash': (str) sd hash of file,
|
|
|
|
'download_path': (str) download path of file,
|
|
|
|
'mime_type': (str) mime type of file,
|
|
|
|
'key': (str) key attached to file,
|
2018-02-24 19:13:29 +01:00
|
|
|
'total_bytes': (int) file size in bytes, None if full_status is false,
|
|
|
|
'written_bytes': (int) written size in bytes,
|
|
|
|
'blobs_completed': (int) num_completed, None if full_status is false,
|
|
|
|
'blobs_in_stream': (int) None if full_status is false,
|
|
|
|
'status': (str) downloader status, None if full_status is false,
|
|
|
|
'claim_id': (str) claim id,
|
|
|
|
'outpoint': (str) claim outpoint string,
|
|
|
|
'txid': (str) claim txid,
|
|
|
|
'nout': (int) claim nout,
|
|
|
|
'metadata': (dict) claim metadata,
|
|
|
|
'channel_claim_id': (str) None if claim is not signed
|
|
|
|
'channel_name': (str) None if claim is not signed
|
|
|
|
'claim_name': (str) claim name
|
2017-03-11 22:04:10 +01:00
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## help
|
|
|
|
|
|
|
|
```text
|
|
|
|
Return a useful message for an API command
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'command' (optional) : (str) command to retrieve documentation for
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(str) Help message
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## peer_list
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get peers for blob hash
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'blob_hash' : (str) find available peers for this blob hash
|
|
|
|
'timeout' (optional) : (int) peer search timeout in seconds
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(list) List of contacts
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## publish
|
|
|
|
|
|
|
|
```text
|
2017-03-28 17:47:01 +02:00
|
|
|
Make a new name claim and publish associated data to lbrynet,
|
|
|
|
update over existing claim if user already has a claim for name.
|
2017-02-27 23:36:29 +01:00
|
|
|
|
2017-03-16 19:29:34 +01:00
|
|
|
Fields required in the final Metadata are:
|
|
|
|
'title'
|
|
|
|
'description'
|
|
|
|
'author'
|
|
|
|
'language'
|
2018-02-24 19:13:29 +01:00
|
|
|
'license'
|
2017-03-16 19:29:34 +01:00
|
|
|
'nsfw'
|
|
|
|
|
|
|
|
Metadata can be set by either using the metadata argument or by setting individual arguments
|
|
|
|
fee, title, description, author, language, license, license_url, thumbnail, preview, nsfw,
|
|
|
|
or sources. Individual arguments will overwrite the fields specified in metadata argument.
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'name' : (str) name of the content
|
|
|
|
'bid' : (float) amount to back the claim
|
|
|
|
'metadata' (optional) : (dict) ClaimDict to associate with the claim.
|
|
|
|
'file_path' (optional) : (str) path to file to be associated with name. If provided,
|
|
|
|
a lbry stream of this file will be used in 'sources'.
|
|
|
|
If no path is given but a sources dict is provided,
|
|
|
|
it will be used. If neither are provided, an
|
|
|
|
error is raised.
|
|
|
|
'fee' (optional) : (dict) Dictionary representing key fee to download content:
|
|
|
|
{
|
|
|
|
'currency': currency_symbol,
|
|
|
|
'amount': float,
|
|
|
|
'address': str, optional
|
|
|
|
}
|
|
|
|
supported currencies: LBC, USD, BTC
|
|
|
|
If an address is not provided a new one will be
|
|
|
|
automatically generated. Default fee is zero.
|
|
|
|
'title' (optional) : (str) title of the publication
|
|
|
|
'description' (optional) : (str) description of the publication
|
|
|
|
'author' (optional) : (str) author of the publication
|
|
|
|
'language' (optional) : (str) language of the publication
|
|
|
|
'license' (optional) : (str) publication license
|
|
|
|
'license_url' (optional) : (str) publication license url
|
|
|
|
'thumbnail' (optional) : (str) thumbnail url
|
|
|
|
'preview' (optional) : (str) preview url
|
|
|
|
'nsfw' (optional) : (bool) title of the publication
|
|
|
|
'sources' (optional) : (str) {'lbry_sd_hash': sd_hash} specifies sd hash of file
|
|
|
|
'channel_name' (optional) : (str) name of the publisher channel name in the wallet
|
|
|
|
'channel_id' (optional) : (str) claim id of the publisher channel, does not check
|
|
|
|
for channel claim being in the wallet. This allows
|
|
|
|
publishing to a channel where only the certificate
|
|
|
|
private key is in the wallet.
|
|
|
|
'claim_address' (optional) : (str) address where the claim is sent to, if not specified
|
|
|
|
new address wil automatically be created
|
2017-03-16 19:29:34 +01:00
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Dictionary containing result of the claim
|
|
|
|
{
|
|
|
|
'tx' : (str) hex encoded transaction
|
|
|
|
'txid' : (str) txid of resulting claim
|
|
|
|
'nout' : (int) nout of the resulting claim
|
|
|
|
'fee' : (float) fee paid for the claim transaction
|
|
|
|
'claim_id' : (str) claim ID of the resulting claim
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## report_bug
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Report a bug to slack
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'message' : (str) Description of the bug
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(bool) true if successful
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## resolve
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Resolve given LBRY URIs
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'force' (optional) : (bool) force refresh and ignore cache
|
|
|
|
'uri' : (str) uri to resolve
|
|
|
|
'uris' (optional) : (list) uris to resolve
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
Dictionary of results, keyed by uri
|
|
|
|
'<uri>': {
|
|
|
|
If a resolution error occurs:
|
|
|
|
'error': Error message
|
2017-02-27 23:36:29 +01:00
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
If the uri resolves to a channel or a claim in a channel:
|
|
|
|
'certificate': {
|
|
|
|
'address': (str) claim address,
|
|
|
|
'amount': (float) claim amount,
|
|
|
|
'effective_amount': (float) claim amount including supports,
|
|
|
|
'claim_id': (str) claim id,
|
|
|
|
'claim_sequence': (int) claim sequence number,
|
|
|
|
'decoded_claim': (bool) whether or not the claim value was decoded,
|
|
|
|
'height': (int) claim height,
|
|
|
|
'depth': (int) claim depth,
|
|
|
|
'has_signature': (bool) included if decoded_claim
|
|
|
|
'name': (str) claim name,
|
|
|
|
'permanent_url': (str) permanent url of the certificate claim,
|
|
|
|
'supports: (list) list of supports [{'txid': (str) txid,
|
|
|
|
'nout': (int) nout,
|
|
|
|
'amount': (float) amount}],
|
|
|
|
'txid': (str) claim txid,
|
|
|
|
'nout': (str) claim nout,
|
|
|
|
'signature_is_valid': (bool), included if has_signature,
|
|
|
|
'value': ClaimDict if decoded, otherwise hex string
|
|
|
|
}
|
2017-04-21 21:14:33 +02:00
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
If the uri resolves to a channel:
|
|
|
|
'claims_in_channel': (int) number of claims in the channel,
|
|
|
|
|
|
|
|
If the uri resolves to a claim:
|
|
|
|
'claim': {
|
2017-04-21 21:14:33 +02:00
|
|
|
'address': (str) claim address,
|
|
|
|
'amount': (float) claim amount,
|
|
|
|
'effective_amount': (float) claim amount including supports,
|
|
|
|
'claim_id': (str) claim id,
|
|
|
|
'claim_sequence': (int) claim sequence number,
|
|
|
|
'decoded_claim': (bool) whether or not the claim value was decoded,
|
|
|
|
'height': (int) claim height,
|
|
|
|
'depth': (int) claim depth,
|
|
|
|
'has_signature': (bool) included if decoded_claim
|
|
|
|
'name': (str) claim name,
|
2018-02-24 19:13:29 +01:00
|
|
|
'permanent_url': (str) permanent url of the claim,
|
|
|
|
'channel_name': (str) channel name if claim is in a channel
|
|
|
|
'supports: (list) list of supports [{'txid': (str) txid,
|
|
|
|
'nout': (int) nout,
|
|
|
|
'amount': (float) amount}]
|
2017-04-21 21:14:33 +02:00
|
|
|
'txid': (str) claim txid,
|
|
|
|
'nout': (str) claim nout,
|
|
|
|
'signature_is_valid': (bool), included if has_signature,
|
|
|
|
'value': ClaimDict if decoded, otherwise hex string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## resolve_name
|
|
|
|
|
|
|
|
```text
|
2017-03-11 22:04:10 +01:00
|
|
|
Resolve stream info from a LBRY name
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'name' : (str) the name to resolve
|
|
|
|
'force' (optional) : (bool) force refresh and do not check cache
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Metadata dictionary from name claim, None if the name is not
|
|
|
|
resolvable
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## routing_table_get
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Get DHT routing information
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(dict) dictionary containing routing and contact information
|
|
|
|
{
|
|
|
|
"buckets": {
|
|
|
|
<bucket index>: [
|
|
|
|
{
|
|
|
|
"address": (str) peer address,
|
|
|
|
"node_id": (str) peer node id,
|
|
|
|
"blobs": (list) blob hashes announced by peer
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"contacts": (list) contact node ids,
|
|
|
|
"blob_hashes": (list) all of the blob hashes stored by peers in the list of buckets,
|
|
|
|
"node_id": (str) the local dht node id
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## settings_get
|
|
|
|
|
|
|
|
```text
|
2017-02-28 18:31:55 +01:00
|
|
|
Get daemon settings
|
2017-02-27 23:36:29 +01:00
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
Args:
|
|
|
|
None
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Dictionary of daemon settings
|
2017-03-24 18:54:43 +01:00
|
|
|
See ADJUSTABLE_SETTINGS in lbrynet/conf.py for full list of settings
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## settings_set
|
|
|
|
|
|
|
|
```text
|
2017-02-28 18:31:55 +01:00
|
|
|
Set daemon settings
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'download_directory' (optional) : (str) path of download directory
|
|
|
|
'data_rate' (optional) : (float) 0.0001
|
|
|
|
'download_timeout' (optional) : (int) 180
|
|
|
|
'peer_port' (optional) : (int) 3333
|
|
|
|
'max_key_fee' (optional) : (dict) maximum key fee for downloads,
|
|
|
|
in the format:
|
|
|
|
{
|
|
|
|
'currency': <currency_symbol>,
|
|
|
|
'amount': <amount>
|
|
|
|
}.
|
|
|
|
In the CLI, it must be an escaped JSON string
|
|
|
|
Supported currency symbols: LBC, USD, BTC
|
|
|
|
'disable_max_key_fee' (optional) : (bool) False
|
|
|
|
'use_upnp' (optional) : (bool) True
|
|
|
|
'run_reflector_server' (optional) : (bool) False
|
|
|
|
'cache_time' (optional) : (int) 150
|
|
|
|
'reflect_uploads' (optional) : (bool) True
|
|
|
|
'share_usage_data' (optional) : (bool) True
|
|
|
|
'peer_search_timeout' (optional) : (int) 3
|
|
|
|
'sd_download_timeout' (optional) : (int) 3
|
|
|
|
'auto_renew_claim_height_delta' (optional) : (int) 0
|
|
|
|
claims set to expire within this many blocks will be
|
|
|
|
automatically renewed after startup (if set to 0, renews
|
|
|
|
will not be made automatically)
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-24 18:54:43 +01:00
|
|
|
(dict) Updated dictionary of daemon settings
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## status
|
|
|
|
|
|
|
|
```text
|
2018-02-24 19:13:29 +01:00
|
|
|
Get daemon status
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'session_status' (optional) : (bool) include session status in results
|
|
|
|
'dht_status' (optional) : (bool) include dht network and peer status
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(dict) lbrynet-daemon status
|
|
|
|
{
|
|
|
|
'lbry_id': lbry peer id, base58,
|
|
|
|
'installation_id': installation id, base58,
|
|
|
|
'is_running': bool,
|
|
|
|
'is_first_run': bool,
|
|
|
|
'startup_status': {
|
|
|
|
'code': status code,
|
|
|
|
'message': status message
|
|
|
|
},
|
|
|
|
'connection_status': {
|
|
|
|
'code': connection status code,
|
|
|
|
'message': connection status message
|
|
|
|
},
|
|
|
|
'blockchain_status': {
|
|
|
|
'blocks': local blockchain height,
|
|
|
|
'blocks_behind': remote_height - local_height,
|
|
|
|
'best_blockhash': block hash of most recent block,
|
|
|
|
},
|
|
|
|
'wallet_is_encrypted': bool,
|
|
|
|
|
|
|
|
If given the session status option:
|
|
|
|
'session_status': {
|
|
|
|
'managed_blobs': count of blobs in the blob manager,
|
|
|
|
'managed_streams': count of streams in the file manager
|
|
|
|
'announce_queue_size': number of blobs currently queued to be announced
|
|
|
|
'should_announce_blobs': number of blobs that should be announced
|
|
|
|
}
|
|
|
|
|
|
|
|
If given the dht status option:
|
|
|
|
'dht_status': {
|
|
|
|
'kbps_received': current kbps receiving,
|
|
|
|
'kbps_sent': current kdps being sent,
|
|
|
|
'total_bytes_sent': total bytes sent,
|
|
|
|
'total_bytes_received': total bytes received,
|
|
|
|
'queries_received': number of queries received per second,
|
|
|
|
'queries_sent': number of queries sent per second,
|
|
|
|
'recent_contacts': count of recently contacted peers,
|
|
|
|
'unique_contacts': count of unique peers
|
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## stream_availability
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get stream availability for lbry uri
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'uri' : (str) check availability for this uri
|
|
|
|
'search_timeout' (optional) : (int) how long to search for peers for the blob
|
|
|
|
in the dht
|
|
|
|
'search_timeout' (optional) : (int) how long to try downloading from a peer
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2018-02-24 19:13:29 +01:00
|
|
|
(dict) {
|
|
|
|
'is_available': <bool>,
|
|
|
|
'did_decode': <bool>,
|
|
|
|
'did_resolve': <bool>,
|
|
|
|
'is_stream': <bool>,
|
|
|
|
'num_blobs_in_stream': <int>,
|
|
|
|
'sd_hash': <str>,
|
|
|
|
'sd_blob_availability': <dict> see `blob_availability`,
|
|
|
|
'head_blob_hash': <str>,
|
|
|
|
'head_blob_availability': <dict> see `blob_availability`,
|
|
|
|
'use_upnp': <bool>,
|
|
|
|
'upnp_redirect_is_set': <bool>,
|
|
|
|
'error': <None> | <str> error message
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## stream_cost_estimate
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get estimated cost for a lbry stream
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'uri' : (str) uri to use
|
|
|
|
'size' (optional) : (float) stream size in bytes. if provided an sd blob won't be
|
|
|
|
downloaded.
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-04-21 21:14:33 +02:00
|
|
|
(float) Estimated cost in lbry credits, returns None if uri is not
|
2018-02-24 19:13:29 +01:00
|
|
|
resolvable
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## transaction_list
|
|
|
|
|
|
|
|
```text
|
2017-03-14 00:14:11 +01:00
|
|
|
List transactions belonging to wallet
|
2017-02-27 23:36:29 +01:00
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(list) List of transactions
|
2018-02-24 19:13:29 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
"claim_info": (list) claim info if in txn [{
|
|
|
|
"address": (str) address of claim,
|
|
|
|
"balance_delta": (float) bid amount,
|
|
|
|
"amount": (float) claim amount,
|
|
|
|
"claim_id": (str) claim id,
|
|
|
|
"claim_name": (str) claim name,
|
|
|
|
"nout": (int) nout
|
|
|
|
}],
|
|
|
|
"abandon_info": (list) abandon info if in txn [{
|
|
|
|
"address": (str) address of abandoned claim,
|
|
|
|
"balance_delta": (float) returned amount,
|
|
|
|
"amount": (float) claim amount,
|
|
|
|
"claim_id": (str) claim id,
|
|
|
|
"claim_name": (str) claim name,
|
|
|
|
"nout": (int) nout
|
|
|
|
}],
|
|
|
|
"confirmations": (int) number of confirmations for the txn,
|
|
|
|
"date": (str) date and time of txn,
|
|
|
|
"fee": (float) txn fee,
|
|
|
|
"support_info": (list) support info if in txn [{
|
|
|
|
"address": (str) address of support,
|
|
|
|
"balance_delta": (float) support amount,
|
|
|
|
"amount": (float) support amount,
|
|
|
|
"claim_id": (str) claim id,
|
|
|
|
"claim_name": (str) claim name,
|
|
|
|
"is_tip": (bool),
|
|
|
|
"nout": (int) nout
|
|
|
|
}],
|
|
|
|
"timestamp": (int) timestamp,
|
|
|
|
"txid": (str) txn id,
|
|
|
|
"update_info": (list) update info if in txn [{
|
|
|
|
"address": (str) address of claim,
|
|
|
|
"balance_delta": (float) credited/debited
|
|
|
|
"amount": (float) absolute amount,
|
|
|
|
"claim_id": (str) claim id,
|
|
|
|
"claim_name": (str) claim name,
|
|
|
|
"nout": (int) nout
|
|
|
|
}],
|
|
|
|
"value": (float) value of txn
|
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## transaction_show
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get a decoded transaction from a txid
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'txid' : (str) txid of the transaction
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) JSON formatted transaction
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## utxo_list
|
|
|
|
|
|
|
|
```text
|
|
|
|
List unspent transaction outputs
|
|
|
|
|
|
|
|
Args:
|
|
|
|
None
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(list) List of unspent transaction outputs (UTXOs)
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"address": (str) the output address
|
|
|
|
"amount": (float) unspent amount
|
|
|
|
"height": (int) block height
|
|
|
|
"is_claim": (bool) is the tx a claim
|
|
|
|
"is_coinbase": (bool) is the tx a coinbase tx
|
|
|
|
"is_support": (bool) is the tx a support
|
|
|
|
"is_update": (bool) is the tx an update
|
|
|
|
"nout": (int) nout of the output
|
|
|
|
"txid": (str) txid of the output
|
|
|
|
},
|
|
|
|
...
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## version
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get lbry version information
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(dict) Dictionary of lbry version information
|
|
|
|
{
|
2017-03-15 21:31:58 +01:00
|
|
|
'build': (str) build type (e.g. "dev", "rc", "release"),
|
|
|
|
'ip': (str) remote ip, if available,
|
2017-03-14 00:14:11 +01:00
|
|
|
'lbrynet_version': (str) lbrynet_version,
|
|
|
|
'lbryum_version': (str) lbryum_version,
|
2017-04-21 21:14:33 +02:00
|
|
|
'lbryschema_version': (str) lbryschema_version,
|
2017-03-15 21:31:58 +01:00
|
|
|
'os_release': (str) os release string
|
|
|
|
'os_system': (str) os name
|
|
|
|
'platform': (str) platform string
|
|
|
|
'processor': (str) processor type,
|
|
|
|
'python_version': (str) python version,
|
2017-03-14 00:14:11 +01:00
|
|
|
}
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## wallet_balance
|
|
|
|
|
|
|
|
```text
|
|
|
|
Return the balance of the wallet
|
|
|
|
|
2017-04-25 14:58:56 +02:00
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'address' (optional) : (str) If provided only the balance for this
|
|
|
|
address will be given
|
|
|
|
'include_unconfirmed' (optional) : (bool) Include unconfirmed
|
2017-04-25 14:58:56 +02:00
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(float) amount of lbry credits in wallet
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## wallet_decrypt
|
|
|
|
|
|
|
|
```text
|
|
|
|
Decrypt an encrypted wallet, this will remove the wallet password
|
|
|
|
|
|
|
|
Args:
|
|
|
|
None
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(bool) true if wallet is decrypted, otherwise false
|
|
|
|
```
|
|
|
|
|
|
|
|
## wallet_encrypt
|
|
|
|
|
|
|
|
```text
|
|
|
|
Encrypt a wallet with a password, if the wallet is already encrypted this will update
|
|
|
|
the password
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'new_password' : (str) password string to be used for encrypting wallet
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(bool) true if wallet is decrypted, otherwise false
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## wallet_is_address_mine
|
|
|
|
|
|
|
|
```text
|
|
|
|
Checks if an address is associated with the current wallet.
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'address' : (str) address to check
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(bool) true, if address is associated with current wallet
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2017-03-24 18:54:43 +01:00
|
|
|
## wallet_list
|
|
|
|
|
|
|
|
```text
|
|
|
|
List wallet addresses
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-03-24 18:54:43 +01:00
|
|
|
Returns:
|
|
|
|
List of wallet addresses
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## wallet_new_address
|
|
|
|
|
|
|
|
```text
|
|
|
|
Generate a new wallet address
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-14 00:14:11 +01:00
|
|
|
(str) New wallet address in base58
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## wallet_prefill_addresses
|
|
|
|
|
|
|
|
```text
|
|
|
|
Create new addresses, each containing `amount` credits
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'no_broadcast' (optional) : (bool) whether to broadcast or not
|
|
|
|
'num_addresses' : (int) num of addresses to create
|
|
|
|
'amount' : (float) initial amount in each address
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(dict) the resulting transaction
|
|
|
|
```
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
## wallet_public_key
|
|
|
|
|
|
|
|
```text
|
|
|
|
Get public key from wallet address
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
'address' : (str) address for which to get the public key
|
|
|
|
|
2017-02-27 23:36:29 +01:00
|
|
|
Returns:
|
2017-03-17 20:07:18 +01:00
|
|
|
(list) list of public keys associated with address.
|
|
|
|
Could contain more than one public key if multisig.
|
2017-02-27 23:36:29 +01:00
|
|
|
```
|
2016-12-09 04:05:31 +01:00
|
|
|
|
2018-02-24 19:13:29 +01:00
|
|
|
## wallet_send
|
|
|
|
|
|
|
|
```text
|
|
|
|
Send credits. If given an address, send credits to it. If given a claim id, send a tip
|
|
|
|
to the owner of a claim specified by uri. A tip is a claim support where the recipient
|
|
|
|
of the support is the claim address for the claim being supported.
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'amount' : (float) amount of credit to send
|
|
|
|
'address' : (str) address to send credits to
|
|
|
|
'claim_id' : (float) claim_id of the claim to send to tip to
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
If sending to an address:
|
|
|
|
(bool) true if payment successfully scheduled
|
|
|
|
|
|
|
|
If sending a claim tip:
|
|
|
|
(dict) Dictionary containing the result of the support
|
|
|
|
{
|
|
|
|
txid : (str) txid of resulting support claim
|
|
|
|
nout : (int) nout of the resulting support claim
|
|
|
|
fee : (float) fee paid for the transaction
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## wallet_unlock
|
|
|
|
|
|
|
|
```text
|
|
|
|
Unlock an encrypted wallet
|
|
|
|
|
|
|
|
Args:
|
|
|
|
'password' : (str) password for unlocking wallet
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
(bool) true if wallet is unlocked, otherwise false
|
|
|
|
```
|
|
|
|
|
2017-03-27 18:51:19 +02:00
|
|
|
## wallet_unused_address
|
|
|
|
|
|
|
|
```text
|
|
|
|
Return an address containing no balance, will create
|
|
|
|
a new address if there is none.
|
|
|
|
|
|
|
|
Args:
|
2018-02-24 19:13:29 +01:00
|
|
|
None
|
|
|
|
|
2017-03-27 18:51:19 +02:00
|
|
|
Returns:
|
|
|
|
(str) Unused wallet address in base58
|
|
|
|
```
|
|
|
|
|