Skip to content

Commit dbe010a

Browse files
committed
Added walet unlocking function
1 parent d69e88f commit dbe010a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bitcoin/rpc.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,17 @@ def validateaddress(self, address):
654654
r['pubkey'] = unhexlify(r['pubkey'])
655655
return r
656656

657+
def unlockwallet(self, password, timeout=60):
658+
"""Stores the wallet decryption key in memory for 'timeout' seconds.
659+
660+
password - The wallet passphrase.
661+
662+
timeout - The time to keep the decryption key in seconds.
663+
(default=60)
664+
"""
665+
r = self._call('walletpassphrase', password, timeout)
666+
return r
667+
657668
def _addnode(self, node, arg):
658669
r = self._call('addnode', node, arg)
659670
return r

0 commit comments

Comments
 (0)