forked from jgarzik/python-bitcoinrpc
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwalletinfo.py
More file actions
16 lines (13 loc) · 738 Bytes
/
walletinfo.py
File metadata and controls
16 lines (13 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from denariusrpc.authproxy import AuthServiceProxy, JSONRPCException
# rpc_user and rpc_password are set in the denarius.conf file
rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:32369"%("user", "password"))
get_block_count = rpc_connection.getblockcount()
print "Block Height:", (get_block_count)
get_staking_info = rpc_connection.getstakinginfo()
print "Wallet Staking Weight:", (get_staking_info[u'weight'])
print "Net Stake Weight:", (get_staking_info[u'netstakeweight'])
get_info = rpc_connection.getinfo()
print "Peers:", (get_info[u'connections'])
print "Daemon Version:", (get_info[u'version'])
get_blockchain_info = rpc_connection.getblockchaininfo()
print "Circulating:", (get_blockchain_info[u'moneysupply']), "D"