public class BlockChainSdk extends Object
| 构造器和说明 |
|---|
BlockChainSdk(String url,
String version)
Object construction through the url path.
|
| 限定符和类型 | 方法和说明 |
|---|---|
CreateRawTransactionOutput |
createRawTransaction(CreateRawTransactionInput input)
Creates an unsigned serialized transaction wa:/api/blockChain/rawTransaction.
|
String |
executeRawTransaction(ExecuteRawTransactionDto input)
Call a method of a contract by given serialized str wa:/api/blockChain/executeRawTransaction.
|
String |
executeTransaction(ExecuteTransactionDto input)
Call a read-only method of a contract. wa:/api/blockChain/executeTransaction
|
BlockDto |
getBlockByHash(String blockHash)
Get information of a block by given block hash.
|
BlockDto |
getBlockByHash(String blockHash,
boolean includeTransactions)
Get information about a given block by block hash.
|
BlockDto |
getBlockByHeight(long blockHeight)
Get information of a block by specified height.
|
BlockDto |
getBlockByHeight(long blockHeight,
boolean includeTransactions)
Get information of a block by specified height.
|
long |
getBlockHeight()
Get the height of the current chain. wa:/api/blockChain/blockHeight
|
int |
getChainId()
Get id of the chain.
|
ChainstatusDto |
getChainStatus()
Get the current status of the block chain. wa:/api/blockChain/chainStatus
|
byte[] |
getContractFileDescriptorSet(String address)
Get the protobuf definitions related to a contract /api/blockChain/contractFileDescriptorSet.
|
MerklePathDto |
getMerklePathByTransactionId(String transactionId)
Get merkle path of a transaction. wa:/api/blockChain/merklePathByTransactionId
|
List<TaskQueueInfoDto> |
getTaskQueueStatus()
Gets the status information of the task queue wa:/api/blockChain/taskQueueStatus.
|
TransactionPoolStatusOutput |
getTransactionPoolStatus()
Gets information about the current transaction pool.wa:/api/blockChain/transactionPoolStatus
|
TransactionResultDto |
getTransactionResult(String transactionId)
Get the current status of a transaction wa:/api/blockChain/transactionResult.
|
List<TransactionResultDto> |
getTransactionResults(String blockHash)
Get results of multiple transactions by specified blockHash and the offset.
|
List<TransactionResultDto> |
getTransactionResults(String blockHash,
int offset,
int limit)
Get multiple transaction results. wa:/api/blockChain/transactionResults
|
SendRawTransactionOutput |
sendRawTransaction(SendRawTransactionInput input)
Broadcast a serialized transaction. wa:/api/blockChain/sendRawTransaction
|
SendTransactionOutput |
sendTransaction(SendTransactionInput input)
Broadcast a transaction wa:/api/blockChain/sendTransaction.
|
List<String> |
sendTransactions(SendTransactionsInput input)
Broadcast volume transactions wa:/api/blockChain/sendTransactions.
|
public long getBlockHeight()
throws Exception
Exceptionpublic BlockDto getBlockByHash(String blockHash) throws Exception
Exceptionpublic BlockDto getBlockByHash(String blockHash, boolean includeTransactions) throws Exception
Exceptionpublic BlockDto getBlockByHeight(long blockHeight) throws Exception
Exceptionpublic BlockDto getBlockByHeight(long blockHeight, boolean includeTransactions) throws Exception
Exceptionpublic ChainstatusDto getChainStatus() throws Exception
Exceptionpublic byte[] getContractFileDescriptorSet(String address) throws Exception
Exceptionpublic List<TaskQueueInfoDto> getTaskQueueStatus() throws Exception
Exceptionpublic TransactionPoolStatusOutput getTransactionPoolStatus() throws Exception
Exceptionpublic String executeTransaction(ExecuteTransactionDto input) throws Exception
Exceptionpublic CreateRawTransactionOutput createRawTransaction(CreateRawTransactionInput input) throws Exception
Exceptionpublic String executeRawTransaction(ExecuteRawTransactionDto input) throws Exception
Exceptionpublic SendRawTransactionOutput sendRawTransaction(SendRawTransactionInput input) throws Exception
Exceptionpublic SendTransactionOutput sendTransaction(SendTransactionInput input) throws Exception
Exceptionpublic List<String> sendTransactions(SendTransactionsInput input) throws Exception
Exceptionpublic TransactionResultDto getTransactionResult(String transactionId) throws Exception
Exceptionpublic List<TransactionResultDto> getTransactionResults(String blockHash) throws Exception
Exceptionpublic List<TransactionResultDto> getTransactionResults(String blockHash, int offset, int limit) throws Exception
Exceptionpublic MerklePathDto getMerklePathByTransactionId(String transactionId)
Copyright © 2020. All rights reserved.