diff options
Diffstat (limited to 'utils/python-rpc/framework/wallet.py')
-rw-r--r-- | utils/python-rpc/framework/wallet.py | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py index 6a3fabdc9..ac9ba2d3a 100644 --- a/utils/python-rpc/framework/wallet.py +++ b/utils/python-rpc/framework/wallet.py @@ -237,14 +237,15 @@ class Wallet(object): } return self.rpc.send_json_rpc_request(create_account) - def create_address(self, account_index = 0, label = ""): + def create_address(self, account_index = 0, label = "", count = 1): create_address = { 'method': 'create_address', 'params' : { 'account_index': account_index, - 'label': label + 'label': label, + 'count': count }, - 'jsonrpc': '2.0', + 'jsonrpc': '2.0', 'id': '0' } return self.rpc.send_json_rpc_request(create_address) @@ -705,11 +706,13 @@ class Wallet(object): } return self.rpc.send_json_rpc_request(check_reserve_proof) - def sign(self, data): + def sign(self, data, account_index = 0, address_index = 0): sign = { 'method': 'sign', 'params' : { 'data': data, + 'account_index': account_index, + 'address_index': address_index, }, 'jsonrpc': '2.0', 'id': '0' @@ -838,11 +841,12 @@ class Wallet(object): } return self.rpc.send_json_rpc_request(validate_address) - def get_accounts(self, tag): + def get_accounts(self, tag, strict_balances = False): get_accounts = { 'method': 'get_accounts', 'params': { 'tag': tag, + 'strict_balances': strict_balances, }, 'jsonrpc': '2.0', 'id': '0' @@ -1062,6 +1066,20 @@ class Wallet(object): } return self.rpc.send_json_rpc_request(stop_mining) + def estimate_tx_size_and_weight(self, n_inputs, n_outputs, ring_size = 0, rct = True): + estimate_tx_size_and_weight = { + 'method': 'estimate_tx_size_and_weight', + 'jsonrpc': '2.0', + 'params': { + 'n_inputs': n_inputs, + 'n_outputs': n_outputs, + 'ring_size': ring_size, + 'rct': rct, + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(estimate_tx_size_and_weight) + def get_version(self): get_version = { 'method': 'get_version', |