aboutsummaryrefslogtreecommitdiff
path: root/utils/python-rpc
diff options
context:
space:
mode:
Diffstat (limited to 'utils/python-rpc')
-rw-r--r--utils/python-rpc/framework/daemon.py9
-rw-r--r--utils/python-rpc/framework/wallet.py13
2 files changed, 19 insertions, 3 deletions
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py
index bbac31980..23d5ec0f0 100644
--- a/utils/python-rpc/framework/daemon.py
+++ b/utils/python-rpc/framework/daemon.py
@@ -67,11 +67,13 @@ class Daemon(object):
}
return self.rpc.send_json_rpc_request(submitblock)
- def getblock(self, height=0):
+ def getblock(self, hash = '', height = 0, fill_pow_hash = False):
getblock = {
'method': 'getblock',
'params': {
- 'height': height
+ 'hash': hash,
+ 'height': height,
+ 'fill_pow_hash': fill_pow_hash,
},
'jsonrpc': '2.0',
'id': '0'
@@ -88,11 +90,12 @@ class Daemon(object):
}
return self.rpc.send_json_rpc_request(getlastblockheader)
- def getblockheaderbyhash(self, hash):
+ def getblockheaderbyhash(self, hash = "", hashes = []):
getblockheaderbyhash = {
'method': 'getblockheaderbyhash',
'params': {
'hash': hash,
+ 'hashes': hashes,
},
'jsonrpc': '2.0',
'id': '0'
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index 2e2650f92..36ff3644f 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -750,6 +750,19 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(set_log_categories)
+ def validate_address(self, address, any_net_type = False, allow_openalias = False):
+ validate_address = {
+ 'method': 'validate_address',
+ 'params': {
+ 'address': address,
+ 'any_net_type': any_net_type,
+ 'allow_openalias': allow_openalias,
+ },
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(validate_address)
+
def get_version(self):
get_version = {
'method': 'get_version',