Class BlockRPCClient

java.lang.Object
org.starcoin.api.BlockRPCClient

public class BlockRPCClient
extends Object
  • Constructor Details

    • BlockRPCClient

      public BlockRPCClient​(URL baseUrl)
  • Method Details

    • getChainHeader

      public BlockHeader getChainHeader() throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
      Throws:
      com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
    • getBlockByHash

      public Block getBlockByHash​(String hash) throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
      Throws:
      com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
    • getBlockByHeight

      public Block getBlockByHeight​(long height) throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
      Throws:
      com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
    • getBlockListFromHeight

      public List<Block> getBlockListFromHeight​(long height, int count) throws com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
      Throws:
      com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException