UNPKG

@orca-so/wavebreak

Version:

The wavebreak JS client for interacting with the wavebreak program.

78 lines (77 loc) 3.95 kB
import { fetchEncodedAccount, fetchEncodedAccounts, Account, Address, EncodedAccount, FetchAccountConfig, FetchAccountsConfig, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, MaybeAccount, MaybeEncodedAccount, ReadonlyUint8Array } from '@solana/kit'; import { AccountDiscriminator, GraduationMethodData, GraduationMethodDataArgs } from '../types'; export declare const BONDING_CURVE_DISCRIMINATOR = AccountDiscriminator.BondingCurve; export declare function getBondingCurveDiscriminatorBytes(): ReadonlyUint8Array; export type BondingCurve = { discriminator: AccountDiscriminator; baseMint: Address; quoteMint: Address; creator: Address; retainMintAuthority: boolean; buyRequiresPermission: boolean; buyPermissionBitmap: ReadonlyUint8Array; sellRequiresPermission: boolean; sellPermissionBitmap: ReadonlyUint8Array; quoteFeeBps: number; baseFeeBps: number; controlPoints: Array<number>; startPrice: bigint; endPrice: bigint; quoteAmount: bigint; baseAmount: bigint; launchTime: bigint; creatorReward: bigint; graduationTarget: bigint; graduationTime: bigint; graduationReward: bigint; maxBuyAmount: bigint; maxSellAmount: bigint; swapFeeBps: number; baseAllocationBps: number; graduationMethods: Array<GraduationMethodData>; minReserveBps: number; padding1: ReadonlyUint8Array; premintedSupply: bigint; padding2: ReadonlyUint8Array; }; export type BondingCurveArgs = { baseMint: Address; quoteMint: Address; creator: Address; retainMintAuthority: boolean; buyRequiresPermission: boolean; buyPermissionBitmap: ReadonlyUint8Array; sellRequiresPermission: boolean; sellPermissionBitmap: ReadonlyUint8Array; quoteFeeBps: number; baseFeeBps: number; controlPoints: Array<number>; startPrice: number | bigint; endPrice: number | bigint; quoteAmount: number | bigint; baseAmount: number | bigint; launchTime: number | bigint; creatorReward: number | bigint; graduationTarget: number | bigint; graduationTime: number | bigint; graduationReward: number | bigint; maxBuyAmount: number | bigint; maxSellAmount: number | bigint; swapFeeBps: number; baseAllocationBps: number; graduationMethods: Array<GraduationMethodDataArgs>; minReserveBps: number; padding1?: ReadonlyUint8Array; premintedSupply: number | bigint; padding2?: ReadonlyUint8Array; }; export declare function getBondingCurveEncoder(): FixedSizeEncoder<BondingCurveArgs>; export declare function getBondingCurveDecoder(): FixedSizeDecoder<BondingCurve>; export declare function getBondingCurveCodec(): FixedSizeCodec<BondingCurveArgs, BondingCurve>; export declare function decodeBondingCurve<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<BondingCurve, TAddress>; export declare function decodeBondingCurve<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<BondingCurve, TAddress>; export declare function fetchBondingCurve<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<BondingCurve, TAddress>>; export declare function fetchMaybeBondingCurve<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<BondingCurve, TAddress>>; export declare function fetchAllBondingCurve(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<BondingCurve>[]>; export declare function fetchAllMaybeBondingCurve(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<BondingCurve>[]>; export declare function getBondingCurveSize(): number;