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
example.ts
import { client } from "./client";
const { hash } = await client.sendUserOperation({
uo: {
target: "0xTARGET_ADDRESS",
data: "0x",
value: 0n,
},
});
Batch User Operations
To batch user operations, you can just pass an array of user operations to the sendUserOperation
method.
example.ts
import { client } from "./client";
const { hash } = await client.sendUserOperation({
uo: [
{
target: "0xTARGET_ADDRESS",
data: "0x",
value: 0n,
},
{
target: "0xTARGET_ADDRESS_2",
data: "0x",
value: 0n,
},
],
});