2018-11-04 01:24:41 -05:00
|
|
|
from torba.client.basenetwork import BaseNetwork
|
2018-05-25 23:26:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Network(BaseNetwork):
|
2018-06-12 11:53:29 -04:00
|
|
|
|
2018-08-27 21:03:08 -03:00
|
|
|
def get_block(self, block_hash):
|
|
|
|
return self.rpc('blockchain.block.get_block', block_hash)
|
|
|
|
|
2018-08-04 20:20:37 -04:00
|
|
|
def get_server_height(self):
|
|
|
|
return self.rpc('blockchain.block.get_server_height')
|
|
|
|
|
2018-07-01 17:21:18 -04:00
|
|
|
def get_values_for_uris(self, block_hash, *uris):
|
|
|
|
return self.rpc('blockchain.claimtrie.getvaluesforuris', block_hash, *uris)
|
2018-07-10 01:31:21 -03:00
|
|
|
|
|
|
|
def get_claims_by_ids(self, *claim_ids):
|
2018-07-12 00:46:01 -03:00
|
|
|
return self.rpc('blockchain.claimtrie.getclaimsbyids', *claim_ids)
|
2018-08-27 21:03:08 -03:00
|
|
|
|
|
|
|
def get_claims_in_tx(self, txid):
|
|
|
|
return self.rpc('blockchain.claimtrie.getclaimsintx', txid)
|
2018-09-21 17:48:49 -03:00
|
|
|
|
|
|
|
def get_claims_for_name(self, name):
|
|
|
|
return self.rpc('blockchain.claimtrie.getclaimsforname', name)
|
2018-12-03 21:40:18 -03:00
|
|
|
|
|
|
|
def get_transaction_height(self, txid):
|
|
|
|
# 1.0 protocol specific workaround. Newer protocol should use get_transaction with verbose True
|
|
|
|
return self.rpc('blockchain.transaction.get_height', txid)
|