UNPKG

@orca-so/whirlpool-sdk

Version:

Whirlpool SDK for the Orca protocol.

25 lines (24 loc) 1.12 kB
import { Whirlpool } from "@orca-so/whirlpool-client-sdk/dist/artifacts/whirlpool"; import { Program, Provider } from "@project-serum/anchor"; import { Wallet } from "@project-serum/anchor/dist/cjs/provider"; import { ConfirmOptions, Connection, PublicKey } from "@solana/web3.js"; import { AccountFetcher } from "./accounts/account-fetcher"; import { OrcaNetwork } from "./constants/public"; /** * Context object containing information applicable to Whirlpools * of a specific program & config space. * * // TODO: This class, is meant to be the same as client-sdk/WhirlpoolContext. * We'll merge the two when both SDKs when we are ready. */ export declare class WhirlpoolContext { readonly configAddress: PublicKey; readonly provider: Provider; readonly program: Program<Whirlpool>; readonly accountFetcher: AccountFetcher; readonly connection: Connection; readonly wallet: Wallet; readonly opts: ConfirmOptions; constructor(provider: Provider, configAddress?: PublicKey, network?: OrcaNetwork, // TODO: Why custom enum? Are there other networks? programId?: PublicKey); }