Skip to content

Add-ons and read APIs

The compounder's calls, held for now, and the read-only JSON hookr.fun serves.

On this page

The add-ons as examples

The add-ons are contracts built on revenue tokens from the outside, with no change to the token. Compound, held for now, shows how a contract holds revenue tokens, claims their income and hands it on.

Compound is held. Its vault holds deposits, claims their income and adds it to the token's own pool as liquidity. The compounder factory opens one vault per token (create(token), vaultOf(token)), and the compounder lens reads a vault's terms, pending fees and totals (terms, pendingFees, totals) and previews a deposit or a redemption (previewDeposit, previewRedeem). On the vault, poke() claims and places the income, and claimDrops(dropIds) claims the vault's drops. Read Compound.

Its vault claims from the token for its holders, which is the pattern any contract that holds revenue tokens follows.

Read APIs

hookr.fun serves read-only answers to its own pages, and to servers within a small budget of reads; a page on another site reads the chain instead, as Integrate revenue tokens explains. None of them scans logs, and a JSON read that failed says so with a reason instead of an empty list.

RouteWhat it answers
GET /api/revenue-tokensEvery revenue token the tokenizer made, as next, each with its address, index and creator.
GET /api/revenue-tokens/incomeEvery revenue token's income over the last seven days, from each token's own received books at day boundaries.
GET /api/revenue-tokens/<address>/doorsEvery Uniswap v4 and v3 position door of that token, with each door's terms and state.
GET /api/revenue-tokens/<address>/markThe token's mark as an SVG, for hookr.fun's own pages.
GET /api/revenue-tokens/<address>/mark.pngThe same mark as a 256 px PNG any site can load, and the token's logoURI in Hookr's token list.

The contracts themselves have the final word: the tokenizer, at the address on Contracts, lists every token with tokenCount(), tokenAt(i) and tokens(start, count), and every figure above can be read from it, its state view and the tokens directly.

Revenue tokens minted before 29 October 2026 are listed by the tokenizer that made them, and the first route's tokens field pages through them with ?before=<index>, as their own page says.