<VersionWarning version="0.1" />

# getUserOperationHash

Generates the hash of the User Operation [as calculated by the EntryPoint](https://github.com/eth-infinitism/account-abstraction/blob/465f22310fcc639964e6ab5f8aa648770c6d8981/contracts/core/EntryPoint.sol#L296-L302).

## Import

```ts
import { getUserOperationHash } from "permissionless"
```

## Usage

```ts
import { getUserOperationHash, ENTRYPOINT_ADDRESS_V07 } from "permissionless"

const userOperationHash = getUserOperationHash({
    userOperation: ...,
    chainId: 5,
    entryPoint: ENTRYPOINT_ADDRESS_V07
})
// "0xf0d56baa398828898360589d5ef75b24b12be0829ef1e1037013d1b6d9dda1f2"
```

## Returns

`Hash`

The hash of the User Operation

## Parameters

### userOperation

* **Type:** `UserOperation`

The User Operation to hash.

### chainId

* **Type:** `number`

The chain ID of the chain on which the User Operation is being executed.

### entryPoint

* **Type:** `Address`

The entry point address.
