From 09f18b48bba202a2c8b14a2257f6e128a85d5b49 Mon Sep 17 00:00:00 2001 From: elichai2 Date: Sat, 8 Oct 2016 19:38:07 +0300 Subject: [PATCH 1/2] 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 From cee726a2e91c2ce328a003cf7d0f1067bf74ea06 Mon Sep 17 00:00:00 2001 From: elichai2 Date: Sun, 9 Oct 2016 19:48:14 +0300 Subject: [PATCH 2/2] fixed spacing --- bitcoin/rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/rpc.py b/bitcoin/rpc.py index ccb310ec..3265bd1a 100644 --- a/bitcoin/rpc.py +++ b/bitcoin/rpc.py @@ -655,7 +655,7 @@ def validateaddress(self, address): return r def unlockwallet(self, password, timeout=60): - """Stores the wallet decryption key in memory for 'timeout' seconds. + """Stores the wallet decryption key in memory for 'timeout' seconds. password - The wallet passphrase.