import type { TermMarketConfig } from '@1delta/data-sdk';
import type { TermAuctionOrders, TermBook, TermBookSource, TermBookTop, TermListing } from './types';
/** Default Ormi core subgraph endpoints (org 05e9a4e2-…) by chainId. */
export declare const TERM_SUBGRAPH_BY_CHAIN: Record<string, string>;
type FetchLike = typeof fetch;
/** Resolve a chain's Term subgraph URL (override/config → per-chain default → ''). */
export declare function termApiBaseUrl(chainId: string): string;
/**
 * GraphQL subgraph source. `getBookTop` derives the fixed APR from the repo's
 * latest completed auction clearing price and open-order depth; `getListings`
 * returns the open secondary-market repo-token orders.
 */
export declare class TermSubgraphSource implements TermBookSource {
    private readonly url;
    private readonly fetchImpl;
    constructor(url: string, fetchImpl?: FetchLike);
    private gql;
    getBookTop(config: TermMarketConfig): Promise<TermBookTop | null>;
    /**
     * ONE query → the aggregate top (best APR + FULL depth) PLUS a bounded book
     * slice (top `maxLevels` open orders per side). `asks` = orders selling repo
     * tokens (the secondary LEND book); `bids` = the rest (borrow side, usually
     * empty — Term borrow is sealed-bid auction, not a continuous book). Term
     * secondary orders carry no per-order rate, so every level shares the market's
     * clearing APR; the levels expose per-order SIZE for filtering.
     */
    getTopAndBook(config: TermMarketConfig, maxLevels?: number): Promise<{
        top: TermBookTop;
        book: TermBook;
    } | null>;
    getListings(config: TermMarketConfig): Promise<TermListing[] | null>;
    /**
     * A user's primary-auction offers + bids for a repo. Offers/bids link to an
     * `auction`, which links to a `term` (the repo) — so we filter by the
     * submitter AND the nested `auction_.term`. The revealed price is 0 (Bytes
     * `unrevealed*Price` still sealed) until the reveal window; `active` marks
     * submissions whose auction is neither complete nor cancelled.
     */
    getAuctionOrders(config: TermMarketConfig, account: string): Promise<TermAuctionOrders | null>;
}
/** Default Term public-data source for a chain (subgraph via resolved URL). */
export declare function createTermBookSource(chainId: string, fetchImpl?: FetchLike): TermBookSource;
export {};
//# sourceMappingURL=apiClient.d.ts.map