UNPKG

goosefx-amm-sdk

Version:

SDK for the GooseFx AMM

27 lines (24 loc) 910 B
import { PublicKey, AccountInfo, RpcResponseAndContext, GetProgramAccountsResponse } from '@solana/web3.js'; import { TokenAccount, TokenAccountRaw } from './types.js'; import 'bn.js'; import '../../common/number.js'; import './layout.js'; import '@solana/buffer-layout'; import '@solana/spl-token'; interface ParseTokenAccount { owner: PublicKey; solAccountResp?: AccountInfo<Buffer> | null; tokenAccountResp: RpcResponseAndContext<GetProgramAccountsResponse>; } declare function parseTokenAccountResp({ owner, solAccountResp, tokenAccountResp }: ParseTokenAccount): { tokenAccounts: TokenAccount[]; tokenAccountRawInfos: TokenAccountRaw[]; }; declare function generatePubKey({ fromPublicKey, programId, }: { fromPublicKey: PublicKey; programId: PublicKey; }): { publicKey: PublicKey; seed: string; }; export { ParseTokenAccount, generatePubKey, parseTokenAccountResp };