The options for sending the user operation.
Request parameters for sending a user operation.
The EVM Smart Account to send the user operation with.
The network to send the user operation on.
The calls to make from the user operation.
Optional
useCdpPaymaster?: booleanWhether to use the CDP Paymaster for the user operation.
Optional
paymasterUrl?: stringThe URL of the paymaster to use for the user operation. Get your free Base paymaster URL from the CDP Portal.
Promise that resolves to the user operation hash.
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);
Sends a user operation from a smart account.