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 TransactionEncoderInterface |
transactionEncoder |
| 构造器和说明 |
|---|
TransactionProcessor(Client client,
CryptoKeyPair cryptoKeyPair,
java.lang.String groupId,
java.lang.String chainId) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
asyncExecuteCall(CallRequest callRequest,
RespCallback<Call> callback) |
void |
asyncExecuteCall(java.lang.String from,
java.lang.String to,
byte[] encodedFunction,
RespCallback<Call> callback) |
void |
asyncExecuteCallWithSign(java.lang.String from,
java.lang.String to,
byte[] encodedFunction,
RespCallback<Call> callback) |
org.fisco.bcos.sdk.jni.utilities.tx.TxPair |
createDeploySignedTransaction(java.lang.String to,
byte[] data,
java.lang.String abi,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
create deploy signed transaction
|
org.fisco.bcos.sdk.jni.utilities.tx.TxPair |
createDeploySignedTransaction(java.lang.String to,
byte[] data,
java.lang.String abi,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
java.lang.String extraData)
create deploy signed transaction
|
org.fisco.bcos.sdk.jni.utilities.tx.TxPair |
createSignedTransaction(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
create signed transaction
|
org.fisco.bcos.sdk.jni.utilities.tx.TxPair |
createSignedTransaction(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
java.lang.String extraData)
create signed transaction
|
TransactionReceipt |
deployAndGetReceipt(java.lang.String to,
byte[] data,
java.lang.String abi,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
send deploy transaction to fisco bcos node and get transaction receipt.
|
TransactionReceipt |
deployAndGetReceipt(java.lang.String to,
byte[] data,
java.lang.String abi,
int txAttribute)
send deploy transaction to fisco bcos node and get transaction receipt. this method use
default keyPair
|
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.
|
Call |
executeCallWithSign(java.lang.String from,
java.lang.String to,
byte[] encodedFunction)
send encoded function call to fisco bcos node and receive call response, which contains sign
of to and data
|
Call |
executeCallWithSign(java.lang.String from,
java.lang.String to,
byte[] encodedFunction,
java.lang.String sign) |
CryptoKeyPair |
getCryptoKeyPair() |
TransactionReceipt |
sendTransactionAndGetReceipt(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
send transaction to fisco bcos node and get transaction receipt.
|
TransactionReceipt |
sendTransactionAndGetReceipt(java.lang.String to,
byte[] data,
int txAttribute)
send transaction to fisco bcos node and get transaction receipt. this method use default
keyPair
|
java.lang.String |
sendTransactionAsync(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
TransactionCallback callback)
send transaction to fisco bcos node and get transaction receipt asynchronously.
|
java.lang.String |
sendTransactionAsync(java.lang.String to,
byte[] data,
int txAttribute,
TransactionCallback callback)
send transaction to fisco bcos node and get transaction receipt asynchronously. this method
use default keyPair
|
void |
setCryptoKeyPair(CryptoKeyPair cryptoKeyPair) |
protected static org.slf4j.Logger log
protected final CryptoSuite cryptoSuite
protected final Client client
protected final java.lang.String groupId
protected final java.lang.String chainId
protected TransactionEncoderInterface transactionEncoder
protected CryptoKeyPair cryptoKeyPair
public TransactionProcessor(Client client, CryptoKeyPair cryptoKeyPair, java.lang.String groupId, java.lang.String chainId)
public CryptoKeyPair getCryptoKeyPair()
public void setCryptoKeyPair(CryptoKeyPair cryptoKeyPair)
public TransactionReceipt deployAndGetReceipt(java.lang.String to, byte[] data, java.lang.String abi, CryptoKeyPair cryptoKeyPair, int txAttribute)
TransactionProcessorInterfacedeployAndGetReceipt 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction dataabi - ABI json string, deploy into chain with code, can be empty stringcryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttributepublic TransactionReceipt deployAndGetReceipt(java.lang.String to, byte[] data, java.lang.String abi, int txAttribute) throws org.fisco.bcos.sdk.jni.common.JniException
TransactionProcessorInterfacedeployAndGetReceipt 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction dataabi - ABI json string, deploy into chain with code, can be empty stringtxAttribute - transaction attribute, see more in TransactionAttributeorg.fisco.bcos.sdk.jni.common.JniException - throw when jni encode transaction errorpublic TransactionReceipt sendTransactionAndGetReceipt(java.lang.String to, byte[] data, CryptoKeyPair cryptoKeyPair, int txAttribute)
TransactionProcessorInterfacesendTransactionAndGetReceipt 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttributepublic TransactionReceipt sendTransactionAndGetReceipt(java.lang.String to, byte[] data, int txAttribute)
TransactionProcessorInterfacesendTransactionAndGetReceipt 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datatxAttribute - transaction attribute, see more in TransactionAttributepublic java.lang.String sendTransactionAsync(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
TransactionCallback callback)
TransactionProcessorInterfacesendTransactionAsync 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttributecallback - define hook functionpublic java.lang.String sendTransactionAsync(java.lang.String to,
byte[] data,
int txAttribute,
TransactionCallback callback)
TransactionProcessorInterfacesendTransactionAsync 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datatxAttribute - transaction attribute, see more in TransactionAttributecallback - 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 Call executeCallWithSign(java.lang.String from, java.lang.String to, byte[] encodedFunction)
TransactionProcessorInterfaceexecuteCallWithSign 在接口中 TransactionProcessorInterfacefrom - outer account address of senderto - target contract addressencodedFunction - signed transaction stringpublic Call executeCallWithSign(java.lang.String from, java.lang.String to, byte[] encodedFunction, java.lang.String sign)
public void asyncExecuteCall(java.lang.String from,
java.lang.String to,
byte[] encodedFunction,
RespCallback<Call> callback)
public void asyncExecuteCall(CallRequest callRequest, RespCallback<Call> callback)
public void asyncExecuteCallWithSign(java.lang.String from,
java.lang.String to,
byte[] encodedFunction,
RespCallback<Call> callback)
public org.fisco.bcos.sdk.jni.utilities.tx.TxPair createDeploySignedTransaction(java.lang.String to,
byte[] data,
java.lang.String abi,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
TransactionProcessorInterfacecreateDeploySignedTransaction 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction dataabi - ABIcryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttributepublic org.fisco.bcos.sdk.jni.utilities.tx.TxPair createSignedTransaction(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute)
TransactionProcessorInterfacecreateSignedTransaction 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttributepublic org.fisco.bcos.sdk.jni.utilities.tx.TxPair createDeploySignedTransaction(java.lang.String to,
byte[] data,
java.lang.String abi,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
java.lang.String extraData)
TransactionProcessorInterfacecreateDeploySignedTransaction 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction dataabi - ABIcryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttributepublic org.fisco.bcos.sdk.jni.utilities.tx.TxPair createSignedTransaction(java.lang.String to,
byte[] data,
CryptoKeyPair cryptoKeyPair,
int txAttribute,
java.lang.String extraData)
TransactionProcessorInterfacecreateSignedTransaction 在接口中 TransactionProcessorInterfaceto - target contract addressdata - ABI encoded transaction datacryptoKeyPair - key pairtxAttribute - transaction attribute, see more in TransactionAttribute