/** * 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, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type SwapParameters = { amountIn: bigint; minimumAmountOut: bigint }; export type SwapParametersArgs = { amountIn: number | bigint; minimumAmountOut: number | bigint; }; export function getSwapParametersEncoder(): FixedSizeEncoder { return getStructEncoder([ ["amountIn", getU64Encoder()], ["minimumAmountOut", getU64Encoder()], ]); } export function getSwapParametersDecoder(): FixedSizeDecoder { return getStructDecoder([ ["amountIn", getU64Decoder()], ["minimumAmountOut", getU64Decoder()], ]); } export function getSwapParametersCodec(): FixedSizeCodec< SwapParametersArgs, SwapParameters > { return combineCodec(getSwapParametersEncoder(), getSwapParametersDecoder()); }