Package org.starcoin.api
Class BlockRPCClient
java.lang.Object
org.starcoin.api.BlockRPCClient
public class BlockRPCClient extends Object
-
Constructor Summary
Constructors Constructor Description BlockRPCClient(URL baseUrl) -
Method Summary
Modifier and Type Method Description BlockgetBlockByHash(String hash)BlockgetBlockByHeight(long height)List<Block>getBlockListFromHeight(long height, int count)BlockHeadergetChainHeader()
-
Constructor Details
-
BlockRPCClient
-
-
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
-