/** * 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, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array, } from "@solana/kit"; export type FeeState = { /** The accumulated manager fees in the vault. */ accumulatedLpManagerFees: bigint; /** The accumulated admin fees in the vault. */ accumulatedLpAdminFees: bigint; /** The accumulated protocol fees in the vault. */ accumulatedLpProtocolFees: bigint; /** Reserved bytes for future use. */ reserved: ReadonlyUint8Array; }; export type FeeStateArgs = { /** The accumulated manager fees in the vault. */ accumulatedLpManagerFees: number | bigint; /** The accumulated admin fees in the vault. */ accumulatedLpAdminFees: number | bigint; /** The accumulated protocol fees in the vault. */ accumulatedLpProtocolFees: number | bigint; /** Reserved bytes for future use. */ reserved: ReadonlyUint8Array; }; export function getFeeStateEncoder(): FixedSizeEncoder { return getStructEncoder([ ["accumulatedLpManagerFees", getU64Encoder()], ["accumulatedLpAdminFees", getU64Encoder()], ["accumulatedLpProtocolFees", getU64Encoder()], ["reserved", fixEncoderSize(getBytesEncoder(), 16)], ]); } export function getFeeStateDecoder(): FixedSizeDecoder { return getStructDecoder([ ["accumulatedLpManagerFees", getU64Decoder()], ["accumulatedLpAdminFees", getU64Decoder()], ["accumulatedLpProtocolFees", getU64Decoder()], ["reserved", fixDecoderSize(getBytesDecoder(), 16)], ]); } export function getFeeStateCodec(): FixedSizeCodec { return combineCodec(getFeeStateEncoder(), getFeeStateDecoder()); }