@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
24 lines • 1.08 kB
TypeScript
import { Address } from '@solana/kit';
import { ConfigType } from '../classes';
import { IBackOffOptions } from 'exponential-backoff';
export type ApiRequestOptions = {
programId?: Address;
source?: 'API' | 'CDN';
apiBaseUrl?: string;
};
export type ApiFilterOptions = {
isCurated?: boolean;
};
/**
* Fetch config from the API
* A good place to start to find active klend markets without expensive RPC calls
*
* @param programId - The program id to retrieve config for
* @param source - CDN is a json file hosted in the cloud, API is a webserver
* @param apiBaseUrl - Optional base URL for the API, if not provided, defaults to the standard API endpoint, not used for CDN
* @param filterOptions - Config options to filter markets by
*/
export declare function getMarketsFromApi({ programId, source, apiBaseUrl }?: ApiRequestOptions, filterOptions?: ApiFilterOptions): Promise<ConfigType>;
export declare const KAMINO_CDN_RETRY: Partial<IBackOffOptions>;
export declare const KAMINO_API_RETRY: Partial<IBackOffOptions>;
//# sourceMappingURL=api.d.ts.map