From cc4be4fa15eba582cc6ab529bd0215e642205ad4 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 1 May 2019 12:29:12 +0000 Subject: wallet: add edit_address_book RPC --- utils/python-rpc/framework/wallet.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'utils/python-rpc/framework') diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py index c67fefc87..e42b99239 100644 --- a/utils/python-rpc/framework/wallet.py +++ b/utils/python-rpc/framework/wallet.py @@ -903,6 +903,23 @@ class Wallet(object): } return self.rpc.send_json_rpc_request(add_address_book) + def edit_address_book(self, index, address = None, payment_id = None, description = None): + edit_address_book = { + 'method': 'edit_address_book', + 'jsonrpc': '2.0', + 'params': { + 'index': index, + 'set_address': address != None, + 'address': address or '', + 'set_payment_id': payment_id != None, + 'payment_id': payment_id or '', + 'set_description': description != None, + 'description': description or '', + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(edit_address_book) + def get_address_book(self, entries = []): get_address_book = { 'method': 'get_address_book', -- cgit v1.2.3