---
title: "V4 Hook Permission Reconciler"
method: POST
path: "/v1/tools/reconcile_v4_hook_permissions"
tags: ["uniswap", "v4-core", "hooks", "permission-bits", "bitmap-decode", "callback-declaration", "hooklist", "dynamic-fee", "compliance-evidence", "mcp:reconcile_v4_hook_permissions"]
---

# V4 Hook Permission Reconciler

`POST /v1/tools/reconcile_v4_hook_permissions`

## Request

- Base URL: `https://ainumbers.co`
- URL: `https://ainumbers.co/v1/tools/reconcile_v4_hook_permissions`
- Auth: none declared

Decodes a Uniswap v4 hook address's 14 permission bits against a caller-declared callback set, replicates v4-core's isValidHookAddress rule (including the dynamic-fee escape), and reconciles a hooklist dynamicFee declaration with the pool fee.

**Tool URL:** https://ainumbers.co/chaingraph/art-708-v4-hook-permission-reconciler.html
**AP2/Policy Mandate export:** yes

## Request body

- object
  - `hook_address` string, required: 0x-prefixed 40-hex-digit Uniswap v4 hook address; checksum not required, normalised to lowercase. Its low 14 bits are the permission bitmap.
  - `declared_permissions` object, required: All 14 callback booleans, required, never defaulted; a missing key is refused. A Uniswap hooklist entry { hook, flags, properties } also accepted.
    - `beforeInitialize` boolean
    - `afterInitialize` boolean
    - `beforeAddLiquidity` boolean
    - `afterAddLiquidity` boolean
    - `beforeRemoveLiquidity` boolean
    - `afterRemoveLiquidity` boolean
    - `beforeSwap` boolean
    - `afterSwap` boolean
    - `beforeDonate` boolean
    - `afterDonate` boolean
    - `beforeSwapReturnDelta` boolean
    - `afterSwapReturnDelta` boolean
    - `afterAddLiquidityReturnDelta` boolean
    - `afterRemoveLiquidityReturnDelta` boolean
  - `pool_fee` integer: Optional uint24 pool fee; the fee is dynamic iff pool_fee & 0x800000 (8388608).
  - `declaration_source` string: Optional free text naming where the declaration comes from, e.g. a registry entry or notice item; emitted unchanged in the output.

## Response `200`

Successful tool execution result

- object
  - `hook_address` string
  - `decoded_bits` string
  - `flags` object[]
    - `flag` string
    - `bit` integer
    - `declared` boolean
    - `actual` boolean
    - `status` 'MATCH' | 'DECLARED_NOT_SET' | 'SET_NOT_DECLARED'
  - `mismatches` object[]
  - `mismatch_count` integer
  - `valid_hook_address` boolean, nullable
  - `failing_rule` string, nullable
  - `pool_fee` integer, nullable
  - `v4_core_commit` string
  - `declaration_source` string, nullable
  - `dynamic_fee_declaration` object, nullable
  - `assumptions` string[]
  - `error` string
  - `detail` string
  - `domain_errors` object[]
    - `code` string
    - `text` string

---

[API](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite.md) · [All operations](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/llms.txt) · [OpenAPI document](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/revisions/b462e4f5bb28?raw)
