signAndExecuteTransactionBlock method
Future<SuiTransactionBlockResponse>
signAndExecuteTransactionBlock(
- SuiAccount signer,
- Transaction transaction, {
- BuildOptions? options,
- SuiTransactionBlockResponseOptions? responseOptions,
- @Deprecated('requestType will be ignored by JSON RPC in the future') ExecuteTransaction requestType = ExecuteTransaction.WaitForEffectsCert,
Implementation
Future<SuiTransactionBlockResponse> signAndExecuteTransactionBlock(
SuiAccount signer,
Transaction transaction,
{
BuildOptions? options,
SuiTransactionBlockResponseOptions? responseOptions,
@Deprecated('requestType will be ignored by JSON RPC in the future')
ExecuteTransaction requestType = ExecuteTransaction.WaitForEffectsCert
}
) async {
options ??= BuildOptions(client: this);
options.client ??= this;
transaction.setSenderIfNotSet(signer.getAddress());
final transactionBytes = await transaction.build(options);
final signWithBytes = signer.keyPair.signTransactionBlock(transactionBytes);
return await executeTransactionBlock(
signWithBytes.bytes,
[signWithBytes.signature],
options: responseOptions,
requestType: requestType
);
}