/** * 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 IncreasePositionInfo = { price: bigint; liquidationPrice: bigint; feeUsd: bigint; collateralUsd: bigint; }; export type IncreasePositionInfoArgs = { price: number | bigint; liquidationPrice: number | bigint; feeUsd: number | bigint; collateralUsd: number | bigint; }; export function getIncreasePositionInfoEncoder(): FixedSizeEncoder { return getStructEncoder([ ["price", getU64Encoder()], ["liquidationPrice", getU64Encoder()], ["feeUsd", getU64Encoder()], ["collateralUsd", getU64Encoder()], ]); } export function getIncreasePositionInfoDecoder(): FixedSizeDecoder { return getStructDecoder([ ["price", getU64Decoder()], ["liquidationPrice", getU64Decoder()], ["feeUsd", getU64Decoder()], ["collateralUsd", getU64Decoder()], ]); } export function getIncreasePositionInfoCodec(): FixedSizeCodec< IncreasePositionInfoArgs, IncreasePositionInfo > { return combineCodec( getIncreasePositionInfoEncoder(), getIncreasePositionInfoDecoder(), ); }