/** * 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 web3 from '@solana/web3.js'; import * as beet from '@metaplex-foundation/beet'; import { ShortVec } from '@honeycomb-protocol/toolkit'; import { EarnedReward } from './EarnedReward'; import { GuildRole } from './GuildRole'; import { SchemaValue } from './SchemaValue'; /** * This type is used to derive the {@link CharacterUsedBy} type as well as the de/serializer. * However don't refer to it in your code but use the {@link CharacterUsedBy} type instead. * * @category userTypes * @category enums * @category generated * @private */ export type CharacterUsedByRecord = { None: void; Staking: { pool: web3.PublicKey; staker: web3.PublicKey; stakedAt: beet.bignum; claimedAt: beet.bignum; }; Mission: { participationId: beet.bignum; missionId: web3.PublicKey; rewards: ShortVec; endTime: beet.bignum; }; Guild: { id: web3.PublicKey; role: GuildRole; order: number; }; Ejected: void; Custom: { user: web3.PublicKey; data: SchemaValue; }; }; /** * Union type respresenting the CharacterUsedBy data enum defined in Rust. * * NOTE: that it includes a `__kind` property which allows to narrow types in * switch/if statements. * Additionally `isCharacterUsedBy*` type guards are exposed below to narrow to a specific variant. * * @category userTypes * @category enums * @category generated */ export type CharacterUsedBy = beet.DataEnumKeyAsKind; export declare const isCharacterUsedByNone: (x: CharacterUsedBy) => x is { __kind: "None"; } & Omit & { __kind: 'None'; }; export declare const isCharacterUsedByStaking: (x: CharacterUsedBy) => x is { __kind: "Staking"; } & Omit<{ pool: web3.PublicKey; staker: web3.PublicKey; stakedAt: beet.bignum; claimedAt: beet.bignum; }, "void"> & { __kind: 'Staking'; }; export declare const isCharacterUsedByMission: (x: CharacterUsedBy) => x is { __kind: "Mission"; } & Omit<{ participationId: beet.bignum; missionId: web3.PublicKey; rewards: ShortVec; endTime: beet.bignum; }, "void"> & { __kind: 'Mission'; }; export declare const isCharacterUsedByGuild: (x: CharacterUsedBy) => x is { __kind: "Guild"; } & Omit<{ id: web3.PublicKey; role: GuildRole; order: number; }, "void"> & { __kind: 'Guild'; }; export declare const isCharacterUsedByEjected: (x: CharacterUsedBy) => x is { __kind: "Ejected"; } & Omit & { __kind: 'Ejected'; }; export declare const isCharacterUsedByCustom: (x: CharacterUsedBy) => x is { __kind: "Custom"; } & Omit<{ user: web3.PublicKey; data: SchemaValue; }, "void"> & { __kind: 'Custom'; }; export declare const characterUsedByBeet: beet.FixableBeet;