UNPKG

@sega-so/sega-sdk

Version:

An SDK for building applications on top of SEGA.

136 lines (134 loc) 3.42 kB
interface ApiCpmmConfigInfo { id: string; index: number; protocolFeeRate: number; tradeFeeRate: number; fundFeeRate: number; createPoolFee: string; } /** ====== v3 api types ======= */ interface ApiV3PageIns<T> { count: number; hasNextPage: boolean; data: T[]; } declare enum JupTokenType { ALL = "all", Strict = "strict" } interface TransferFeeDataBaseType { transferFeeConfigAuthority: string; withdrawWithheldAuthority: string; withheldAmount: string; olderTransferFee: { epoch: string; maximumFee: string; transferFeeBasisPoints: number; }; newerTransferFee: { epoch: string; maximumFee: string; transferFeeBasisPoints: number; }; } type ExtensionsItem = { coingeckoId?: string; feeConfig?: TransferFeeDataBaseType; }; type ApiV3Token = { chainId: number; address: string; programId: string; logoURI: string; symbol: string; name: string; decimals: number; tags: string[]; extensions: ExtensionsItem; freezeAuthority?: string; mintAuthority?: string; }; interface ApiV3PoolInfoCountItem { volume: number; volumeQuote: number; volumeFee: number; apr: number; feeApr: number; priceMin: number; priceMax: number; rewardApr: number[]; } type PoolTypeItem = "StablePool" | "OpenBookMarket"; type PoolKeys = CpmmKeys; interface ApiV3PoolInfoBaseItem { programId: string; id: string; mintA: ApiV3Token; mintB: ApiV3Token; rewardDefaultPoolInfos: "Ecosystem" | "Fusion" | "Raydium" | "Clmm"; price: number; mintAmountA: number; mintAmountB: number; feeRate: number; openTime: string; tvl: number; day: ApiV3PoolInfoCountItem; week: ApiV3PoolInfoCountItem; month: ApiV3PoolInfoCountItem; pooltype: PoolTypeItem[]; farmUpcomingCount: number; farmOngoingCount: number; farmFinishedCount: number; burnPercent: number; } type ApiV3PoolInfoStandardItemCpmm = ApiV3PoolInfoBaseItem & { type: "Standard"; lpMint: ApiV3Token; lpPrice: number; lpAmount: number; config: ApiCpmmConfigV3; }; interface Base { programId: string; id: string; mintA: ApiV3Token; mintB: ApiV3Token; lookupTableAccount?: string; openTime: string; vault: { A: string; B: string; }; } type ApiV3TokenRes = { mintList: ApiV3Token[]; blacklist: string[]; whiteList: string[]; }; interface ApiCpmmConfigV3 { id: string; index: number; protocolFeeRate: number; tradeFeeRate: number; fundFeeRate: number; createPoolFee: string; } interface _Cpmm { authority: string; mintLp: ApiV3Token; config: ApiCpmmConfigV3; observationId: string; } type CpmmKeys = Base & _Cpmm; interface AvailabilityCheckAPI3 { all: boolean; swap: boolean; createConcentratedPosition: boolean; addConcentratedPosition: boolean; addStandardPosition: boolean; removeConcentratedPosition: boolean; removeStandardPosition: boolean; addFarm: boolean; removeFarm: boolean; } export { type ApiCpmmConfigInfo, type ApiV3PageIns, type ApiV3PoolInfoBaseItem, type ApiV3PoolInfoCountItem, type ApiV3PoolInfoStandardItemCpmm, type ApiV3Token, type ApiV3TokenRes, type AvailabilityCheckAPI3, type CpmmKeys, JupTokenType, type PoolKeys, type TransferFeeDataBaseType };