SDK, router and quoter
Read about the two trusted integrations an interface calls into, what each one needs from it, and the approvals behind them.
The npm package
hookr-sdk 1.6.1 is the TypeScript package for building on Hookr from any app, launcher or agent. It runs on viem, holds no wallet and signs nothing.
npm install hookr-sdk viem| What it gives you | Exports |
|---|---|
| The addresses, deployment and chain for viem | HOOKR_1, RELEASES, CHAIN_ID, ROBINHOOD_CHAIN, releaseAddress |
| The release manifest every builder takes, read from the chain | readReleaseManifest, releaseManifest |
A token launch with Hook Blocks, or pools for an existing token, each with arb recapture unless its member names RECAPTURE_OFF | buildLaunch, buildLaunchAdvised, buildLaunchFamily, RECAPTURE_OFF |
| Quotes through HookrQuoter and swaps through HookrRouter | buildQuote, buildSwap, poolId |
| The approvals a swap or a launch needs | swapAllowance, launchFunding, buildApprovals |
| The gas floor a swap on a pool with arb recapture needs | laneGasFloor |
| King of the Pool: a pool's round | readKingOfThePool |
| Hookr on Monad: the release, the chain for viem, the contracts' clock and the gas a send carries | HOOKR_1_MONAD, MONAD_CHAIN, releaseOn, readContractClock, sendGasLimit |
| Hookr on Arbitrum: the release, the chain for viem and the core a new pool binds | HOOKR_1_ARBITRUM, ARBITRUM_CHAIN, rulesModule |
| Limit orders on Robinhood Chain: place, cancel and fill an order, and claim its tip | buildCreateOrder, buildCancelOrder, buildFillOrder, buildClaimBounty, readLimitOrder |
| Revenue tokens on Robinhood Chain: a token's reads and its holders' claim and sync calls | readRevenueToken, buildRevenueClaimAll, buildRevenueSync |
Each builder returns the chain id, the contract, the call data and the value; your wallet sends it.
This page covers what hookr-sdk wraps.
Router and quoter
A Hookr pool is an ordinary Uniswap v4 pool on HookrRoot, so it trades through the Universal Router or through Hookr's own router, HookrRouter. HookrQuoter quotes it either way. Their addresses, and every other address, render below from the release book the app ships; none is typed into this page.
Hookr’s core and own-hook contracts
HookrRoot is the hook every Hookr pool names, and each pool records the Rules it opens with. The core, HookrRules, carries every Hook Block in one Rules contract, with six parts pinned by code hash and a key for each block HookrRoot admits.
HookrOwnedRootFactoryV2 deploys a hook of your own with its own lane, and the two swap modules are admitted under the combined core, HookrRules 0x8AD0…e52e. Each is verified on chain; the table below lists these contracts.
Hookr’s contracts
The table lists Hookr’s 34 core contracts, rendered from the release book the app ships, source commit 412960b37a631ce145d49fb4a1887f04a4d1fa74: HookrRoot, the hook every Hookr pool names, first, then the contracts a swap passes through, then the rest in the order they were deployed.
Each one’s source is verified on RobinScan, on Sourcify as an exact match and on Blockscout as a full match. The arb recapture table below repeats HookrLane and adds What The Hook’s executor. None of the contracts they add is in the release book.
Arb recapture
The registry opened the lane on HookrRoot on 2026-10-07. The executor is What The Hook’s contract, not Hookr’s.
| Contract | Address |
|---|---|
| HookrLane, the arb recapture lane on HookrRoot | 0x9A8a1006469BA196f8FEfc017a53505C83A060BB |
| What The Hook's arb recapture executor, 25% of each arb recapture's profit | 0x4B4c16681401454140a9dBca55e5c186BBE8D728 |
hookr-sdk carries the ABIs with the addresses.
Approvals
The two paths do not share an approval model, and mixing them up is the most common integration failure.
| Path | Native input | ERC-20 input |
|---|---|---|
HookrRouter | msg.value equal to the input | a plain ERC-20 approve to the router, which swapAllowance returns |
| Universal Router | msg.value equal to the input | approve the token to Permit2, then approve the Universal Router as a Permit2 spender with an amount and an expiry |
PositionManager mint | msg.value up to amount0Max | approve the token to Permit2, then approve PositionManager as a Permit2 spender |
A plain ERC-20 approval to the Universal Router or to PositionManager is not read, and the swap or mint fails to settle. A direct HookrRouter swap is the opposite: it pulls with transferFrom and does not read Permit2. Only a gasless swap, which the payer signs and a relayer sends, pulls through Permit2 (permit2Allowance).
Quoting
Swapping and quoting covers both: the V4Quoter-shaped functions for the Universal Router, and quote for HookrRouter, which buildQuote builds.
On a pool with arb recapture on, a swap must also carry the lane's gas floor plus its own gas: laneGasFloor in the SDK, or gasFloor from laneOf(id) on the root. eth_estimateGas includes the floor. Send the estimate plus a sixth.
Reading a Pool
A pool's Hook Blocks are frozen at launch, so one read at any block is correct for the life of the pool. Read the release first with readReleaseManifest(client, HOOKR_1), which refuses any contract whose code is not the code the release deployed, then read the pool against it.
Do not reconstruct a configuration from events.
Before You Ship
- Check that the pool's
hooksisHookrRoot.buildSwapandbuildQuoterefuse any other. - Give every swap an amount bound, a price bound and a deadline within the next hour; the builders refuse a swap without them.
- Quote the path you route: the
V4Quoter-shaped functions for the Universal Router,quoteforHookrRouter. - Check the wallet's chain, the payer, the token approvals and the slippage yourself.
- Put the lane's gas floor on a swap against a pool with arb recapture on.