/** * 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, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; /** * One destroyed player fleet's deterministic recipient and authored reward amounts. The future hash * chooses only the salvage table outcome; it cannot change the recipient or economic target. */ export type CombatRewardLeg = { recipient: Address; medallions: bigint; salvageTargetValue: bigint; }; export type CombatRewardLegArgs = { recipient: Address; medallions: number | bigint; salvageTargetValue: number | bigint; }; export function getCombatRewardLegEncoder(): FixedSizeEncoder { return getStructEncoder([ ['recipient', getAddressEncoder()], ['medallions', getU64Encoder()], ['salvageTargetValue', getU64Encoder()], ]); } export function getCombatRewardLegDecoder(): FixedSizeDecoder { return getStructDecoder([ ['recipient', getAddressDecoder()], ['medallions', getU64Decoder()], ['salvageTargetValue', getU64Decoder()], ]); } export function getCombatRewardLegCodec(): FixedSizeCodec< CombatRewardLegArgs, CombatRewardLeg > { return combineCodec(getCombatRewardLegEncoder(), getCombatRewardLegDecoder()); }