/** * This code was GENERATED using the solita package. * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. * * See: https://github.com/metaplex-foundation/solita */ import * as beet from '@metaplex-foundation/beet'; import { HiveControlPermission } from './HiveControlPermission'; import { CharacterManagerPermissions } from './CharacterManagerPermissions'; import { ResourceManagerPermission } from './ResourceManagerPermission'; import { NectarStakingPermission } from './NectarStakingPermission'; import { NectarMissionsPermission } from './NectarMissionsPermission'; import { BuzzGuildPermission } from './BuzzGuildPermission'; /** * This type is used to derive the {@link ServiceDelegation} type as well as the de/serializer. * However don't refer to it in your code but use the {@link ServiceDelegation} type instead. * * @category userTypes * @category enums * @category generated * @private */ export type ServiceDelegationRecord = { HiveControl: { permission: HiveControlPermission; }; CharacterManager: { index: number; permission: CharacterManagerPermissions; }; ResourceManager: { permission: ResourceManagerPermission; }; NectarStaking: { index: number; permission: NectarStakingPermission; }; NectarMissions: { index: number; permission: NectarMissionsPermission; }; BuzzGuild: { index: number; permission: BuzzGuildPermission; }; }; /** * Union type respresenting the ServiceDelegation data enum defined in Rust. * * NOTE: that it includes a `__kind` property which allows to narrow types in * switch/if statements. * Additionally `isServiceDelegation*` type guards are exposed below to narrow to a specific variant. * * @category userTypes * @category enums * @category generated */ export type ServiceDelegation = beet.DataEnumKeyAsKind; export declare const isServiceDelegationHiveControl: (x: ServiceDelegation) => x is { __kind: "HiveControl"; } & Omit<{ permission: HiveControlPermission; }, "void"> & { __kind: 'HiveControl'; }; export declare const isServiceDelegationCharacterManager: (x: ServiceDelegation) => x is { __kind: "CharacterManager"; } & Omit<{ index: number; permission: CharacterManagerPermissions; }, "void"> & { __kind: 'CharacterManager'; }; export declare const isServiceDelegationResourceManager: (x: ServiceDelegation) => x is { __kind: "ResourceManager"; } & Omit<{ permission: ResourceManagerPermission; }, "void"> & { __kind: 'ResourceManager'; }; export declare const isServiceDelegationNectarStaking: (x: ServiceDelegation) => x is { __kind: "NectarStaking"; } & Omit<{ index: number; permission: NectarStakingPermission; }, "void"> & { __kind: 'NectarStaking'; }; export declare const isServiceDelegationNectarMissions: (x: ServiceDelegation) => x is { __kind: "NectarMissions"; } & Omit<{ index: number; permission: NectarMissionsPermission; }, "void"> & { __kind: 'NectarMissions'; }; export declare const isServiceDelegationBuzzGuild: (x: ServiceDelegation) => x is { __kind: "BuzzGuild"; } & Omit<{ index: number; permission: BuzzGuildPermission; }, "void"> & { __kind: 'BuzzGuild'; }; export declare const serviceDelegationBeet: beet.FixableBeet;