/** * 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 KeyLookup = { 0: "Uninitialized", 1: "RuleSet", 2: "Frequency", Uninitialized: 0, RuleSet: 1, Frequency: 2, } as const; /** Discriminator identifying the type of an auth-rules account. */ export const Key: Omit = KeyLookup; export type Key = (typeof Key)[keyof typeof Key]; export type KeyArgs = Key; export function getKeyEncoder(): FixedSizeEncoder { return getEnumEncoder(Key); } export function getKeyDecoder(): FixedSizeDecoder { return getEnumDecoder(Key); } export function getKeyCodec(): FixedSizeCodec { return combineCodec(getKeyEncoder(), getKeyDecoder()); }