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 OperationblockNumber
: Block number where the User Operation was includedentryPoint
: Address of the EntryPoint contract usedtransactionHash
: Hash of the transaction that included the User OperationuserOperation
: 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'
})