Skip to content

getUserOperation

Retrieves information about a User Operation given a hash.

Usage

example.ts
import { nexusClient } from "./nexusClient"
 
// Get user operation details
const userOp = await nexusClient.getUserOperation({
  hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d'
})

Returns

{
  blockHash: Hash,
  blockNumber: bigint,
  entryPoint: Address,
  transactionHash: Hash,
  userOperation: UserOperation
}

Returns an object containing:

  • blockHash: Hash of the block containing the User Operation
  • blockNumber: Block number where the User Operation was included
  • entryPoint: Address of the EntryPoint contract used
  • transactionHash: Hash of the transaction that included the User Operation
  • userOperation: The full User Operation details

Parameters

hash

  • Type: '0x${string}'
  • Required: Yes

The User Operation hash to query.

const result = await nexusClient.getUserOperation({
  hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d'
})

Related Methods