Merge pull request #3 from benzcash/ben/add-rpc-command-for-zcashd_monitor.py

Added some additional rpc commands to support zcashd monitoring
This commit is contained in:
Ben Wilson 2019-11-12 10:29:19 -05:00 committed by GitHub
commit f298eb6bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -42,6 +42,9 @@ class ZDaemon(object):
def getBlockByHash(self, blockhash):
return self._call('getblock', blockhash)
def getRawTransaction(self, txid):
return self._call('getrawtransaction', txid, 1)
def getBlockByHeight(self, blockheight):
return self.getBlockByHash(self.getBlockHash(blockheight))
@ -49,6 +52,21 @@ class ZDaemon(object):
def getNetworkHeight(self):
return self._call('getblockcount')
def getInfo(self):
return self._call('getinfo')
def getChainTips(self):
return self._call('getchaintips')
def getMempoolInfo(self):
return self._call('getmempoolinfo')
def getNetworkSolps(self):
return self._call('getnetworksolps')
def getNetTotals(self):
return self._call('getnettotals')
def getNetworkDifficulty(self):
return self._call('getdifficulty')