Send User Operations

Once you’ve completed the Quickstart, you’re ready to start sending user operations!

User operations can be sent either as single user operations or as a batch of user operations. In this guide, we’ll cover both methods.

Single User Operation

1import { client } from "./client";
2
3const { hash } = await client.sendUserOperation({
4 uo: {
5 target: "0xTARGET_ADDRESS",
6 data: "0x",
7 value: 0n,
8 },
9});

Batch User Operations

To batch user operations, you can just pass an array of user operations to the sendUserOperation method.

1import { client } from "./client";
2
3const { hash } = await client.sendUserOperation({
4 uo: [
5 {
6 target: "0xTARGET_ADDRESS",
7 data: "0x",
8 value: 0n,
9 },
10 {
11 target: "0xTARGET_ADDRESS_2",
12 data: "0x",
13 value: 0n,
14 },
15 ],
16});