Alchemy Logo

sendTransactions

function sendTransactions<TTransport, TChain, TAccount, TContext>(
  client_,
  args,
): 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.

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

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends undefined | Chain

undefined | Chain

TAccount extends | undefined | SmartContractAccount

| undefined | SmartContractAccount

TContext extends any

UserOperationContext

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

Promise<`0x${string}`>

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

Was this page helpful?