/** * 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, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type PositionRewardInfo = { growthInsideCheckpoint: bigint; amountOwed: bigint; }; export type PositionRewardInfoArgs = { growthInsideCheckpoint: number | bigint; amountOwed: number | bigint; }; export function getPositionRewardInfoEncoder(): FixedSizeEncoder { return getStructEncoder([ ["growthInsideCheckpoint", getU128Encoder()], ["amountOwed", getU64Encoder()], ]); } export function getPositionRewardInfoDecoder(): FixedSizeDecoder { return getStructDecoder([ ["growthInsideCheckpoint", getU128Decoder()], ["amountOwed", getU64Decoder()], ]); } export function getPositionRewardInfoCodec(): FixedSizeCodec< PositionRewardInfoArgs, PositionRewardInfo > { return combineCodec( getPositionRewardInfoEncoder(), getPositionRewardInfoDecoder(), ); }