From b8b054c0f18226f058b64044fb5c677f62e2613c Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 11 Jun 2021 06:59:36 +0000 Subject: [PATCH] python-rpc: add missing python api for new freeze/thaw/frozen RPC --- utils/python-rpc/framework/wallet.py | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py index aca7c82bb..02084620c 100644 --- a/utils/python-rpc/framework/wallet.py +++ b/utils/python-rpc/framework/wallet.py @@ -1099,3 +1099,36 @@ class Wallet(object): 'id': '0' } return self.rpc.send_json_rpc_request(scan_tx) + + def freeze(self, key_image): + freeze = { + 'method': 'freeze', + 'jsonrpc': '2.0', + 'params' : { + 'key_image': key_image, + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(freeze) + + def thaw(self, key_image): + thaw = { + 'method': 'thaw', + 'jsonrpc': '2.0', + 'params' : { + 'key_image': key_image, + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(thaw) + + def frozen(self, key_image): + frozen = { + 'method': 'frozen', + 'jsonrpc': '2.0', + 'params' : { + 'key_image': key_image, + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(frozen)