commit
4027733f2c
3 changed files with 20 additions and 1 deletions
|
@ -9,7 +9,7 @@ at anytime.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
*
|
* Add `wallet_list` command
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
|
@ -1106,6 +1106,9 @@ class LBRYumWallet(Wallet):
|
||||||
def get_pub_keys(self, address):
|
def get_pub_keys(self, address):
|
||||||
return self._run_cmd_as_defer_succeed('getpubkeys', address)
|
return self._run_cmd_as_defer_succeed('getpubkeys', address)
|
||||||
|
|
||||||
|
def list_addresses(self):
|
||||||
|
return self._run_cmd_as_defer_succeed('listaddresses')
|
||||||
|
|
||||||
def _save_wallet(self, val):
|
def _save_wallet(self, val):
|
||||||
self.wallet.storage.write()
|
self.wallet.storage.write()
|
||||||
return defer.succeed(val)
|
return defer.succeed(val)
|
||||||
|
|
|
@ -2067,6 +2067,22 @@ class Daemon(AuthJSONRPCServer):
|
||||||
d.addCallback(lambda r: self._render_response(r))
|
d.addCallback(lambda r: self._render_response(r))
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
@AuthJSONRPCServer.auth_required
|
||||||
|
@defer.inlineCallbacks
|
||||||
|
def jsonrpc_wallet_list(self):
|
||||||
|
"""
|
||||||
|
List wallet addresses
|
||||||
|
|
||||||
|
Args:
|
||||||
|
None
|
||||||
|
Returns:
|
||||||
|
List of wallet addresses
|
||||||
|
"""
|
||||||
|
|
||||||
|
addresses = yield self.session.wallet.list_addresses()
|
||||||
|
response = yield self._render_response(addresses)
|
||||||
|
defer.returnValue(response)
|
||||||
|
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
def jsonrpc_get_new_address(self):
|
def jsonrpc_get_new_address(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue