function sendUserOperation<
TTransport,
TChain,
TAccount,
TContext,
TEntryPointVersion,
>(client_, args): Promise<SendUserOperationResult<TEntryPointVersion>>;Defined in: aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts:39
Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline.
import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";
const account = await toSmartContractAccount(...);
const result = await createSmartAccountClient(...).sendUserOperation({
uo: {
target: "0x...",
data: "0x...", // or "0x",
value: 0n, // optional
}
});| Type Parameter | Default type |
|---|---|
| |
|
|
| | |
| | |
|
|
| Parameter | Type | Description |
|---|---|---|
|
| the smart account client to use for RPC requests |
|
| contains the UO or batch to send, context, overrides, and account if not hoisted on the client |
Promise<SendUserOperationResult<TEntryPointVersion>>
a Promise containing the result of the user operation