sendTransactions

1function sendTransactions<TTransport, TChain, TAccount, TContext>(
2 client_,
3 args,
4): Promise<`0x${string}`>;

Defined in: aa-sdk/core/src/actions/smartAccount/sendTransactions.ts:36

Sends transactions using the provided client and transaction parameters. This function builds user operations from the transactions, sends them, and waits for the transaction to be mined.

Example

1import { createSmartAccountClient } from "@aa-sdk/core";
2
3// smart account client is already extended with sendTransactions
4const client = createSmartAccountClient(...);
5const result = await client.sendTransactions({
6 requests: [{
7 to: "0x...",
8 data: "0x...", // or "0x",
9 value: 0n, // optional
10 }],
11 account, // only required if the client above is not connected to an account
12});

Type Parameters

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends undefined | Chain

undefined | Chain

TAccount extends | undefined | SmartContractAccount

| undefined | SmartContractAccount

TContext extends any

UserOperationContext

Parameters

ParameterTypeDescription

client_

Client<TTransport, TChain, TAccount>

The client used to send the transactions

args

SendTransactionsParameters<TAccount, TContext>

The parameters for sending the transactions, including requests, overrides, account, and context

Returns

Promise<`0x${string}`>

A promise that resolves to the transaction hash of the sent transactions