/** * 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 Fees = { increasePositionBps: bigint; decreasePositionBps: bigint; addRemoveLiquidityBps: bigint; swapBps: bigint; taxBps: bigint; stableSwapBps: bigint; stableSwapTaxBps: bigint; liquidationRewardBps: bigint; protocolShareBps: bigint; }; export type FeesArgs = { increasePositionBps: number | bigint; decreasePositionBps: number | bigint; addRemoveLiquidityBps: number | bigint; swapBps: number | bigint; taxBps: number | bigint; stableSwapBps: number | bigint; stableSwapTaxBps: number | bigint; liquidationRewardBps: number | bigint; protocolShareBps: number | bigint; }; export function getFeesEncoder(): FixedSizeEncoder { return getStructEncoder([ ["increasePositionBps", getU64Encoder()], ["decreasePositionBps", getU64Encoder()], ["addRemoveLiquidityBps", getU64Encoder()], ["swapBps", getU64Encoder()], ["taxBps", getU64Encoder()], ["stableSwapBps", getU64Encoder()], ["stableSwapTaxBps", getU64Encoder()], ["liquidationRewardBps", getU64Encoder()], ["protocolShareBps", getU64Encoder()], ]); } export function getFeesDecoder(): FixedSizeDecoder { return getStructDecoder([ ["increasePositionBps", getU64Decoder()], ["decreasePositionBps", getU64Decoder()], ["addRemoveLiquidityBps", getU64Decoder()], ["swapBps", getU64Decoder()], ["taxBps", getU64Decoder()], ["stableSwapBps", getU64Decoder()], ["stableSwapTaxBps", getU64Decoder()], ["liquidationRewardBps", getU64Decoder()], ["protocolShareBps", getU64Decoder()], ]); } export function getFeesCodec(): FixedSizeCodec { return combineCodec(getFeesEncoder(), getFeesDecoder()); }