From 66f33202c7fc1eb8964c9efb0726d5acefe2100e Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 25 Sep 2018 09:41:41 -0400 Subject: [PATCH] [API] add account_lock --- lbrynet/daemon/Daemon.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index f2b49c4ab..3584c1249 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -1379,6 +1379,23 @@ class Daemon(AuthJSONRPCServer): password, self.get_account_or_default(account_id, lbc_only=False) ) + @requires(WALLET_COMPONENT) + def jsonrpc_account_lock(self, account_id=None): + """ + Lock an unlocked account + + Usage: + account_lock [ | --account_id=] + + Options: + --account_id= : (str) id for the account to lock + + Returns: + (bool) true if account is locked, otherwise false + """ + + return self.wallet_manager.lock_account(self.get_account_or_default(account_id, lbc_only=False)) + @requires(WALLET_COMPONENT, conditions=[WALLET_IS_UNLOCKED]) def jsonrpc_account_decrypt(self, account_id=None): """