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