diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-22 15:25:33 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-23 18:59:47 +0000 |
commit | c7bfdc356618fd1ccbe0f87fd5009e944cd12e50 (patch) | |
tree | 2f1154b5560f096dab5f2bbf531d83362eb8df1c /utils/python-rpc/framework/daemon.py | |
parent | functional_tests: move RPC API to utils, it is not test specific (diff) | |
download | monero-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 'utils/python-rpc/framework/daemon.py')
-rw-r--r-- | utils/python-rpc/framework/daemon.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py index 11d5f5845..83c8eea67 100644 --- a/utils/python-rpc/framework/daemon.py +++ b/utils/python-rpc/framework/daemon.py @@ -196,3 +196,11 @@ class Daemon(object): 'id': '0' } return self.rpc.send_json_rpc_request(flush_txpool) + + def get_version(self): + get_version = { + 'method': 'get_version', + 'jsonrpc': '2.0', + 'id': '0' + } + return self.rpc.send_json_rpc_request(get_version) |