import type { Address } from 'viem'; import type { PositionDefinition } from '../types'; /** * Price-range strategy → `PositionDefinition[]` (the LP positions the migrator opens). Offsets are * ticks relative to the final auction (clearing) tick. Validated end-to-end against testnet by * simulation; follows the CCA price model (currency-per-token in Q96). * * The raw offsets are computed in that currency-per-token frame. The v4 pool, however, expresses * price as currency1-per-currency0. When the raised `currency` sorts as `currency0` (`currency < * token`, always the case for native ETH), the pool price is the reciprocal of currency-per-token, * so a custom range must be mirrored onto the reciprocal band: negate and swap the tick offsets. * Full-range positions use the `(MIN_TICK, MAX_TICK)` sentinel and are mirror-invariant, so they are * left untouched. Callers must pass the ordering pair (`currency`, `token`) for this reason. */ export type PriceRangeKind = 'CONCENTRATED_FULL_RANGE' | 'FULL_RANGE' | 'CUSTOM_RANGE'; export interface CustomRangeInput { minPercentFromClearing: number; maxPercentFromClearing: number; liquidityPercent: number; } /** * Tick offset (from the clearing tick) for a percent change in price. * pct = 0 → 0; pct = +Inf sentinel → MAX_TICK; pct <= -100 → MIN_TICK. */ export declare function percentToTickOffset(pct: number): number; /** * Builds the LP `PositionDefinition[]` for a price-range strategy. * * `currency`/`token` (the raised currency and the launched token) determine v4 currency ordering. * When `currency` sorts as `currency0` the custom offsets are mirrored onto the reciprocal price * band (see the module header). Native ETH is `ZERO_ADDRESS`, which always sorts as `currency0`. * * Custom-range weights may sum to less than 100%. The returned definitions then cover only the * allocated share; the migrator opens an implicit full-range position for the rest. */ export declare function buildPositionDefinitions(strategy: PriceRangeKind, customRanges: CustomRangeInput[], tickSpacing: number, currency: Address, token: Address): PositionDefinition[];