/** * 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, getAddressDecoder, getAddressEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, type Address, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getCargoPodDecoder, getCargoPodEncoder, type CargoPod, type CargoPodArgs, } from '.'; /** Represents loot at a location */ export type LootInfo = { /** the time the exclusivity lock expires */ exclusivityUnlockTime: bigint; /** exclusive access to loot until exclusivity_unlock_time passes */ destroyer: Address; /** `0` for ordinary carried cargo. Reward items stay owner-locked until this reclaim timestamp. */ rewardReclaimAt: bigint; /** the loot */ loot: CargoPod; }; export type LootInfoArgs = { /** the time the exclusivity lock expires */ exclusivityUnlockTime: number | bigint; /** exclusive access to loot until exclusivity_unlock_time passes */ destroyer: Address; /** `0` for ordinary carried cargo. Reward items stay owner-locked until this reclaim timestamp. */ rewardReclaimAt: number | bigint; /** the loot */ loot: CargoPodArgs; }; export function getLootInfoEncoder(): Encoder { return getStructEncoder([ ['exclusivityUnlockTime', getI64Encoder()], ['destroyer', getAddressEncoder()], ['rewardReclaimAt', getI64Encoder()], ['loot', getCargoPodEncoder()], ]); } export function getLootInfoDecoder(): Decoder { return getStructDecoder([ ['exclusivityUnlockTime', getI64Decoder()], ['destroyer', getAddressDecoder()], ['rewardReclaimAt', getI64Decoder()], ['loot', getCargoPodDecoder()], ]); } export function getLootInfoCodec(): Codec { return combineCodec(getLootInfoEncoder(), getLootInfoDecoder()); }