UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

138 lines 7.08 kB
/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit'; import { type ProtocolFee, type ProtocolFeeArgs, type RewardInfo, type RewardInfoArgs, type StaticParameters, type StaticParametersArgs, type VariableParameters, type VariableParametersArgs } from '../types'; export declare const LB_PAIR_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getLbPairDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>; export type LbPair = { discriminator: ReadonlyUint8Array; parameters: StaticParameters; vParameters: VariableParameters; bumpSeed: ReadonlyUint8Array; /** Bin step signer seed */ binStepSeed: ReadonlyUint8Array; /** Type of the pair */ pairType: number; /** Active bin id */ activeId: number; /** Bin step. Represent the price increment / decrement. */ binStep: number; /** Status of the pair. Check PairStatus enum. */ status: number; requireBaseFactorSeed: number; baseFactorSeed: ReadonlyUint8Array; padding1: ReadonlyUint8Array; /** Token X mint */ tokenXMint: Address; /** Token Y mint */ tokenYMint: Address; /** LB token X vault */ reserveX: Address; /** LB token Y vault */ reserveY: Address; /** Uncollected protocol fee */ protocolFee: ProtocolFee; /** Protocol fee owner, */ feeOwner: Address; /** Farming reward information */ rewardInfos: Array<RewardInfo>; /** Oracle pubkey */ oracle: Address; /** Packed initialized bin array state */ binArrayBitmap: Array<bigint>; /** Last time the pool fee parameter was updated */ lastUpdatedAt: bigint; /** Whitelisted wallet */ whitelistedWallet: Address; /** Address allowed to swap when the current slot is greater than or equal to the pre-activation slot. The pre-activation slot is calculated as `activation_slot - pre_activation_slot_duration`. */ preActivationSwapAddress: Address; /** Base keypair. Only required for permission pair */ baseKey: Address; /** Slot to enable the pair. Only applicable for permission pair. */ activationSlot: bigint; /** Number of slot before activation slot. Used to calculate pre-activation slot for pre_activation_swap_address */ preActivationSlotDuration: bigint; /** _padding2 is reclaimed free space from swap_cap_deactivate_slot and swap_cap_amount before, BE CAREFUL FOR TOMBSTONE WHEN REUSE !! */ padding2: ReadonlyUint8Array; /** Liquidity lock duration for positions which created before activate. Only applicable for permission pair. */ lockDurationsInSlot: bigint; /** Pool creator */ creator: Address; /** Reserved space for future use */ reserved: ReadonlyUint8Array; }; export type LbPairArgs = { parameters: StaticParametersArgs; vParameters: VariableParametersArgs; bumpSeed: ReadonlyUint8Array; /** Bin step signer seed */ binStepSeed: ReadonlyUint8Array; /** Type of the pair */ pairType: number; /** Active bin id */ activeId: number; /** Bin step. Represent the price increment / decrement. */ binStep: number; /** Status of the pair. Check PairStatus enum. */ status: number; requireBaseFactorSeed: number; baseFactorSeed: ReadonlyUint8Array; padding1: ReadonlyUint8Array; /** Token X mint */ tokenXMint: Address; /** Token Y mint */ tokenYMint: Address; /** LB token X vault */ reserveX: Address; /** LB token Y vault */ reserveY: Address; /** Uncollected protocol fee */ protocolFee: ProtocolFeeArgs; /** Protocol fee owner, */ feeOwner: Address; /** Farming reward information */ rewardInfos: Array<RewardInfoArgs>; /** Oracle pubkey */ oracle: Address; /** Packed initialized bin array state */ binArrayBitmap: Array<number | bigint>; /** Last time the pool fee parameter was updated */ lastUpdatedAt: number | bigint; /** Whitelisted wallet */ whitelistedWallet: Address; /** Address allowed to swap when the current slot is greater than or equal to the pre-activation slot. The pre-activation slot is calculated as `activation_slot - pre_activation_slot_duration`. */ preActivationSwapAddress: Address; /** Base keypair. Only required for permission pair */ baseKey: Address; /** Slot to enable the pair. Only applicable for permission pair. */ activationSlot: number | bigint; /** Number of slot before activation slot. Used to calculate pre-activation slot for pre_activation_swap_address */ preActivationSlotDuration: number | bigint; /** _padding2 is reclaimed free space from swap_cap_deactivate_slot and swap_cap_amount before, BE CAREFUL FOR TOMBSTONE WHEN REUSE !! */ padding2: ReadonlyUint8Array; /** Liquidity lock duration for positions which created before activate. Only applicable for permission pair. */ lockDurationsInSlot: number | bigint; /** Pool creator */ creator: Address; /** Reserved space for future use */ reserved: ReadonlyUint8Array; }; /** Gets the encoder for {@link LbPairArgs} account data. */ export declare function getLbPairEncoder(): FixedSizeEncoder<LbPairArgs>; /** Gets the decoder for {@link LbPair} account data. */ export declare function getLbPairDecoder(): FixedSizeDecoder<LbPair>; /** Gets the codec for {@link LbPair} account data. */ export declare function getLbPairCodec(): FixedSizeCodec<LbPairArgs, LbPair>; export declare function decodeLbPair<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<LbPair, TAddress>; export declare function decodeLbPair<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<LbPair, TAddress>; export declare function fetchLbPair<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<LbPair, TAddress>>; export declare function fetchMaybeLbPair<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<LbPair, TAddress>>; export declare function fetchAllLbPair(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<LbPair>[]>; export declare function fetchAllMaybeLbPair(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<LbPair>[]>; export declare function getLbPairSize(): number; //# sourceMappingURL=lbPair.d.ts.map