@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
71 lines • 4.77 kB
TypeScript
/**
* 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';
export declare const PROTOCOL_POSITION_STATE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getProtocolPositionStateDiscriminatorBytes(): ReadonlyUint8Array;
export type ProtocolPositionState = {
discriminator: ReadonlyUint8Array;
/** Bump to identify PDA */
bump: number;
/** The ID of the pool with which this token is connected */
poolId: Address;
/** The lower bound tick of the position */
tickLowerIndex: number;
/** The upper bound tick of the position */
tickUpperIndex: number;
/** The amount of liquidity owned by this position */
liquidity: bigint;
/** The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed */
feeGrowthInside0LastX64: bigint;
/** The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed */
feeGrowthInside1LastX64: bigint;
/** The fees owed to the position owner in token_0 */
tokenFeesOwed0: bigint;
/** The fees owed to the position owner in token_1 */
tokenFeesOwed1: bigint;
/** The reward growth per unit of liquidity as of the last update to liquidity */
rewardGrowthInside: Array<bigint>;
padding: Array<bigint>;
};
export type ProtocolPositionStateArgs = {
/** Bump to identify PDA */
bump: number;
/** The ID of the pool with which this token is connected */
poolId: Address;
/** The lower bound tick of the position */
tickLowerIndex: number;
/** The upper bound tick of the position */
tickUpperIndex: number;
/** The amount of liquidity owned by this position */
liquidity: number | bigint;
/** The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed */
feeGrowthInside0LastX64: number | bigint;
/** The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed */
feeGrowthInside1LastX64: number | bigint;
/** The fees owed to the position owner in token_0 */
tokenFeesOwed0: number | bigint;
/** The fees owed to the position owner in token_1 */
tokenFeesOwed1: number | bigint;
/** The reward growth per unit of liquidity as of the last update to liquidity */
rewardGrowthInside: Array<number | bigint>;
padding: Array<number | bigint>;
};
/** Gets the encoder for {@link ProtocolPositionStateArgs} account data. */
export declare function getProtocolPositionStateEncoder(): FixedSizeEncoder<ProtocolPositionStateArgs>;
/** Gets the decoder for {@link ProtocolPositionState} account data. */
export declare function getProtocolPositionStateDecoder(): FixedSizeDecoder<ProtocolPositionState>;
/** Gets the codec for {@link ProtocolPositionState} account data. */
export declare function getProtocolPositionStateCodec(): FixedSizeCodec<ProtocolPositionStateArgs, ProtocolPositionState>;
export declare function decodeProtocolPositionState<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<ProtocolPositionState, TAddress>;
export declare function decodeProtocolPositionState<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<ProtocolPositionState, TAddress>;
export declare function fetchProtocolPositionState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<ProtocolPositionState, TAddress>>;
export declare function fetchMaybeProtocolPositionState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<ProtocolPositionState, TAddress>>;
export declare function fetchAllProtocolPositionState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<ProtocolPositionState>[]>;
export declare function fetchAllMaybeProtocolPositionState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<ProtocolPositionState>[]>;
export declare function getProtocolPositionStateSize(): number;
//# sourceMappingURL=protocolPositionState.d.ts.map