aboutsummaryrefslogtreecommitdiff
path: root/utils/python-rpc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-25 10:59:46 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-11 11:08:09 +0000
commit2d68b31f3e58767c961a790dd51811d69798eac0 (patch)
treed7d840493af53f7803b76e04df2ef06d42ac21fd /utils/python-rpc
parentpython-rpc: add set_log_level and set_log_categories (diff)
downloadmonero-2d68b31f3e58767c961a790dd51811d69798eac0.tar.xz
functional_tests: add more wallet tests
get_transfer_by_txid, get_height, open/close
Diffstat (limited to 'utils/python-rpc')
-rw-r--r--utils/python-rpc/framework/wallet.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index 5b0df2e13..e09778c80 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -89,6 +89,18 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(transfer)
+ def get_transfer_by_txid(self, txid, account_index = 0):
+ get_transfer_by_txid = {
+ 'method': 'get_transfer_by_txid',
+ 'params': {
+ 'txid': txid,
+ 'account_index': account_index,
+ },
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(get_transfer_by_txid)
+
def get_bulk_payments(self, payment_ids = [], min_block_height = 0):
get_bulk_payments = {
'method': 'get_bulk_payments',
@@ -592,6 +604,25 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(verify)
+ def get_height(self):
+ get_height = {
+ 'method': 'get_height',
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(get_height)
+
+ def relay_tx(self, hex_):
+ relay_tx = {
+ 'method': 'relay_tx',
+ 'params': {
+ 'hex': hex_,
+ },
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(relay_tx)
+
def get_version(self):
get_version = {
'method': 'get_version',