/** * 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, getEnumDecoder, getEnumEncoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; /** * Pairwise faction relationship. Dual-use (the value stored in [`RelationEntry`] AND the `rel` arg of * `SetFactionRelation`) → mirror [`FactionStatus`](crate::state::FactionStatus): explicit Borsh * (variant-aware, for the ix arg + IDL) + bytemuck (for the packed account field). NOT `borsh_with_bytemuck!`. */ export enum Relationship { Neutral, Allied, Hostile, Ceasefire, } export type RelationshipArgs = Relationship; export function getRelationshipEncoder(): FixedSizeEncoder { return getEnumEncoder(Relationship); } export function getRelationshipDecoder(): FixedSizeDecoder { return getEnumDecoder(Relationship); } export function getRelationshipCodec(): FixedSizeCodec< RelationshipArgs, Relationship > { return combineCodec(getRelationshipEncoder(), getRelationshipDecoder()); }