<VersionWarning version="0.1" />

# sendUserOperation

Submits a user operation to the bundler.

## Usage

:::code-group
```ts [example.ts]
import { bundlerClient } from "./client"

const userOpHash = await bundlerClient.sendUserOperation({
    userOperation: {
        sender: "0x6152348912fb1e78c9037D83f9d4524D4a2988Ed",
        nonce: "0x8104e3ad430ea6d354d013a6789fdfc71e671c4300000000000000000000",
        factory: "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
        factoryData:
            "0xc5265d5d0000000000000000000000006723b44abeec4e71ebe3232bd5b455805badd22f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e412af322c018104e3ad430ea6d354d013a6789fdfc71e671c4300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000014ec787ae5c34157ce61e751e54dff3612d4117663000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        callData:
            "0xe9ae5c530100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000594bc666500faed35dc741f45a35c571399560d80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e4e688a440000000000000000000000000c67e4838d4e6682e3a5f9ec27f133e76cb3855f30000000000000000000000006152348912fb1e78c9037d83f9d4524d4a2988ed00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041aebdfb90adba067d9304980a300636506c3c9081b01f64b04f108407a890602377625ef9096946cc028743123646881c7e31a1c8d6698132c188cb4c33a3f9151b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        maxFeePerGas: 99985502n,
        maxPriorityFeePerGas: 1221000n,
        preVerificationGas: 66875n,
        verificationGasLimit: 373705n,
        callGasLimit: 170447n,
        paymaster: "0x9d0021A869f1Ed3a661Ffe8C9B41Ec6244261d98",
        paymasterData:
            "0x000000000000000000000000000000000000000000000000000000006638ab470000000000000000000000000000000000000000000000000000000000000000e9311d1945317dc6a1c750e8e6d0641a598beb59edc5652ed3807ca57338a7a107123e1a479386b2c91f242d2dff367c18e0ad9d1021acfe47afc890e252644e1c",
        paymasterVerificationGasLimit: 20274n
        paymasterPostOpGasLimit: 1n,
        signature:
            "0xa58d445f26b126fcd644975f0c66bd45f3e6e5b9c1acec2eeee490aa9341cfc312988231c228f84e12eac2d90ed9cd8825546d70d73b2e0fabdd6c8089ab29581b",
    },
    entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032"
})
```

```ts [client.ts]
import { createClient, http } from 'viem'
import { sepolia } from 'viem/chains'
import { bundlerActions } from 'permissionless'

export const bundlerClient = createClient({ 
  chain: sepolia,
  transport: http("https://api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_API_KEY_HERE")
}).extend(bundlerActions)
```
:::

## Returns

* **Type:** `Hash`

The user operation hash.

## Parameters

### userOperation

* **Type:** `UserOperation`

The full user operation object.

### entryPoint

* **Type:** `Address`

The address of the entry point contract.

## JSON-RPC Method

[`eth_sendUserOperation`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace)
