aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/python-rpc/framework/wallet.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index a80aaefec..a55750e3a 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -265,7 +265,7 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(query_key)
- def restore_deterministic_wallet(self, seed = '', seed_offset = '', filename = '', restore_height = 0, password = '', language = ''):
+ def restore_deterministic_wallet(self, seed = '', seed_offset = '', filename = '', restore_height = 0, password = '', language = '', autosave_current = True):
restore_deterministic_wallet = {
'method': 'restore_deterministic_wallet',
'params' : {
@@ -274,14 +274,15 @@ class Wallet(object):
'seed': seed,
'seed_offset': seed_offset,
'password': password,
- 'language': language
+ 'language': language,
+ 'autosave_current': autosave_current,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(restore_deterministic_wallet)
- def generate_from_keys(self, restore_height = 0, filename = "", password = "", address = "", spendkey = "", viewkey = ""):
+ def generate_from_keys(self, restore_height = 0, filename = "", password = "", address = "", spendkey = "", viewkey = "", autosave_current = True):
generate_from_keys = {
'method': 'generate_from_keys',
'params' : {
@@ -291,16 +292,31 @@ class Wallet(object):
'spendkey': spendkey,
'viewkey': viewkey,
'password': password,
+ 'autosave_current': autosave_current,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(generate_from_keys)
- def close_wallet(self):
+ def open_wallet(self, filename, password='', autosave_current = True):
+ open_wallet = {
+ 'method': 'open_wallet',
+ 'params' : {
+ 'filename': filename,
+ 'password': password,
+ 'autosave_current': autosave_current,
+ },
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(open_wallet)
+
+ def close_wallet(self, autosave_current = True):
close_wallet = {
'method': 'close_wallet',
'params' : {
+ 'autosave_current': autosave_current
},
'jsonrpc': '2.0',
'id': '0'