import { Interface } from '@ethersproject/abi'; import { ChainId } from '@uniswap/sdk-core'; export declare const PV4CL_PROTOCOL = "PV4CL"; /** * PancakeSwap Infinity Vault (accounting layer) addresses. * Same address on BNB and Base. */ export declare const PV4CL_VAULT_ADDRESSES: { [chainId: number]: string; }; /** * PancakeSwap Infinity CLPoolManager (singleton) addresses. * Same address on BNB and Base. */ export declare const PV4CL_POOL_MANAGER_ADDRESSES: { [chainId: number]: string; }; /** * PancakeSwap Infinity CLQuoter addresses (single-hop CL quotes). * Same address on BNB and Base. */ export declare const PV4CL_QUOTER_ADDRESSES: { [chainId: number]: string; }; /** * PancakeSwap Infinity MixedQuoter addresses (multi-pool-type quotes). * Same address on BNB and Base. */ export declare const PV4CL_MIXED_QUOTER_ADDRESSES: { [chainId: number]: string; }; /** Chains where PV4CL routing is enabled. */ export declare const PV4CL_SUPPORTED: ChainId[]; /** * Default PancakeSwap Infinity CL subgraph URLs per chain. * Override at runtime via `pv4clSubgraphUrls` in AlphaRouter constructor. * * NOTE: The Graph gateway URLs require an API key. * Replace [api-key] with your key, or use the subgraph ID directly. */ export declare const PV4CL_SUBGRAPH_URL_BY_CHAIN: { [chainId: number]: string; }; export declare const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; /** Dynamic fee flag used in PoolKey.fee when a hook controls the swap fee. */ export declare const DYNAMIC_FEE_FLAG = 8388608; /** * Static / router config row for PancakeSwap Infinity CL pool discovery. * * - **3-tuple** `[fee, tickSpacing, hooks]`: `parameters` bytes32 is derived via * {@link encodePoolParameters}(tickSpacing, hookPermissions), where hook permissions * come from `getHooksRegistrationBitmap()` on the hook (or a weak address fallback). * This is **not** the same as Uniswap v4 PoolKey encoding. * - **4-tuple** `[fee, tickSpacing, hooks, parameters]`: supply the on-chain PCS * Infinity `PoolKey.parameters` bytes32 explicitly (required when it does not match * the tickSpacing+bitmap layout, or to avoid quoter mismatches). */ export type PV4CLPoolParamSpec = readonly [number, number, string] | readonly [number, number, string, string]; /** * PancakeSwap Infinity CL hook addresses per chain. * Add new hook addresses here so the static provider generates candidate pools for them. */ export declare const PV4CL_HOOK_ADDRESSES: { [chainId: number]: string[]; }; /** * Extract hook permissions from a hook contract address. * In PCS Infinity the lower 16 bits of the hook address encode which * callbacks are enabled. The `parameters` bytes32 in the PoolKey must * carry the same value, otherwise the PoolKey won't match on-chain. */ export declare function getHookPermissions(hookAddress: string): number; /** * Default pool params for static discovery (no subgraph). * See {@link PV4CLPoolParamSpec}. */ export declare const PV4CL_DEFAULT_POOL_PARAMS: PV4CLPoolParamSpec[]; /** * Encode tickSpacing and hook permissions into PCS Infinity `parameters` bytes32. * * Layout (right-aligned): * - bits [0..15] : hook permissions (16 bits) * - bits [16..39] : tickSpacing (next 24 bits) * * For hookless pools, hookPermissions = 0. */ export declare function encodePoolParameters(tickSpacing: number, hookPermissions?: number): string; /** * Minimal ABI for PancakeSwap Infinity CLQuoter. * * PoolKey struct: * (address currency0, address currency1, address hooks, * address poolManager, uint24 fee, bytes32 parameters) * * QuoteExactSingleParams struct: * (PoolKey poolKey, bool zeroForOne, uint128 exactAmount, bytes hookData) * * PathKey struct: * (address intermediateCurrency, uint24 fee, address hooks, * address poolManager, bytes hookData, bytes32 parameters) * * QuoteExactParams struct: * (address exactCurrency, PathKey[] path, uint128 exactAmount) */ export declare const CL_QUOTER_IFACE: Interface; export declare const PV4CL_QUOTE_BATCH_SIZE = 300; export declare const PV4CL_MULTIHOP_BATCH_SIZE = 30; export declare const PV4CL_MAX_ROUTES = 80; /** * Compute the keccak256 pool ID from the 6-field PCS Infinity PoolKey. * * PoolKey layout: * (address currency0, address currency1, address hooks, * address poolManager, uint24 fee, bytes32 parameters) */ export declare function computePV4CLPoolId(currency0: string, currency1: string, hooks: string, poolManager: string, fee: number, parameters: string): string; /** * Minimal ABI for CLPoolManager on-chain verification (getSlot0, getLiquidity). */ export declare const CL_POOL_MANAGER_IFACE: Interface;