aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2025-02-13 17:43:24 +0000
committertobtoht <tob@featherwallet.org>2025-02-13 17:43:24 +0000
commit5b045d70e0cb336eef9b962e53c827df3dcf469b (patch)
tree2b087e184c5fdc6ce1d0f226104e89aa2d1dff25 /utils
parent903e4fa3608a7432b47124bda9eb21aba1b2187e (diff)
parente44e8b164030cfbddb9ae8b39251c1ccf396e2b6 (diff)
downloadmonzero-core-5b045d70e0cb336eef9b962e53c827df3dcf469b.tar.gz
monzero-core-5b045d70e0cb336eef9b962e53c827df3dcf469b.tar.xz
monzero-core-5b045d70e0cb336eef9b962e53c827df3dcf469b.zip
Merge pull request #8617
e44e8b164 wallet: background sync with just the view key (j-berman)
Diffstat (limited to 'utils')
-rw-r--r--utils/python-rpc/framework/wallet.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index 1e10e1f86..bff33a561 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -1138,3 +1138,45 @@ class Wallet(object):
'id': '0'
}
return self.rpc.send_json_rpc_request(frozen)
+
+ class BackgroundSyncOptions(object):
+ def __init__(self):
+ self.off = 'off'
+ self.reuse_password = 'reuse-wallet-password'
+ self.custom_password = 'custom-background-password'
+ background_sync_options = BackgroundSyncOptions()
+
+ def setup_background_sync(self, background_sync_type = background_sync_options.off, wallet_password = '', background_cache_password = ''):
+ setup_background_sync = {
+ 'method': 'setup_background_sync',
+ 'jsonrpc': '2.0',
+ 'params' : {
+ 'background_sync_type': background_sync_type,
+ 'wallet_password': wallet_password,
+ 'background_cache_password': background_cache_password,
+ },
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(setup_background_sync)
+
+ def start_background_sync(self):
+ start_background_sync = {
+ 'method': 'start_background_sync',
+ 'jsonrpc': '2.0',
+ 'params' : {},
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(start_background_sync)
+
+ def stop_background_sync(self, wallet_password = '', seed = '', seed_offset = ''):
+ stop_background_sync = {
+ 'method': 'stop_background_sync',
+ 'jsonrpc': '2.0',
+ 'params' : {
+ 'wallet_password': wallet_password,
+ 'seed': seed,
+ 'seed_offset': seed_offset,
+ },
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(stop_background_sync)