forked from LBRYCommunity/lbry-sdk
update docstrings
This commit is contained in:
parent
0b4c4cf6ca
commit
0eac1e6ed0
1 changed files with 249 additions and 158 deletions
|
@ -993,16 +993,16 @@ class Daemon(AuthJSONRPCServer):
|
||||||
@AuthJSONRPCServer.flags(session_status="-s", dht_status="-d")
|
@AuthJSONRPCServer.flags(session_status="-s", dht_status="-d")
|
||||||
def jsonrpc_status(self, session_status=False, dht_status=False):
|
def jsonrpc_status(self, session_status=False, dht_status=False):
|
||||||
"""
|
"""
|
||||||
Return daemon status
|
Get daemon status
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'session_status' (optional): (bool) true to return session status,
|
status [-s] [-d]
|
||||||
default is false
|
|
||||||
'dht_status' (optional): (bool) true to return dht status,
|
Options:
|
||||||
default is false
|
-s : include session status in results
|
||||||
Returns:
|
-d : include dht network and peer status
|
||||||
(dict) Daemon status dictionary
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# on startup, the wallet or network won't be available but we still need this call to work
|
# on startup, the wallet or network won't be available but we still need this call to work
|
||||||
has_wallet = self.session and self.session.wallet and self.session.wallet.network
|
has_wallet = self.session and self.session.wallet and self.session.wallet.network
|
||||||
local_height = self.session.wallet.network.get_local_height() if has_wallet else 0
|
local_height = self.session.wallet.network.get_local_height() if has_wallet else 0
|
||||||
|
@ -1048,6 +1048,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `status blockchain_status=True` instead
|
DEPRECATED. Use `status blockchain_status=True` instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
d = self.jsonrpc_status()
|
d = self.jsonrpc_status()
|
||||||
d.addCallback(lambda x: self._render_response(
|
d.addCallback(lambda x: self._render_response(
|
||||||
x['blockchain_status']['best_blockhash']))
|
x['blockchain_status']['best_blockhash']))
|
||||||
|
@ -1058,6 +1059,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `status` instead
|
DEPRECATED. Use `status` instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
d = self.jsonrpc_status()
|
d = self.jsonrpc_status()
|
||||||
d.addCallback(lambda x: self._render_response(x['is_running']))
|
d.addCallback(lambda x: self._render_response(x['is_running']))
|
||||||
return d
|
return d
|
||||||
|
@ -1103,6 +1105,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `status` instead
|
DEPRECATED. Use `status` instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
d = self.jsonrpc_status()
|
d = self.jsonrpc_status()
|
||||||
d.addCallback(lambda x: self._render_response(x['is_first_run']))
|
d.addCallback(lambda x: self._render_response(x['is_first_run']))
|
||||||
return d
|
return d
|
||||||
|
@ -1126,6 +1129,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `status` instead
|
DEPRECATED. Use `status` instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
d = self.jsonrpc_status()
|
d = self.jsonrpc_status()
|
||||||
d.addCallback(lambda x: self._render_response(x['blockchain_status']['blocks_behind']))
|
d.addCallback(lambda x: self._render_response(x['blockchain_status']['blocks_behind']))
|
||||||
return d
|
return d
|
||||||
|
@ -1134,8 +1138,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get lbry version information
|
Get lbry version information
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
version
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary of lbry version information
|
(dict) Dictionary of lbry version information
|
||||||
{
|
{
|
||||||
|
@ -1160,8 +1165,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Report a bug to slack
|
Report a bug to slack
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'message': (str) message to send
|
report_bug (<message> | --message=<message>)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true if successful
|
(bool) true if successful
|
||||||
"""
|
"""
|
||||||
|
@ -1186,6 +1192,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get daemon settings
|
Get daemon settings
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
settings_get
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary of daemon settings
|
(dict) Dictionary of daemon settings
|
||||||
See ADJUSTABLE_SETTINGS in lbrynet/conf.py for full list of settings
|
See ADJUSTABLE_SETTINGS in lbrynet/conf.py for full list of settings
|
||||||
|
@ -1227,11 +1236,11 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Return a useful message for an API command
|
Return a useful message for an API command
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'command'(optional): (str) command to retrieve documentation for
|
help [<command> | --command=<command>]
|
||||||
Returns:
|
|
||||||
(str) if given a command, returns documentation about that command
|
Options:
|
||||||
otherwise returns general help message
|
<command>, --command=<command> : command to retrieve documentation for
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if command is None:
|
if command is None:
|
||||||
|
@ -1257,13 +1266,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Return a list of available commands
|
Return a list of available commands
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
commands
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) list of available commands
|
(list) list of available commands
|
||||||
"""
|
"""
|
||||||
return self._render_response(sorted(
|
return self._render_response(sorted([command for command in self.callable_methods.keys()]))
|
||||||
[command for command in self.callable_methods.keys()
|
|
||||||
if 'DEPRECATED' not in getattr(self, "jsonrpc_" + command).__doc__]
|
|
||||||
))
|
|
||||||
|
|
||||||
@AuthJSONRPCServer.deprecated('wallet_balance')
|
@AuthJSONRPCServer.deprecated('wallet_balance')
|
||||||
def jsonrpc_get_balance(self, address=None, include_unconfirmed=False):
|
def jsonrpc_get_balance(self, address=None, include_unconfirmed=False):
|
||||||
|
@ -1277,10 +1286,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Return the balance of the wallet
|
Return the balance of the wallet
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'address' (optional): If address is provided only that balance will be given
|
wallet_balance [<address> | --address=<address] [-u]
|
||||||
'include_unconfirmed' (optional): If set unconfirmed balance will be included in
|
|
||||||
the only takes effect when address is also provided.
|
Options:
|
||||||
|
<address> : If provided only the balance for this address will be given
|
||||||
|
-u : Include unconfirmed
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(float) amount of lbry credits in wallet
|
(float) amount of lbry credits in wallet
|
||||||
|
@ -1303,6 +1314,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Stop lbrynet-daemon
|
Stop lbrynet-daemon
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
daemon_stop
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(string) Shutdown message
|
(string) Shutdown message
|
||||||
"""
|
"""
|
||||||
|
@ -1318,15 +1332,20 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
List files limited by optional filters
|
List files limited by optional filters
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name' (optional): (str) filter files by lbry name,
|
file_list [--sd_hash=<sd_hash>] [--file_name=<file_name>] [--stream_hash=<stream_hash>]
|
||||||
'sd_hash' (optional): (str) filter files by sd hash,
|
[--claim_id=<claim_id>] [--outpoint=<outpoint>] [--rowid=<rowid>]
|
||||||
'file_name' (optional): (str) filter files by the name in the downloads folder,
|
[-f]
|
||||||
'stream_hash' (optional): (str) filter files by stream hash,
|
|
||||||
'claim_id' (optional): (str) filter files by claim id,
|
Options:
|
||||||
'outpoint' (optional): (str) filter files by claim outpoint,
|
--sd_hash=<sd_hash> : set status of file with matching sd hash
|
||||||
'rowid' (optional): (int) filter files by internal row id,
|
--file_name=<file_name> : set status of file with matching file name in the
|
||||||
'full_status': (optional): (bool) if true populate the 'message' and 'size' fields
|
downloads folder
|
||||||
|
--stream_hash=<stream_hash> : set status of file with matching stream hash
|
||||||
|
--claim_id=<claim_id> : set status of file with matching claim id
|
||||||
|
--outpoint=<outpoint> : set status of file with matching claim outpoint
|
||||||
|
--rowid=<rowid> : set status of file with matching row id
|
||||||
|
-f : full status, populate the 'message' and 'size' fields
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) List of files
|
(list) List of files
|
||||||
|
@ -1366,8 +1385,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Resolve stream info from a LBRY name
|
Resolve stream info from a LBRY name
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name': (str) name to look up, do not include lbry:// prefix
|
resolve_name <name> [-f]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-f : force refresh and do not check cache
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Metadata dictionary from name claim, None if the name is not
|
(dict) Metadata dictionary from name claim, None if the name is not
|
||||||
resolvable
|
resolvable
|
||||||
|
@ -1390,15 +1413,18 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def jsonrpc_claim_show(self, name=None, txid=None, nout=None, claim_id=None):
|
def jsonrpc_claim_show(self, name=None, txid=None, nout=None, claim_id=None):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Resolve claim info from a LBRY name
|
Resolve claim info from a LBRY name
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name': (str) name to look up, do not include lbry:// prefix
|
claim_show <name> [<txid> | --txid=<txid>] [<nout> | --nout=<nout>]
|
||||||
'txid'(optional): (str) if specified, look for claim with this txid
|
[<claim_id> | --claim_id=<claim_id>]
|
||||||
'nout'(optional): (int) if specified, look for claim with this nout
|
|
||||||
'claim_id'(optional): (str) if specified, look for claim with this claim_id
|
Options:
|
||||||
|
<txid>, --txid=<txid> : look for claim with this txid
|
||||||
|
<nout>, --nout=<nout> : look for claim with this nout
|
||||||
|
<claim_id>, --claim_id=<claim_id> : look for claim with this claim id
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary contaning claim info, (bool) false if claim is not
|
(dict) Dictionary contaning claim info, (bool) false if claim is not
|
||||||
resolvable
|
resolvable
|
||||||
|
@ -1434,9 +1460,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Resolve a LBRY URI
|
Resolve a LBRY URI
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'uri': (str) uri to download
|
resolve <uri> [-f]
|
||||||
'force'(optional): (boolean) set to true to ignore cache and force refresh
|
|
||||||
|
Options:
|
||||||
|
-f : force refresh and ignore cache
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
None if nothing can be resolved, otherwise:
|
None if nothing can be resolved, otherwise:
|
||||||
If uri resolves to a channel or a claim in a channel:
|
If uri resolves to a channel or a claim in a channel:
|
||||||
|
@ -1518,11 +1547,15 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Download stream from a LBRY name.
|
Download stream from a LBRY name.
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'uri': (str) lbry uri to download
|
get <uri> [<file_name> | --file_name=<file_name>] [<timeout> | --timeout=<timeout>]
|
||||||
'file_name'(optional): (str) a user specified name for the downloaded file
|
[<download_directory> | --download_directory=<download_directory>]
|
||||||
'timeout'(optional): (int) download timeout in number of seconds
|
|
||||||
'download_directory'(optional): (str) path to directory where file will be saved
|
Options:
|
||||||
|
<file_name> : specified name for the downloaded file
|
||||||
|
<timeout> : download timeout in number of seconds
|
||||||
|
<download_directory> : path to directory where file will be saved
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary contaning information about the stream
|
(dict) Dictionary contaning information about the stream
|
||||||
{
|
{
|
||||||
|
@ -1606,11 +1639,18 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Start or stop downloading a file
|
Start or stop downloading a file
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'status': (str) "start" or "stop"
|
file_set_status <status> [-s <sd_hash>] [-n <file_name>] [-h <stream_hash>]
|
||||||
'name' (optional): (str) start file by lbry name,
|
[-c <claim_id>] [-o <outpoint>] [-r <rowid>]
|
||||||
'sd_hash' (optional): (str) start file by the hash in the name claim,
|
|
||||||
'file_name' (optional): (str) start file by its name in the downloads folder,
|
Options:
|
||||||
|
-s <sd_hash> : set status of file with matching sd hash
|
||||||
|
-n <file_name> : set status of file with matching file name in the downloads folder
|
||||||
|
-h <stream_hash> : set status of file with matching stream hash
|
||||||
|
-c <claim_id> : set status of file with matching claim id
|
||||||
|
-o <outpoint> : set status of file with matching claim outpoint
|
||||||
|
-r <rowid> : set status of file with matching row id
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(str) Confirmation message
|
(str) Confirmation message
|
||||||
"""
|
"""
|
||||||
|
@ -1639,19 +1679,23 @@ class Daemon(AuthJSONRPCServer):
|
||||||
@AuthJSONRPCServer.flags(delete_target_file='-f', delete_all='-a')
|
@AuthJSONRPCServer.flags(delete_target_file='-f', delete_all='-a')
|
||||||
def jsonrpc_file_delete(self, delete_target_file=True, delete_all=False, **kwargs):
|
def jsonrpc_file_delete(self, delete_target_file=True, delete_all=False, **kwargs):
|
||||||
"""
|
"""
|
||||||
Delete a lbry file
|
Delete a LBRY file
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
file_delete [-a | -f] [--sd_hash=<sd_hash>] [--file_name=<file_name>]
|
||||||
|
[--stream_hash=<stream_hash>] [--claim_id=<claim_id>]
|
||||||
|
[--outpoint=<outpoint>] [--rowid=<rowid>]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-a : delete file from downloads and delete stored blobs
|
||||||
|
-f : delete only from downloads, do not delete blobs
|
||||||
|
--sd_hash=<sd_hash> : delete by file sd hash
|
||||||
|
--file_name<file_name> : delete by file name in downloads folder
|
||||||
|
--stream_hash=<stream_hash> : delete by file stream hash
|
||||||
|
--claim_id=<claim_id> : delete by file claim id
|
||||||
|
--outpoint=<outpoint> : delete by file claim outpoint
|
||||||
|
--rowid=<rowid> : delete by file row id
|
||||||
|
|
||||||
Args:
|
|
||||||
'name' (optional): (str) delete file by lbry name,
|
|
||||||
'sd_hash' (optional): (str) delete file by sd hash,
|
|
||||||
'file_name' (optional): (str) delete file by the name in the downloads folder,
|
|
||||||
'stream_hash' (optional): (str) delete file by stream hash,
|
|
||||||
'claim_id' (optional): (str) delete file by claim ID,
|
|
||||||
'outpoint' (optional): (str) delete file by claim outpoint,
|
|
||||||
'rowid': (optional): (int) delete file by rowid in the file manager
|
|
||||||
'delete_target_file' (optional): (bool) delete file from downloads folder,
|
|
||||||
defaults to true if false only the blobs and
|
|
||||||
db entries will be deleted
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true if deletion was successful
|
(bool) true if deletion was successful
|
||||||
"""
|
"""
|
||||||
|
@ -1694,10 +1738,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get estimated cost for a lbry stream
|
Get estimated cost for a lbry stream
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name': (str) lbry name
|
stream_cost_estimate <uri> [<size> | --size=<size>]
|
||||||
'size' (optional): (int) stream size, in bytes. if provided an sd blob
|
|
||||||
won't be downloaded.
|
Options:
|
||||||
|
<size>, --size=<size> : stream size in bytes. if provided an sd blob won't be
|
||||||
|
downloaded.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(float) Estimated cost in lbry credits, returns None if uri is not
|
(float) Estimated cost in lbry credits, returns None if uri is not
|
||||||
resolveable
|
resolveable
|
||||||
|
@ -1710,11 +1757,11 @@ class Daemon(AuthJSONRPCServer):
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def jsonrpc_channel_new(self, channel_name, amount):
|
def jsonrpc_channel_new(self, channel_name, amount):
|
||||||
"""
|
"""
|
||||||
Generate a publisher key and create a new certificate claim
|
Generate a publisher key and create a new '@' prefixed certificate claim
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'channel_name': (str) '@' prefixed name
|
channel_new (<channel_name> | --channel_name=<channel_name>)
|
||||||
'amount': (float) amount to claim name
|
(<amount> | --amount=<amount>)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
|
@ -1752,6 +1799,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get my channels
|
Get my channels
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
channel_list_mine
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) ClaimDict
|
(list) ClaimDict
|
||||||
"""
|
"""
|
||||||
|
@ -1776,38 +1826,48 @@ class Daemon(AuthJSONRPCServer):
|
||||||
'description'
|
'description'
|
||||||
'author'
|
'author'
|
||||||
'language'
|
'language'
|
||||||
'license',
|
'license'
|
||||||
'nsfw'
|
'nsfw'
|
||||||
|
|
||||||
Metadata can be set by either using the metadata argument or by setting individual arguments
|
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,
|
fee, title, description, author, language, license, license_url, thumbnail, preview, nsfw,
|
||||||
or sources. Individual arguments will overwrite the fields specified in metadata argument.
|
or sources. Individual arguments will overwrite the fields specified in metadata argument.
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name': (str) name to be claimed
|
publish (<name> | --name=<name>) (<bid> | --bid=<bid>) [--metadata=<metadata>]
|
||||||
'bid': (float) amount of credits to commit in this claim,
|
[--file_path=<file_path>] [--fee=<fee>] [--title=<title>]
|
||||||
'metadata'(optional): (dict) Metadata to associate with the claim.
|
[--description=<description>] [--author=<author>] [--language=<language>]
|
||||||
'file_path'(optional): (str) path to file to be associated with name. If provided,
|
[--license=<license>] [--license_url=<license_url>] [--thumbnail=<thumbnail>]
|
||||||
a lbry stream of this file will be used in 'sources'.
|
[--preview=<preview>] [--nsfw=<nsfw>] [--sources=<sources>]
|
||||||
If no path is given but a metadata dict is provided, the source
|
[--channel_name=<channel_name>] [--channel_id=<channel_id>]
|
||||||
from the given metadata will be used.
|
|
||||||
'fee'(optional): (dict) Dictionary representing key fee to download content:
|
Options:
|
||||||
{currency_symbol: {'amount': float, 'address': str, optional}}
|
--metadata=<metadata> : ClaimDict to associate with the claim.
|
||||||
supported currencies: LBC, USD, BTC
|
--file_path=<file_path> : path to file to be associated with name. If provided,
|
||||||
If an address is not provided a new one will be automatically
|
a lbry stream of this file will be used in 'sources'.
|
||||||
generated. Default fee is zero.
|
If no path is given but a metadata dict is provided,
|
||||||
'title'(optional): (str) title of the file
|
the source from the given metadata will be used.
|
||||||
'description'(optional): (str) description of the file
|
--fee=<fee> : Dictionary representing key fee to download content:
|
||||||
'author'(optional): (str) author of the file
|
{currency_symbol: {'amount': float,
|
||||||
'language'(optional): (str), language code
|
'address': str, optional}}
|
||||||
'license'(optional): (str) license for the file
|
supported currencies: LBC, USD, BTC
|
||||||
'license_url'(optional): (str) URL to license
|
If an address is not provided a new one will be
|
||||||
'thumbnail'(optional): (str) thumbnail URL for the file
|
automatically generated. Default fee is zero.
|
||||||
'preview'(optional): (str) preview URL for the file
|
--title=<title> : title of the publication
|
||||||
'nsfw'(optional): (bool) True if not safe for work
|
--description=<description> : description of the publication
|
||||||
'sources'(optional): (dict){'lbry_sd_hash':sd_hash} specifies sd hash of file
|
--author=<author> : author of the publication
|
||||||
'channel_name' (optional): (str) name of the publisher channel
|
--language=<language> : language of the publication
|
||||||
'channel_id' (optional): (str) claim id of the publisher channel
|
--license=<license> : publication license
|
||||||
|
--license_url=<license_url> : publication license url
|
||||||
|
--thumbnail=<thumbnail> : thumbnail url
|
||||||
|
--preview=<preview> : preview url
|
||||||
|
--nsfw=<nsfw> : title of the publication
|
||||||
|
--sources=<sources> : {'lbry_sd_hash':sd_hash} specifies sd hash of file
|
||||||
|
--channel_name=<channel_name> : name of the publisher channel name in the wallet
|
||||||
|
--channel_id=<channel_id> : 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.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
|
@ -1917,8 +1977,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Abandon a name and reclaim credits from the claim
|
Abandon a name and reclaim credits from the claim
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'claim_id': (str) claim_id of claim
|
claim_abandon (<claim_id> | --claim_id=<claim_id>)
|
||||||
|
|
||||||
Return:
|
Return:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
{
|
{
|
||||||
|
@ -1946,14 +2007,16 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `claim_abandon` instead
|
DEPRECATED. Use `claim_abandon` instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self.jsonrpc_claim_abandon(**kwargs)
|
return self.jsonrpc_claim_abandon(**kwargs)
|
||||||
|
|
||||||
@AuthJSONRPCServer.deprecated('claim_support_new')
|
@AuthJSONRPCServer.deprecated('claim_support_new')
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
def jsonrpc_support_claim(self, **kwargs):
|
def jsonrpc_support_claim(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `claim_abandon` instead
|
DEPRECATED. Use `claim_support_new` instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self.jsonrpc_claim_new_support(**kwargs)
|
return self.jsonrpc_claim_new_support(**kwargs)
|
||||||
|
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
|
@ -1962,10 +2025,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Support a name claim
|
Support a name claim
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name': (str) name
|
claim_new_support (<name> | --name=<name>) (<claim_id> | --claim_id=<claim_id>)
|
||||||
'claim_id': (str) claim ID of claim to support
|
(<amount> | --amount<amount>)
|
||||||
'amount': (float) amount to support by
|
|
||||||
Return:
|
Return:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
{
|
{
|
||||||
|
@ -1979,7 +2042,6 @@ class Daemon(AuthJSONRPCServer):
|
||||||
self.analytics_manager.send_claim_action('new_support')
|
self.analytics_manager.send_claim_action('new_support')
|
||||||
defer.returnValue(result)
|
defer.returnValue(result)
|
||||||
|
|
||||||
# TODO: merge this into claim_list
|
|
||||||
@AuthJSONRPCServer.deprecated('claim_list_mine')
|
@AuthJSONRPCServer.deprecated('claim_list_mine')
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
def jsonrpc_get_my_claim(self, name):
|
def jsonrpc_get_my_claim(self, name):
|
||||||
|
@ -2012,8 +2074,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
List my name claims
|
List my name claims
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
claim_list_mine
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
(list) List of name claims owned by user
|
(list) List of name claims owned by user
|
||||||
[
|
[
|
||||||
|
@ -2060,8 +2123,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get claims for a name
|
Get claims for a name
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'name': (str) search for claims on this name
|
claim_list (<name> | --name=<name>)
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
(dict) State of claims assigned for the name
|
(dict) State of claims assigned for the name
|
||||||
{
|
{
|
||||||
|
@ -2100,8 +2164,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
List transactions belonging to wallet
|
List transactions belonging to wallet
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
transaction_list
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) List of transactions
|
(list) List of transactions
|
||||||
"""
|
"""
|
||||||
|
@ -2121,8 +2186,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get a decoded transaction from a txid
|
Get a decoded transaction from a txid
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'txid': (str) txid of transaction
|
transaction_show (<txid> | --txid=<txid>)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) JSON formatted transaction
|
(dict) JSON formatted transaction
|
||||||
"""
|
"""
|
||||||
|
@ -2144,8 +2210,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Checks if an address is associated with the current wallet.
|
Checks if an address is associated with the current wallet.
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'address': (str) address to check in base58
|
wallet_is_address_mine (<address> | --address=<address>)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true, if address is associated with current wallet
|
(bool) true, if address is associated with current wallet
|
||||||
"""
|
"""
|
||||||
|
@ -2158,7 +2225,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
def jsonrpc_get_public_key_from_wallet(self, wallet):
|
def jsonrpc_get_public_key_from_wallet(self, wallet):
|
||||||
"""
|
"""
|
||||||
DEPRECATED. Use `wallet_is_address_mine` instead
|
DEPRECATED. Use `wallet_public_key` instead
|
||||||
"""
|
"""
|
||||||
return self.jsonrpc_wallet_public_key(wallet)
|
return self.jsonrpc_wallet_public_key(wallet)
|
||||||
|
|
||||||
|
@ -2167,8 +2234,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get public key from wallet address
|
Get public key from wallet address
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'address': (str) wallet address in base58
|
wallet_public_key (<address> | --address=<address>)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) list of public keys associated with address.
|
(list) list of public keys associated with address.
|
||||||
Could contain more than one public key if multisig.
|
Could contain more than one public key if multisig.
|
||||||
|
@ -2184,8 +2252,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
List wallet addresses
|
List wallet addresses
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
wallet_list
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List of wallet addresses
|
List of wallet addresses
|
||||||
"""
|
"""
|
||||||
|
@ -2207,8 +2276,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Generate a new wallet address
|
Generate a new wallet address
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
wallet_new_address
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(str) New wallet address in base58
|
(str) New wallet address in base58
|
||||||
"""
|
"""
|
||||||
|
@ -2228,8 +2298,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Return an address containing no balance, will create
|
Return an address containing no balance, will create
|
||||||
a new address if there is none.
|
a new address if there is none.
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
wallet_unused_address
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(str) Unused wallet address in base58
|
(str) Unused wallet address in base58
|
||||||
"""
|
"""
|
||||||
|
@ -2247,11 +2318,11 @@ class Daemon(AuthJSONRPCServer):
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def jsonrpc_send_amount_to_address(self, amount, address):
|
def jsonrpc_send_amount_to_address(self, amount, address):
|
||||||
"""
|
"""
|
||||||
Send credits to an address
|
Queue a payment of credits to an address
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
send_amount_to_address (<amount> | --amount=<amount>) (<address> | --address=<address>)
|
||||||
|
|
||||||
Args:
|
|
||||||
'amount': (float) the amount to send
|
|
||||||
'address': (str) the address of the recipient in base58
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true if payment successfully scheduled
|
(bool) true if payment successfully scheduled
|
||||||
"""
|
"""
|
||||||
|
@ -2274,8 +2345,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get contents of a block
|
Get contents of a block
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'blockhash': (str) hash of the block to look up
|
block_show (<blockhash> | --blockhash=<blockhash>) | (<height> | --height=<height>)
|
||||||
|
|
||||||
|
Options:
|
||||||
|
<blockhash>, --blockhash=<blockhash> : hash of the block to look up
|
||||||
|
<height>, --height=<height> : height of the block to look up
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Requested block
|
(dict) Requested block
|
||||||
"""
|
"""
|
||||||
|
@ -2324,15 +2400,20 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Download and return a blob
|
Download and return a blob
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'blob_hash': (str) blob hash of blob to get
|
blob_get (<blob_hash> | --blob_hash=<blob_hash>) [--timeout=<timeout>]
|
||||||
'timeout'(optional): (int) timeout in number of seconds
|
[--encoding=<encoding>] [--payment_rate_manager=<payment_rate_manager>]
|
||||||
'encoding'(optional): (str) by default no attempt at decoding is made,
|
|
||||||
can be set to one of the following decoders:
|
Options:
|
||||||
'json'
|
--timeout=<timeout> : timeout in number of seconds
|
||||||
'payment_rate_manager'(optional): if not given the default payment rate manager
|
--encoding=<encoding> : by default no attempt at decoding is made,
|
||||||
will be used. supported alternative rate managers:
|
can be set to one of the
|
||||||
'only-free'
|
following decoders:
|
||||||
|
'json'
|
||||||
|
--payment_rate_manager=<payment_rate_manager> : if not given the default payment rate
|
||||||
|
manager will be used.
|
||||||
|
supported alternative rate managers:
|
||||||
|
'only-free'
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
(str) Success/Fail message or (dict) decoded data
|
(str) Success/Fail message or (dict) decoded data
|
||||||
|
@ -2362,8 +2443,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Delete a blob
|
Delete a blob
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'blob_hash': (str) hash of blob to get
|
blob_delete (<blob_hash> | --blob_hash=<blob_hash)
|
||||||
|
t
|
||||||
Returns:
|
Returns:
|
||||||
(str) Success/fail message
|
(str) Success/fail message
|
||||||
"""
|
"""
|
||||||
|
@ -2391,9 +2473,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get peers for blob hash
|
Get peers for blob hash
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'blob_hash': (str) blob hash
|
peer_list (<blob_hash> | --blob_hash=<blob_hash) [<timeout> | --timeout=<timeout>]
|
||||||
'timeout'(optional): (int) peer search timeout in seconds
|
|
||||||
|
Options:
|
||||||
|
<timeout>, --timeout=<timeout> : peer search timeout in seconds
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) List of contacts
|
(list) List of contacts
|
||||||
"""
|
"""
|
||||||
|
@ -2416,8 +2501,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Announce all blobs to the DHT
|
Announce all blobs to the DHT
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
blob_announce_all
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(str) Success/fail message
|
(str) Success/fail message
|
||||||
"""
|
"""
|
||||||
|
@ -2431,8 +2517,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Reflect a stream
|
Reflect a stream
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'sd_hash': (str) sd_hash of lbry file
|
reflect (<sd_hash> | --sd_hash=<sd_hash>)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true if successful
|
(bool) true if successful
|
||||||
"""
|
"""
|
||||||
|
@ -2510,8 +2597,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Reflects all saved blobs
|
Reflects all saved blobs
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
None
|
blob_reflect_all
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true if successful
|
(bool) true if successful
|
||||||
"""
|
"""
|
||||||
|
@ -2526,10 +2614,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
Get stream availability for lbry uri
|
Get stream availability for lbry uri
|
||||||
|
|
||||||
Args:
|
Usage:
|
||||||
'uri' : (str) lbry uri
|
get_availability (<uri> | --uri=<uri) [<sd_timeout> | --sd_timeout=<sd_timeout>]
|
||||||
'sd_timeout' (optional): (int) sd blob download timeout
|
[<peer_timeout> | --peer_timeout=<peer_timeout>]
|
||||||
'peer_timeout' (optional): (int) how long to look for peers
|
|
||||||
|
Options:
|
||||||
|
<sd_timeout>, --sd_timeout=<sd_timeout> : sd blob download timeout
|
||||||
|
<peer_timeout>, --peer_timeout=<peer_timeout> : how long to look for peers
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(float) Peers per blob / total blobs
|
(float) Peers per blob / total blobs
|
||||||
|
|
Loading…
Reference in a new issue