UNPKG

@symmetry-hq/baskets-v2-sdk

Version:

Symmetry Baskets V2 SDK

31 lines (30 loc) 1.02 kB
import { PublicKey } from "@solana/web3.js"; import { BN, Program } from "@coral-xyz/anchor"; import { BasketsProgram } from "../idl/types"; export declare const WITHDRAW_STATE_SIZE = 8155; export interface WithdrawState { ownAddress: PublicKey; withdrawStateSeed: number[]; basket: PublicKey; owner: PublicKey; numTokens: number; compositionMints: PublicKey[]; compositionAmounts: BN[]; rebalance: number; destinationMint: PublicKey; destinationAmount: BN; } export interface ParsedWithdrawState { ownAddress: string; withdrawStateSeed: number[]; basket: string; owner: string; numTokens: number; compositionMints: string[]; compositionAmounts: number[]; rebalance: number; destinationMint: string; destinationAmount: number; } export declare function fetchWithdrawState(program: Program<BasketsProgram>, basket: PublicKey): Promise<WithdrawState>; export declare function parseWithdrawState(withdrawState: WithdrawState): ParsedWithdrawState;