import { ChainId } from "../model/primitives.js"; import { GearboxAPIOptions } from "./types.js"; import { OffchainAnalytics } from "./analytics/OffchainAnalytics.js"; import "./analytics/index.js"; import { OffchainNotices } from "./notices/OffchainNotices.js"; import "./notices/index.js"; import { OffchainOpportunities } from "./opportunities/OffchainOpportunities.js"; import "./opportunities/index.js"; import { OffchainPositions } from "./positions/OffchainPositions.js"; import "./positions/index.js"; //#region src/offchain/GearboxAPI.d.ts /** * Client for the Gearbox backend, the off-chain source of the read model. * * It mirrors the namespace layout of the combined `GearboxSDK`, so the same * call reads the same way against either source: * * ```ts * const api = new GearboxAPI({ * baseUrl: "https://api.gearbox.fi", * chainIds: [1, 42161], * }); * const { data } = await api.opportunities.list({ kind: "strategy" }); * ``` * * Every read is scoped to {@link GearboxAPIOptions.chainIds}, so a client only * ever sees the chains it was built for even though the backend knows more. **/ export declare class GearboxAPI { /** * Chains every read of this client is scoped to. **/ readonly chainIds: readonly ChainId[]; /** Protocol-wide, backend-only analytics. */ readonly analytics: OffchainAnalytics; /** * Namespace for pool and strategy opportunities. **/ readonly opportunities: OffchainOpportunities; /** * Namespace for the positions a wallet holds. **/ readonly positions: OffchainPositions; /** * Namespace for the notices the backend attaches to entities. **/ readonly notices: OffchainNotices; constructor(options: GearboxAPIOptions); } //#endregion