/**
 * Aave public GraphQL API client for Earn ("stable") vaults.
 *
 * Endpoint (no auth):
 *   https://api.v3.aave.com/graphql
 *
 * Unlike Lagoon's API, Aave's `vaults` query has NO "list every vault on
 * a chain" mode — its filter criteria accepts either an explicit set of
 * `{ address, chainId }` pairs OR a set of curator `ownedBy` owner
 * addresses. Discovery therefore rides on our registry: we hand the API
 * the curator owners (and any pinned vault addresses) we know about and
 * it returns their full, live vault set. See {@link getAaveEarnRegistry}.
 *
 * The generic `Vault` type does NOT expose `totalSupply` or the share
 * `decimals`, so this client returns only what the API owns (identity,
 * underlying reserve, APR, `balance` = totalAssets); `fetchPublic`
 * enriches the rest on-chain.
 */
/** Aave unified GraphQL API (AaveKit), v3. Public — no API key. */
export declare const AAVE_EARN_API_URL = "https://api.v3.aave.com/graphql";
/** A `DecimalValue` / `TokenAmount.amount` cell. */
interface ApiDecimal {
    raw: string | null;
    decimals: number | null;
    value: string | null;
}
/** A `TokenAmount`: an `amount` plus its USD valuation. */
interface ApiTokenAmount {
    amount: ApiDecimal | null;
    usd: string | null;
    usdPerToken: string | null;
}
/** A `PercentValue`: `value` is the fraction (0.0425), `formatted` the
 *  percentage (4.25). */
interface ApiPercent {
    value: string | null;
    formatted: string | null;
}
/** Shape of a single `vaults.items[]` (Aave `Vault`) entry we consume. */
export interface AaveApiVault {
    address: string | null;
    shareName: string | null;
    shareSymbol: string | null;
    owner: string | null;
    chainId: number | null;
    vaultApr: ApiPercent | null;
    fee: ApiPercent | null;
    /** Reserve `balance` — the underlying the vault holds (= totalAssets). */
    balance: ApiTokenAmount | null;
    usedReserve: {
        underlyingToken: {
            address: string | null;
            symbol: string | null;
            name: string | null;
            decimals: number | null;
            imageUrl: string | null;
        } | null;
    } | null;
    /** Present only when the query carried a `user` argument. */
    userShares: {
        shares: ApiTokenAmount | null;
        balance: ApiTokenAmount | null;
    } | null;
}
/** Vault discovery targets for a chain — pulled from the registry. */
export interface AaveEarnQueryTargets {
    /** Curator owner addresses to expand via `ownedBy`. */
    owners: string[];
    /** Explicitly pinned vault addresses. */
    vaults: string[];
}
/**
 * Fetch every Aave Earn vault on `chainId` matching the given targets.
 *
 * Two query kinds, each with a hard-won constraint:
 *  - **`ownedBy`** (per owner, paginated) — the API's `vaults` filter
 *    returns a curator's vaults across *every* chain, so we filter the
 *    result down to `chainId`. We query one owner at a time because the
 *    batch `criteria.vaults:[…]` form errors server-side.
 *  - **single `vault(by:{address},chainId)`** — for one-off pinned
 *    addresses, one request each (same batch-filter limitation).
 *
 * Merges + de-dups by lowercased address (already chain-scoped). Returns
 * the raw API items; normalization happens in `fetchPublic`.
 */
export declare function fetchAaveEarnApiVaults(chainId: string, targets: AaveEarnQueryTargets): Promise<AaveApiVault[]>;
export {};
//# sourceMappingURL=api.d.ts.map