forked from LBRYCommunity/lbry-sdk
Merge branch 'fix-1402-1411'
This commit is contained in:
commit
dcc71713c3
3 changed files with 10 additions and 60 deletions
|
@ -24,9 +24,10 @@ implementation are the major changes in this release.
|
||||||
* deprecated `wallet_prefill_addresses` command, use `account_fund` instead.
|
* deprecated `wallet_prefill_addresses` command, use `account_fund` instead.
|
||||||
* deprecated `wallet_list` command, use `address_list` instead.
|
* deprecated `wallet_list` command, use `address_list` instead.
|
||||||
* deprecated `wallet_is_address_mine` command, use `address_is_mine` instead.
|
* deprecated `wallet_is_address_mine` command, use `address_is_mine` instead.
|
||||||
* deprecated `wallet_public_key` command, use `address_public_key` instead.
|
* deprecated `wallet_public_key` command.
|
||||||
* deprecated `wallet_new_address` command, use `address_generate` instead.
|
* deprecated `wallet_new_address` command, use `address_generate` instead.
|
||||||
* deprecated `wallet_unused_address` command, use `address_unused` instead.
|
* deprecated `wallet_unused_address` command, use `address_unused` instead.
|
||||||
|
* deprecated `claim_renew` command.
|
||||||
* added `account_list` command to list accounts including their balance.
|
* added `account_list` command to list accounts including their balance.
|
||||||
* added `account_add` command to add a previously created account from seed or private key.
|
* added `account_add` command to add a previously created account from seed or private key.
|
||||||
* added `account_create` command to generate a new account.
|
* added `account_create` command to generate a new account.
|
||||||
|
|
|
@ -145,7 +145,12 @@ def main(argv=None):
|
||||||
if method not in Daemon.deprecated_methods:
|
if method not in Daemon.deprecated_methods:
|
||||||
print('{} is not a valid command.'.format(method))
|
print('{} is not a valid command.'.format(method))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
new_method = Daemon.deprecated_methods[method].new_command
|
new_method = Daemon.deprecated_methods[method].new_command
|
||||||
|
if new_method is None:
|
||||||
|
print("{} is permanently deprecated and does not have a replacement command.".format(method))
|
||||||
|
return 0
|
||||||
|
|
||||||
print("{} is deprecated, using {}.".format(method, new_method))
|
print("{} is deprecated, using {}.".format(method, new_method))
|
||||||
method = new_method
|
method = new_method
|
||||||
|
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
def jsonrpc_wallet_is_address_mine(self, address):
|
def jsonrpc_wallet_is_address_mine(self, address):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@AuthJSONRPCServer.deprecated("address_public_key")
|
@AuthJSONRPCServer.deprecated()
|
||||||
def jsonrpc_wallet_public_key(self, address):
|
def jsonrpc_wallet_public_key(self, address):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -1513,23 +1513,6 @@ class Daemon(AuthJSONRPCServer):
|
||||||
address, self.get_account_or_default(account_id)
|
address, self.get_account_or_default(account_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT)
|
|
||||||
def jsonrpc_address_public_key(self, address):
|
|
||||||
"""
|
|
||||||
Get public key from wallet address
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
wallet_public_key (<address> | --address=<address>)
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--address=<address> : (str) address for which to get the public key
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
(list) list of public keys associated with address.
|
|
||||||
Could contain more than one public key if multisig.
|
|
||||||
"""
|
|
||||||
return self.wallet_manager.get_pub_keys(address)
|
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT)
|
@requires(WALLET_COMPONENT)
|
||||||
def jsonrpc_address_list(self, account_id=None):
|
def jsonrpc_address_list(self, account_id=None):
|
||||||
"""
|
"""
|
||||||
|
@ -2438,48 +2421,9 @@ class Daemon(AuthJSONRPCServer):
|
||||||
self.analytics_manager.send_claim_action('new_support')
|
self.analytics_manager.send_claim_action('new_support')
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT, conditions=[WALLET_IS_UNLOCKED])
|
@AuthJSONRPCServer.deprecated()
|
||||||
@defer.inlineCallbacks
|
|
||||||
def jsonrpc_claim_renew(self, outpoint=None, height=None):
|
def jsonrpc_claim_renew(self, outpoint=None, height=None):
|
||||||
"""
|
pass
|
||||||
Renew claim(s) or support(s)
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
claim_renew (<outpoint> | --outpoint=<outpoint>) | (<height> | --height=<height>)
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--outpoint=<outpoint> : (str) outpoint of the claim to renew
|
|
||||||
--height=<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
|
|
||||||
},
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
|
|
||||||
if outpoint is None and height is None:
|
|
||||||
raise Exception("must provide an outpoint or a height")
|
|
||||||
elif outpoint is not None:
|
|
||||||
if len(outpoint.split(":")) == 2:
|
|
||||||
txid, nout = outpoint.split(":")
|
|
||||||
nout = int(nout)
|
|
||||||
else:
|
|
||||||
raise Exception("invalid outpoint")
|
|
||||||
result = yield self.wallet_manager.claim_renew(txid, nout)
|
|
||||||
result = {outpoint: result}
|
|
||||||
else:
|
|
||||||
height = int(height)
|
|
||||||
result = yield self.wallet_manager.claim_renew_all_before_expiration(height)
|
|
||||||
return result
|
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT, conditions=[WALLET_IS_UNLOCKED])
|
@requires(WALLET_COMPONENT, conditions=[WALLET_IS_UNLOCKED])
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
Loading…
Reference in a new issue