public class DefaultLightClientApi extends java.lang.Object implements LightClientApi
| Constructor and Description |
|---|
DefaultLightClientApi(org.nervos.ckb.service.RpcService rpcService) |
DefaultLightClientApi(java.lang.String nodeUrl) |
DefaultLightClientApi(java.lang.String nodeUrl,
boolean isDebug) |
| Modifier and Type | Method and Description |
|---|---|
FetchedHeader |
fetchHeader(byte[] blockHash) |
FetchedTransaction |
fetchTransaction(byte[] transactionHash) |
org.nervos.indexer.model.resp.CellsResponse |
getCells(org.nervos.indexer.model.SearchKey searchKey,
org.nervos.indexer.model.Order order,
int limit,
byte[] afterCursor) |
org.nervos.indexer.model.resp.CellCapacityResponse |
getCellsCapacity(org.nervos.indexer.model.SearchKey searchKey) |
org.nervos.ckb.type.Block |
getGenesisBlock() |
org.nervos.ckb.type.Header |
getHeader(byte[] blockHash) |
java.util.List<ScriptDetail> |
getScripts() |
org.nervos.ckb.type.Header |
getTipHeader() |
TransactionWithHeader |
getTransaction(byte[] transactionHash) |
TxsWithCell |
getTransactions(org.nervos.indexer.model.SearchKey searchKey,
org.nervos.indexer.model.Order order,
int limit,
byte[] afterCursor) |
TxsWithCells |
getTransactionsGrouped(org.nervos.indexer.model.SearchKey searchKey,
org.nervos.indexer.model.Order order,
int limit,
byte[] afterCursor) |
byte[] |
sendTransaction(org.nervos.ckb.type.Transaction transaction) |
void |
setScripts(java.util.List<ScriptDetail> scriptDetails) |
public DefaultLightClientApi(java.lang.String nodeUrl)
public DefaultLightClientApi(java.lang.String nodeUrl,
boolean isDebug)
public DefaultLightClientApi(org.nervos.ckb.service.RpcService rpcService)
public void setScripts(java.util.List<ScriptDetail> scriptDetails) throws java.io.IOException
setScripts in interface LightClientApijava.io.IOExceptionpublic java.util.List<ScriptDetail> getScripts() throws java.io.IOException
getScripts in interface LightClientApijava.io.IOExceptionpublic byte[] sendTransaction(org.nervos.ckb.type.Transaction transaction)
throws java.io.IOException
sendTransaction in interface LightClientApijava.io.IOExceptionpublic org.nervos.ckb.type.Header getTipHeader()
throws java.io.IOException
getTipHeader in interface LightClientApijava.io.IOExceptionpublic org.nervos.ckb.type.Block getGenesisBlock()
throws java.io.IOException
getGenesisBlock in interface LightClientApijava.io.IOExceptionpublic org.nervos.ckb.type.Header getHeader(byte[] blockHash)
throws java.io.IOException
getHeader in interface LightClientApijava.io.IOExceptionpublic TransactionWithHeader getTransaction(byte[] transactionHash) throws java.io.IOException
getTransaction in interface LightClientApijava.io.IOExceptionpublic FetchedHeader fetchHeader(byte[] blockHash) throws java.io.IOException
fetchHeader in interface LightClientApijava.io.IOExceptionpublic FetchedTransaction fetchTransaction(byte[] transactionHash) throws java.io.IOException
fetchTransaction in interface LightClientApijava.io.IOExceptionpublic org.nervos.indexer.model.resp.CellsResponse getCells(org.nervos.indexer.model.SearchKey searchKey,
org.nervos.indexer.model.Order order,
int limit,
byte[] afterCursor)
throws java.io.IOException
getCells in interface LightClientApijava.io.IOExceptionpublic TxsWithCell getTransactions(org.nervos.indexer.model.SearchKey searchKey, org.nervos.indexer.model.Order order, int limit, byte[] afterCursor) throws java.io.IOException
getTransactions in interface LightClientApijava.io.IOExceptionpublic TxsWithCells getTransactionsGrouped(org.nervos.indexer.model.SearchKey searchKey, org.nervos.indexer.model.Order order, int limit, byte[] afterCursor) throws java.io.IOException
getTransactionsGrouped in interface LightClientApijava.io.IOExceptionpublic org.nervos.indexer.model.resp.CellCapacityResponse getCellsCapacity(org.nervos.indexer.model.SearchKey searchKey)
throws java.io.IOException
getCellsCapacity in interface LightClientApijava.io.IOException