# CLAUS routing 0.3.23 Use the fixed-pool entry when the user explicitly chooses the CLAUS main pool. Use the existing market entry when comparing pools. The market selector can choose an independent pool; it does not force main-pool routing. ## Quote the main pool through HTTP No account, API key, wallet connection or signature is required to read a quote. Buy inputs are ETH; sell inputs are CLAUS. Both use 18 decimals. ```sh curl 'https://claus.si/api/swap?side=buy&amount=0.1' curl 'https://claus.si/api/swap?side=sell&amount=10000' ``` The public endpoint supports browser GET requests with `Access-Control-Allow-Origin: *`; omit credentials. Its machine-readable description is https://claus.si/routing/quote-api.json. The response includes `chainId`, `poolId`, `blockNumber`, `blockHash`, `amountIn`, `amountOut`, `minimumOutput`, `quotedAt` and `expiresAt`. Integer amounts are decimal strings in base units. HTTP `quotedAt` and `expiresAt` are milliseconds. Slippage defaults to 50 basis points; `slippage=10` through `slippage=300` are accepted. This always quotes the fixed main pool. It is not a claim of the best market-wide price. Pool and hook fees are reflected in the returned output; do not deduct them again. Gas is additional and paid in ETH. ## Prepare a wallet step Add `account=&prepare=1` to the same request. Read the returned `status` before displaying any wallet action: - `approve_token`: the returned transaction approves the exact input amount to Permit2. - `approve_permit2`: it grants the exact amount and limited expiry to the fixed Universal Router. - `ready`: the returned transaction is the swap. - `insufficient_balance` or `insufficient_gas`: stop; no wallet action is ready. Preparation only reads and simulates. The endpoint never signs, broadcasts, holds funds, or connects a wallet. `prepare=1` requires an account. A normal quote without preparation does not contain a transaction. Check the chain, exact executing account, input, side, fixed pool ID and current quote before using the result. API transaction integers are decimal strings; wallet JSON-RPC quantity fields must be encoded as hex. Simulate the exact transaction through the connected wallet, then request its explicit confirmation. Record the resulting hash and reconcile its receipt before preparing the next step. Never automatically repeat an uncertain send. Refresh after each confirmed approval, preserve the user's original minimum output, and do not silently accept a worse return. Results go to the executing caller. Website integration: https://claus.si/Swap. Token transfers are unrestricted. Other venues remain free to select different pools. ## Quote the main pool through your own RPC Requires Node 24 or newer. Install the pinned dependency with `npm ci`, then set `ETHEREUM_RPC_URL` to your Ethereum endpoint. ```sh node main-pool-cli.mjs buy 0.1 node main-pool-cli.mjs sell 10000 ``` ```js import { createPublicClient, http, parseUnits } from 'viem'; import { quoteMainPool } from './main-pool.mjs'; const client = createPublicClient({ transport: http(process.env.ETHEREUM_RPC_URL, { batch: { wait: 0 } }) }); const quote = await quoteMainPool(client, { direction: 'sell', amountIn: parseUnits('10000', 18) }); ``` This entry skips pool discovery and cache scans. It verifies the reviewed token and hook code, quotes only the fixed pool, and checks block freshness/canonicality. It prepares no wallet transaction. Module results use bigint; `expiresAt` here is Unix seconds, unlike the HTTP response. `quoterGas` covers the quoter call, not a full transaction; never use it as the transaction gas limit or as a whole-route gas cost. ## Existing market and Relay entries `market-cli.mjs` discovers supported v4 pools and compares buy outputs. `quoteMarketBuys` plus `prepareNativeMarketBuy` or `prepareRelayMarketBuy` can compare full-entry gas costs for a funded executor. Read the returned coverage, exclusions and unavailable routes. The market scan supports ETH and USDC buys; it is not the new fixed-pool sell entry. The packaged Relay builder targets the legacy approval proxy recorded in `market-prepare.mjs`. It is not a generic replacement for Relay Quote API steps or their permit signatures. When consuming Relay Quote API transactions, preserve its current target, approval and signature steps. Direct main-pool HTTP and RPC quotes do not require a Relay proxy. Platform adoption and Uniswap routing allowlisting are separate from publication of this package. ## Contract identity Ethereum chain 1 Token: 0x1b54e762aa34cf6e28e9c082f2848e28e45da6b8 Hook proxy: 0x37bfb8ac7c960e558657871d41ca70e07e7dbfff Main pool: 0xfaa42866f7667e3a1a10d783f3b629171febd45f056336b8df766d74afc0f0f7 Universal Router: 0x23617e59a5925b2a4bf75d73ff6711cd0b29de85 Permit2: 0x000000000022d473030f116ddee9f6b43ac78ba3 This release retains the reviewed implementation pins from 0.3.22. The timed buyback wrapper remains 0xa62f9b597225779b430024398b70374e8468ce14, runtime hash 0x0135248dad9b583303bf5803c27523bc88fa012dd8823309c216423ca786dd89. Its timed interval ends on 15 October 2026 at 12:19:59 UTC and then delegates ordinary processing automatically. No new activation is needed. Trading fees, reward allocations and open transfers are unchanged by this routing-only release. Fetch https://claus.si/routing/index.json for the currently published archive and digest. Protected core compatibility (0.3.24) This release recognizes the exact source-verified protected token and hook implementations, alongside the previous implementations during transition. Unknown implementations and mismatched runtime code still fail closed. The pool, wallet transaction construction and quote freshness rules are unchanged. Check the current onchain proxy implementations; a source deployment alone does not activate the protection.