@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
87 lines • 4.58 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 GLOBAL_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array;
export type GlobalConfig = {
discriminator: ReadonlyUint8Array;
emergencyMode: bigint;
blockDeposit: bigint;
blockInvest: bigint;
blockWithdraw: bigint;
blockCollectFees: bigint;
blockCollectRewards: bigint;
blockSwapRewards: bigint;
blockSwapUnevenVaults: number;
blockEmergencySwap: number;
minWithdrawalFeeBps: bigint;
scopeProgramId: Address;
deprecated: Address;
padding0NonZeroed: Array<bigint>;
actionsAuthority: Address;
adminAuthority: Address;
treasuryFeeVaults: Array<Address>;
tokenInfos: Address;
blockLocalAdmin: bigint;
minPerformanceFeeBps: bigint;
minSwapUnevenSlippageToleranceBps: bigint;
minReferencePriceSlippageToleranceBps: bigint;
actionsAfterRebalanceDelaySeconds: bigint;
treasuryFeeVaultReceiver: Address;
scopePriceIds: Array<Address>;
maxDeviationFromRefPriceOnInvestBps: number;
padding1: number;
investCooldownSlots: bigint;
minInvestTriggerValueUsd: bigint;
padding: Array<bigint>;
};
export type GlobalConfigArgs = {
emergencyMode: number | bigint;
blockDeposit: number | bigint;
blockInvest: number | bigint;
blockWithdraw: number | bigint;
blockCollectFees: number | bigint;
blockCollectRewards: number | bigint;
blockSwapRewards: number | bigint;
blockSwapUnevenVaults: number;
blockEmergencySwap: number;
minWithdrawalFeeBps: number | bigint;
scopeProgramId: Address;
deprecated: Address;
padding0NonZeroed: Array<number | bigint>;
actionsAuthority: Address;
adminAuthority: Address;
treasuryFeeVaults: Array<Address>;
tokenInfos: Address;
blockLocalAdmin: number | bigint;
minPerformanceFeeBps: number | bigint;
minSwapUnevenSlippageToleranceBps: number | bigint;
minReferencePriceSlippageToleranceBps: number | bigint;
actionsAfterRebalanceDelaySeconds: number | bigint;
treasuryFeeVaultReceiver: Address;
scopePriceIds: Array<Address>;
maxDeviationFromRefPriceOnInvestBps: number;
padding1: number;
investCooldownSlots: number | bigint;
minInvestTriggerValueUsd: number | bigint;
padding: Array<number | bigint>;
};
/** Gets the encoder for {@link GlobalConfigArgs} account data. */
export declare function getGlobalConfigEncoder(): FixedSizeEncoder<GlobalConfigArgs>;
/** Gets the decoder for {@link GlobalConfig} account data. */
export declare function getGlobalConfigDecoder(): FixedSizeDecoder<GlobalConfig>;
/** Gets the codec for {@link GlobalConfig} account data. */
export declare function getGlobalConfigCodec(): FixedSizeCodec<GlobalConfigArgs, GlobalConfig>;
export declare function decodeGlobalConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<GlobalConfig, TAddress>;
export declare function decodeGlobalConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<GlobalConfig, TAddress>;
export declare function fetchGlobalConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<GlobalConfig, TAddress>>;
export declare function fetchMaybeGlobalConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<GlobalConfig, TAddress>>;
export declare function fetchAllGlobalConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<GlobalConfig>[]>;
export declare function fetchAllMaybeGlobalConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<GlobalConfig>[]>;
export declare function getGlobalConfigSize(): number;
//# sourceMappingURL=globalConfig.d.ts.map