lbry-sdk/lbrynet/wallet/network.py
shyba 5e371e8e6a [API] Fixes for block_show and claim_show (#1390)
block_show using block hash
block_show using height
claim_show from claim_id
claim_show from outpoint
2018-08-27 20:03:08 -04:00

20 lines
639 B
Python

from torba.basenetwork import BaseNetwork
class Network(BaseNetwork):
def get_block(self, block_hash):
return self.rpc('blockchain.block.get_block', block_hash)
def get_server_height(self):
return self.rpc('blockchain.block.get_server_height')
def get_values_for_uris(self, block_hash, *uris):
return self.rpc('blockchain.claimtrie.getvaluesforuris', block_hash, *uris)
def get_claims_by_ids(self, *claim_ids):
return self.rpc('blockchain.claimtrie.getclaimsbyids', *claim_ids)
def get_claims_in_tx(self, txid):
return self.rpc('blockchain.claimtrie.getclaimsintx', txid)