From 09f18b48bba202a2c8b14a2257f6e128a85d5b49 Mon Sep 17 00:00:00 2001 From: elichai2 Date: Sat, 8 Oct 2016 19:38:07 +0300 Subject: [PATCH] Added walet unlocking function --- bitcoin/rpc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bitcoin/rpc.py b/bitcoin/rpc.py index 0017fd2f..ccb310ec 100644 --- a/bitcoin/rpc.py +++ b/bitcoin/rpc.py @@ -654,6 +654,17 @@ def validateaddress(self, address): r['pubkey'] = unhexlify(r['pubkey']) return r + def unlockwallet(self, password, timeout=60): + """Stores the wallet decryption key in memory for 'timeout' seconds. + + password - The wallet passphrase. + + timeout - The time to keep the decryption key in seconds. + (default=60) + """ + r = self._call('walletpassphrase', password, timeout) + return r + def _addnode(self, node, arg): r = self._call('addnode', node, arg) return r