executeTransaction method
Future<SuiExecuteTransactionResponse>
executeTransaction({
- required Uint8List txnBytes,
- required SignatureScheme signatureScheme,
- required Uint8List signature,
- required PublicKey pubkey,
- SuiTransactionBlockResponseOptions? options,
- @Deprecated('requestType will be ignored by JSON RPC in the future') ExecuteTransaction requestType = ExecuteTransaction.WaitForEffectsCert,
Implementation
Future<SuiExecuteTransactionResponse> executeTransaction({
required Uint8List txnBytes,
required SignatureScheme signatureScheme,
required Uint8List signature,
required PublicKey pubkey,
SuiTransactionBlockResponseOptions? options,
@Deprecated('requestType will be ignored by JSON RPC in the future')
ExecuteTransaction requestType = ExecuteTransaction.WaitForEffectsCert,
}) async {
final serializedSig = <int>[];
serializedSig.add(SIGNATURE_SCHEME_TO_FLAG.schemeToFlag(signatureScheme));
serializedSig.addAll(signature);
serializedSig.addAll(pubkey.toRawBytes());
final result = await executeTransactionBlock(
base64Encode(txnBytes),
[base64Encode(serializedSig)],
options: options ?? SuiTransactionBlockResponseOptions(
showInput: true,
showEffects: true,
showEvents: true,
showObjectChanges: true,
showBalanceChanges: true,
),
requestType: requestType,
);
return result;
}