/
accounts.ts
35 lines (28 loc) · 1000 Bytes
/
accounts.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import {
CandyMachine,
CollectionPDA,
} from '@metaplex-foundation/mpl-candy-machine';
import {
Account,
getAccountParsingAndAssertingFunction,
getAccountParsingFunction,
MaybeAccount,
} from '@/types';
/** @group Accounts */
export type CandyMachineV2Account = Account<CandyMachine>;
/** @group Account Helpers */
export const parseCandyMachineV2Account =
getAccountParsingFunction(CandyMachine);
/** @group Account Helpers */
export const toCandyMachineV2Account =
getAccountParsingAndAssertingFunction(CandyMachine);
/** @group Accounts */
export type CandyMachineV2CollectionAccount = Account<CollectionPDA>;
/** @group Accounts */
export type MaybeCandyMachineV2CollectionAccount = MaybeAccount<CollectionPDA>;
/** @group Account Helpers */
export const parseCandyMachineV2CollectionAccount =
getAccountParsingFunction(CollectionPDA);
/** @group Account Helpers */
export const toCandyMachineV2CollectionAccount =
getAccountParsingAndAssertingFunction(CollectionPDA);