/** * 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 { combineCodec, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, type Codec, type Decoder, type Encoder, type Option, type OptionOrNullable, } from "@solana/kit"; export type InitializePoolParameters = { /** initialize liquidity */ liquidity: bigint; /** The init price of the pool as a sqrt(token_b/token_a) Q64.64 value */ sqrtPrice: bigint; /** activation point */ activationPoint: Option; }; export type InitializePoolParametersArgs = { /** initialize liquidity */ liquidity: number | bigint; /** The init price of the pool as a sqrt(token_b/token_a) Q64.64 value */ sqrtPrice: number | bigint; /** activation point */ activationPoint: OptionOrNullable; }; export function getInitializePoolParametersEncoder(): Encoder { return getStructEncoder([ ["liquidity", getU128Encoder()], ["sqrtPrice", getU128Encoder()], ["activationPoint", getOptionEncoder(getU64Encoder())], ]); } export function getInitializePoolParametersDecoder(): Decoder { return getStructDecoder([ ["liquidity", getU128Decoder()], ["sqrtPrice", getU128Decoder()], ["activationPoint", getOptionDecoder(getU64Decoder())], ]); } export function getInitializePoolParametersCodec(): Codec< InitializePoolParametersArgs, InitializePoolParameters > { return combineCodec( getInitializePoolParametersEncoder(), getInitializePoolParametersDecoder(), ); }