import { ChainConfigEntry, SupportedChain } from './types'; /** * Strategy ↔ deployment resolution. A lending strategy is not tied to one * deployment: Tax Pay runs as one pool on Base (USDC) and another on XDC * (AUDD), and the two share one CMS record keyed by the BASE pool id — the * canonical id. Each chain config's `poolMetadataMapping` maps its * chain-local ids to canonical ones; Base, being canonical, has none. * * Pure: it reads only the built-in `CHAIN_CONFIGS`. The same rules as * kasu-ui's counterpart lookup, so both apps sum a strategy over the same * pools. */ /** The pool that represents a strategy on one deployment. */ export interface StrategyDeployment { chain: SupportedChain; /** * Chain-local pool id, lowercase — what that chain's subgraph is keyed * by. */ poolId: string; } /** * What `strategyDeployments` refuses, as a code: * * - `pool-id` — not a `0x` address; * - `chain` — not a `SupportedChain`; * - `wrong-chain` — the mapping places the id on ANOTHER deployment (an XDC * chain-local id passed as Base, or a Base id passed as XDC). Querying one * chain with another's address reads nothing, silently. */ export type StrategyDeploymentInputErrorCode = 'pool-id' | 'chain' | 'wrong-chain'; /** What `strategyDeployments` throws for an id it cannot place. */ export declare class StrategyDeploymentInputError extends Error { readonly code: StrategyDeploymentInputErrorCode; constructor(code: StrategyDeploymentInputErrorCode); } type MappingConfigs = Readonly>>; /** * `strategyDeployments` over any configs — the export reads `CHAIN_CONFIGS`; * the spec passes its own to cover shapes the built-in mapping lacks. */ export declare function resolveStrategyDeployments(configs: MappingConfigs, poolId: string, chain: SupportedChain): StrategyDeployment[]; /** * Every deployment a strategy has a pool on, canonical (Base) first, then the * others in `CHAIN_CONFIGS` order — the legs to fetch and pass to * `combineTvlHistories`. One entry for a strategy that lives on one chain * only (PayFi, on Base). * * `chain` is the deployment `poolId` was read on — required, because an * address alone does not say which chain it belongs to. From either side of * a mapping the answer is the same set: Tax Pay's Base id on `'base'` and * its XDC id on `'xdc'` both return both pools. An id the mapping does not * know is a strategy of one on its own chain. Ids are compared * case-insensitively and returned lowercase. * * Throws `StrategyDeploymentInputError` for a malformed id, an unknown chain, * or an id the mapping places on another deployment (`'wrong-chain'`). * * ```ts * strategyDeployments(strategy.id, 'base'); * // [{ chain: 'base', poolId: '0x…' }, { chain: 'xdc', poolId: '0x…' }] * ``` */ export declare function strategyDeployments(poolId: string, chain: SupportedChain): StrategyDeployment[]; export {};