/** * 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 RemoveLiquidityParameters = { /** delta liquidity */ liquidityDelta: bigint; /** minimum token a amount */ tokenAAmountThreshold: bigint; /** minimum token b amount */ tokenBAmountThreshold: bigint; }; export type RemoveLiquidityParametersArgs = { /** delta liquidity */ liquidityDelta: number | bigint; /** minimum token a amount */ tokenAAmountThreshold: number | bigint; /** minimum token b amount */ tokenBAmountThreshold: number | bigint; }; export function getRemoveLiquidityParametersEncoder(): FixedSizeEncoder { return getStructEncoder([ ["liquidityDelta", getU128Encoder()], ["tokenAAmountThreshold", getU64Encoder()], ["tokenBAmountThreshold", getU64Encoder()], ]); } export function getRemoveLiquidityParametersDecoder(): FixedSizeDecoder { return getStructDecoder([ ["liquidityDelta", getU128Decoder()], ["tokenAAmountThreshold", getU64Decoder()], ["tokenBAmountThreshold", getU64Decoder()], ]); } export function getRemoveLiquidityParametersCodec(): FixedSizeCodec< RemoveLiquidityParametersArgs, RemoveLiquidityParameters > { return combineCodec( getRemoveLiquidityParametersEncoder(), getRemoveLiquidityParametersDecoder(), ); }