/** * 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, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type AddLiquidityParameters = { /** delta liquidity */ liquidityDelta: bigint; /** maximum token a amount */ tokenAAmountThreshold: bigint; /** maximum token b amount */ tokenBAmountThreshold: bigint; }; export type AddLiquidityParametersArgs = { /** delta liquidity */ liquidityDelta: number | bigint; /** maximum token a amount */ tokenAAmountThreshold: number | bigint; /** maximum token b amount */ tokenBAmountThreshold: number | bigint; }; export function getAddLiquidityParametersEncoder(): FixedSizeEncoder { return getStructEncoder([ ["liquidityDelta", getU128Encoder()], ["tokenAAmountThreshold", getU64Encoder()], ["tokenBAmountThreshold", getU64Encoder()], ]); } export function getAddLiquidityParametersDecoder(): FixedSizeDecoder { return getStructDecoder([ ["liquidityDelta", getU128Decoder()], ["tokenAAmountThreshold", getU64Decoder()], ["tokenBAmountThreshold", getU64Decoder()], ]); } export function getAddLiquidityParametersCodec(): FixedSizeCodec< AddLiquidityParametersArgs, AddLiquidityParameters > { return combineCodec( getAddLiquidityParametersEncoder(), getAddLiquidityParametersDecoder(), ); }