/** * 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, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; import { getMinorFactionIdDecoder, getMinorFactionIdEncoder, type MinorFactionId, type MinorFactionIdArgs, } from '.'; export type TransferFactionOwnershipArgs = { /** New dynamic controller (0 = hand back to legacy/contestable). */ newController: MinorFactionId; /** New contested window (0 = immediately capturable). */ contestedUntil: bigint; }; export type TransferFactionOwnershipArgsArgs = { /** New dynamic controller (0 = hand back to legacy/contestable). */ newController: MinorFactionIdArgs; /** New contested window (0 = immediately capturable). */ contestedUntil: number | bigint; }; export function getTransferFactionOwnershipArgsEncoder(): FixedSizeEncoder { return getStructEncoder([ ['newController', getMinorFactionIdEncoder()], ['contestedUntil', getI64Encoder()], ]); } export function getTransferFactionOwnershipArgsDecoder(): FixedSizeDecoder { return getStructDecoder([ ['newController', getMinorFactionIdDecoder()], ['contestedUntil', getI64Decoder()], ]); } export function getTransferFactionOwnershipArgsCodec(): FixedSizeCodec< TransferFactionOwnershipArgsArgs, TransferFactionOwnershipArgs > { return combineCodec( getTransferFactionOwnershipArgsEncoder(), getTransferFactionOwnershipArgsDecoder(), ); }