UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

68 lines 3.7 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 WhirlpoolRewardInfo, type WhirlpoolRewardInfoArgs } from '../types'; export declare const WHIRLPOOL_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getWhirlpoolDiscriminatorBytes(): ReadonlyUint8Array; export type Whirlpool = { discriminator: ReadonlyUint8Array; whirlpoolsConfig: Address; whirlpoolBump: ReadonlyUint8Array; tickSpacing: number; tickSpacingSeed: ReadonlyUint8Array; feeRate: number; protocolFeeRate: number; liquidity: bigint; sqrtPrice: bigint; tickCurrentIndex: number; protocolFeeOwedA: bigint; protocolFeeOwedB: bigint; tokenMintA: Address; tokenVaultA: Address; feeGrowthGlobalA: bigint; tokenMintB: Address; tokenVaultB: Address; feeGrowthGlobalB: bigint; rewardLastUpdatedTimestamp: bigint; rewardInfos: Array<WhirlpoolRewardInfo>; }; export type WhirlpoolArgs = { whirlpoolsConfig: Address; whirlpoolBump: ReadonlyUint8Array; tickSpacing: number; tickSpacingSeed: ReadonlyUint8Array; feeRate: number; protocolFeeRate: number; liquidity: number | bigint; sqrtPrice: number | bigint; tickCurrentIndex: number; protocolFeeOwedA: number | bigint; protocolFeeOwedB: number | bigint; tokenMintA: Address; tokenVaultA: Address; feeGrowthGlobalA: number | bigint; tokenMintB: Address; tokenVaultB: Address; feeGrowthGlobalB: number | bigint; rewardLastUpdatedTimestamp: number | bigint; rewardInfos: Array<WhirlpoolRewardInfoArgs>; }; /** Gets the encoder for {@link WhirlpoolArgs} account data. */ export declare function getWhirlpoolEncoder(): FixedSizeEncoder<WhirlpoolArgs>; /** Gets the decoder for {@link Whirlpool} account data. */ export declare function getWhirlpoolDecoder(): FixedSizeDecoder<Whirlpool>; /** Gets the codec for {@link Whirlpool} account data. */ export declare function getWhirlpoolCodec(): FixedSizeCodec<WhirlpoolArgs, Whirlpool>; export declare function decodeWhirlpool<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Whirlpool, TAddress>; export declare function decodeWhirlpool<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Whirlpool, TAddress>; export declare function fetchWhirlpool<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Whirlpool, TAddress>>; export declare function fetchMaybeWhirlpool<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Whirlpool, TAddress>>; export declare function fetchAllWhirlpool(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Whirlpool>[]>; export declare function fetchAllMaybeWhirlpool(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Whirlpool>[]>; export declare function getWhirlpoolSize(): number; //# sourceMappingURL=whirlpool.d.ts.map