public interface Client
| 限定符和类型 | 字段和说明 |
|---|---|
static org.slf4j.Logger |
logger |
| 限定符和类型 | 方法和说明 |
|---|---|
static Client |
build(ConfigOption configOption)
Build a client instance GroupId is identified, all interfaces are available
|
static Client |
build(java.lang.String groupId,
ConfigOption configOption)
Build a client instance GroupId is identified, all interfaces are available
|
static Client |
build(java.lang.String groupId,
ConfigOption configOption,
long nativePointer)
Build a client instance GroupId is identified, all interfaces are available, with specific
jniRPC
|
Call |
call(java.lang.String node,
Transaction transaction)
Ledger operation: call contract functions without sending transaction
|
Call |
call(Transaction transaction)
Ledger operation: call contract functions without sending transaction
|
void |
callAsync(java.lang.String node,
Transaction transaction,
RespCallback<Call> callback)
Ledger operation: async call contract functions without sending transaction
|
void |
callAsync(Transaction transaction,
RespCallback<Call> callback)
Ledger operation: async call contract functions without sending transaction
|
void |
destroy() |
Abi |
getABI(java.lang.String address)
Scheduler: get abi
|
Abi |
getABI(java.lang.String node,
java.lang.String address)
Ledger operation: get abi
|
void |
getABIAsync(java.lang.String address,
RespCallback<Abi> callback)
Ledger operation: async get abi
|
void |
getABIAsync(java.lang.String node,
java.lang.String address,
RespCallback<Abi> callback)
Ledger operation: async get abi
|
BcosBlock |
getBlockByHash(java.lang.String blockHash,
boolean onlyHeader,
boolean onlyTxHash)
Ledger operation: get block by hash
|
BcosBlock |
getBlockByHash(java.lang.String node,
java.lang.String blockHash,
boolean onlyHeader,
boolean onlyTxHash)
Ledger operation: get block by hash
|
void |
getBlockByHashAsync(java.lang.String blockHash,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
Ledger operation: async get block by hash
|
void |
getBlockByHashAsync(java.lang.String node,
java.lang.String blockHash,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
Ledger operation: async get block by hash
|
BcosBlock |
getBlockByNumber(java.math.BigInteger blockNumber,
boolean onlyHeader,
boolean onlyTxHash)
Ledger operation: get block by block number
|
BcosBlock |
getBlockByNumber(java.lang.String node,
java.math.BigInteger blockNumber,
boolean onlyHeader,
boolean onlyTxHash)
Ledger operation: get block by block number
|
void |
getBlockByNumberAsync(java.math.BigInteger blockNumber,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
Ledger operation: async get block by block number
|
void |
getBlockByNumberAsync(java.lang.String node,
java.math.BigInteger blockNumber,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
Ledger operation: async get block by block number
|
BlockHash |
getBlockHashByNumber(java.math.BigInteger blockNumber)
Ledger operation: async get block hash by block number
|
BlockHash |
getBlockHashByNumber(java.lang.String node,
java.math.BigInteger blockNumber)
Ledger operation: async get block hash by block number
|
void |
getBlockHashByNumberAsync(java.math.BigInteger blockNumber,
RespCallback<BlockHash> callback)
Ledger operation: async get block hash by block number
|
void |
getBlockHashByNumberAsync(java.lang.String node,
java.math.BigInteger blockNumber,
RespCallback<BlockHash> callback)
Ledger operation: async get block hash by block number
|
java.math.BigInteger |
getBlockLimit()
Get cached block height
|
BlockNumber |
getBlockNumber()
Ledger operation: get block number
|
BlockNumber |
getBlockNumber(java.lang.String node)
Ledger operation: get block number
|
void |
getBlockNumberAsync(RespCallback<BlockNumber> callback)
Ledger operation: async get block number
|
void |
getBlockNumberAsync(java.lang.String node,
RespCallback<BlockNumber> callback)
Ledger operation: async get block number
|
java.lang.String |
getChainId()
get groupId of the client
|
Code |
getCode(java.lang.String address)
Ledger operation: get code
|
Code |
getCode(java.lang.String node,
java.lang.String address)
Ledger operation: get code
|
void |
getCodeAsync(java.lang.String address,
RespCallback<Code> callback)
Ledger operation: async get code
|
void |
getCodeAsync(java.lang.String node,
java.lang.String address,
RespCallback<Code> callback)
Ledger operation: async get code
|
ConfigOption |
getConfigOption() |
ConsensusStatus |
getConsensusStatus()
sync get consensus status
|
ConsensusStatus |
getConsensusStatus(java.lang.String node)
sync get consensus status
|
void |
getConsensusStatusAsync(RespCallback<ConsensusStatus> callback)
async get consensus status
|
void |
getConsensusStatusAsync(java.lang.String node,
RespCallback<ConsensusStatus> callback)
async get consensus status
|
CryptoSuite |
getCryptoSuite()
Get CryptoSuite
|
java.lang.Integer |
getCryptoType()
Get crypto type
|
java.lang.String |
getGroup()
get groupId of the client
|
BcosGroupInfo |
getGroupInfo()
get group info
|
void |
getGroupInfoAsync(RespCallback<BcosGroupInfo> callback) |
BcosGroupInfoList |
getGroupInfoList()
get group info list
|
void |
getGroupInfoListAsync(RespCallback<BcosGroupInfoList> callback) |
BcosGroupList |
getGroupList()
get group list
|
void |
getGroupListAsync(RespCallback<BcosGroupList> callback) |
BcosGroupNodeInfo |
getGroupNodeInfo(java.lang.String node)
get group node info
|
void |
getGroupNodeInfoAsync(java.lang.String node,
RespCallback<BcosGroupNodeInfo> callback) |
GroupPeers |
getGroupPeers()
get the group peers
|
void |
getGroupPeersAsync(RespCallback<GroupPeers> callback) |
long |
getNativePointer() |
ObserverList |
getObserverList()
Peer operation: get observer node list
|
void |
getObserverList(RespCallback<ObserverList> callback)
Peer operation: async get observer node list
|
ObserverList |
getObserverList(java.lang.String node)
Peer operation: get observer node list
|
void |
getObserverList(java.lang.String node,
RespCallback<ObserverList> callback)
Peer operation: async get observer node list
|
PbftView |
getPbftView()
Peer operation: get pbft view
|
PbftView |
getPbftView(java.lang.String node)
Peer operation: get pbft view
|
void |
getPbftViewAsync(RespCallback<PbftView> callback)
Peer operation: async get pbft view
|
void |
getPbftViewAsync(java.lang.String node,
RespCallback<PbftView> callback)
Peer operation: async get pbft view
|
Peers |
getPeers()
Peer operation: get connected peers
|
void |
getPeersAsync(RespCallback<Peers> callback)
Peer operation: async get connected peers
|
PendingTxSize |
getPendingTxSize()
Ledger operation: get pending transaction size
|
PendingTxSize |
getPendingTxSize(java.lang.String node)
Ledger operation: get pending transaction size
|
void |
getPendingTxSizeAsync(RespCallback<PendingTxSize> callback)
Ledger operation: async get pending transaction size
|
void |
getPendingTxSizeAsync(java.lang.String node,
RespCallback<PendingTxSize> callback)
Ledger operation: async get pending transaction size
|
SealerList |
getSealerList()
Peer operation: get sealer node list
|
SealerList |
getSealerList(java.lang.String node)
Peer operation: get sealer node list
|
void |
getSealerListAsync(RespCallback<SealerList> callback)
Peer operation: async get sealer node list
|
void |
getSealerListAsync(java.lang.String node,
RespCallback<SealerList> callback)
Peer operation: async get sealer node list
|
SyncStatus |
getSyncStatus()
Peer operation: get sync status
|
SyncStatus |
getSyncStatus(java.lang.String node)
Peer operation: get sync status
|
void |
getSyncStatusAsync(RespCallback<SyncStatus> callback)
Peer operation: async get sync status
|
void |
getSyncStatusAsync(java.lang.String node,
RespCallback<SyncStatus> callback)
Peer operation: async get sync status
|
SystemConfig |
getSystemConfigByKey(java.lang.String key)
Peer operation: get system config
|
SystemConfig |
getSystemConfigByKey(java.lang.String node,
java.lang.String key)
Peer operation: get system config
|
void |
getSystemConfigByKeyAsync(java.lang.String key,
RespCallback<SystemConfig> callback)
Peer operation: async get system config
|
void |
getSystemConfigByKeyAsync(java.lang.String node,
java.lang.String key,
RespCallback<SystemConfig> callback)
Peer operation: async get system config
|
TotalTransactionCount |
getTotalTransactionCount()
Ledger operation: get total transaction coun
|
TotalTransactionCount |
getTotalTransactionCount(java.lang.String node)
Ledger operation: get total transaction coun
|
void |
getTotalTransactionCountAsync(RespCallback<TotalTransactionCount> callback)
Ledger operation: async get total transaction count
|
void |
getTotalTransactionCountAsync(java.lang.String node,
RespCallback<TotalTransactionCount> callback)
Ledger operation: async get total transaction count
|
BcosTransaction |
getTransaction(java.lang.String transactionHash,
java.lang.Boolean withProof)
Ledger operation: get transaction by hash
|
BcosTransaction |
getTransaction(java.lang.String node,
java.lang.String transactionHash,
java.lang.Boolean withProof)
Ledger operation: get trnasaction by hash
|
void |
getTransactionAsync(java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransaction> callback)
Ledger operation: async get trnasaction by hash
|
void |
getTransactionAsync(java.lang.String node,
java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransaction> callback)
Ledger operation: async get trnasaction by hash
|
BcosTransactionReceipt |
getTransactionReceipt(java.lang.String transactionHash,
java.lang.Boolean withProof)
Ledger operation: get transaction receipt by transaction hash
|
BcosTransactionReceipt |
getTransactionReceipt(java.lang.String node,
java.lang.String transactionHash,
java.lang.Boolean withProof)
Ledger operation: get transaction receipt by transaction hash
|
void |
getTransactionReceiptAsync(java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransactionReceipt> callback)
Ledger operation: async get transaction receipt by transaction hash
|
void |
getTransactionReceiptAsync(java.lang.String node,
java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransactionReceipt> callback)
Ledger operation: async get transaction receipt by transaction hash
|
java.lang.Boolean |
isAuthCheck()
Whether is auth check in chain
|
java.lang.Boolean |
isSerialExecute() |
java.lang.Boolean |
isWASM()
Whether is wasm exec env
|
BcosTransactionReceipt |
sendTransaction(java.lang.String signedTransactionData,
boolean withProof)
Ledger operation: send transaction
|
BcosTransactionReceipt |
sendTransaction(java.lang.String node,
java.lang.String signedTransactionData,
boolean withProof)
Ledger operation: send transaction
|
void |
sendTransactionAsync(java.lang.String signedTransactionData,
boolean withProof,
TransactionCallback callback)
Ledger operation: async send transaction
|
void |
sendTransactionAsync(java.lang.String node,
java.lang.String signedTransactionData,
boolean withProof,
TransactionCallback callback)
Ledger operation: async send transaction
|
void |
start() |
void |
stop() |
static Client build(ConfigOption configOption)
configOption - the configstatic Client build(java.lang.String groupId, ConfigOption configOption)
groupId - the group infoconfigOption - the configstatic Client build(java.lang.String groupId, ConfigOption configOption, long nativePointer)
groupId - the group infoconfigOption - the confignativePointer - jni impl native handlerlong getNativePointer()
CryptoSuite getCryptoSuite()
java.lang.Integer getCryptoType()
java.lang.Boolean isWASM()
java.lang.Boolean isAuthCheck()
java.lang.Boolean isSerialExecute()
java.lang.String getGroup()
java.lang.String getChainId()
ConfigOption getConfigOption()
BcosTransactionReceipt sendTransaction(java.lang.String signedTransactionData, boolean withProof)
signedTransactionData - transaction stringwithProof - whether contains merkle proof or notBcosTransactionReceipt sendTransaction(java.lang.String node, java.lang.String signedTransactionData, boolean withProof)
node - the node rpc request send tosignedTransactionData - transaction stringwithProof - whether contains merkle proof or notvoid sendTransactionAsync(java.lang.String signedTransactionData,
boolean withProof,
TransactionCallback callback)
signedTransactionData - transaction stringwithProof - whether contains merkle proof or notcallback - the callback that will be called when receive the responsevoid sendTransactionAsync(java.lang.String node,
java.lang.String signedTransactionData,
boolean withProof,
TransactionCallback callback)
node - the node rpc request send tosignedTransactionData - transaction stringwithProof - whether contains merkle proof or notcallback - the callback that will be called when receive the responseCall call(Transaction transaction)
transaction - transaction instanceCall call(java.lang.String node, Transaction transaction)
node - the node rpc request send totransaction - transaction instancevoid callAsync(Transaction transaction, RespCallback<Call> callback)
transaction - transaction instancecallback - the callback that will be called when receive the responsevoid callAsync(java.lang.String node,
Transaction transaction,
RespCallback<Call> callback)
node - the node rpc request send totransaction - transaction instancecallback - the callback that will be called when receive the responseBlockNumber getBlockNumber()
BlockNumber getBlockNumber(java.lang.String node)
node - the node rpc request send tovoid getBlockNumberAsync(RespCallback<BlockNumber> callback)
callback - the callback that will be called when receive the responsevoid getBlockNumberAsync(java.lang.String node,
RespCallback<BlockNumber> callback)
node - the node rpc request send tocallback - the callback that will be called when receive the responseCode getCode(java.lang.String address)
address - the address stringCode getCode(java.lang.String node, java.lang.String address)
node - the node rpc request send toaddress - the address stringvoid getCodeAsync(java.lang.String address,
RespCallback<Code> callback)
address - the address stringcallback - the callback that will be called when receive the responsevoid getCodeAsync(java.lang.String node,
java.lang.String address,
RespCallback<Code> callback)
node - the node rpc request send toaddress - the address stringcallback - the callback that will be called when receive the responseAbi getABI(java.lang.String address)
address - the address stringAbi getABI(java.lang.String node, java.lang.String address)
node - the node rpc request send toaddress - the address stringvoid getABIAsync(java.lang.String address,
RespCallback<Abi> callback)
address - the address stringcallback - the callback that will be called when receive the responsevoid getABIAsync(java.lang.String node,
java.lang.String address,
RespCallback<Abi> callback)
node - the node rpc request send toaddress - the address stringcallback - the callback that will be called when receive the responseTotalTransactionCount getTotalTransactionCount()
TotalTransactionCount getTotalTransactionCount(java.lang.String node)
node - the node rpc request send tovoid getTotalTransactionCountAsync(RespCallback<TotalTransactionCount> callback)
callback - the callback that will be called when receive the responsevoid getTotalTransactionCountAsync(java.lang.String node,
RespCallback<TotalTransactionCount> callback)
node - the node rpc request send tocallback - the callback that will be called when receive the responseBcosBlock getBlockByHash(java.lang.String blockHash, boolean onlyHeader, boolean onlyTxHash)
blockHash - the hashcode of the blockonlyHeader - if true then only return block headeronlyTxHash - the boolean define the tx is full or notBcosBlock getBlockByHash(java.lang.String node, java.lang.String blockHash, boolean onlyHeader, boolean onlyTxHash)
node - the node rpc request send toblockHash - the hashcode of the blockonlyHeader - if true then only return block headeronlyTxHash - the boolean define the tx is full or notvoid getBlockByHashAsync(java.lang.String blockHash,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
blockHash - the hashcode of the blockonlyHeader - if true then only return block headeronlyTxHash - the boolean define the tx is full or notcallback - the callback that will be called when receive the responsevoid getBlockByHashAsync(java.lang.String node,
java.lang.String blockHash,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
node - the node rpc request send toblockHash - the hashcode of the blockonlyHeader - if true then only return block headeronlyTxHash - the boolean define the tx is full or notcallback - the callback that will be called when receive the responseBcosBlock getBlockByNumber(java.math.BigInteger blockNumber, boolean onlyHeader, boolean onlyTxHash)
blockNumber - the number of the blockonlyHeader - the boolean define if only return headeronlyTxHash - the boolean define if only return tx hashBcosBlock getBlockByNumber(java.lang.String node, java.math.BigInteger blockNumber, boolean onlyHeader, boolean onlyTxHash)
node - the node rpc request send toblockNumber - the number of the blockonlyHeader - the boolean define if only return headeronlyTxHash - the boolean define if only return tx hashvoid getBlockByNumberAsync(java.math.BigInteger blockNumber,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
blockNumber - the number of the blockonlyHeader - the boolean if only need headeronlyTxHash - the boolean if you need all transactionscallback - the callback that will be called when receive the responsevoid getBlockByNumberAsync(java.lang.String node,
java.math.BigInteger blockNumber,
boolean onlyHeader,
boolean onlyTxHash,
RespCallback<BcosBlock> callback)
node - the node rpc request send toblockNumber - the number of the blockonlyHeader - the boolean if only need headeronlyTxHash - the boolean if you need all transactionscallback - the callback that will be called when receive the responseBlockHash getBlockHashByNumber(java.math.BigInteger blockNumber)
blockNumber - the number of the blockvoid getBlockHashByNumberAsync(java.math.BigInteger blockNumber,
RespCallback<BlockHash> callback)
blockNumber - the number of the blockcallback - the callback that will be called when receive the responseBlockHash getBlockHashByNumber(java.lang.String node, java.math.BigInteger blockNumber)
node - the node rpc request send toblockNumber - the number of the blockvoid getBlockHashByNumberAsync(java.lang.String node,
java.math.BigInteger blockNumber,
RespCallback<BlockHash> callback)
node - the node rpc request send toblockNumber - the number of the blockcallback - the callback that will be called when receive the responseBcosTransaction getTransaction(java.lang.String transactionHash, java.lang.Boolean withProof)
transactionHash - the hashcode of transactionwithProof - with the transaction proofBcosTransaction getTransaction(java.lang.String node, java.lang.String transactionHash, java.lang.Boolean withProof)
node - the node rpc request send totransactionHash - the hashcode of transactionwithProof - with the transaction proofvoid getTransactionAsync(java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransaction> callback)
transactionHash - the hashcode of transactionwithProof - with the transaction proofcallback - the callback that will be called when receive the responsevoid getTransactionAsync(java.lang.String node,
java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransaction> callback)
node - the node rpc request send totransactionHash - the hashcode of transactionwithProof - with the transaction proofcallback - the callback that will be called when receive the responseBcosTransactionReceipt getTransactionReceipt(java.lang.String transactionHash, java.lang.Boolean withProof)
transactionHash - the hashcode of transactionwithProof - with the transaction proofBcosTransactionReceipt getTransactionReceipt(java.lang.String node, java.lang.String transactionHash, java.lang.Boolean withProof)
node - the node rpc request send totransactionHash - the hashcode of transactionwithProof - with the transaction receipt proofvoid getTransactionReceiptAsync(java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransactionReceipt> callback)
transactionHash - the hashcode of transactionwithProof - with the transaction receipt proofcallback - the callback that will be called when receive the responsevoid getTransactionReceiptAsync(java.lang.String node,
java.lang.String transactionHash,
java.lang.Boolean withProof,
RespCallback<BcosTransactionReceipt> callback)
node - the node rpc request send totransactionHash - the hashcode of transactionwithProof - with the transaction receipt proofcallback - the callback that will be called when receive the responsePendingTxSize getPendingTxSize(java.lang.String node)
node - the node rpc request send tovoid getPendingTxSizeAsync(java.lang.String node,
RespCallback<PendingTxSize> callback)
node - the node rpc request send tocallback - the callback that will be called when receive the responsePendingTxSize getPendingTxSize()
void getPendingTxSizeAsync(RespCallback<PendingTxSize> callback)
callback - the callback that will be called when receive the responsejava.math.BigInteger getBlockLimit()
Peers getPeers()
GroupPeers getGroupPeers()
void getGroupPeersAsync(RespCallback<GroupPeers> callback)
void getPeersAsync(RespCallback<Peers> callback)
callback - the callback instanceObserverList getObserverList()
ObserverList getObserverList(java.lang.String node)
node - the node rpc request send tovoid getObserverList(RespCallback<ObserverList> callback)
callback - the callback instancevoid getObserverList(java.lang.String node,
RespCallback<ObserverList> callback)
node - the node rpc request send tocallback - the callback instanceSealerList getSealerList()
SealerList getSealerList(java.lang.String node)
node - the node rpc request send tovoid getSealerListAsync(RespCallback<SealerList> callback)
callback - the callback instancevoid getSealerListAsync(java.lang.String node,
RespCallback<SealerList> callback)
node - the node rpc request send tocallback - the callback instancePbftView getPbftView()
PbftView getPbftView(java.lang.String node)
node - the node rpc request send tovoid getPbftViewAsync(RespCallback<PbftView> callback)
callback - the callback instancevoid getPbftViewAsync(java.lang.String node,
RespCallback<PbftView> callback)
node - the node rpc request send tocallback - the callback instanceSystemConfig getSystemConfigByKey(java.lang.String key)
key - the string of keySystemConfig getSystemConfigByKey(java.lang.String node, java.lang.String key)
node - the node rpc request send tokey - the string of keyvoid getSystemConfigByKeyAsync(java.lang.String key,
RespCallback<SystemConfig> callback)
key - the string of keycallback - the callback instancevoid getSystemConfigByKeyAsync(java.lang.String node,
java.lang.String key,
RespCallback<SystemConfig> callback)
node - the node rpc request send tokey - the string of keycallback - the callback instanceSyncStatus getSyncStatus(java.lang.String node)
node - the node rpc request send tovoid getSyncStatusAsync(java.lang.String node,
RespCallback<SyncStatus> callback)
node - the node rpc request send tocallback - the callback instanceSyncStatus getSyncStatus()
void getSyncStatusAsync(RespCallback<SyncStatus> callback)
callback - the callback instancevoid getConsensusStatusAsync(java.lang.String node,
RespCallback<ConsensusStatus> callback)
node - the node rpc request send tocallback - the callbackvoid getConsensusStatusAsync(RespCallback<ConsensusStatus> callback)
callback - callback when get consensus statusConsensusStatus getConsensusStatus(java.lang.String node)
node - the node rpc request send toConsensusStatus getConsensusStatus()
BcosGroupList getGroupList()
void getGroupListAsync(RespCallback<BcosGroupList> callback)
BcosGroupInfo getGroupInfo()
void getGroupInfoAsync(RespCallback<BcosGroupInfo> callback)
BcosGroupInfoList getGroupInfoList()
void getGroupInfoListAsync(RespCallback<BcosGroupInfoList> callback)
BcosGroupNodeInfo getGroupNodeInfo(java.lang.String node)
node - the node rpc request send tovoid getGroupNodeInfoAsync(java.lang.String node,
RespCallback<BcosGroupNodeInfo> callback)
void start()
void stop()
void destroy()