diff --git a/CHANGELOG.md b/CHANGELOG.md index ec52f33a6..c2e9808ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ at anytime. ## [Unreleased] ### Added - * + * Add `claim_send_to_address` * ### Changed diff --git a/lbrynet/core/Wallet.py b/lbrynet/core/Wallet.py index 6a7526857..1dce56bfe 100644 --- a/lbrynet/core/Wallet.py +++ b/lbrynet/core/Wallet.py @@ -1102,6 +1102,9 @@ class Wallet(object): def _get_values_for_uris(self, page, page_size, *uris): return defer.fail(NotImplementedError()) + def send_claim_to_address(self, claim_id, destination, amount): + return defer.fail(NotImplementedError()) + def _start(self): pass @@ -1428,6 +1431,9 @@ class LBRYumWallet(Wallet): def list_addresses(self): return self._run_cmd_as_defer_succeed('listaddresses') + def send_claim_to_address(self, claim_id, destination, amount): + return self._run_cmd_as_defer_succeed('sendclaimtoaddress', claim_id, destination, amount) + def _save_wallet(self, val=None): self.wallet.storage.write() return defer.succeed(val) diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index c74d30f51..5e20097dc 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -1901,6 +1901,25 @@ class Daemon(AuthJSONRPCServer): self.analytics_manager.send_claim_action('new_support') defer.returnValue(result) + @AuthJSONRPCServer.auth_required + @defer.inlineCallbacks + def jsonrpc_claim_send_to_address(self, claim_id, address, amount=None): + """ + Send a name claim to an address + + Usage: + claim_send_to_address ( | --claim_id=) + (
| --address=
) + [ | --amount=] + + Options: + : Amount of credits to claim name for, defaults to the current amount + on the claim + """ + result = yield self.session.wallet.send_claim_to_address(claim_id, address, amount) + response = yield self._render_response(result) + defer.returnValue(response) + # TODO: claim_list_mine should be merged into claim_list, but idk how to authenticate it -Grin @AuthJSONRPCServer.auth_required def jsonrpc_claim_list_mine(self):