-
Notifications
You must be signed in to change notification settings - Fork 25
/
hypercerts.ts
27 lines (25 loc) · 931 Bytes
/
hypercerts.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
/**
* Represents the possible transfer restrictions of a claim matching the hypercerts protocol.
*
* @typedef {Object} TransferRestrictions
* @property {number} AllowAll - Represents no restrictions on the transfer of the claim.
* @property {number} DisallowAll - Represents complete restriction on the transfer of the claim.
* @property {number} FromCreatorOnly - Represents that the claim can only be transferred by its creator.
*/
export const TransferRestrictions = {
AllowAll: 0,
DisallowAll: 1,
FromCreatorOnly: 2,
} as const;
export type TransferRestrictions = (typeof TransferRestrictions)[keyof typeof TransferRestrictions];
/**
* Represents an entry in an allowlist.
*
* @typedef {Object} AllowlistEntry
* @property {string} address - The address of the entry.
* @property {bigint} units - The units associated with the entry.
*/
export type AllowlistEntry = {
address: string;
units: bigint;
};