/** * 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"; const AccountTypeLookup = { 0: "Uninitialized", 1: "StakePool", 2: "ValidatorList", Uninitialized: 0, StakePool: 1, ValidatorList: 2, } as const; /** Enum representing the account type managed by the program */ export const AccountType: Omit = AccountTypeLookup; export type AccountType = (typeof AccountType)[keyof typeof AccountType]; export type AccountTypeArgs = AccountType; export function getAccountTypeEncoder(): FixedSizeEncoder { return getEnumEncoder(AccountType); } export function getAccountTypeDecoder(): FixedSizeDecoder { return getEnumDecoder(AccountType); } export function getAccountTypeCodec(): FixedSizeCodec< AccountTypeArgs, AccountType > { return combineCodec(getAccountTypeEncoder(), getAccountTypeDecoder()); }