aboutsummaryrefslogtreecommitdiff
path: root/utils/python-rpc/framework/wallet.py
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-22 15:25:33 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-23 18:59:47 +0000
commitc7bfdc356618fd1ccbe0f87fd5009e944cd12e50 (patch)
tree2f1154b5560f096dab5f2bbf531d83362eb8df1c /utils/python-rpc/framework/wallet.py
parentfunctional_tests: move RPC API to utils, it is not test specific (diff)
downloadmonero-c7bfdc356618fd1ccbe0f87fd5009e944cd12e50.tar.xz
python-rpc: add console.py
It allows one to connect to a running daemon or wallet, and use its RPC API from python. Usage: python -i console.py <port> It will detect whether it's talking to a daemon or wallet and initialize itself accordingly.
Diffstat (limited to '')
-rw-r--r--utils/python-rpc/framework/wallet.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index e9f13667b..ea683b8c5 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -590,3 +590,11 @@ class Wallet(object):
'id': '0'
}
return self.rpc.send_json_rpc_request(verify)
+
+ def get_version(self):
+ get_version = {
+ 'method': 'get_version',
+ 'jsonrpc': '2.0',
+ 'id': '0'
+ }
+ return self.rpc.send_json_rpc_request(get_version)