/** * 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 OrderTotals = { /** Atlas either escrowed from buy orders or released from completed sell orders */ atlas: bigint; /** Cargo either escrowed from sell orders or released from completed buy orders */ cargo: bigint; }; export type OrderTotalsArgs = { /** Atlas either escrowed from buy orders or released from completed sell orders */ atlas: number | bigint; /** Cargo either escrowed from sell orders or released from completed buy orders */ cargo: number | bigint; }; export function getOrderTotalsEncoder(): FixedSizeEncoder { return getStructEncoder([ ['atlas', getU64Encoder()], ['cargo', getU64Encoder()], ]); } export function getOrderTotalsDecoder(): FixedSizeDecoder { return getStructDecoder([ ['atlas', getU64Decoder()], ['cargo', getU64Decoder()], ]); } export function getOrderTotalsCodec(): FixedSizeCodec< OrderTotalsArgs, OrderTotals > { return combineCodec(getOrderTotalsEncoder(), getOrderTotalsDecoder()); }