/** * 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 Assets = { feesReserves: bigint; owned: bigint; locked: bigint; guaranteedUsd: bigint; globalShortSizes: bigint; globalShortAveragePrices: bigint; }; export type AssetsArgs = { feesReserves: number | bigint; owned: number | bigint; locked: number | bigint; guaranteedUsd: number | bigint; globalShortSizes: number | bigint; globalShortAveragePrices: number | bigint; }; export function getAssetsEncoder(): FixedSizeEncoder { return getStructEncoder([ ["feesReserves", getU64Encoder()], ["owned", getU64Encoder()], ["locked", getU64Encoder()], ["guaranteedUsd", getU64Encoder()], ["globalShortSizes", getU64Encoder()], ["globalShortAveragePrices", getU64Encoder()], ]); } export function getAssetsDecoder(): FixedSizeDecoder { return getStructDecoder([ ["feesReserves", getU64Decoder()], ["owned", getU64Decoder()], ["locked", getU64Decoder()], ["guaranteedUsd", getU64Decoder()], ["globalShortSizes", getU64Decoder()], ["globalShortAveragePrices", getU64Decoder()], ]); } export function getAssetsCodec(): FixedSizeCodec { return combineCodec(getAssetsEncoder(), getAssetsDecoder()); }