public class TransactionProcessor extends java.lang.Object implements TransactionProcessorInterface
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.lang.String |
chainId |
protected Client |
client |
protected CryptoKeyPair |
cryptoKeyPair |
protected CryptoSuite |
cryptoSuite |
protected java.lang.String |
groupId |
protected static org.slf4j.Logger |
log |
protected TransactionBuilderInterface |
transactionBuilder |
protected TransactionEncoderInterface |
transactionEncoder |
| 构造器和说明 |
|---|
TransactionProcessor(Client client,
CryptoKeyPair cryptoKeyPair,
java.lang.String groupId,
java.lang.String chainId) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
createSignedTransaction(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
create signed transaction
|
Call |
executeCall(CallRequest callRequest)
send call to fisco bcos node and receive call response.
|
Call |
executeCall(java.lang.String from,
java.lang.String to,
byte[] encodedFunction)
send encoded function call to fisco bcos node and receive call response.
|
TransactionReceipt |
sendTransactionAndGetReceipt(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
send transaction to fisco bcos node and get transaction receipt.
|
void |
sendTransactionAsync(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
TransactionCallback callback)
send transaction to fisco bcos node and get transaction receipt asynchronously.
|
protected static org.slf4j.Logger log
protected final CryptoSuite cryptoSuite
protected final CryptoKeyPair cryptoKeyPair
protected final Client client
protected final java.lang.String groupId
protected final java.lang.String chainId
protected final TransactionBuilderInterface transactionBuilder
protected TransactionEncoderInterface transactionEncoder
public TransactionProcessor(Client client, CryptoKeyPair cryptoKeyPair, java.lang.String groupId, java.lang.String chainId)
public TransactionReceipt sendTransactionAndGetReceipt(java.lang.String to, byte[] data, CryptoKeyPair cryptoKeyPair, int txAttribute)
TransactionProcessorInterfacesendTransactionAndGetReceipt 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key pairpublic void sendTransactionAsync(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
TransactionCallback callback)
TransactionProcessorInterfacesendTransactionAsync 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key paircallback - define hook functionpublic Call executeCall(CallRequest callRequest)
TransactionProcessorInterfaceexecuteCall 在接口中 TransactionProcessorInterfacecallRequest - signed transaction stringpublic Call executeCall(java.lang.String from, java.lang.String to, byte[] encodedFunction)
TransactionProcessorInterfaceexecuteCall 在接口中 TransactionProcessorInterfacefrom - outer account address of senderto - target contract addressencodedFunction - signed transaction stringpublic java.lang.String createSignedTransaction(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
TransactionProcessorInterfacecreateSignedTransaction 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key pair