/** * 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, getU16Decoder, getU16Encoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; import { getOrderTotalsDecoder, getOrderTotalsEncoder, type OrderTotals, type OrderTotalsArgs, } from '.'; export type MakerInfo = { totals: OrderTotals; /** Total open orders for this maker */ orderCount: number; /** The bytes allocated by this maker that have since been cleaned up but not yet withdrawn */ rentBytesOwned: bigint; }; export type MakerInfoArgs = { totals: OrderTotalsArgs; /** Total open orders for this maker */ orderCount: number; /** The bytes allocated by this maker that have since been cleaned up but not yet withdrawn */ rentBytesOwned: number | bigint; }; export function getMakerInfoEncoder(): FixedSizeEncoder { return getStructEncoder([ ['totals', getOrderTotalsEncoder()], ['orderCount', getU16Encoder()], ['rentBytesOwned', getU64Encoder()], ]); } export function getMakerInfoDecoder(): FixedSizeDecoder { return getStructDecoder([ ['totals', getOrderTotalsDecoder()], ['orderCount', getU16Decoder()], ['rentBytesOwned', getU64Decoder()], ]); } export function getMakerInfoCodec(): FixedSizeCodec { return combineCodec(getMakerInfoEncoder(), getMakerInfoDecoder()); }