Skip to main content
function sendUserOperation(options: SendUserOperationOptions): Promise<SendUserOperationResult>;
Sends a user operation from a smart account.

Parameters

ParameterTypeDescription
optionsSendUserOperationOptionsThe options for sending the user operation.

Returns

Promise<SendUserOperationResult> Promise that resolves to the user operation hash.

Example

const user = await getCurrentUser();
const smartAccount = user?.evmSmartAccounts[0];

const result = await sendUserOperation({
  evmSmartAccount: smartAccount,
  network: "base-sepolia",
  calls: [{
    to: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    value: 0n,
    data: "0x",
  }],
});
console.log("User Operation Hash:", result.userOperationHash);