UNPKG

@symmetry-hq/liquidity-sdk

Version:

Exchange functionality using symmetry funds liquidity

14 lines (13 loc) 942 B
/// <reference types="node" /> import { Program } from "@coral-xyz/anchor"; import { AccountInfo, GetProgramAccountsResponse, PublicKey } from "@solana/web3.js"; import { FundsIDL } from "./fundsIDL"; import { CurveChainData, FundStateChainData, OraclePrice, TokenSettings } from "./types"; export declare function asciiToString(coingeckoIdAscii: number[]): string; export declare function decodeTokenList(program: Program<FundsIDL>, tokenListAccountInfo: AccountInfo<Buffer>): TokenSettings[]; export declare function decodeCurveData(program: Program<FundsIDL>, curveDataAccountInfo: AccountInfo<Buffer>): CurveChainData; export declare function decodeFunds(program: Program<FundsIDL>, fundStateAccountInfos: GetProgramAccountsResponse): { pubkey: PublicKey; fund: FundStateChainData; }[]; export declare function decodeOraclePrices(oracleDataAccountInfos: Array<AccountInfo<Buffer>>, tokenListData: TokenSettings[]): OraclePrice[];