/** * 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 Limit = { maxAumUsd: bigint; maxIndividualLpToken: bigint; maxPositionUsd: bigint; }; export type LimitArgs = { maxAumUsd: number | bigint; maxIndividualLpToken: number | bigint; maxPositionUsd: number | bigint; }; export function getLimitEncoder(): FixedSizeEncoder { return getStructEncoder([ ["maxAumUsd", getU128Encoder()], ["maxIndividualLpToken", getU128Encoder()], ["maxPositionUsd", getU64Encoder()], ]); } export function getLimitDecoder(): FixedSizeDecoder { return getStructDecoder([ ["maxAumUsd", getU128Decoder()], ["maxIndividualLpToken", getU128Decoder()], ["maxPositionUsd", getU64Decoder()], ]); } export function getLimitCodec(): FixedSizeCodec { return combineCodec(getLimitEncoder(), getLimitDecoder()); }