getUserOperationHash

Generates the hash of the User Operation as calculated by the EntryPoint (opens in a new tab).

Import

import { getUserOperationHash } from "permissionless"

Usage

import { getUserOperationHash } from "permissionless"
 
const userOperationHash = getUserOperationHash({
    userOperation: ...,
    chainId: 5,
    entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
})
// "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.