UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

91 lines 7.34 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 { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit'; import { LB_CLMM_PROGRAM_ADDRESS } from '../programs'; export declare const INITIALIZE_PRESET_PARAMETER_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getInitializePresetParameterDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>; export type InitializePresetParameterInstruction<TProgram extends string = typeof LB_CLMM_PROGRAM_ADDRESS, TAccountPresetParameter extends string | AccountMeta<string> = string, TAccountAdmin extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountRent extends string | AccountMeta<string> = "SysvarRent111111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPresetParameter extends string ? WritableAccount<TAccountPresetParameter> : TAccountPresetParameter, TAccountAdmin extends string ? WritableSignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountRent extends string ? ReadonlyAccount<TAccountRent> : TAccountRent, ...TRemainingAccounts]>; export type InitializePresetParameterInstructionData = { discriminator: ReadonlyUint8Array; /** Bin step. Represent the price increment / decrement. */ binStep: number; /** Used for base fee calculation. base_fee_rate = base_factor * bin_step */ baseFactor: number; /** Filter period determine high frequency trading time window. */ filterPeriod: number; /** Decay period determine when the volatile fee start decay / decrease. */ decayPeriod: number; /** Reduction factor controls the volatile fee rate decrement rate. */ reductionFactor: number; /** Used to scale the variable fee component depending on the dynamic of the market */ variableFeeControl: number; /** Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate. */ maxVolatilityAccumulator: number; /** Min bin id supported by the pool based on the configured bin step. */ minBinId: number; /** Max bin id supported by the pool based on the configured bin step. */ maxBinId: number; /** Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee */ protocolShare: number; }; export type InitializePresetParameterInstructionDataArgs = { /** Bin step. Represent the price increment / decrement. */ binStep: number; /** Used for base fee calculation. base_fee_rate = base_factor * bin_step */ baseFactor: number; /** Filter period determine high frequency trading time window. */ filterPeriod: number; /** Decay period determine when the volatile fee start decay / decrease. */ decayPeriod: number; /** Reduction factor controls the volatile fee rate decrement rate. */ reductionFactor: number; /** Used to scale the variable fee component depending on the dynamic of the market */ variableFeeControl: number; /** Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate. */ maxVolatilityAccumulator: number; /** Min bin id supported by the pool based on the configured bin step. */ minBinId: number; /** Max bin id supported by the pool based on the configured bin step. */ maxBinId: number; /** Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee */ protocolShare: number; }; export declare function getInitializePresetParameterInstructionDataEncoder(): FixedSizeEncoder<InitializePresetParameterInstructionDataArgs>; export declare function getInitializePresetParameterInstructionDataDecoder(): FixedSizeDecoder<InitializePresetParameterInstructionData>; export declare function getInitializePresetParameterInstructionDataCodec(): FixedSizeCodec<InitializePresetParameterInstructionDataArgs, InitializePresetParameterInstructionData>; export type InitializePresetParameterInput<TAccountPresetParameter extends string = string, TAccountAdmin extends string = string, TAccountSystemProgram extends string = string, TAccountRent extends string = string> = { presetParameter: Address<TAccountPresetParameter>; admin: TransactionSigner<TAccountAdmin>; systemProgram?: Address<TAccountSystemProgram>; rent?: Address<TAccountRent>; binStep: InitializePresetParameterInstructionDataArgs["binStep"]; baseFactor: InitializePresetParameterInstructionDataArgs["baseFactor"]; filterPeriod: InitializePresetParameterInstructionDataArgs["filterPeriod"]; decayPeriod: InitializePresetParameterInstructionDataArgs["decayPeriod"]; reductionFactor: InitializePresetParameterInstructionDataArgs["reductionFactor"]; variableFeeControl: InitializePresetParameterInstructionDataArgs["variableFeeControl"]; maxVolatilityAccumulator: InitializePresetParameterInstructionDataArgs["maxVolatilityAccumulator"]; minBinId: InitializePresetParameterInstructionDataArgs["minBinId"]; maxBinId: InitializePresetParameterInstructionDataArgs["maxBinId"]; protocolShare: InitializePresetParameterInstructionDataArgs["protocolShare"]; }; export declare function getInitializePresetParameterInstruction<TAccountPresetParameter extends string, TAccountAdmin extends string, TAccountSystemProgram extends string, TAccountRent extends string, TProgramAddress extends Address = typeof LB_CLMM_PROGRAM_ADDRESS>(input: InitializePresetParameterInput<TAccountPresetParameter, TAccountAdmin, TAccountSystemProgram, TAccountRent>, config?: { programAddress?: TProgramAddress; }): InitializePresetParameterInstruction<TProgramAddress, TAccountPresetParameter, TAccountAdmin, TAccountSystemProgram, TAccountRent>; export type ParsedInitializePresetParameterInstruction<TProgram extends string = typeof LB_CLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>; accounts: { presetParameter: TAccountMetas[0]; admin: TAccountMetas[1]; systemProgram: TAccountMetas[2]; rent: TAccountMetas[3]; }; data: InitializePresetParameterInstructionData; }; export declare function parseInitializePresetParameterInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedInitializePresetParameterInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=initializePresetParameter.d.ts.map