forked from LBRYCommunity/lbry-sdk
switched all --account args to --account_id, fixed issues reported by @osilkin98 and regenerated api.json
This commit is contained in:
parent
4185a3b9e3
commit
c753a5825a
3 changed files with 1370 additions and 1122 deletions
2376
docs/api.json
2376
docs/api.json
File diff suppressed because it is too large
Load diff
|
@ -1035,13 +1035,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Usage:
|
Usage:
|
||||||
wallet_send (<amount> | --amount=<amount>)
|
wallet_send (<amount> | --amount=<amount>)
|
||||||
((<address> | --address=<address>) | (<claim_id> | --claim_id=<claim_id>))
|
((<address> | --address=<address>) | (<claim_id> | --claim_id=<claim_id>))
|
||||||
[--account=<account_id>]
|
[--account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--amount=<amount> : (Decimal) amount of credit to send
|
--amount=<amount> : (decimal) amount of credit to send
|
||||||
--address=<address> : (str) address to send credits to
|
--address=<address> : (str) address to send credits to
|
||||||
--claim_id=<claim_id> : (str) claim_id of the claim to send to tip to
|
--claim_id=<claim_id> : (str) claim_id of the claim to send to tip to
|
||||||
--account=<account_id> : (str) account to fund the transaction
|
--account_id=<account_id> : (str) account to fund the transaction
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
If sending to an address:
|
If sending to an address:
|
||||||
|
@ -1106,7 +1106,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Options:
|
Options:
|
||||||
--no_broadcast : (bool) whether to broadcast or not
|
--no_broadcast : (bool) whether to broadcast or not
|
||||||
--num_addresses=<num_addresses> : (int) num of addresses to create
|
--num_addresses=<num_addresses> : (int) num of addresses to create
|
||||||
--amount=<amount> : (float) initial amount in each address
|
--amount=<amount> : (decimal) initial amount in each address
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) the resulting transaction
|
(dict) the resulting transaction
|
||||||
|
@ -1131,7 +1131,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
[--include_reserved] [--include_claims] [--show_seed]
|
[--include_reserved] [--include_claims] [--show_seed]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) If provided only the balance for this
|
--account_id=<account_id> : (str) If provided only the balance for this
|
||||||
account will be given
|
account will be given
|
||||||
--confirmations=<confirmations> : (int) required confirmations (default: 6)
|
--confirmations=<confirmations> : (int) required confirmations (default: 6)
|
||||||
--include_reserved : (bool) include reserved UTXOs (default: false)
|
--include_reserved : (bool) include reserved UTXOs (default: false)
|
||||||
|
@ -1174,14 +1174,14 @@ class Daemon(AuthJSONRPCServer):
|
||||||
account_balance [<account_id>] [<address> | --address=<address>] [--include_unconfirmed]
|
account_balance [<account_id>] [<address> | --address=<address>] [--include_unconfirmed]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) If provided only the balance for this
|
--account_id=<account_id> : (str) If provided only the balance for this
|
||||||
account will be given
|
account will be given
|
||||||
--address=<address> : (str) If provided only the balance for this
|
--address=<address> : (str) If provided only the balance for this
|
||||||
address will be given
|
address will be given
|
||||||
--include_unconfirmed : (bool) Include unconfirmed
|
--include_unconfirmed : (bool) Include unconfirmed
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(float) amount of lbry credits in wallet
|
(decimal) amount of lbry credits in wallet
|
||||||
"""
|
"""
|
||||||
if address is not None:
|
if address is not None:
|
||||||
raise NotImplementedError("Limiting by address needs to be re-implemented in new wallet.")
|
raise NotImplementedError("Limiting by address needs to be re-implemented in new wallet.")
|
||||||
|
@ -1205,11 +1205,11 @@ class Daemon(AuthJSONRPCServer):
|
||||||
[--single_key]
|
[--single_key]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account_name=<account_name> : (str) name of the account to add
|
--account_name=<account_name> : (str) name of the account to add
|
||||||
--seed=<seed> : (str) seed to generate new account from
|
--seed=<seed> : (str) seed to generate new account from
|
||||||
--private_key=<private_key> : (str) private key for new account
|
--private_key=<private_key> : (str) private key for new account
|
||||||
--public_key=<public_key> : (str) public key for new account
|
--public_key=<public_key> : (str) public key for new account
|
||||||
--single_key : (bool) create single key account, default is multi-key
|
--single_key : (bool) create single key account, default is multi-key
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(map) added account details
|
(map) added account details
|
||||||
|
@ -1250,8 +1250,8 @@ class Daemon(AuthJSONRPCServer):
|
||||||
account_create (<account_name> | --account_name=<account_name>) [--single_key]
|
account_create (<account_name> | --account_name=<account_name>) [--single_key]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account_name=<account_name> : (str) name of the account to create
|
--account_name=<account_name> : (str) name of the account to create
|
||||||
--single_key : (bool) create single key account, default is multi-key
|
--single_key : (bool) create single key account, default is multi-key
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(map) new account details
|
(map) new account details
|
||||||
|
@ -1281,10 +1281,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Remove an existing account.
|
Remove an existing account.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
account (<account_id> | --account=<account_id>)
|
account (<account_id> | --account_id=<account_id>)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to remove
|
--account_id=<account_id> : (str) id of the account to remove
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(map) details of removed account
|
(map) details of removed account
|
||||||
|
@ -1307,13 +1307,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Change various settings on an account.
|
Change various settings on an account.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
account (<account_id> | --account=<account_id>)
|
account (<account_id> | --account_id=<account_id>)
|
||||||
[--default] [--new_name=<new_name>]
|
[--default] [--new_name=<new_name>]
|
||||||
[--change_gap=<change_gap>] [--change_max_uses=<change_max_uses>]
|
[--change_gap=<change_gap>] [--change_max_uses=<change_max_uses>]
|
||||||
[--receiving_gap=<receiving_gap>] [--receiving_max_uses=<receiving_max_uses>]
|
[--receiving_gap=<receiving_gap>] [--receiving_max_uses=<receiving_max_uses>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to change
|
--account_id=<account_id> : (str) id of the account to change
|
||||||
--default : (bool) make this account the default
|
--default : (bool) make this account the default
|
||||||
--new_name=<new_name> : (str) new name for the account
|
--new_name=<new_name> : (str) new name for the account
|
||||||
--receiving_gap=<receiving_gap> : (int) set the gap for receiving addresses
|
--receiving_gap=<receiving_gap> : (int) set the gap for receiving addresses
|
||||||
|
@ -1429,10 +1429,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
account settings.
|
account settings.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
account_max_address_gap (<account_id> | --account=<account_id>)
|
account_max_address_gap (<account_id> | --account_id=<account_id>)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) account for which to get max gaps
|
--account_id=<account_id> : (str) account for which to get max gaps
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(map) maximum gap for change and receiving addresses
|
(map) maximum gap for change and receiving addresses
|
||||||
|
@ -1486,11 +1486,11 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
wallet_is_address_mine (<address> | --address=<address>)
|
wallet_is_address_mine (<address> | --address=<address>)
|
||||||
[<account_id> | --account=<account_id>]
|
[<account_id> | --account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--address=<address> : (str) address to check
|
--address=<address> : (str) address to check
|
||||||
--account=<account_id> : (str) id of the account to use
|
--account_id=<account_id> : (str) id of the account to use
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(bool) true, if address is associated with current wallet
|
(bool) true, if address is associated with current wallet
|
||||||
|
@ -1522,10 +1522,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
List account addresses
|
List account addresses
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
address_list [<account_id> | --account=<account_id>]
|
address_list [<account_id> | --account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to use
|
--account_id=<account_id> : (str) id of the account to use
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List of wallet addresses
|
List of wallet addresses
|
||||||
|
@ -1539,10 +1539,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
a new address if there is none.
|
a new address if there is none.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
address_unused [--account=<account_id>]
|
address_unused [--account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to use
|
--account_id=<account_id> : (str) id of the account to use
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(str) Unused wallet address in base58
|
(str) Unused wallet address in base58
|
||||||
|
@ -1931,7 +1931,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
allow the deletion of multiple files.
|
allow the deletion of multiple files.
|
||||||
Otherwise do not delete anything.
|
Otherwise do not delete anything.
|
||||||
--sd_hash=<sd_hash> : (str) delete by file sd hash
|
--sd_hash=<sd_hash> : (str) delete by file sd hash
|
||||||
--file_name<file_name> : (str) delete by file name in downloads folder
|
--file_name=<file_name> : (str) delete by file name in downloads folder
|
||||||
--stream_hash=<stream_hash> : (str) delete by file stream hash
|
--stream_hash=<stream_hash> : (str) delete by file stream hash
|
||||||
--rowid=<rowid> : (int) delete by file row id
|
--rowid=<rowid> : (int) delete by file row id
|
||||||
--claim_id=<claim_id> : (str) delete by file claim id
|
--claim_id=<claim_id> : (str) delete by file claim id
|
||||||
|
@ -2008,7 +2008,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--channel_name=<channel_name> : (str) name of the channel prefixed with '@'
|
--channel_name=<channel_name> : (str) name of the channel prefixed with '@'
|
||||||
--amount=<amount> : (float) bid amount on the channel
|
--amount=<amount> : (decimal) bid amount on the channel
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
|
@ -2325,13 +2325,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Usage:
|
Usage:
|
||||||
claim_abandon [<claim_id> | --claim_id=<claim_id>]
|
claim_abandon [<claim_id> | --claim_id=<claim_id>]
|
||||||
[<txid> | --txid=<txid>] [<nout> | --nout=<nout>]
|
[<txid> | --txid=<txid>] [<nout> | --nout=<nout>]
|
||||||
[--account=<account>]
|
[--account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--claim_id=<claim_id> : (str) claim_id of the claim to abandon
|
--claim_id=<claim_id> : (str) claim_id of the claim to abandon
|
||||||
--txid=<txid> : (str) txid of the claim to abandon
|
--txid=<txid> : (str) txid of the claim to abandon
|
||||||
--nout=<nout> : (int) nout of the claim to abandon
|
--nout=<nout> : (int) nout of the claim to abandon
|
||||||
--account=<account> : (str) id of the account to use
|
--account_id=<account_id> : (str) id of the account to use
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
|
@ -2364,13 +2364,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
claim_new_support (<name> | --name=<name>) (<claim_id> | --claim_id=<claim_id>)
|
claim_new_support (<name> | --name=<name>) (<claim_id> | --claim_id=<claim_id>)
|
||||||
(<amount> | --amount=<amount>) [--account=<account_id>]
|
(<amount> | --amount=<amount>) [--account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--name=<name> : (str) name of the claim to support
|
--name=<name> : (str) name of the claim to support
|
||||||
--claim_id=<claim_id> : (str) claim_id of the claim to support
|
--claim_id=<claim_id> : (str) claim_id of the claim to support
|
||||||
--amount=<amount> : (float) amount of support
|
--amount=<amount> : (decimal) amount of support
|
||||||
--account=<account_id> : (str) id of the account to use
|
--account_id=<account_id> : (str) id of the account to use
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing the transaction information
|
(dict) Dictionary containing the transaction information
|
||||||
|
@ -2397,12 +2397,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Tip the owner of the claim
|
Tip the owner of the claim
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
claim_tip (<claim_id> | --claim_id=<claim_id>) (<amount> | --amount=<amount>) [--account=<account_id>]
|
claim_tip (<claim_id> | --claim_id=<claim_id>) (<amount> | --amount=<amount>)
|
||||||
|
[--account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--claim_id=<claim_id> : (str) claim_id of the claim to support
|
--claim_id=<claim_id> : (str) claim_id of the claim to support
|
||||||
--amount=<amount> : (float) amount of support
|
--amount=<amount> : (decimal) amount of support
|
||||||
--account=<account_id> : (str) id of the account to use
|
--account_id=<account_id> : (str) id of the account to use
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing the transaction information
|
(dict) Dictionary containing the transaction information
|
||||||
|
@ -2480,8 +2481,8 @@ class Daemon(AuthJSONRPCServer):
|
||||||
Options:
|
Options:
|
||||||
--claim_id=<claim_id> : (str) claim_id to send
|
--claim_id=<claim_id> : (str) claim_id to send
|
||||||
--address=<address> : (str) address to send the claim to
|
--address=<address> : (str) address to send the claim to
|
||||||
--amount<amount> : (int) Amount of credits to claim name for, defaults to the current amount
|
--amount=<amount> : (int) Amount of credits to claim name for,
|
||||||
on the claim
|
defaults to the current amount on the claim
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(dict) Dictionary containing result of the claim
|
(dict) Dictionary containing result of the claim
|
||||||
|
@ -2505,10 +2506,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
List my name claims
|
List my name claims
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
claim_list_mine [<account_id> | --account=<account_id>]
|
claim_list_mine [<account_id> | --account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to query
|
--account_id=<account_id> : (str) id of the account to query
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) List of name claims owned by user
|
(list) List of name claims owned by user
|
||||||
|
@ -2669,10 +2670,10 @@ class Daemon(AuthJSONRPCServer):
|
||||||
List transactions belonging to wallet
|
List transactions belonging to wallet
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
transaction_list [<account_id> | --account=<account_id>]
|
transaction_list [<account_id> | --account_id=<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to query
|
--account_id=<account_id> : (str) id of the account to query
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) List of transactions
|
(list) List of transactions
|
||||||
|
@ -2747,7 +2748,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
utxo_list [<account_id>]
|
utxo_list [<account_id>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--account=<account_id> : (str) id of the account to query
|
--account_id=<account_id> : (str) id of the account to query
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
(list) List of unspent transaction outputs (UTXOs)
|
(list) List of unspent transaction outputs (UTXOs)
|
||||||
|
|
|
@ -61,6 +61,7 @@ def write_api(f):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
html_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'docs', 'api.json')
|
parent = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
html_file = os.path.join(parent, 'docs', 'api.json')
|
||||||
with open(html_file, 'w+') as f:
|
with open(html_file, 'w+') as f:
|
||||||
write_api(f)
|
write_api(f)
|
||||||
|
|
Loading…
Reference in a new issue