@fxhash/shared 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,611 +1,623 @@
1
- import { GPURenderingConfig } from '@fxhash/config';
2
- import { PromiseResult } from '@fxhash/utils';
3
- import { JwtPayload } from 'jwt-decode';
1
+ import { PromiseResult } from "@fxhash/utils";
2
+ import { GPURenderingConfig } from "@fxhash/config";
3
+ import { JwtPayload } from "jwt-decode";
4
4
 
5
+ //#region src/types/entities/Pricing.d.ts
5
6
  interface IPricingFixed<GNumber = number, GDate = Date> {
6
- id?: string;
7
- price: GNumber;
8
- opensAt?: GDate | null;
9
- frameMinting?: {
10
- enabled?: boolean;
11
- mintsPerFid?: number;
12
- };
7
+ id?: string;
8
+ price: GNumber;
9
+ opensAt?: GDate | null;
10
+ frameMinting?: {
11
+ enabled?: boolean;
12
+ mintsPerFid?: number;
13
+ };
13
14
  }
14
15
  interface IPricingDutchAuction<N = number> {
15
- id?: string;
16
- levels: N[];
17
- restingPrice?: number;
18
- finalPrice?: number;
19
- decrementDuration: N;
20
- opensAt: Date;
21
- refundable: boolean;
22
- }
23
-
16
+ id?: string;
17
+ levels: N[];
18
+ restingPrice?: number;
19
+ finalPrice?: number;
20
+ decrementDuration: N;
21
+ opensAt: Date;
22
+ refundable: boolean;
23
+ }
24
+ //#endregion
25
+ //#region src/types/entities/MediaImage.d.ts
24
26
  interface MediaImage$1 {
25
- id: string;
26
- width?: number;
27
- height?: number;
28
- metadata?: {} | null;
29
- mimeType?: string;
30
- placeholder?: string;
31
- processed: boolean;
32
- }
33
-
27
+ id: string;
28
+ width?: number;
29
+ height?: number;
30
+ metadata?: {} | null;
31
+ mimeType?: string;
32
+ placeholder?: string;
33
+ processed: boolean;
34
+ }
35
+ //#endregion
36
+ //#region src/types/entities/Split.d.ts
34
37
  interface ISplit {
35
- address: string;
36
- pct: number;
38
+ address: string;
39
+ pct: number;
37
40
  }
38
41
  interface Split {
39
- pct: number;
40
- user: User;
42
+ pct: number;
43
+ user: User;
41
44
  }
42
-
45
+ //#endregion
46
+ //#region src/types/entities/Article.d.ts
43
47
  declare enum ArticleFlag {
44
- NONE = "NONE",
45
- CLEAN = "CLEAN",
46
- REPORTED = "REPORTED",
47
- AUTO_DETECT_COPY = "AUTO_DETECT_COPY",
48
- MALICIOUS = "MALICIOUS",
49
- HIDDEN = "HIDDEN"
48
+ NONE = "NONE",
49
+ CLEAN = "CLEAN",
50
+ REPORTED = "REPORTED",
51
+ AUTO_DETECT_COPY = "AUTO_DETECT_COPY",
52
+ MALICIOUS = "MALICIOUS",
53
+ HIDDEN = "HIDDEN",
50
54
  }
51
55
  interface NTFArticleLedger {
52
- article: NFTArticle;
53
- owner: User;
54
- amount: number;
56
+ article: NFTArticle;
57
+ owner: User;
58
+ amount: number;
55
59
  }
56
60
  interface NFTArticleRevision {
57
- article: NFTArticle;
58
- iteration: number;
59
- metadataUri: string;
60
- createdAt: string;
61
- opHash: string;
61
+ article: NFTArticle;
62
+ iteration: number;
63
+ metadataUri: string;
64
+ createdAt: string;
65
+ opHash: string;
62
66
  }
63
67
  interface NFTArticleGenerativeToken {
64
- article: NFTArticle;
65
- generativeToken: GenerativeToken;
66
- line: number;
68
+ article: NFTArticle;
69
+ generativeToken: GenerativeToken;
70
+ line: number;
67
71
  }
68
72
  type NFTArticleInfos = Pick<NFTArticle, "id" | "title" | "flag" | "slug" | "thumbnailUri" | "thumbnailMedia" | "description" | "tags" | "author" | "createdAt" | "metadataLocked"> & {
69
- revisions?: NFTArticleRevision[];
73
+ revisions?: NFTArticleRevision[];
70
74
  };
71
75
  interface NFTArticle {
72
- id: number | string;
73
- slug: string;
74
- author?: User;
75
- ledgers: NTFArticleLedger[];
76
- generativeTokenJointures: NFTArticleGenerativeToken[];
77
- revisions: NFTArticleRevision[];
78
- royaltiesSplits: Split[];
79
- actions: Action[];
80
- title: string;
81
- description: string;
82
- body: string;
83
- tags: string[];
84
- language: string;
85
- metadataUri: string;
86
- metadata: ArticleMetadata;
87
- metadataLocked: boolean;
88
- artifactUri: string;
89
- displayUri: string;
90
- thumbnailUri: string;
91
- thumbnailCaption: string;
92
- thumbnailMedia?: MediaImage$1;
93
- platforms?: string[] | null;
94
- createdAt: string;
95
- editions: number;
96
- royalties: number;
97
- mintOpHash: string;
98
- relatedArticles: NFTArticle[];
99
- flag: ArticleFlag;
100
- moderationReason?: string;
76
+ id: number | string;
77
+ slug: string;
78
+ author?: User;
79
+ ledgers: NTFArticleLedger[];
80
+ generativeTokenJointures: NFTArticleGenerativeToken[];
81
+ revisions: NFTArticleRevision[];
82
+ royaltiesSplits: Split[];
83
+ actions: Action[];
84
+ title: string;
85
+ description: string;
86
+ body: string;
87
+ tags: string[];
88
+ language: string;
89
+ metadataUri: string;
90
+ metadata: ArticleMetadata;
91
+ metadataLocked: boolean;
92
+ artifactUri: string;
93
+ displayUri: string;
94
+ thumbnailUri: string;
95
+ thumbnailCaption: string;
96
+ thumbnailMedia?: MediaImage$1;
97
+ platforms?: string[] | null;
98
+ createdAt: string;
99
+ editions: number;
100
+ royalties: number;
101
+ mintOpHash: string;
102
+ relatedArticles: NFTArticle[];
103
+ flag: ArticleFlag;
104
+ moderationReason?: string;
101
105
  }
102
106
  interface NFTArticleFilters {
103
- author_eq?: string;
104
- metadataLocked_eq?: string;
105
- editions_lte?: string;
106
- editions_gte?: string;
107
- royalties_lte?: string;
108
- royalties_gte?: string;
109
- searchQuery_eq?: string;
110
- flag_in?: ArticleFlag[];
111
- flag_eq?: ArticleFlag;
112
- flag_ne?: ArticleFlag;
113
- }
114
-
107
+ author_eq?: string;
108
+ metadataLocked_eq?: string;
109
+ editions_lte?: string;
110
+ editions_gte?: string;
111
+ royalties_lte?: string;
112
+ royalties_gte?: string;
113
+ searchQuery_eq?: string;
114
+ flag_in?: ArticleFlag[];
115
+ flag_eq?: ArticleFlag;
116
+ flag_ne?: ArticleFlag;
117
+ }
118
+ //#endregion
119
+ //#region src/types/entities/ArticleGenerativeTokenMention.d.ts
115
120
  interface ArticleGenerativeTokenMention {
116
- line: number;
117
- article: NFTArticle;
118
- generativeToken: GenerativeToken;
121
+ line: number;
122
+ article: NFTArticle;
123
+ generativeToken: GenerativeToken;
119
124
  }
120
-
125
+ //#endregion
126
+ //#region src/types/entities/Listing.d.ts
121
127
  interface Listing {
122
- id: string;
123
- version: number;
124
- amount: number;
125
- issuer: User;
126
- issuerId: number;
127
- objkt: Objkt;
128
- price: number;
129
- royalties: number;
130
- createdAt: Date;
131
- updatedAt: Date;
132
- article: NFTArticle;
128
+ id: string;
129
+ version: number;
130
+ amount: number;
131
+ issuer: User;
132
+ issuerId: number;
133
+ objkt: Objkt;
134
+ price: number;
135
+ royalties: number;
136
+ createdAt: Date;
137
+ updatedAt: Date;
138
+ article: NFTArticle;
133
139
  }
134
140
  interface ListingFilters {
135
- price_gte?: string;
136
- price_lte?: string;
137
- fullyMinted_eq?: boolean;
138
- authorVerified_eq?: boolean;
139
- searchQuery_eq?: string;
140
- tokenSupply_lte?: number;
141
- tokenSupply_gte?: number;
142
- }
143
-
141
+ price_gte?: string;
142
+ price_lte?: string;
143
+ fullyMinted_eq?: boolean;
144
+ authorVerified_eq?: boolean;
145
+ searchQuery_eq?: string;
146
+ tokenSupply_lte?: number;
147
+ tokenSupply_gte?: number;
148
+ }
149
+ //#endregion
150
+ //#region src/types/entities/Offer.d.ts
144
151
  interface Offer {
145
- id: string;
146
- version: number;
147
- buyer: User;
148
- objkt: Objkt;
149
- price: number;
150
- createdAt: string;
151
- cancelledAt: string;
152
- acceptedAt: string;
152
+ id: string;
153
+ version: number;
154
+ buyer: User;
155
+ objkt: Objkt;
156
+ price: number;
157
+ createdAt: string;
158
+ cancelledAt: string;
159
+ acceptedAt: string;
153
160
  }
154
161
  interface CollectionOffer {
155
- id: string;
156
- version: number;
157
- buyer: User;
158
- token: GenerativeToken;
159
- price: number;
160
- amount: number;
161
- createdAt: string;
162
- cancelledAt: string;
163
- completedAt: string;
162
+ id: string;
163
+ version: number;
164
+ buyer: User;
165
+ token: GenerativeToken;
166
+ price: number;
167
+ amount: number;
168
+ createdAt: string;
169
+ cancelledAt: string;
170
+ completedAt: string;
164
171
  }
165
172
  type AnyOffer = Offer | CollectionOffer;
166
173
  declare const offerTypeGuard: (offer: AnyOffer) => offer is Offer;
167
-
174
+ //#endregion
175
+ //#region src/types/entities/EventMedia.d.ts
168
176
  interface EventMedia {
169
- s3key: string;
170
- name: string;
171
- url: string;
177
+ s3key: string;
178
+ name: string;
179
+ url: string;
172
180
  }
173
-
181
+ //#endregion
182
+ //#region src/types/entities/Redeemable.d.ts
174
183
  interface IAddress {
175
- firstName: string;
176
- lastName: string;
177
- address: string;
178
- postalCode: string;
179
- city: string;
180
- state: string;
181
- country: string;
184
+ firstName: string;
185
+ lastName: string;
186
+ address: string;
187
+ postalCode: string;
188
+ city: string;
189
+ state: string;
190
+ country: string;
182
191
  }
183
192
  interface Redeemable {
184
- address: string;
185
- token: GenerativeToken;
186
- baseAmount: number;
187
- maxConsumptionsPerToken: number;
188
- splits: Split[];
189
- redemptions: Redemption[];
190
- createdAt: string;
191
- redeemedPercentage: number;
193
+ address: string;
194
+ token: GenerativeToken;
195
+ baseAmount: number;
196
+ maxConsumptionsPerToken: number;
197
+ splits: Split[];
198
+ redemptions: Redemption[];
199
+ createdAt: string;
200
+ redeemedPercentage: number;
192
201
  }
193
202
  interface RedeemableOptionValue {
194
- label: string;
195
- amount: number;
203
+ label: string;
204
+ amount: number;
196
205
  }
197
206
  interface RedeemableOption {
198
- label: string;
199
- values: RedeemableOptionValue[];
207
+ label: string;
208
+ values: RedeemableOptionValue[];
200
209
  }
201
210
  declare enum RedeemableUserActionType {
202
- INPUT_ADDRESS = "INPUT_ADDRESS",
203
- INPUT_EMAIL = "INPUT_EMAIL",
204
- INPUT_PHONE = "INPUT_PHONE",
205
- INPUT_LIST = "INPUT_LIST"
211
+ INPUT_ADDRESS = "INPUT_ADDRESS",
212
+ INPUT_EMAIL = "INPUT_EMAIL",
213
+ INPUT_PHONE = "INPUT_PHONE",
214
+ INPUT_LIST = "INPUT_LIST",
206
215
  }
207
216
  interface RedeemableUserAction {
208
- id: string;
209
- type: RedeemableUserActionType;
210
- options: any;
217
+ id: string;
218
+ type: RedeemableUserActionType;
219
+ options: any;
211
220
  }
212
221
  interface RedeemablePublicDefinition {
213
- userActions: RedeemableUserAction[];
222
+ userActions: RedeemableUserAction[];
214
223
  }
215
224
  interface RedeemableDetails {
216
- address: string;
217
- name: string;
218
- active: boolean;
219
- amount: number;
220
- createdAt: Date;
221
- expiresAt: string | null;
222
- description: string;
223
- successInfos: string;
224
- fa2: string;
225
- maxConsumptions: number;
226
- options: RedeemableOption[];
227
- publicDefinition: RedeemablePublicDefinition;
228
- splits: ISplit[];
229
- medias: {
230
- index: number;
231
- media: EventMedia;
232
- }[];
233
- }
234
- type RedeemableUserActionOptions = {
235
- [T in RedeemableUserActionType]: {
236
- [RedeemableUserActionType.INPUT_ADDRESS]: {
237
- label: string;
238
- hint?: string;
239
- };
240
- [RedeemableUserActionType.INPUT_EMAIL]: {
241
- label: string;
242
- hint?: string;
243
- };
244
- [RedeemableUserActionType.INPUT_PHONE]: {
245
- label: string;
246
- hint?: string;
247
- };
248
- [RedeemableUserActionType.INPUT_LIST]: {
249
- label: string;
250
- hint?: string;
251
- values: string[];
252
- multiple: boolean;
253
- placeholder?: string;
254
- };
255
- }[T];
256
- };
257
- type RedeemableUserActionInputType = {
258
- [T in RedeemableUserActionType]: {
259
- [RedeemableUserActionType.INPUT_ADDRESS]: IAddress;
260
- [RedeemableUserActionType.INPUT_EMAIL]: string;
261
- [RedeemableUserActionType.INPUT_PHONE]: string;
262
- [RedeemableUserActionType.INPUT_LIST]: string;
263
- }[T];
264
- };
265
-
266
- interface Redemption {
267
- id: number;
268
- redeemable: Redeemable;
269
- objkt: Objkt;
270
- redeemer: User;
271
- createdAt: string;
225
+ address: string;
226
+ name: string;
227
+ active: boolean;
228
+ amount: number;
229
+ createdAt: Date;
230
+ expiresAt: string | null;
231
+ description: string;
232
+ successInfos: string;
233
+ fa2: string;
234
+ maxConsumptions: number;
235
+ options: RedeemableOption[];
236
+ publicDefinition: RedeemablePublicDefinition;
237
+ splits: ISplit[];
238
+ medias: {
239
+ index: number;
240
+ media: EventMedia;
241
+ }[];
272
242
  }
273
-
243
+ type RedeemableUserActionOptions = { [T in RedeemableUserActionType]: {
244
+ [RedeemableUserActionType.INPUT_ADDRESS]: {
245
+ label: string;
246
+ hint?: string;
247
+ };
248
+ [RedeemableUserActionType.INPUT_EMAIL]: {
249
+ label: string;
250
+ hint?: string;
251
+ };
252
+ [RedeemableUserActionType.INPUT_PHONE]: {
253
+ label: string;
254
+ hint?: string;
255
+ };
256
+ [RedeemableUserActionType.INPUT_LIST]: {
257
+ label: string;
258
+ hint?: string;
259
+ values: string[];
260
+ multiple: boolean;
261
+ placeholder?: string;
262
+ };
263
+ }[T] };
264
+ type RedeemableUserActionInputType = { [T in RedeemableUserActionType]: {
265
+ [RedeemableUserActionType.INPUT_ADDRESS]: IAddress;
266
+ [RedeemableUserActionType.INPUT_EMAIL]: string;
267
+ [RedeemableUserActionType.INPUT_PHONE]: string;
268
+ [RedeemableUserActionType.INPUT_LIST]: string;
269
+ }[T] };
270
+ //#endregion
271
+ //#region src/types/entities/Redemption.d.ts
272
+ interface Redemption {
273
+ id: number;
274
+ redeemable: Redeemable;
275
+ objkt: Objkt;
276
+ redeemer: User;
277
+ createdAt: string;
278
+ }
279
+ //#endregion
280
+ //#region src/types/entities/Objkt.d.ts
274
281
  interface Objkt {
275
- id: string;
276
- version: number;
277
- issuer: GenerativeToken;
278
- owner?: User | null;
279
- minter?: User | null;
280
- assigned?: boolean;
281
- generationHash?: string;
282
- inputBytes?: string | null;
283
- duplicate?: boolean;
284
- iteration?: number;
285
- mintedPrice?: number;
286
- tags: string[];
287
- name?: string;
288
- slug?: string;
289
- metadata?: ObjktMetadata;
290
- features?: TokenFeature[] | null;
291
- rarity?: number | null;
292
- metadataUri: string;
293
- royalties: number;
294
- royaltiesSplit: Split[];
295
- activeListing?: Listing | null;
296
- offers?: Offer[];
297
- actions?: Action[];
298
- createdAt: string;
299
- updatedAt: string;
300
- assignedAt: string | null;
301
- captureMedia?: MediaImage$1;
302
- redemptions: Redemption[];
303
- availableRedeemables: Redeemable[];
282
+ id: string;
283
+ version: number;
284
+ issuer: GenerativeToken;
285
+ owner?: User | null;
286
+ minter?: User | null;
287
+ assigned?: boolean;
288
+ generationHash?: string;
289
+ inputBytes?: string | null;
290
+ duplicate?: boolean;
291
+ iteration?: number;
292
+ mintedPrice?: number;
293
+ tags: string[];
294
+ name?: string;
295
+ slug?: string;
296
+ metadata?: ObjktMetadata;
297
+ features?: TokenFeature[] | null;
298
+ rarity?: number | null;
299
+ metadataUri: string;
300
+ royalties: number;
301
+ royaltiesSplit: Split[];
302
+ activeListing?: Listing | null;
303
+ offers?: Offer[];
304
+ actions?: Action[];
305
+ createdAt: string;
306
+ updatedAt: string;
307
+ assignedAt: string | null;
308
+ captureMedia?: MediaImage$1;
309
+ redemptions: Redemption[];
310
+ availableRedeemables: Redeemable[];
304
311
  }
305
312
  interface ObjktFilters {
306
- activeListing_exist?: boolean;
307
- redeemable_eq?: boolean;
308
- redeemed_eq?: boolean;
313
+ activeListing_exist?: boolean;
314
+ redeemable_eq?: boolean;
315
+ redeemed_eq?: boolean;
309
316
  }
310
317
  declare enum EObjktFeatureType {
311
- BOOLEAN = "BOOLEAN",
312
- STRING = "STRING",
313
- NUMBER = "NUMBER"
318
+ BOOLEAN = "BOOLEAN",
319
+ STRING = "STRING",
320
+ NUMBER = "NUMBER",
314
321
  }
315
322
  interface IObjktFeatureFilter {
316
- name: string;
317
- values: string[];
318
- type: EObjktFeatureType;
323
+ name: string;
324
+ values: string[];
325
+ type: EObjktFeatureType;
319
326
  }
320
327
  declare function objktFeatureType(value: any): EObjktFeatureType;
321
-
328
+ //#endregion
329
+ //#region src/types/entities/Report.d.ts
322
330
  interface Report {
323
- id: string;
324
- user?: User;
325
- token?: GenerativeToken;
326
- createdAt: Date;
331
+ id: string;
332
+ user?: User;
333
+ token?: GenerativeToken;
334
+ createdAt: Date;
327
335
  }
328
-
336
+ //#endregion
337
+ //#region src/types/entities/Reserve.d.ts
329
338
  declare enum EReserveMethod {
330
- WHITELIST = "WHITELIST",
331
- MINT_PASS = "MINT_PASS"
339
+ WHITELIST = "WHITELIST",
340
+ MINT_PASS = "MINT_PASS",
332
341
  }
333
342
  interface IWhitelistData<T = number> {
334
- address: string;
335
- pct: T;
343
+ address: string;
344
+ pct: T;
336
345
  }
337
346
  type ReserveWhiteList<T = number> = {
338
- method: EReserveMethod.WHITELIST;
339
- data: IWhitelistData<T>[];
340
- amount: T;
347
+ method: EReserveMethod.WHITELIST;
348
+ data: IWhitelistData<T>[];
349
+ amount: T;
341
350
  };
342
351
  declare function isReserveWhiteList(reserve: IReserve): reserve is ReserveWhiteList;
343
352
  type ReserveMintPass<T = number> = {
344
- method: EReserveMethod.MINT_PASS;
345
- data: string;
346
- amount: T;
353
+ method: EReserveMethod.MINT_PASS;
354
+ data: string;
355
+ amount: T;
347
356
  };
348
357
  declare function isReserveMintPass<T = number>(reserve: IReserve<T>): reserve is ReserveMintPass<T>;
349
358
  type IReserve<T = number> = ReserveWhiteList<T> | ReserveMintPass<T>;
350
359
  interface IReserveMintInput {
351
- method: EReserveMethod;
352
- data: any;
360
+ method: EReserveMethod;
361
+ data: any;
353
362
  }
354
-
363
+ //#endregion
364
+ //#region src/types/entities/MintTicket.d.ts
355
365
  interface MintTicket {
356
- id: number;
357
- token: GenerativeToken;
358
- owner: User;
359
- createdAt: Date;
360
- price: number;
361
- taxationLocked: string;
362
- taxationStart: Date;
363
- taxationPaidUntil: Date;
364
- settings: MintTicketSettings;
366
+ id: number;
367
+ token: GenerativeToken;
368
+ owner: User;
369
+ createdAt: Date;
370
+ price: number;
371
+ taxationLocked: string;
372
+ taxationStart: Date;
373
+ taxationPaidUntil: Date;
374
+ settings: MintTicketSettings;
365
375
  }
366
376
  interface MintTicketSettings {
367
- token: GenerativeToken;
368
- gracingPeriod: number;
369
- metadata: MintTicketMetadata;
370
- metadataUri?: string;
371
- captureMedia?: MediaImage$1;
372
- }
373
- interface MintTicketMetadata {
374
- }
375
-
377
+ token: GenerativeToken;
378
+ gracingPeriod: number;
379
+ metadata: MintTicketMetadata;
380
+ metadataUri?: string;
381
+ captureMedia?: MediaImage$1;
382
+ }
383
+ interface MintTicketMetadata {}
384
+ //#endregion
385
+ //#region src/types/entities/GenerativeToken.d.ts
376
386
  declare enum GenTokFlag {
377
- NONE = "NONE",
378
- CLEAN = "CLEAN",
379
- REPORTED = "REPORTED",
380
- AUTO_DETECT_COPY = "AUTO_DETECT_COPY",
381
- MALICIOUS = "MALICIOUS",
382
- HIDDEN = "HIDDEN"
387
+ NONE = "NONE",
388
+ CLEAN = "CLEAN",
389
+ REPORTED = "REPORTED",
390
+ AUTO_DETECT_COPY = "AUTO_DETECT_COPY",
391
+ MALICIOUS = "MALICIOUS",
392
+ HIDDEN = "HIDDEN",
383
393
  }
384
394
  declare enum GenerativeTokenFormat {
385
- LONG_FORM = "LONG_FORM",
386
- OPEN_FORM = "OPEN_FORM"
395
+ LONG_FORM = "LONG_FORM",
396
+ OPEN_FORM = "OPEN_FORM",
387
397
  }
388
398
  declare enum GenTokPricing {
389
- FIXED = "FIXED",
390
- DUTCH_AUCTION = "DUTCH_AUCTION"
399
+ FIXED = "FIXED",
400
+ DUTCH_AUCTION = "DUTCH_AUCTION",
391
401
  }
392
402
  declare enum GenTokLabel {
393
- EPILEPTIC_TRIGGER = 0,
394
- SEXUAL_CONTENT = 1,
395
- SENSITIVE = 2,
396
- IMAGE_COMPOSITION = 100,
397
- ANIMATED = 101,
398
- INTERACTIVE = 102,
399
- PFP = 103,
400
- AUDIO = 104,
401
- INCLUDE_PRERENDERED_COMPONENTS = 105,
402
- CUSTOM_MINTING_INTERFACE = 106,
403
- FXHACKATHON2023 = 302023
403
+ EPILEPTIC_TRIGGER = 0,
404
+ SEXUAL_CONTENT = 1,
405
+ SENSITIVE = 2,
406
+ IMAGE_COMPOSITION = 100,
407
+ ANIMATED = 101,
408
+ INTERACTIVE = 102,
409
+ PFP = 103,
410
+ AUDIO = 104,
411
+ INCLUDE_PRERENDERED_COMPONENTS = 105,
412
+ CUSTOM_MINTING_INTERFACE = 106,
413
+ FXHACKATHON2023 = 302023,
404
414
  }
405
415
  declare enum GenTokLabelGroup {
406
- WARNING = "WARNING",
407
- DETAILS = "DETAILS",
408
- HIGHLIGHT = "HIGHLIGHT"
416
+ WARNING = "WARNING",
417
+ DETAILS = "DETAILS",
418
+ HIGHLIGHT = "HIGHLIGHT",
409
419
  }
410
420
  interface GenTokLabelDefinition {
411
- label: string;
412
- shortLabel: string;
413
- group: GenTokLabelGroup;
414
- description?: string;
415
- icon?: string;
416
- showWarningSetting?: string;
417
- showWarningOn?: "preview" | "run";
421
+ label: string;
422
+ shortLabel: string;
423
+ group: GenTokLabelGroup;
424
+ description?: string;
425
+ icon?: string;
426
+ showWarningSetting?: string;
427
+ showWarningOn?: "preview" | "run";
418
428
  }
419
429
  declare const GenTokLabel_Params: GenTokLabelDefinition;
420
430
  declare const GenTokLabel_Redeemable: GenTokLabelDefinition;
421
431
  interface GenerativeTokenMarketStats {
422
- floor: number | null;
423
- median: number | null;
424
- listed: number | null;
425
- highestSold: number | null;
426
- lowestSold: number | null;
427
- primVolume: number | null;
428
- primVolumeFiat: number | null;
429
- primVolumeNb: number | null;
430
- secVolume: number | null;
431
- secVolumeFiat: number | null;
432
- secVolumeNb: number | null;
433
- secVolume24: number | null;
434
- secVolumeFiat24: number | null;
435
- secVolumeNb24: number | null;
436
- secVolume7d: number | null;
437
- secVolumeFiat7d: number | null;
438
- secVolumeNb7d: number | null;
439
- secVolume30d: number | null;
440
- secVolumeFiat30d: number | null;
441
- secVolumeNb30d: number | null;
442
- generativeToken?: GenerativeToken;
432
+ floor: number | null;
433
+ median: number | null;
434
+ listed: number | null;
435
+ highestSold: number | null;
436
+ lowestSold: number | null;
437
+ primVolume: number | null;
438
+ primVolumeFiat: number | null;
439
+ primVolumeNb: number | null;
440
+ secVolume: number | null;
441
+ secVolumeFiat: number | null;
442
+ secVolumeNb: number | null;
443
+ secVolume24: number | null;
444
+ secVolumeFiat24: number | null;
445
+ secVolumeNb24: number | null;
446
+ secVolume7d: number | null;
447
+ secVolumeFiat7d: number | null;
448
+ secVolumeNb7d: number | null;
449
+ secVolume30d: number | null;
450
+ secVolumeFiat30d: number | null;
451
+ secVolumeNb30d: number | null;
452
+ generativeToken?: GenerativeToken;
443
453
  }
444
454
  interface GenerativeTokenMarketStatsHistory {
445
- floor: number | null;
446
- median: number | null;
447
- listed: number | null;
448
- highestSold: number | null;
449
- lowestSold: number | null;
450
- primVolume: number | null;
451
- primVolumeFiat: number | null;
452
- primVolumeNb: number | null;
453
- secVolume: number | null;
454
- secVolumeFiat: number | null;
455
- secVolumeNb: number | null;
456
- from: string;
457
- to: string;
455
+ floor: number | null;
456
+ median: number | null;
457
+ listed: number | null;
458
+ highestSold: number | null;
459
+ lowestSold: number | null;
460
+ primVolume: number | null;
461
+ primVolumeFiat: number | null;
462
+ primVolumeNb: number | null;
463
+ secVolume: number | null;
464
+ secVolumeFiat: number | null;
465
+ secVolumeNb: number | null;
466
+ from: string;
467
+ to: string;
458
468
  }
459
469
  declare enum GenerativeTokenVersion {
460
- "PRE_V3" = "PRE_V3",
461
- V3 = "V3",
462
- ETH_V1 = "ETH_V1",
463
- BASE_V1 = "BASE_V1"
470
+ "PRE_V3" = "PRE_V3",
471
+ V3 = "V3",
472
+ ETH_V1 = "ETH_V1",
473
+ BASE_V1 = "BASE_V1",
464
474
  }
465
475
  interface GenerativeToken {
466
- id: string;
467
- version: GenerativeTokenVersion;
468
- author: User;
469
- name: string;
470
- flag: GenTokFlag;
471
- reports?: Report[];
472
- slug?: string;
473
- metadata: GenerativeTokenMetadata;
474
- metadataUri?: string;
475
- generativeUri?: string;
476
- thumbnailUri?: string;
477
- displayUri?: string;
478
- tags?: string[];
479
- labels?: number[];
480
- price: number;
481
- pricingFixed?: IPricingFixed;
482
- pricingDutchAuction?: IPricingDutchAuction;
483
- originalSupply: number;
484
- supply: number;
485
- balance: number;
486
- iterationsCount?: number;
487
- openEditions: boolean;
488
- openEditionsEndsAt?: string | null;
489
- enabled: boolean;
490
- royalties: number;
491
- splitsPrimary: Split[];
492
- splitsSecondary: Split[];
493
- reserves: IReserve[];
494
- lockedSeconds: number;
495
- lockEnd: string;
496
- mintOpensAt?: string;
497
- objkts: Objkt[];
498
- actions: Action[];
499
- objktsCount?: number;
500
- createdAt: string;
501
- marketStats?: GenerativeTokenMarketStats;
502
- marketStatsHistory?: GenerativeTokenMarketStatsHistory[];
503
- features?: GenerativeTokenFeature[];
504
- moderationReason?: string | null;
505
- entireCollection?: Objkt[];
506
- articleMentions?: ArticleGenerativeTokenMention[];
507
- captureMedia?: MediaImage$1;
508
- redeemables: Redeemable[];
509
- underAuctionMintTickets: MintTicket[];
510
- mintTickets: MintTicket[];
511
- mintTicketSettings: MintTicketSettings | null;
512
- inputBytesSize: number;
513
- gentkContractAddress: string;
514
- collectionOffers: CollectionOffer[];
515
- isFrame: boolean;
516
- maxMintsPerFid?: number;
476
+ id: string;
477
+ version: GenerativeTokenVersion;
478
+ author: User;
479
+ name: string;
480
+ flag: GenTokFlag;
481
+ reports?: Report[];
482
+ slug?: string;
483
+ metadata: GenerativeTokenMetadata;
484
+ metadataUri?: string;
485
+ generativeUri?: string;
486
+ thumbnailUri?: string;
487
+ displayUri?: string;
488
+ tags?: string[];
489
+ labels?: number[];
490
+ price: number;
491
+ pricingFixed?: IPricingFixed;
492
+ pricingDutchAuction?: IPricingDutchAuction;
493
+ originalSupply: number;
494
+ supply: number;
495
+ balance: number;
496
+ iterationsCount?: number;
497
+ openEditions: boolean;
498
+ openEditionsEndsAt?: string | null;
499
+ enabled: boolean;
500
+ royalties: number;
501
+ splitsPrimary: Split[];
502
+ splitsSecondary: Split[];
503
+ reserves: IReserve[];
504
+ lockedSeconds: number;
505
+ lockEnd: string;
506
+ mintOpensAt?: string;
507
+ objkts: Objkt[];
508
+ actions: Action[];
509
+ objktsCount?: number;
510
+ createdAt: string;
511
+ marketStats?: GenerativeTokenMarketStats;
512
+ marketStatsHistory?: GenerativeTokenMarketStatsHistory[];
513
+ features?: GenerativeTokenFeature[];
514
+ moderationReason?: string | null;
515
+ entireCollection?: Objkt[];
516
+ articleMentions?: ArticleGenerativeTokenMention[];
517
+ captureMedia?: MediaImage$1;
518
+ redeemables: Redeemable[];
519
+ underAuctionMintTickets: MintTicket[];
520
+ mintTickets: MintTicket[];
521
+ mintTicketSettings: MintTicketSettings | null;
522
+ inputBytesSize: number;
523
+ gentkContractAddress: string;
524
+ collectionOffers: CollectionOffer[];
525
+ isFrame: boolean;
526
+ maxMintsPerFid?: number;
517
527
  }
518
528
  interface GenerativeTokenWithCollection extends GenerativeToken {
519
- entireCollection: Objkt[];
529
+ entireCollection: Objkt[];
520
530
  }
521
531
  interface GenerativeTokenFilters {
522
- id_in?: number[];
523
- flag_eq?: GenTokFlag;
524
- flag_in?: GenTokFlag[];
525
- flag_neq?: GenTokFlag;
526
- price_gte?: number;
527
- price_lte?: number;
528
- mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
529
- authorVerified_eq?: boolean;
530
- searchQuery_eq?: string;
531
- supply_lte?: number;
532
- supply_gte?: number;
533
- pricingMethod_eq?: GenTokPricing;
534
- locked_eq?: boolean;
535
- mintOpened_eq?: boolean;
536
- fxparams_eq?: boolean;
537
- redeemable_eq?: boolean;
532
+ id_in?: number[];
533
+ flag_eq?: GenTokFlag;
534
+ flag_in?: GenTokFlag[];
535
+ flag_neq?: GenTokFlag;
536
+ price_gte?: number;
537
+ price_lte?: number;
538
+ mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
539
+ authorVerified_eq?: boolean;
540
+ searchQuery_eq?: string;
541
+ supply_lte?: number;
542
+ supply_gte?: number;
543
+ pricingMethod_eq?: GenTokPricing;
544
+ locked_eq?: boolean;
545
+ mintOpened_eq?: boolean;
546
+ fxparams_eq?: boolean;
547
+ redeemable_eq?: boolean;
538
548
  }
539
549
  interface GenerativeTokenFeatureValue {
540
- value: string | boolean | number;
541
- occur: number;
550
+ value: string | boolean | number;
551
+ occur: number;
542
552
  }
543
553
  interface GenerativeTokenFeature {
544
- name: string;
545
- values: GenerativeTokenFeatureValue[];
554
+ name: string;
555
+ values: GenerativeTokenFeatureValue[];
546
556
  }
547
-
557
+ //#endregion
558
+ //#region src/types/Math.d.ts
548
559
  type Vec2 = {
549
- x: number;
550
- y: number;
560
+ x: number;
561
+ y: number;
551
562
  };
552
-
563
+ //#endregion
564
+ //#region src/types/Mint.d.ts
553
565
  interface GenerativeTokenInformations {
554
- metadata: GenerativeTokenMetadata;
555
- editions: number;
556
- enabled: boolean;
557
- price?: number;
558
- royaties?: number;
566
+ metadata: GenerativeTokenMetadata;
567
+ editions: number;
568
+ enabled: boolean;
569
+ price?: number;
570
+ royaties?: number;
559
571
  }
560
572
  declare enum CaptureTriggerMode {
561
- DELAY = "DELAY",
562
- FN_TRIGGER = "FN_TRIGGER",
563
- FN_TRIGGER_GIF = "FN_TRIGGER_GIF"
573
+ DELAY = "DELAY",
574
+ FN_TRIGGER = "FN_TRIGGER",
575
+ FN_TRIGGER_GIF = "FN_TRIGGER_GIF",
564
576
  }
565
577
  declare const CaptureTriggerModeList: CaptureTriggerMode[];
566
578
  declare enum CaptureMode {
567
- CANVAS = "CANVAS",
568
- CUSTOM = "CUSTOM",
569
- VIEWPORT = "VIEWPORT"
579
+ CANVAS = "CANVAS",
580
+ CUSTOM = "CUSTOM",
581
+ VIEWPORT = "VIEWPORT",
570
582
  }
571
583
  declare const CaptureModeList: CaptureMode[];
572
584
  interface CaptureSettings {
573
- mode?: CaptureMode;
574
- triggerMode?: CaptureTriggerMode;
575
- canvasSelector?: string;
576
- delay?: number;
577
- resolution?: Vec2;
578
- gpu?: boolean;
579
- gif?: boolean;
580
- frameCount?: number;
581
- captureInterval?: number;
582
- playbackFps?: number;
583
- gpuVersion?: keyof GPURenderingConfig;
585
+ mode?: CaptureMode;
586
+ triggerMode?: CaptureTriggerMode;
587
+ canvasSelector?: string;
588
+ delay?: number;
589
+ resolution?: Vec2;
590
+ gpu?: boolean;
591
+ gif?: boolean;
592
+ frameCount?: number;
593
+ captureInterval?: number;
594
+ playbackFps?: number;
595
+ gpuVersion?: keyof GPURenderingConfig;
584
596
  }
585
597
  interface MintGenerativeParams {
586
- definition: any;
587
- inputBytesSize: number;
598
+ definition: any;
599
+ inputBytesSize: number;
588
600
  }
589
601
  interface MintGenerativeData<N = string> {
590
- onChain?: boolean;
591
- collaboration?: Collaboration | null;
592
- projectZipKey?: string;
593
- cidUrlParams?: string;
594
- authHash1?: string;
595
- previewHash?: string;
596
- previewIteration?: string;
597
- previewMinter?: string;
598
- previewInputBytes?: string | null;
599
- cidPreview?: string;
600
- cidThumbnail?: string;
601
- authHash2?: string;
602
- distribution?: GenTokDistributionForm<N>;
603
- captureSettings?: CaptureSettings;
604
- settings?: GenTokenSettings;
605
- params?: MintGenerativeParams;
606
- informations?: GenTokenInformationsForm;
607
- minted?: boolean;
608
- snippetVersion?: string | null;
602
+ onChain?: boolean;
603
+ collaboration?: Collaboration | null;
604
+ projectZipKey?: string;
605
+ cidUrlParams?: string;
606
+ authHash1?: string;
607
+ previewHash?: string;
608
+ previewIteration?: string;
609
+ previewMinter?: string;
610
+ previewInputBytes?: string | null;
611
+ cidPreview?: string;
612
+ cidThumbnail?: string;
613
+ authHash2?: string;
614
+ distribution?: GenTokDistributionForm<N>;
615
+ captureSettings?: CaptureSettings;
616
+ settings?: GenTokenSettings;
617
+ params?: MintGenerativeParams;
618
+ informations?: GenTokenInformationsForm;
619
+ minted?: boolean;
620
+ snippetVersion?: string | null;
609
621
  }
610
622
  /**
611
623
  * This type describes the constraints that can be applied to the minting of a generative token
@@ -617,531 +629,526 @@ interface MintGenerativeData<N = string> {
617
629
  */
618
630
  type ConstraintVariant = [string, string, string, string];
619
631
  interface GenTokConstrains {
620
- hashConstraints?: string[] | null;
621
- minterConstraints?: string[] | null;
622
- iterationConstraints?: string[] | null;
623
- paramsConstraints?: string[] | null;
632
+ hashConstraints?: string[] | null;
633
+ minterConstraints?: string[] | null;
634
+ iterationConstraints?: string[] | null;
635
+ paramsConstraints?: string[] | null;
624
636
  }
625
637
  interface ExplorationSettings extends GenTokConstrains {
626
- enabled: boolean;
638
+ enabled: boolean;
627
639
  }
628
640
  interface GenTokenSettings {
629
- exploration?: {
630
- preMint?: ExplorationSettings;
631
- postMint?: ExplorationSettings;
632
- };
641
+ exploration?: {
642
+ preMint?: ExplorationSettings;
643
+ postMint?: ExplorationSettings;
644
+ };
633
645
  }
634
646
  type FrameMintingFormValues = {
635
- enabled: boolean;
636
- mintsPerFid: number;
647
+ enabled: boolean;
648
+ mintsPerFid: number;
637
649
  };
638
650
  interface GenTokPricingForm<N> {
639
- pricingMethod?: GenTokPricing;
640
- pricingFixed: Partial<IPricingFixed<N>>;
641
- pricingDutchAuction: Partial<IPricingDutchAuction<N>>;
642
- lockForReserves?: boolean;
643
- royalties?: N;
644
- splitsPrimary: ISplit[];
645
- splitsSecondary: ISplit[];
651
+ pricingMethod?: GenTokPricing;
652
+ pricingFixed: Partial<IPricingFixed<N>>;
653
+ pricingDutchAuction: Partial<IPricingDutchAuction<N>>;
654
+ lockForReserves?: boolean;
655
+ royalties?: N;
656
+ splitsPrimary: ISplit[];
657
+ splitsSecondary: ISplit[];
646
658
  }
647
659
  declare enum GenTokEditions {
648
- FIXED = "FIXED",
649
- OPENED = "OPENED"
660
+ FIXED = "FIXED",
661
+ OPENED = "OPENED",
650
662
  }
651
663
  type GenTokOpenEditionsForm = {
652
- closesAt?: Date | null;
664
+ closesAt?: Date | null;
653
665
  };
654
666
  type GenTokFixedEditionsForm<N> = {
655
- amount: N;
667
+ amount: N;
656
668
  };
657
669
  type GenTokEditionsForm<N> = {
658
- type: GenTokEditions;
659
- fixed: GenTokFixedEditionsForm<N>;
660
- opened: GenTokOpenEditionsForm;
670
+ type: GenTokEditions;
671
+ fixed: GenTokFixedEditionsForm<N>;
672
+ opened: GenTokOpenEditionsForm;
661
673
  };
662
674
  interface GenTokDistributionForm<N> {
663
- editions: GenTokEditionsForm<N>;
664
- enabled: boolean;
665
- reserves: IReserve<N>[];
666
- gracingPeriod?: N;
667
- frameMinting?: FrameMintingFormValues;
675
+ editions: GenTokEditionsForm<N>;
676
+ enabled: boolean;
677
+ reserves: IReserve<N>[];
678
+ gracingPeriod?: N;
679
+ frameMinting?: FrameMintingFormValues;
668
680
  }
669
681
  interface GenTokenInformationsForm {
670
- name: string;
671
- description: string;
672
- mintingInstructions: string;
673
- childrenDescription: string;
674
- tags: string;
675
- labels: GenTokLabel[];
676
- }
677
-
682
+ name: string;
683
+ description: string;
684
+ mintingInstructions: string;
685
+ childrenDescription: string;
686
+ tags: string;
687
+ labels: GenTokLabel[];
688
+ }
689
+ //#endregion
690
+ //#region src/types/Metadata.d.ts
678
691
  interface TokenMetadata {
679
- "": string;
680
- name: string;
681
- symbol: string;
682
- decimals: number;
692
+ "": string;
693
+ name: string;
694
+ symbol: string;
695
+ decimals: number;
683
696
  }
684
697
  interface HistoryMetadata {
685
- [key: string]: any;
698
+ [key: string]: any;
686
699
  }
687
700
  interface TokenFormat {
688
- uri: string;
689
- mimeType: string;
701
+ uri: string;
702
+ mimeType: string;
690
703
  }
691
704
  type RawTokenFeatures = Record<string, any>;
692
705
  type TokenFeatureValueType = string | number | boolean;
693
706
  interface TokenMetadataFeature {
694
- name: string;
695
- value: TokenFeatureValueType;
707
+ name: string;
708
+ value: TokenFeatureValueType;
696
709
  }
697
710
  interface TokenFeature {
698
- name: string;
699
- value: TokenFeatureValueType;
700
- rarity?: number;
711
+ name: string;
712
+ value: TokenFeatureValueType;
713
+ rarity?: number;
701
714
  }
702
715
  declare enum ProcessRawTokenFeatureErrorType {
703
- UNKNOWN = "UNKNOWN",
704
- INVALID_PROPERTY_TYPE = "INVALID_PROPERTY_TYPE",
705
- INVALID_FEATURES_SIGNATURE = "INVALID_FEATURES_SIGNATURE"
716
+ UNKNOWN = "UNKNOWN",
717
+ INVALID_PROPERTY_TYPE = "INVALID_PROPERTY_TYPE",
718
+ INVALID_FEATURES_SIGNATURE = "INVALID_FEATURES_SIGNATURE",
706
719
  }
707
720
  declare const ProcessRawTokenFeatureErrorTypes: ProcessRawTokenFeatureErrorType[];
708
721
  type ProcessRawTokenFeatureError = {
709
- type: ProcessRawTokenFeatureErrorType;
710
- extra?: string;
722
+ type: ProcessRawTokenFeatureErrorType;
723
+ extra?: string;
711
724
  };
712
725
  type GenerativeTokenMetadataVersion = "0.1" | "0.2" | "0.3" | "0.4" | "0.5";
713
726
  type BaseGenerativeTokenMetadata = {
714
- name: string;
715
- description: string;
716
- childrenDescription: string;
717
- mintingInstructions: string;
718
- tags: string[];
719
- artifactUri: string;
720
- displayUri: string;
721
- thumbnailUri: string;
722
- generativeUri: string;
723
- authenticityHash: string;
724
- capture: CaptureSettings;
725
- settings?: GenTokenSettings | null;
726
- symbol: string;
727
- version?: GenerativeTokenMetadataVersion;
727
+ name: string;
728
+ description: string;
729
+ childrenDescription: string;
730
+ mintingInstructions: string;
731
+ tags: string[];
732
+ artifactUri: string;
733
+ displayUri: string;
734
+ thumbnailUri: string;
735
+ generativeUri: string;
736
+ authenticityHash: string;
737
+ capture: CaptureSettings;
738
+ settings?: GenTokenSettings | null;
739
+ symbol: string;
740
+ version?: GenerativeTokenMetadataVersion;
728
741
  };
729
742
  type GenerativeTokenMetadataV1 = BaseGenerativeTokenMetadata;
730
743
  type GenerativeTokenMetadataV2 = GenerativeTokenMetadataV1 & {
731
- previewHash?: string;
732
- previewIteration?: string;
733
- previewMinter?: string;
734
- previewInputBytes?: string;
735
- mintingInstructions: string;
744
+ previewHash?: string;
745
+ previewIteration?: string;
746
+ previewMinter?: string;
747
+ previewInputBytes?: string;
748
+ mintingInstructions: string;
736
749
  };
737
750
  type GenerativeTokenMetadataV3 = GenerativeTokenMetadataV2 & {
738
- params: {
739
- definition: any;
740
- inputBytesSize: number;
741
- };
742
- snippetVersion: string;
751
+ params: {
752
+ definition: any;
753
+ inputBytesSize: number;
754
+ };
755
+ snippetVersion: string;
743
756
  };
744
757
  type GenerativeTokenMetadataV4 = GenerativeTokenMetadataV3 & {
745
- primarySplits: ISplit[];
758
+ primarySplits: ISplit[];
746
759
  };
747
760
  type GenerativeTokenMetadataV5 = GenerativeTokenMetadataV4 & {
748
- chain: string;
761
+ chain: string;
749
762
  };
750
763
  type GenerativeTokenMetadataV6 = GenerativeTokenMetadataV5 & {
751
- previewParentHashes?: string[];
764
+ previewParentHashes?: string[];
752
765
  };
753
766
  type GenerativeTokenMetadata = GenerativeTokenMetadataV1 | (GenerativeTokenMetadataV2 & {
754
- version: "0.2";
767
+ version: "0.2";
755
768
  }) | (GenerativeTokenMetadataV3 & {
756
- version: "0.3";
769
+ version: "0.3";
757
770
  }) | (GenerativeTokenMetadataV4 & {
758
- version: "0.4";
771
+ version: "0.4";
759
772
  }) | (GenerativeTokenMetadataV5 & {
760
- version: "0.5";
773
+ version: "0.5";
761
774
  }) | (GenerativeTokenMetadataV6 & {
762
- version: "0.6";
775
+ version: "0.6";
763
776
  });
764
777
  type ObjktMetadata = {
765
- features?: TokenMetadataFeature[] | null;
778
+ features?: TokenMetadataFeature[] | null;
766
779
  } & GenerativeTokenMetadata;
767
780
  interface Eth721ContractMetadata {
768
- name: string;
769
- description: string;
770
- image: string;
771
- external_link: string;
772
- collaborators?: string[];
773
- ipfsBackupUri?: string;
774
- }
775
- interface Eth721ContractMetadata {
776
- name: string;
777
- description: string;
778
- image: string;
779
- external_link: string;
780
- collaborators?: string[];
781
- ipfsBackupUri?: string;
781
+ name: string;
782
+ description: string;
783
+ image: string;
784
+ external_link: string;
785
+ collaborators?: string[];
786
+ ipfsBackupUri?: string;
782
787
  }
783
788
  interface Eth721TokenMetadata {
784
- name: string;
785
- description: string;
786
- image: string;
787
- external_url: string;
788
- animation_url?: string;
789
- collaborators?: string[];
790
- ipfsBackupUri?: string;
789
+ name: string;
790
+ description: string;
791
+ image: string;
792
+ external_url: string;
793
+ animation_url?: string;
794
+ collaborators?: string[];
795
+ ipfsBackupUri?: string;
796
+ }
797
+ interface Eth721ContractMetadata {
798
+ name: string;
799
+ description: string;
800
+ image: string;
801
+ external_link: string;
802
+ collaborators?: string[];
803
+ ipfsBackupUri?: string;
791
804
  }
792
805
  interface Eth721TokenMetadata {
793
- name: string;
794
- description: string;
795
- image: string;
796
- external_url: string;
797
- animation_url?: string;
798
- collaborators?: string[];
799
- ipfsBackupUri?: string;
806
+ name: string;
807
+ description: string;
808
+ image: string;
809
+ external_url: string;
810
+ animation_url?: string;
811
+ collaborators?: string[];
812
+ ipfsBackupUri?: string;
800
813
  }
801
814
  interface ArticleMetadata {
802
- decimals: number;
803
- symbol: "ARTKL";
804
- name: string;
805
- description: string;
806
- minter?: string;
807
- creators?: string[];
808
- contributors?: string[];
809
- type: "article";
810
- tags: string[];
811
- language: string;
812
- artifactUri: string;
813
- displayUri: string;
814
- thumbnailUri: string;
815
- thumbnailCaption?: string;
816
- platforms?: string[];
815
+ decimals: number;
816
+ symbol: "ARTKL";
817
+ name: string;
818
+ description: string;
819
+ minter?: string;
820
+ creators?: string[];
821
+ contributors?: string[];
822
+ type: "article";
823
+ tags: string[];
824
+ language: string;
825
+ artifactUri: string;
826
+ displayUri: string;
827
+ thumbnailUri: string;
828
+ thumbnailCaption?: string;
829
+ platforms?: string[];
817
830
  }
818
831
  interface MarketplaceMetadataEvm {
819
- external: boolean;
820
- source?: string;
821
- hasRoyalties: boolean;
832
+ external: boolean;
833
+ source?: string;
834
+ hasRoyalties: boolean;
822
835
  }
823
-
836
+ //#endregion
837
+ //#region src/types/entities/Action.d.ts
824
838
  declare enum TokenActionType {
825
- NONE = "NONE",
826
- UPDATE_STATE = "UPDATE_STATE",
827
- UPDATE_PRICING = "UPDATE_PRICING",
828
- BURN_SUPPLY = "BURN_SUPPLY",
829
- CODEX_UPDATED = "CODEX_UPDATED",
830
- MINTED = "MINTED",
831
- MINTED_FROM = "MINTED_FROM",
832
- TICKET_MINTED = "TICKET_MINTED",
833
- TICKET_CLAIMED = "TICKET_CLAIMED",
834
- TICKET_PRICE_UPDATED = "TICKET_PRICE_UPDATED",
835
- GENTK_SIGNED = "GENTK_SIGNED",
836
- GENTK_REVEALED = "GENTK_REVEALED",
837
- GENTK_REDEEMED = "GENTK_REDEEMED",
838
- COMPLETED = "COMPLETED",
839
- TRANSFERED = "TRANSFERED",
840
- LISTING_V1 = "LISTING_V1",
841
- LISTING_V1_CANCELLED = "LISTING_V1_CANCELLED",
842
- LISTING_V1_ACCEPTED = "LISTING_V1_ACCEPTED",
843
- LISTING_ETH_V1 = "LISTING_ETH_V1",
844
- LISTING_BASE_V1 = "LISTING_BASE_V1",
845
- LISTING_ETH_V1_CANCELLED = "LISTING_ETH_V1_CANCELLED",
846
- LISTING_BASE_V1_CANCELLED = "LISTING_BASE_V1_CANCELLED",
847
- LISTING_ETH_V1_ACCEPTED = "LISTING_ETH_V1_ACCEPTED",
848
- LISTING_BASE_V1_ACCEPTED = "LISTING_BASE_V1_ACCEPTED",
849
- LISTING_V2 = "LISTING_V2",
850
- LISTING_V2_CANCELLED = "LISTING_V2_CANCELLED",
851
- LISTING_V2_ACCEPTED = "LISTING_V2_ACCEPTED",
852
- LISTING_V3 = "LISTING_V3",
853
- LISTING_V3_CANCELLED = "LISTING_V3_CANCELLED",
854
- LISTING_V3_ACCEPTED = "LISTING_V3_ACCEPTED",
855
- OFFER = "OFFER",
856
- OFFER_CANCELLED = "OFFER_CANCELLED",
857
- OFFER_ACCEPTED = "OFFER_ACCEPTED",
858
- OFFER_ETH = "OFFER_ETH",
859
- OFFER_BASE = "OFFER_BASE",
860
- OFFER_CANCELLED_ETH = "OFFER_CANCELLED_ETH",
861
- OFFER_CANCELLED_BASE = "OFFER_CANCELLED_BASE",
862
- OFFER_ACCEPTED_ETH = "OFFER_ACCEPTED_ETH",
863
- OFFER_ACCEPTED_BASE = "OFFER_ACCEPTED_BASE",
864
- COLLECTION_OFFER_ETH = "COLLECTION_OFFER_ETH",
865
- COLLECTION_OFFER_BASE = "COLLECTION_OFFER_BASE",
866
- COLLECTION_OFFER_CANCELLED_ETH = "COLLECTION_OFFER_CANCELLED_ETH",
867
- COLLECTION_OFFER_CANCELLED_BASE = "COLLECTION_OFFER_CANCELLED_BASE",
868
- COLLECTION_OFFER_ACCEPTED_ETH = "COLLECTION_OFFER_ACCEPTED_ETH",
869
- COLLECTION_OFFER_ACCEPTED_BASE = "COLLECTION_OFFER_ACCEPTED_BASE",
870
- COLLECTION_OFFER = "COLLECTION_OFFER",
871
- COLLECTION_OFFER_CANCELLED = "COLLECTION_OFFER_CANCELLED",
872
- COLLECTION_OFFER_ACCEPTED = "COLLECTION_OFFER_ACCEPTED",
873
- AUCTION = "AUCTION",
874
- AUCTION_BID = "AUCTION_BID",
875
- AUCTION_CANCELLED = "AUCTION_CANCELLED",
876
- AUCTION_FULFILLED = "AUCTION_FULFILLED",
877
- ARTICLE_MINTED = "ARTICLE_MINTED",
878
- ARTICLE_METADATA_UPDATED = "ARTICLE_METADATA_UPDATED",
879
- ARTICLE_METADATA_LOCKED = "ARTICLE_METADATA_LOCKED",
880
- ARTICLE_EDITIONS_TRANSFERED = "ARTICLE_EDITIONS_TRANSFERED",
881
- OBJKT_STATE_UPDATE_ACTIVE = "OBJKT_STATE_UPDATE_ACTIVE",
882
- OBJKT_STATE_UPDATE_EVOLVED = "OBJKT_STATE_UPDATE_EVOLVED",
883
- OBJKT_STATE_UPDATE_LOCKED = "OBJKT_STATE_UPDATE_LOCKED",
884
- OBJKT_STATE_UPDATE_LIQUIDATED = "OBJKT_STATE_UPDATE_LIQUIDATED",
885
- OBJKT_STATE_UPDATE_REGENERATED = "OBJKT_STATE_UPDATE_REGENERATED"
839
+ NONE = "NONE",
840
+ UPDATE_STATE = "UPDATE_STATE",
841
+ UPDATE_PRICING = "UPDATE_PRICING",
842
+ BURN_SUPPLY = "BURN_SUPPLY",
843
+ CODEX_UPDATED = "CODEX_UPDATED",
844
+ MINTED = "MINTED",
845
+ MINTED_FROM = "MINTED_FROM",
846
+ TICKET_MINTED = "TICKET_MINTED",
847
+ TICKET_CLAIMED = "TICKET_CLAIMED",
848
+ TICKET_PRICE_UPDATED = "TICKET_PRICE_UPDATED",
849
+ GENTK_SIGNED = "GENTK_SIGNED",
850
+ GENTK_REVEALED = "GENTK_REVEALED",
851
+ GENTK_REDEEMED = "GENTK_REDEEMED",
852
+ COMPLETED = "COMPLETED",
853
+ TRANSFERED = "TRANSFERED",
854
+ LISTING_V1 = "LISTING_V1",
855
+ LISTING_V1_CANCELLED = "LISTING_V1_CANCELLED",
856
+ LISTING_V1_ACCEPTED = "LISTING_V1_ACCEPTED",
857
+ LISTING_ETH_V1 = "LISTING_ETH_V1",
858
+ LISTING_BASE_V1 = "LISTING_BASE_V1",
859
+ LISTING_ETH_V1_CANCELLED = "LISTING_ETH_V1_CANCELLED",
860
+ LISTING_BASE_V1_CANCELLED = "LISTING_BASE_V1_CANCELLED",
861
+ LISTING_ETH_V1_ACCEPTED = "LISTING_ETH_V1_ACCEPTED",
862
+ LISTING_BASE_V1_ACCEPTED = "LISTING_BASE_V1_ACCEPTED",
863
+ LISTING_V2 = "LISTING_V2",
864
+ LISTING_V2_CANCELLED = "LISTING_V2_CANCELLED",
865
+ LISTING_V2_ACCEPTED = "LISTING_V2_ACCEPTED",
866
+ LISTING_V3 = "LISTING_V3",
867
+ LISTING_V3_CANCELLED = "LISTING_V3_CANCELLED",
868
+ LISTING_V3_ACCEPTED = "LISTING_V3_ACCEPTED",
869
+ OFFER = "OFFER",
870
+ OFFER_CANCELLED = "OFFER_CANCELLED",
871
+ OFFER_ACCEPTED = "OFFER_ACCEPTED",
872
+ OFFER_ETH = "OFFER_ETH",
873
+ OFFER_BASE = "OFFER_BASE",
874
+ OFFER_CANCELLED_ETH = "OFFER_CANCELLED_ETH",
875
+ OFFER_CANCELLED_BASE = "OFFER_CANCELLED_BASE",
876
+ OFFER_ACCEPTED_ETH = "OFFER_ACCEPTED_ETH",
877
+ OFFER_ACCEPTED_BASE = "OFFER_ACCEPTED_BASE",
878
+ COLLECTION_OFFER_ETH = "COLLECTION_OFFER_ETH",
879
+ COLLECTION_OFFER_BASE = "COLLECTION_OFFER_BASE",
880
+ COLLECTION_OFFER_CANCELLED_ETH = "COLLECTION_OFFER_CANCELLED_ETH",
881
+ COLLECTION_OFFER_CANCELLED_BASE = "COLLECTION_OFFER_CANCELLED_BASE",
882
+ COLLECTION_OFFER_ACCEPTED_ETH = "COLLECTION_OFFER_ACCEPTED_ETH",
883
+ COLLECTION_OFFER_ACCEPTED_BASE = "COLLECTION_OFFER_ACCEPTED_BASE",
884
+ COLLECTION_OFFER = "COLLECTION_OFFER",
885
+ COLLECTION_OFFER_CANCELLED = "COLLECTION_OFFER_CANCELLED",
886
+ COLLECTION_OFFER_ACCEPTED = "COLLECTION_OFFER_ACCEPTED",
887
+ AUCTION = "AUCTION",
888
+ AUCTION_BID = "AUCTION_BID",
889
+ AUCTION_CANCELLED = "AUCTION_CANCELLED",
890
+ AUCTION_FULFILLED = "AUCTION_FULFILLED",
891
+ ARTICLE_MINTED = "ARTICLE_MINTED",
892
+ ARTICLE_METADATA_UPDATED = "ARTICLE_METADATA_UPDATED",
893
+ ARTICLE_METADATA_LOCKED = "ARTICLE_METADATA_LOCKED",
894
+ ARTICLE_EDITIONS_TRANSFERED = "ARTICLE_EDITIONS_TRANSFERED",
895
+ OBJKT_STATE_UPDATE_ACTIVE = "OBJKT_STATE_UPDATE_ACTIVE",
896
+ OBJKT_STATE_UPDATE_EVOLVED = "OBJKT_STATE_UPDATE_EVOLVED",
897
+ OBJKT_STATE_UPDATE_LOCKED = "OBJKT_STATE_UPDATE_LOCKED",
898
+ OBJKT_STATE_UPDATE_LIQUIDATED = "OBJKT_STATE_UPDATE_LIQUIDATED",
899
+ OBJKT_STATE_UPDATE_REGENERATED = "OBJKT_STATE_UPDATE_REGENERATED",
886
900
  }
887
901
  interface Action {
888
- id: string;
889
- opHash: string;
890
- type: TokenActionType;
891
- numericValue: number;
892
- issuer?: User;
893
- target?: User;
894
- token?: GenerativeToken;
895
- objkt?: Objkt;
896
- redeemable?: Redeemable;
897
- ticketId?: number;
898
- article?: NFTArticleInfos;
899
- metadata: HistoryMetadata;
900
- createdAt: string;
901
- }
902
-
902
+ id: string;
903
+ opHash: string;
904
+ type: TokenActionType;
905
+ numericValue: number;
906
+ issuer?: User;
907
+ target?: User;
908
+ token?: GenerativeToken;
909
+ objkt?: Objkt;
910
+ redeemable?: Redeemable;
911
+ ticketId?: number;
912
+ article?: NFTArticleInfos;
913
+ metadata: HistoryMetadata;
914
+ createdAt: string;
915
+ }
916
+ //#endregion
917
+ //#region src/types/entities/User.d.ts
903
918
  interface UserItems {
904
- generativeTokens?: GenerativeToken[];
905
- objkts?: Objkt[];
906
- listings?: Listing[];
907
- actions?: Action[];
919
+ generativeTokens?: GenerativeToken[];
920
+ objkts?: Objkt[];
921
+ listings?: Listing[];
922
+ actions?: Action[];
908
923
  }
909
924
  declare enum UserFlag {
910
- NONE = "NONE",
911
- REVIEW = "REVIEW",
912
- SUSPICIOUS = "SUSPICIOUS",
913
- MALICIOUS = "MALICIOUS",
914
- VERIFIED = "VERIFIED"
925
+ NONE = "NONE",
926
+ REVIEW = "REVIEW",
927
+ SUSPICIOUS = "SUSPICIOUS",
928
+ MALICIOUS = "MALICIOUS",
929
+ VERIFIED = "VERIFIED",
915
930
  }
916
931
  declare enum UserAuthorization {
917
- TOKEN_MODERATION = "TOKEN_MODERATION",
918
- ARTICLE_MODERATION = "ARTICLE_MODERATION",
919
- USER_MODERATION = "USER_MODERATION",
920
- GOVERNANCE_MODERATION = "GOVERNANCE_MODERATION"
932
+ TOKEN_MODERATION = "TOKEN_MODERATION",
933
+ ARTICLE_MODERATION = "ARTICLE_MODERATION",
934
+ USER_MODERATION = "USER_MODERATION",
935
+ GOVERNANCE_MODERATION = "GOVERNANCE_MODERATION",
921
936
  }
922
937
  declare enum UserType {
923
- REGULAR = "REGULAR",
924
- COLLAB_CONTRACT_V1 = "COLLAB_CONTRACT_V1"
938
+ REGULAR = "REGULAR",
939
+ COLLAB_CONTRACT_V1 = "COLLAB_CONTRACT_V1",
925
940
  }
926
941
  declare const UserFlagValues: Record<UserFlag, number>;
927
942
  interface User {
928
- id: string;
929
- name?: string;
930
- type: UserType;
931
- authorizations: UserAuthorization[];
932
- flag: UserFlag;
933
- metadata?: Record<string, any>;
934
- metadataUri?: string;
935
- description?: string;
936
- avatarUri?: string;
937
- avatarMedia?: MediaImage$1;
938
- generativeTokens?: GenerativeToken[];
939
- sales: Action[];
940
- actionsAsIssuer: Action[];
941
- actionsAsTarget: Action[];
942
- listings: Listing[];
943
- objkts: Objkt[];
944
- offers: Listing[];
945
- allOffersReceived: AnyOffer[];
946
- allOffersSent: Offer[];
947
- createdAt: Date;
948
- updatedAt: Date;
949
- actions?: Action[];
950
- platformOwned?: boolean;
951
- donationAddress?: boolean;
952
- descriptionLight?: string;
953
- preventLink?: boolean;
954
- collaborationContracts: Collaboration[];
955
- moderationReason?: string | null;
956
- articles: NFTArticle[];
957
- mintTickets: MintTicket[];
943
+ id: string;
944
+ name?: string;
945
+ type: UserType;
946
+ authorizations: UserAuthorization[];
947
+ flag: UserFlag;
948
+ metadata?: Record<string, any>;
949
+ metadataUri?: string;
950
+ description?: string;
951
+ avatarUri?: string;
952
+ avatarMedia?: MediaImage$1;
953
+ generativeTokens?: GenerativeToken[];
954
+ sales: Action[];
955
+ actionsAsIssuer: Action[];
956
+ actionsAsTarget: Action[];
957
+ listings: Listing[];
958
+ objkts: Objkt[];
959
+ offers: Listing[];
960
+ allOffersReceived: AnyOffer[];
961
+ allOffersSent: Offer[];
962
+ createdAt: Date;
963
+ updatedAt: Date;
964
+ actions?: Action[];
965
+ platformOwned?: boolean;
966
+ donationAddress?: boolean;
967
+ descriptionLight?: string;
968
+ preventLink?: boolean;
969
+ collaborationContracts: Collaboration[];
970
+ moderationReason?: string | null;
971
+ articles: NFTArticle[];
972
+ mintTickets: MintTicket[];
958
973
  }
959
974
  interface ConnectedUser extends Partial<User> {
960
- id: string;
961
- authorizations: UserAuthorization[];
975
+ id: string;
976
+ authorizations: UserAuthorization[];
962
977
  }
963
978
  interface Collaboration extends User {
964
- collaborators: User[];
979
+ collaborators: User[];
965
980
  }
966
981
  interface UserAlias {
967
- id: string;
968
- alias: Partial<User>;
982
+ id: string;
983
+ alias: Partial<User>;
969
984
  }
970
985
  interface IUserCollectionFilters {
971
- issuer_in?: number[];
972
- assigned_eq?: boolean;
973
- offer_ne?: string;
974
- createdAt_lt?: string;
975
- createdAt_gt?: string;
976
- assignedAt_gt?: string;
977
- assignedAt_lt?: string;
978
- mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
979
- authorVerified_eq?: boolean;
980
- author_in?: string[];
981
- searchQuery_eq?: string;
982
- activeListing_exist?: "LISTED" | "NOT LISTED";
986
+ issuer_in?: number[];
987
+ assigned_eq?: boolean;
988
+ offer_ne?: string;
989
+ createdAt_lt?: string;
990
+ createdAt_gt?: string;
991
+ assignedAt_gt?: string;
992
+ assignedAt_lt?: string;
993
+ mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
994
+ authorVerified_eq?: boolean;
995
+ author_in?: string[];
996
+ searchQuery_eq?: string;
997
+ activeListing_exist?: "LISTED" | "NOT LISTED";
983
998
  }
984
999
  interface UserFilters {
985
- flag_in?: UserFlag[];
986
- searchQuery_eq?: string;
1000
+ flag_in?: UserFlag[];
1001
+ searchQuery_eq?: string;
987
1002
  }
988
-
1003
+ //#endregion
1004
+ //#region src/wallet/WalletManager.d.ts
989
1005
  declare class PendingSigningRequestError extends Error {
990
- name: "PendingSigningRequestError";
991
- message: string;
1006
+ name: "PendingSigningRequestError";
1007
+ message: string;
992
1008
  }
993
1009
  declare enum WalletConnectionErrorReason {
994
- INCORRECT_CHAIN = "INCORRECT_CHAIN"
1010
+ INCORRECT_CHAIN = "INCORRECT_CHAIN",
995
1011
  }
996
1012
  declare class WalletConnectionError extends Error {
997
- readonly reason: WalletConnectionErrorReason;
998
- name: "WalletConnectionError";
999
- constructor(reason: WalletConnectionErrorReason);
1013
+ readonly reason: WalletConnectionErrorReason;
1014
+ name: "WalletConnectionError";
1015
+ constructor(reason: WalletConnectionErrorReason);
1000
1016
  }
1001
1017
  declare class UserRejectedError extends Error {
1002
- name: "UserRejectedError";
1003
- message: string;
1018
+ name: "UserRejectedError";
1019
+ message: string;
1004
1020
  }
1005
1021
  declare class InsufficientFundsError extends Error {
1006
- name: "InsufficientFundsError";
1007
- message: string;
1022
+ name: "InsufficientFundsError";
1023
+ message: string;
1008
1024
  }
1009
1025
  declare class TransactionRevertedError extends Error {
1010
- readonly paramErrorName: string;
1011
- name: "TransactionRevertedError";
1012
- errorName: string;
1013
- constructor(paramErrorName: string);
1026
+ readonly paramErrorName: string;
1027
+ name: "TransactionRevertedError";
1028
+ errorName: string;
1029
+ constructor(paramErrorName: string);
1014
1030
  }
1015
1031
  declare class TransactionReceiptError extends Error {
1016
- name: "TransactionReceiptError";
1017
- constructor();
1032
+ name: "TransactionReceiptError";
1033
+ constructor();
1018
1034
  }
1019
1035
  declare class TransactionUnknownError extends Error {
1020
- readonly paramErrorName?: string | undefined;
1021
- name: "TransactionUnknownError";
1022
- errorName?: string;
1023
- constructor(paramErrorName?: string | undefined);
1036
+ readonly paramErrorName?: string | undefined;
1037
+ name: "TransactionUnknownError";
1038
+ errorName?: string;
1039
+ constructor(paramErrorName?: string | undefined);
1024
1040
  }
1025
1041
  declare class NetworkError extends Error {
1026
- name: "NetworkError";
1027
- message: string;
1042
+ name: "NetworkError";
1043
+ message: string;
1028
1044
  }
1029
1045
  declare class BadRequestError extends Error {
1030
- name: "BadRequestError";
1031
- message: string;
1046
+ name: "BadRequestError";
1047
+ message: string;
1032
1048
  }
1033
1049
  type SignMessageOptions = {
1034
- /**
1035
- * An string-identifier to define the type of the operation. It is used to
1036
- * classify signatures in the cache.
1037
- */
1038
- type: string;
1039
- /**
1040
- * - wallet-only: the cache is bypassed and signature must come from wallet
1041
- * - cache-first: the cache is checked first, and if a valid signature is
1042
- * found it's returned, otherwise the wallet is
1043
- */
1044
- policy: "wallet-only" | "cache-first";
1050
+ /**
1051
+ * An string-identifier to define the type of the operation. It is used to
1052
+ * classify signatures in the cache.
1053
+ */
1054
+ type: string;
1055
+ /**
1056
+ * - wallet-only: the cache is bypassed and signature must come from wallet
1057
+ * - cache-first: the cache is checked first, and if a valid signature is
1058
+ * found it's returned, otherwise the wallet is
1059
+ */
1060
+ policy: "wallet-only" | "cache-first";
1045
1061
  };
1046
1062
  type MessageSigned = {
1047
- signedAt: Date;
1048
- message: string;
1049
- signature: string;
1063
+ signedAt: Date;
1064
+ message: string;
1065
+ signature: string;
1050
1066
  };
1051
1067
  declare abstract class WalletManager {
1052
- address: string;
1053
- private cache;
1054
- constructor(address: string);
1055
- /**
1056
- * Must be implemented by wallets for custom signing of messages.
1057
- * @param message The message to sign.
1058
- * @returns The signature of the message.
1059
- */
1060
- abstract signMessageWithWallet(message: string): PromiseResult<string, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1061
- /**
1062
- * Sign a message using the wallet associated with the manager. Some sign
1063
- * options can be provided, mainly for implementing cache-fetching for
1064
- * avoiding redundant signatures from the wallet.
1065
- *
1066
- * Signatures are stored in cache so that users don't have to repeatedly
1067
- * sign messages for similar operations, as long as messages are considered to
1068
- * be valid for their usage. This function returns a message signed of a
1069
- * given type if it's still valid in cache. A signature is considered valid
1070
- * if it was made less than 4 minutes ago.
1071
- *
1072
- * @remark For now, the cache policy enforces a 5 min cache time for the
1073
- * signatures, after which they are considered invalid. There isn't any way to
1074
- * change this with the current implementation, although it could be added.
1075
- *
1076
- * @param options Sign options, which can be used to determine whether the
1077
- * signature should be fetched from cache or not.
1078
- */
1079
- signMessage(message: string, options?: SignMessageOptions): PromiseResult<MessageSigned, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1080
- abstract sendTransaction<TParams>(operation: TContractOperation<this, TParams, any>, params: TParams, chain: BlockchainType): PromiseResult<unknown, WalletConnectionError | PendingSigningRequestError | UserRejectedError | InsufficientFundsError | TransactionRevertedError | TransactionUnknownError>;
1081
- abstract waitForTransaction(params: {
1082
- hash: string;
1083
- }): PromiseResult<unknown, UserRejectedError | TransactionRevertedError | TransactionReceiptError | TransactionUnknownError>;
1084
- }
1085
- type TWalletManager = new (address: string) => WalletManager;
1086
-
1068
+ address: string;
1069
+ private cache;
1070
+ constructor(address: string);
1071
+ /**
1072
+ * Must be implemented by wallets for custom signing of messages.
1073
+ * @param message The message to sign.
1074
+ * @returns The signature of the message.
1075
+ */
1076
+ abstract signMessageWithWallet(message: string): PromiseResult<string, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1077
+ /**
1078
+ * Sign a message using the wallet associated with the manager. Some sign
1079
+ * options can be provided, mainly for implementing cache-fetching for
1080
+ * avoiding redundant signatures from the wallet.
1081
+ *
1082
+ * Signatures are stored in cache so that users don't have to repeatedly
1083
+ * sign messages for similar operations, as long as messages are considered to
1084
+ * be valid for their usage. This function returns a message signed of a
1085
+ * given type if it's still valid in cache. A signature is considered valid
1086
+ * if it was made less than 4 minutes ago.
1087
+ *
1088
+ * @remark For now, the cache policy enforces a 5 min cache time for the
1089
+ * signatures, after which they are considered invalid. There isn't any way to
1090
+ * change this with the current implementation, although it could be added.
1091
+ *
1092
+ * @param options Sign options, which can be used to determine whether the
1093
+ * signature should be fetched from cache or not.
1094
+ */
1095
+ signMessage(message: string, options?: SignMessageOptions): PromiseResult<MessageSigned, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1096
+ abstract sendTransaction<TParams>(operation: TContractOperation<this, TParams, any>, params: TParams, chain: BlockchainType): PromiseResult<unknown, WalletConnectionError | PendingSigningRequestError | UserRejectedError | InsufficientFundsError | TransactionRevertedError | TransactionUnknownError>;
1097
+ abstract waitForTransaction(params: {
1098
+ hash: string;
1099
+ }): PromiseResult<unknown, UserRejectedError | TransactionRevertedError | TransactionReceiptError | TransactionUnknownError>;
1100
+ }
1101
+ type TWalletManager$1 = new (address: string) => WalletManager;
1102
+ //#endregion
1103
+ //#region src/wallet/ContractOperation.d.ts
1087
1104
  /**
1088
1105
  * A Blockchain Environment is based on the classification of the "blockchain
1089
1106
  * engine".
1090
1107
  * TODO: should decide between BlockchainEnv & BlockchainNetwork and harmonize
1091
1108
  */
1092
1109
  declare enum BlockchainEnv {
1093
- EVM = "EVM",
1094
- TEZOS = "TEZOS"
1110
+ EVM = "EVM",
1111
+ TEZOS = "TEZOS",
1095
1112
  }
1096
1113
  /**
1097
1114
  * An array of all the `BlockchainEnv` enum values.
1098
1115
  */
1099
1116
  declare const BlockchainEnvs: BlockchainEnv[];
1100
1117
  declare enum BlockchainNetwork {
1101
- TEZOS = "TEZOS",
1102
- ETHEREUM = "ETHEREUM"
1118
+ TEZOS = "TEZOS",
1119
+ ETHEREUM = "ETHEREUM",
1103
1120
  }
1104
1121
  declare const BlockchainNetworks: BlockchainNetwork[];
1105
1122
  declare enum TransactionType {
1106
- OFFCHAIN = "OFFCHAIN",
1107
- ONCHAIN = "ONCHAIN"
1123
+ OFFCHAIN = "OFFCHAIN",
1124
+ ONCHAIN = "ONCHAIN",
1108
1125
  }
1109
1126
  declare enum BlockchainType {
1110
- ETHEREUM = "ETHEREUM",
1111
- TEZOS = "TEZOS",
1112
- BASE = "BASE"
1127
+ ETHEREUM = "ETHEREUM",
1128
+ TEZOS = "TEZOS",
1129
+ BASE = "BASE",
1113
1130
  }
1114
1131
  type Blockchain = keyof typeof BlockchainType;
1115
1132
  declare const BlockchainTypes: ("TEZOS" | "ETHEREUM" | "BASE")[];
1116
- type ChainNetworkToChainTypemap = {
1117
- [T in BlockchainNetwork]: {
1118
- [BlockchainNetwork.ETHEREUM]: BlockchainType.ETHEREUM;
1119
- [BlockchainNetwork.TEZOS]: BlockchainType.TEZOS;
1120
- }[T];
1121
- };
1133
+ type ChainNetworkToChainTypemap = { [T in BlockchainNetwork]: {
1134
+ [BlockchainNetwork.ETHEREUM]: BlockchainType.ETHEREUM;
1135
+ [BlockchainNetwork.TEZOS]: BlockchainType.TEZOS;
1136
+ }[T] };
1122
1137
  /**
1123
1138
  * Given a BlockchainNetwork, returns an associated BlockchainType of preference
1124
1139
  */
1125
1140
  declare function networkToChain<N extends BlockchainNetwork>(network: N): ChainNetworkToChainTypemap[N];
1126
- type ChainToChainEnvTypemap = {
1127
- [T in BlockchainType]: {
1128
- [BlockchainType.BASE]: BlockchainEnv.EVM;
1129
- [BlockchainType.ETHEREUM]: BlockchainEnv.EVM;
1130
- [BlockchainType.TEZOS]: BlockchainEnv.TEZOS;
1131
- }[T];
1132
- };
1133
- declare const chainToChainEnvMap: {
1134
- [K in BlockchainType]: ChainToChainEnvTypemap[K];
1135
- };
1136
- type ChainEnvToChainTypemap = {
1137
- [E in BlockchainEnv]: {
1138
- [BlockchainEnv.EVM]: BlockchainType.ETHEREUM;
1139
- [BlockchainEnv.TEZOS]: BlockchainType.TEZOS;
1140
- }[E];
1141
- };
1142
- declare const chainEnvToChainMap: {
1143
- [E in BlockchainEnv]: ChainEnvToChainTypemap[E];
1144
- };
1141
+ type ChainToChainEnvTypemap = { [T in BlockchainType]: {
1142
+ [BlockchainType.BASE]: BlockchainEnv.EVM;
1143
+ [BlockchainType.ETHEREUM]: BlockchainEnv.EVM;
1144
+ [BlockchainType.TEZOS]: BlockchainEnv.TEZOS;
1145
+ }[T] };
1146
+ declare const chainToChainEnvMap: { [K in BlockchainType]: ChainToChainEnvTypemap[K] };
1147
+ type ChainEnvToChainTypemap = { [E in BlockchainEnv]: {
1148
+ [BlockchainEnv.EVM]: BlockchainType.ETHEREUM;
1149
+ [BlockchainEnv.TEZOS]: BlockchainType.TEZOS;
1150
+ }[E] };
1151
+ declare const chainEnvToChainMap: { [E in BlockchainEnv]: ChainEnvToChainTypemap[E] };
1145
1152
  /**
1146
1153
  * A Contract Operation defines a set of operations to run at different
1147
1154
  * moments of the lifecycle of an operation. When an operation needs to be sent,
@@ -1154,363 +1161,458 @@ declare const chainEnvToChainMap: {
1154
1161
  * is swapped with another one. This logic is handled by an external runner.
1155
1162
  */
1156
1163
  declare abstract class ContractOperation<TWalletManager extends WalletManager, TParams, TData> {
1157
- manager: TWalletManager;
1158
- params: TParams;
1159
- chain: BlockchainType;
1160
- constructor(manager: TWalletManager, params: TParams, chain: BlockchainType);
1161
- /**
1162
- * Runs the required preparations (such as fetching the contracts to get
1163
- * the entrypoints signature), or any other sync/async operation considered
1164
- * not to be a part of the actual contract call.
1165
- * Can store required values in the members of the instance.
1166
- */
1167
- abstract prepare(): Promise<void>;
1168
- /**
1169
- * The actual calls to the contracts, which results in some Transaction
1170
- * Wallet Operation and can be observed to track the success/failure of
1171
- * the transaction emitted
1172
- */
1173
- abstract call(): Promise<TData>;
1174
- /**
1175
- * Each Contract Operation should implement a success message based on the
1176
- * operation parameters, and so to provide meaningful feedback to users on
1177
- * different parts of the front.
1178
- */
1179
- abstract success(): string;
1164
+ manager: TWalletManager;
1165
+ params: TParams;
1166
+ chain: BlockchainType;
1167
+ constructor(manager: TWalletManager, params: TParams, chain: BlockchainType);
1168
+ /**
1169
+ * Runs the required preparations (such as fetching the contracts to get
1170
+ * the entrypoints signature), or any other sync/async operation considered
1171
+ * not to be a part of the actual contract call.
1172
+ * Can store required values in the members of the instance.
1173
+ */
1174
+ abstract prepare(): Promise<void>;
1175
+ /**
1176
+ * The actual calls to the contracts, which results in some Transaction
1177
+ * Wallet Operation and can be observed to track the success/failure of
1178
+ * the transaction emitted
1179
+ */
1180
+ abstract call(): Promise<TData>;
1181
+ /**
1182
+ * Each Contract Operation should implement a success message based on the
1183
+ * operation parameters, and so to provide meaningful feedback to users on
1184
+ * different parts of the front.
1185
+ */
1186
+ abstract success(): string;
1180
1187
  }
1181
1188
  type TContractOperation<TWalletManager extends WalletManager, TParams, TData> = new (manager: TWalletManager, params: TParams, chain: BlockchainType) => ContractOperation<TWalletManager, TParams, TData>;
1182
-
1189
+ //#endregion
1190
+ //#region src/types/entities/Account.d.ts
1183
1191
  /**
1184
1192
  * Model Wallet
1185
1193
  *
1186
1194
  */
1187
1195
  type Wallet = {
1188
- address: string;
1189
- network: BlockchainNetwork;
1190
- accountId: string;
1196
+ address: string;
1197
+ network: BlockchainNetwork;
1198
+ accountId: string;
1191
1199
  };
1192
1200
  /**
1193
1201
  * Model Profile
1194
1202
  *
1195
1203
  */
1196
1204
  type Profile = {
1197
- accountId: string;
1198
- description: string | null;
1199
- website: string | null;
1200
- twitter: string | null;
1201
- instagram: string | null;
1202
- picture: string | null;
1205
+ accountId: string;
1206
+ description: string | null;
1207
+ website: string | null;
1208
+ twitter: string | null;
1209
+ instagram: string | null;
1210
+ picture: string | null;
1203
1211
  };
1204
1212
  interface ConnectedAccount extends Partial<Account> {
1205
- id: string;
1206
- username: string;
1207
- activeWallet: string;
1208
- authorizations: UserAuthorization[];
1213
+ id: string;
1214
+ username: string;
1215
+ activeWallet: string;
1216
+ authorizations: UserAuthorization[];
1209
1217
  }
1210
1218
  interface Account {
1211
- id: string;
1212
- username: string;
1213
- authorizations: UserAuthorization[];
1214
- profile?: Profile;
1215
- wallets?: Wallet[];
1216
- flag: UserFlag;
1217
- metadata?: Record<string, any>;
1218
- metadataUri?: string;
1219
- description?: string;
1220
- avatarUri?: string;
1221
- avatarMedia?: MediaImage;
1222
- generativeTokens?: GenerativeToken[];
1223
- sales: Action[];
1224
- actionsAsIssuer: Action[];
1225
- actionsAsTarget: Action[];
1226
- listings: Listing[];
1227
- objkts: Objkt[];
1228
- offers: Listing[];
1229
- offersReceived: AnyOffer[];
1230
- offersSent: AnyOffer[];
1231
- createdAt: Date;
1232
- updatedAt: Date;
1233
- actions?: Action[];
1234
- platformOwned?: boolean;
1235
- donationAddress?: boolean;
1236
- descriptionLight?: string;
1237
- preventLink?: boolean;
1238
- moderationReason?: string | null;
1239
- articles: NFTArticle[];
1240
- mintTickets: MintTicket[];
1219
+ id: string;
1220
+ username: string;
1221
+ authorizations: UserAuthorization[];
1222
+ profile?: Profile;
1223
+ wallets?: Wallet[];
1224
+ flag: UserFlag;
1225
+ metadata?: Record<string, any>;
1226
+ metadataUri?: string;
1227
+ description?: string;
1228
+ avatarUri?: string;
1229
+ avatarMedia?: MediaImage;
1230
+ generativeTokens?: GenerativeToken[];
1231
+ sales: Action[];
1232
+ actionsAsIssuer: Action[];
1233
+ actionsAsTarget: Action[];
1234
+ listings: Listing[];
1235
+ objkts: Objkt[];
1236
+ offers: Listing[];
1237
+ offersReceived: AnyOffer[];
1238
+ offersSent: AnyOffer[];
1239
+ createdAt: Date;
1240
+ updatedAt: Date;
1241
+ actions?: Action[];
1242
+ platformOwned?: boolean;
1243
+ donationAddress?: boolean;
1244
+ descriptionLight?: string;
1245
+ preventLink?: boolean;
1246
+ moderationReason?: string | null;
1247
+ articles: NFTArticle[];
1248
+ mintTickets: MintTicket[];
1241
1249
  }
1242
1250
  declare const accountTypeGuard: (entity: any) => entity is Account;
1243
-
1251
+ //#endregion
1252
+ //#region src/types/entities/Ledger.d.ts
1244
1253
  interface Ledger {
1245
- amount: number;
1246
- owner: User;
1254
+ amount: number;
1255
+ owner: User;
1247
1256
  }
1248
-
1257
+ //#endregion
1258
+ //#region src/types/entities/LiveMinting.d.ts
1249
1259
  declare enum EventStatus {
1250
- PUBLISHED = "PUBLISHED",
1251
- DRAFT = "DRAFT",
1252
- HIDDEN = "HIDDEN"
1260
+ PUBLISHED = "PUBLISHED",
1261
+ DRAFT = "DRAFT",
1262
+ HIDDEN = "HIDDEN",
1253
1263
  }
1254
1264
  declare enum EventAvailability {
1255
- ONLINE = "ONLINE",
1256
- IRL = "IRL"
1265
+ ONLINE = "ONLINE",
1266
+ IRL = "IRL",
1257
1267
  }
1258
1268
  interface LiveMintingEvent {
1259
- id: string;
1260
- name: string;
1261
- description: string;
1262
- createdAt: string;
1263
- updatedAt: string;
1264
- startsAt: string;
1265
- endsAt: string;
1266
- projectIds: number[];
1267
- onboarding?: EventOnboarding;
1268
- location?: string;
1269
- imageUrl?: string;
1270
- availabilities: EventAvailability[];
1271
- status: EventStatus;
1272
- freeLiveMinting: boolean;
1269
+ id: string;
1270
+ name: string;
1271
+ description: string;
1272
+ createdAt: string;
1273
+ updatedAt: string;
1274
+ startsAt: string;
1275
+ endsAt: string;
1276
+ projectIds: number[];
1277
+ onboarding?: EventOnboarding;
1278
+ location?: string;
1279
+ imageUrl?: string;
1280
+ availabilities: EventAvailability[];
1281
+ status: EventStatus;
1282
+ freeLiveMinting: boolean;
1273
1283
  }
1274
1284
  type LiveMintingEventWithArtists = LiveMintingEvent & {
1275
- artists: User[];
1285
+ artists: User[];
1276
1286
  };
1277
1287
  interface LiveMintingPassGroup {
1278
- address: string;
1279
- label: string;
1280
- maxMints: number;
1281
- maxMintsPerProject: number;
1282
- event: LiveMintingEvent;
1288
+ address: string;
1289
+ label: string;
1290
+ maxMints: number;
1291
+ maxMintsPerProject: number;
1292
+ event: LiveMintingEvent;
1283
1293
  }
1284
1294
  interface LiveMintingPass {
1285
- token: string;
1286
- group: LiveMintingPassGroup;
1287
- expiresAt: string;
1295
+ token: string;
1296
+ group: LiveMintingPassGroup;
1297
+ expiresAt: string;
1288
1298
  }
1289
1299
  interface OnboardingComponent {
1290
- id: number;
1291
- description: string;
1292
- content: string;
1300
+ id: number;
1301
+ description: string;
1302
+ content: string;
1293
1303
  }
1294
1304
  interface EventOnboardingOnComponent {
1295
- component: OnboardingComponent;
1296
- index: number;
1305
+ component: OnboardingComponent;
1306
+ index: number;
1297
1307
  }
1298
1308
  interface EventOnboarding {
1299
- id: number;
1300
- enabled: boolean;
1301
- description: string;
1302
- components: EventOnboardingOnComponent[];
1309
+ id: number;
1310
+ enabled: boolean;
1311
+ description: string;
1312
+ components: EventOnboardingOnComponent[];
1303
1313
  }
1304
-
1314
+ //#endregion
1315
+ //#region src/types/entities/ManagedWallet.d.ts
1305
1316
  declare enum EWalletOperatorState {
1306
- EMPTY = "EMPTY",
1307
- INITIALIZING = "INITIALIZING",
1308
- AVAILABLE = "AVAILABLE",
1309
- PREPARING = "PREPARING",
1310
- WAITING_CONFIRMATION = "WAITING_CONFIRMATION"
1311
- }
1312
-
1317
+ EMPTY = "EMPTY",
1318
+ INITIALIZING = "INITIALIZING",
1319
+ AVAILABLE = "AVAILABLE",
1320
+ PREPARING = "PREPARING",
1321
+ WAITING_CONFIRMATION = "WAITING_CONFIRMATION",
1322
+ }
1323
+ //#endregion
1324
+ //#region src/types/entities/ModerationReason.d.ts
1313
1325
  interface ModerationReason {
1314
- id: string;
1315
- reason: string;
1326
+ id: string;
1327
+ reason: string;
1316
1328
  }
1317
-
1329
+ //#endregion
1330
+ //#region src/types/Auth.d.ts
1318
1331
  interface JwtAccessTokenPayload extends JwtPayload {
1319
- id: string;
1332
+ id: string;
1320
1333
  }
1321
-
1334
+ //#endregion
1335
+ //#region src/types/UpdateIssuer.d.ts
1322
1336
  type UpdateIssuerForm<N = string> = Omit<Omit<Omit<GenTokDistributionForm<N>, "pricing">, "reserves">, "gracingPeriod">;
1323
-
1337
+ //#endregion
1338
+ //#region src/types/Sandbox.d.ts
1324
1339
  type SandboxFiles = Record<string, {
1325
- blob?: Blob;
1326
- url: string;
1340
+ blob?: Blob;
1341
+ url: string;
1327
1342
  }>;
1328
1343
  declare enum SandboxFileError {
1329
- UNKNOWN = "UNKNOWN",
1330
- WRONG_FORMAT = "WRONG_FORMAT",
1331
- NO_INDEX_HTML = "NO_INDEX_HTML",
1332
- NO_SNIPPET = "NO_SNIPPET",
1333
- FAILED_UNZIP = "FAILED_UNZIP"
1334
- }
1335
-
1344
+ UNKNOWN = "UNKNOWN",
1345
+ WRONG_FORMAT = "WRONG_FORMAT",
1346
+ NO_INDEX_HTML = "NO_INDEX_HTML",
1347
+ NO_SNIPPET = "NO_SNIPPET",
1348
+ FAILED_UNZIP = "FAILED_UNZIP",
1349
+ }
1350
+ //#endregion
1351
+ //#region src/types/Responses.d.ts
1336
1352
  declare enum ProfileUploadError {
1337
- UNKNOWN = "UNKNOWN",
1338
- WRONG_FORMAT = "WRONG_FORMAT",
1339
- IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED"
1353
+ UNKNOWN = "UNKNOWN",
1354
+ WRONG_FORMAT = "WRONG_FORMAT",
1355
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1340
1356
  }
1341
1357
  interface ProfileUploadResponse {
1342
- metadataUri: string;
1358
+ metadataUri: string;
1343
1359
  }
1344
1360
  declare enum AvatarUploadError {
1345
- UNKNOWN = "UNKNOWN",
1346
- NO_FILE = "NO_FILE",
1347
- WRONG_FORMAT = "WRONG_FORMAT",
1348
- IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED"
1361
+ UNKNOWN = "UNKNOWN",
1362
+ NO_FILE = "NO_FILE",
1363
+ WRONG_FORMAT = "WRONG_FORMAT",
1364
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1349
1365
  }
1350
1366
  interface AvatarUploadResponse {
1351
- avatarUri: string;
1352
- }
1353
- interface TempGenUploadProjectResponse {
1354
- zipKey: string;
1355
- projectCid: string;
1356
- authenticationHash: string;
1367
+ avatarUri: string;
1357
1368
  }
1358
1369
  interface MintGenUploadProjectResponse {
1359
- cidParams: string;
1360
- authenticationHash: string;
1370
+ cidParams: string;
1371
+ authenticationHash: string;
1372
+ }
1373
+ interface TempGenUploadProjectResponse {
1374
+ zipKey: string;
1375
+ projectCid: string;
1376
+ authenticationHash: string;
1361
1377
  }
1362
1378
  interface MintGenUploadProjectResponse {
1363
- zipKey: string;
1364
- projectCid: string;
1365
- authenticationHash: string;
1379
+ zipKey: string;
1380
+ projectCid: string;
1381
+ authenticationHash: string;
1366
1382
  }
1367
1383
  declare enum StaticGenError {
1368
- UNKNOWN = "UNKNOWN",
1369
- MISSING_PARAMETERS = "MISSING_PARAMETERS",
1370
- AUTH_FAILED = "AUTH_FAILED",
1371
- INVALID_HASH = "INVALID_HASH",
1372
- IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1373
- NO_SNIPPET = "NO_SNIPPET"
1384
+ UNKNOWN = "UNKNOWN",
1385
+ MISSING_PARAMETERS = "MISSING_PARAMETERS",
1386
+ AUTH_FAILED = "AUTH_FAILED",
1387
+ INVALID_HASH = "INVALID_HASH",
1388
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1389
+ NO_SNIPPET = "NO_SNIPPET",
1374
1390
  }
1375
1391
  interface StaticGenResponse {
1376
- cidStatic: string;
1377
- authenticationHash: string;
1392
+ cidStatic: string;
1393
+ authenticationHash: string;
1378
1394
  }
1379
1395
  declare enum PreviewError {
1380
- UNKNOWN = "UNKNOWN",
1381
- MISSING_PARAMETERS = "MISSING_PARAMETERS",
1382
- AUTH_FAILED = "AUTH_FAILED",
1383
- INCORRECT_PARAMETERS = "INCORRECT_PARAMETERS",
1384
- PREVIEW_ERROR = "PREVIEW_ERROR",
1385
- IPFS_ERROR = "IPFS_ERROR"
1396
+ UNKNOWN = "UNKNOWN",
1397
+ MISSING_PARAMETERS = "MISSING_PARAMETERS",
1398
+ AUTH_FAILED = "AUTH_FAILED",
1399
+ INCORRECT_PARAMETERS = "INCORRECT_PARAMETERS",
1400
+ PREVIEW_ERROR = "PREVIEW_ERROR",
1401
+ IPFS_ERROR = "IPFS_ERROR",
1386
1402
  }
1387
1403
  interface PreviewErrorResponse {
1388
- error: PreviewError;
1404
+ error: PreviewError;
1389
1405
  }
1390
1406
  interface PreviewResponse {
1391
- cidPreview: string;
1392
- cidThumbnail: string;
1393
- authenticationHash: string;
1394
- mode: CaptureMode;
1395
- triggerMode: CaptureTriggerMode;
1396
- resX: number;
1397
- resY: number;
1398
- delay: number;
1399
- canvasSelector: string;
1400
- gpu: boolean;
1407
+ cidPreview: string;
1408
+ cidThumbnail: string;
1409
+ authenticationHash: string;
1410
+ mode: CaptureMode;
1411
+ triggerMode: CaptureTriggerMode;
1412
+ resX: number;
1413
+ resY: number;
1414
+ delay: number;
1415
+ canvasSelector: string;
1416
+ gpu: boolean;
1401
1417
  }
1402
1418
  declare enum TestPreviewError {
1403
- UNKNOWN = "UNKNOWN",
1404
- TIMEOUT = "TIMEOUT",
1405
- EXTRACT_SERVICE_UNREACHABLE = "EXTRACT_SERVICE_UNREACHABLE",
1406
- INVALID_INPUT_PARAMETERS = "INVALID_INPUT_PARAMETERS",
1407
- JOB_QUEUE_FAILED = "JOB_QUEUE_FAILED",
1408
- JOB_EXECUTION_FAILED = "JOB_EXECUTION_FAILED"
1419
+ UNKNOWN = "UNKNOWN",
1420
+ TIMEOUT = "TIMEOUT",
1421
+ EXTRACT_SERVICE_UNREACHABLE = "EXTRACT_SERVICE_UNREACHABLE",
1422
+ INVALID_INPUT_PARAMETERS = "INVALID_INPUT_PARAMETERS",
1423
+ JOB_QUEUE_FAILED = "JOB_QUEUE_FAILED",
1424
+ JOB_EXECUTION_FAILED = "JOB_EXECUTION_FAILED",
1409
1425
  }
1410
1426
  interface TestPreviewResponse {
1411
- capture: string;
1412
- features?: string;
1427
+ capture: string;
1428
+ features?: string;
1413
1429
  }
1414
1430
  interface TestPreviewErrorResponse {
1415
- error: TestPreviewError;
1431
+ error: TestPreviewError;
1416
1432
  }
1417
1433
  declare enum MetadataError {
1418
- UNKNOWN = "UNKNOWN",
1419
- IPFS_ERROR = "IPFS_ERROR",
1420
- UPLOAD_ERROR = "UPLOAD_ERROR",
1421
- METADATA_EXISTS = "METADATA_EXISTS"
1434
+ UNKNOWN = "UNKNOWN",
1435
+ IPFS_ERROR = "IPFS_ERROR",
1436
+ UPLOAD_ERROR = "UPLOAD_ERROR",
1437
+ METADATA_EXISTS = "METADATA_EXISTS",
1422
1438
  }
1423
1439
  interface MetadataResponse {
1424
- cid: string;
1440
+ cid: string;
1425
1441
  }
1426
1442
  interface MetadataEthResponse {
1427
- key: string;
1443
+ key: string;
1428
1444
  }
1429
1445
  declare enum MintError {
1430
- UNKNOWN = "UNKNOWN",
1431
- BAD_REQUEST = "BAD_REQUEST",
1432
- TOKEN_NOT_EXISTS = "TOKEN_NOT_EXISTS",
1433
- TOKEN_UNAVAILABLE = "TOKEN_UNAVAILABLE",
1434
- FAIL_GET_METADATA = "FAIL_GET_METADATA",
1435
- WRONG_TOKEN_METADATA = "WRONG_TOKEN_METADATA",
1436
- FAIL_AUTHENTICATE = "FAIL_AUTHENTICATE",
1437
- FAIL_GET_TOKEN = "FAIL_GET_TOKEN",
1438
- INVALID_TOKEN = "INVALID_TOKEN",
1439
- FAIL_ADD_IPFS = "FAIL_ADD_IPFS",
1440
- FAIL_PREVIEW = "FAIL_PREVIEW"
1446
+ UNKNOWN = "UNKNOWN",
1447
+ BAD_REQUEST = "BAD_REQUEST",
1448
+ TOKEN_NOT_EXISTS = "TOKEN_NOT_EXISTS",
1449
+ TOKEN_UNAVAILABLE = "TOKEN_UNAVAILABLE",
1450
+ FAIL_GET_METADATA = "FAIL_GET_METADATA",
1451
+ WRONG_TOKEN_METADATA = "WRONG_TOKEN_METADATA",
1452
+ FAIL_AUTHENTICATE = "FAIL_AUTHENTICATE",
1453
+ FAIL_GET_TOKEN = "FAIL_GET_TOKEN",
1454
+ INVALID_TOKEN = "INVALID_TOKEN",
1455
+ FAIL_ADD_IPFS = "FAIL_ADD_IPFS",
1456
+ FAIL_PREVIEW = "FAIL_PREVIEW",
1441
1457
  }
1442
1458
  declare const MintErrors: MintError[];
1443
1459
  declare enum MintProgressMessage {
1444
- GET_TOKEN_DATA = "GET_TOKEN_DATA",
1445
- GET_TOKEN_METADATA = "GET_TOKEN_METADATA",
1446
- GET_GENERATIVE_TOKEN_CONTENTS = "GET_GENERATIVE_TOKEN_CONTENTS",
1447
- ADD_CONTENT_IPFS = "ADD_CONTENT_IPFS",
1448
- GENERATE_PREVIEW = "GENERATE_PREVIEW",
1449
- AUTHENTICATE_TOKEN = "AUTHENTICATE_TOKEN"
1460
+ GET_TOKEN_DATA = "GET_TOKEN_DATA",
1461
+ GET_TOKEN_METADATA = "GET_TOKEN_METADATA",
1462
+ GET_GENERATIVE_TOKEN_CONTENTS = "GET_GENERATIVE_TOKEN_CONTENTS",
1463
+ ADD_CONTENT_IPFS = "ADD_CONTENT_IPFS",
1464
+ GENERATE_PREVIEW = "GENERATE_PREVIEW",
1465
+ AUTHENTICATE_TOKEN = "AUTHENTICATE_TOKEN",
1450
1466
  }
1451
1467
  interface MintResponse {
1452
- cidMetadata: string;
1453
- cidGenerative: string;
1454
- cidPreview: string;
1468
+ cidMetadata: string;
1469
+ cidGenerative: string;
1470
+ cidPreview: string;
1455
1471
  }
1456
1472
  declare enum SigningState {
1457
- NONE = "NONE",
1458
- NOT_FOUND = "NOT_FOUND",
1459
- QUEUED = "QUEUED",
1460
- GENERATING_METADATA = "GENERATING_METADATA",
1461
- METADATA_GENERATED = "METADATA_GENERATED",
1462
- CALLING_CONTRACT = "CALLING_CONTRACT",
1463
- SIGNED = "SIGNED"
1473
+ NONE = "NONE",
1474
+ NOT_FOUND = "NOT_FOUND",
1475
+ QUEUED = "QUEUED",
1476
+ GENERATING_METADATA = "GENERATING_METADATA",
1477
+ METADATA_GENERATED = "METADATA_GENERATED",
1478
+ CALLING_CONTRACT = "CALLING_CONTRACT",
1479
+ SIGNED = "SIGNED",
1464
1480
  }
1465
1481
  interface SigningProgress {
1466
- state: SigningState;
1467
- extra?: any;
1482
+ state: SigningState;
1483
+ extra?: any;
1468
1484
  }
1469
1485
  interface SigningData {
1470
- cidGenerative?: string;
1471
- cidPreview?: string;
1472
- features?: TokenFeature[];
1486
+ cidGenerative?: string;
1487
+ cidPreview?: string;
1488
+ features?: TokenFeature[];
1473
1489
  }
1474
-
1490
+ //#endregion
1491
+ //#region src/types/Reserve.d.ts
1475
1492
  interface IReserveConsumption {
1476
- method: EReserveMethod;
1477
- data: any;
1493
+ method: EReserveMethod;
1494
+ data: any;
1478
1495
  }
1479
-
1496
+ //#endregion
1497
+ //#region src/types/Inputs.d.ts
1480
1498
  interface InputProps<T = string> {
1481
- value: T;
1482
- onChange: (value: T) => void;
1499
+ value: T;
1500
+ onChange: (value: T) => void;
1483
1501
  }
1484
-
1502
+ //#endregion
1503
+ //#region src/types/IndexerStatus.d.ts
1485
1504
  type IndexerStatusSeverity = "low" | "medium" | "high";
1486
1505
  interface IndexerStatus {
1487
- level: number;
1488
- id: number;
1489
- originatedAt: string;
1490
- lastIndexedAt: string;
1506
+ level: number;
1507
+ id: number;
1508
+ originatedAt: string;
1509
+ lastIndexedAt: string;
1491
1510
  }
1492
1511
  interface NetworkStatus {
1493
- level: number;
1494
- lastSyncedAt: string;
1512
+ level: number;
1513
+ lastSyncedAt: string;
1495
1514
  }
1496
-
1515
+ //#endregion
1516
+ //#region src/types/Files.d.ts
1497
1517
  interface FileSandboxResponse {
1498
- filename: string;
1499
- contents: string[];
1500
- url: string;
1518
+ filename: string;
1519
+ contents: string[];
1520
+ url: string;
1501
1521
  }
1502
-
1522
+ //#endregion
1523
+ //#region src/types/Cycles.d.ts
1503
1524
  interface Cycle {
1504
- start: Date;
1505
- opening: number;
1506
- closing: number;
1525
+ start: Date;
1526
+ opening: number;
1527
+ closing: number;
1507
1528
  }
1508
1529
  interface CyclesState {
1509
- opened: boolean;
1510
- nextOpening: Date;
1511
- nextClosing: Date;
1530
+ opened: boolean;
1531
+ nextOpening: Date;
1532
+ nextClosing: Date;
1512
1533
  }
1513
-
1534
+ //#endregion
1535
+ //#region src/types/Colors.d.ts
1514
1536
  type TColor = "success" | "warning" | "error";
1515
-
1516
- export { type Account, type Action, type AnyOffer, ArticleFlag, type ArticleGenerativeTokenMention, type ArticleMetadata, AvatarUploadError, type AvatarUploadResponse, BadRequestError, type Blockchain, BlockchainEnv, BlockchainEnvs, BlockchainNetwork, BlockchainNetworks, BlockchainType, BlockchainTypes, CaptureMode, CaptureModeList, type CaptureSettings, CaptureTriggerMode, CaptureTriggerModeList, type ChainEnvToChainTypemap, type ChainNetworkToChainTypemap, type ChainToChainEnvTypemap, type Collaboration, type CollectionOffer, type ConnectedAccount, type ConnectedUser, type ConstraintVariant, ContractOperation, type Cycle, type CyclesState, EObjktFeatureType, EReserveMethod, EWalletOperatorState, type Eth721ContractMetadata, type Eth721TokenMetadata, EventAvailability, type EventMedia, type EventOnboarding, type EventOnboardingOnComponent, EventStatus, type ExplorationSettings, type FileSandboxResponse, type FrameMintingFormValues, type GenTokConstrains, type GenTokDistributionForm, GenTokEditions, type GenTokEditionsForm, type GenTokFixedEditionsForm, GenTokFlag, GenTokLabel, type GenTokLabelDefinition, GenTokLabelGroup, GenTokLabel_Params, GenTokLabel_Redeemable, type GenTokOpenEditionsForm, GenTokPricing, type GenTokPricingForm, type GenTokenInformationsForm, type GenTokenSettings, type GenerativeToken, type GenerativeTokenFeature, type GenerativeTokenFeatureValue, type GenerativeTokenFilters, GenerativeTokenFormat, type GenerativeTokenInformations, type GenerativeTokenMarketStats, type GenerativeTokenMarketStatsHistory, type GenerativeTokenMetadata, type GenerativeTokenMetadataV1, type GenerativeTokenMetadataV2, type GenerativeTokenMetadataV3, type GenerativeTokenMetadataV4, type GenerativeTokenMetadataV5, type GenerativeTokenMetadataV6, GenerativeTokenVersion, type GenerativeTokenWithCollection, type HistoryMetadata, type IAddress, type IObjktFeatureFilter, type IPricingDutchAuction, type IPricingFixed, type IReserve, type IReserveConsumption, type IReserveMintInput, type ISplit, type IUserCollectionFilters, type IWhitelistData, type IndexerStatus, type IndexerStatusSeverity, type InputProps, InsufficientFundsError, type JwtAccessTokenPayload, type Ledger, type Listing, type ListingFilters, type LiveMintingEvent, type LiveMintingEventWithArtists, type LiveMintingPass, type LiveMintingPassGroup, type MarketplaceMetadataEvm, type MediaImage$1 as MediaImage, type MessageSigned, MetadataError, type MetadataEthResponse, type MetadataResponse, MintError, MintErrors, type MintGenUploadProjectResponse, type MintGenerativeData, type MintGenerativeParams, MintProgressMessage, type MintResponse, type MintTicket, type MintTicketMetadata, type MintTicketSettings, type ModerationReason, type NFTArticle, type NFTArticleFilters, type NFTArticleGenerativeToken, type NFTArticleInfos, type NFTArticleRevision, type NTFArticleLedger, NetworkError, type NetworkStatus, type Objkt, type ObjktFilters, type ObjktMetadata, type Offer, type OnboardingComponent, PendingSigningRequestError, PreviewError, type PreviewErrorResponse, type PreviewResponse, type ProcessRawTokenFeatureError, ProcessRawTokenFeatureErrorType, ProcessRawTokenFeatureErrorTypes, ProfileUploadError, type ProfileUploadResponse, type RawTokenFeatures, type Redeemable, type RedeemableDetails, type RedeemableOption, type RedeemableOptionValue, type RedeemablePublicDefinition, type RedeemableUserAction, type RedeemableUserActionInputType, type RedeemableUserActionOptions, RedeemableUserActionType, type Redemption, type Report, type ReserveMintPass, type ReserveWhiteList, SandboxFileError, type SandboxFiles, type SignMessageOptions, type SigningData, type SigningProgress, SigningState, type Split, StaticGenError, type StaticGenResponse, type TColor, type TContractOperation, type TWalletManager, type TempGenUploadProjectResponse, TestPreviewError, type TestPreviewErrorResponse, type TestPreviewResponse, TokenActionType, type TokenFeature, type TokenFeatureValueType, type TokenFormat, type TokenMetadata, type TokenMetadataFeature, TransactionReceiptError, TransactionRevertedError, TransactionType, TransactionUnknownError, type UpdateIssuerForm, type User, type UserAlias, UserAuthorization, type UserFilters, UserFlag, UserFlagValues, type UserItems, UserRejectedError, UserType, type Vec2, WalletConnectionError, WalletConnectionErrorReason, WalletManager, accountTypeGuard, chainEnvToChainMap, chainToChainEnvMap, isReserveMintPass, isReserveWhiteList, networkToChain, objktFeatureType, offerTypeGuard };
1537
+ //#endregion
1538
+ //#region src/lib/currencies.d.ts
1539
+ interface CurrencyDefinition {
1540
+ /**
1541
+ * Short name (3 characters) for the blockchain, (ex: ETH, TEZ)
1542
+ */
1543
+ shortname: string;
1544
+ /**
1545
+ * The number of decimal digits for full-precision for the human adopted
1546
+ * exponent.
1547
+ */
1548
+ decimalDigits: number;
1549
+ /**
1550
+ * The base unit of the currency.
1551
+ */
1552
+ basename: string;
1553
+ }
1554
+ /**
1555
+ * The various supported blockchains as well as the default user currency, which
1556
+ * is (going to be) the FIAT currency they chose.
1557
+ */
1558
+ type Currency = BlockchainType | "FXH" | "_default";
1559
+ /**
1560
+ * A map of every currency and its declarative definition.
1561
+ */
1562
+ declare const currenciesDef: Record<Currency, CurrencyDefinition>;
1563
+ //#endregion
1564
+ //#region src/lib/units.d.ts
1565
+ /**
1566
+ * Given a number in mutez, outputs a more readable format such as
1567
+ * 1.1K or 200.0K etc...
1568
+ */
1569
+ declare function bigMutezFormatter(num: number, digits?: number): string;
1570
+ /**
1571
+ * Given a number in mutez, outputs a string with decimals provided, if any
1572
+ * Default to
1573
+ */
1574
+ declare function displayDecimals(mutez: number, maxDecimals?: number, exponent?: number): number;
1575
+ /**
1576
+ * Options to display a Price.
1577
+ */
1578
+ type DisplayPriceOptions = {
1579
+ /**
1580
+ * Whether the number should be abbreviated if it's very big, such as 1K, 1M
1581
+ */
1582
+ abbreviateBig: boolean;
1583
+ /**
1584
+ * The number of decimal digits which should be displayed after the comma. If
1585
+ * those numbers are zeros, they will be left out. If undefined, all the
1586
+ * digits necessary for full precision will be outputted.
1587
+ */
1588
+ maxDecimals?: number;
1589
+ };
1590
+ /**
1591
+ * Given a uint price, outputs a string in human-readable unit (ex 1 ETH, 1 XTZ)
1592
+ * with an output which can be configured using options. The default options
1593
+ * provide a full representation of the price value, to ensure it's properly
1594
+ * displayed and to avoid bad surprises.
1595
+ *
1596
+ * @param options Some options for the display. The default options
1597
+ * provide a full representation of the price value, to ensure it's properly
1598
+ * displayed and to avoid bad surprises.
1599
+ *
1600
+ * @see units.test.ts For examples on usage
1601
+ */
1602
+ declare function displayPrice(price: bigint, currency: Currency, options?: Partial<DisplayPriceOptions>): string;
1603
+ /**
1604
+ * Takes some normalized royalties as input, and serialize it to a string ready
1605
+ * to be displayed on the front-end. **It expects the royalty amount to be
1606
+ * normalized, and will throw if not the case.**
1607
+ * @param royalties A normalized value between [0; 1], ex: 0.1 = 10%, 0.01 = 1%
1608
+ * @returns A text string ready to display on the front
1609
+ */
1610
+ declare function displayRoyalties(royalties: number): string;
1611
+ /**
1612
+ * Given a number in the [0; 1] range, displays the percentage in an elegant manner
1613
+ */
1614
+ declare function displayPercentage(x: number, prettifyLow?: boolean): string;
1615
+ declare function prettyPrintBytes(size: number): string;
1616
+ //#endregion
1617
+ export { Account, Action, AnyOffer, ArticleFlag, ArticleGenerativeTokenMention, ArticleMetadata, AvatarUploadError, AvatarUploadResponse, BadRequestError, Blockchain, BlockchainEnv, BlockchainEnvs, BlockchainNetwork, BlockchainNetworks, BlockchainType, BlockchainTypes, CaptureMode, CaptureModeList, CaptureSettings, CaptureTriggerMode, CaptureTriggerModeList, ChainEnvToChainTypemap, ChainNetworkToChainTypemap, ChainToChainEnvTypemap, Collaboration, CollectionOffer, ConnectedAccount, ConnectedUser, ConstraintVariant, ContractOperation, Currency, CurrencyDefinition, Cycle, CyclesState, DisplayPriceOptions, EObjktFeatureType, EReserveMethod, EWalletOperatorState, Eth721ContractMetadata, Eth721TokenMetadata, EventAvailability, EventMedia, EventOnboarding, EventOnboardingOnComponent, EventStatus, ExplorationSettings, FileSandboxResponse, FrameMintingFormValues, GenTokConstrains, GenTokDistributionForm, GenTokEditions, GenTokEditionsForm, GenTokFixedEditionsForm, GenTokFlag, GenTokLabel, GenTokLabelDefinition, GenTokLabelGroup, GenTokLabel_Params, GenTokLabel_Redeemable, GenTokOpenEditionsForm, GenTokPricing, GenTokPricingForm, GenTokenInformationsForm, GenTokenSettings, GenerativeToken, GenerativeTokenFeature, GenerativeTokenFeatureValue, GenerativeTokenFilters, GenerativeTokenFormat, GenerativeTokenInformations, GenerativeTokenMarketStats, GenerativeTokenMarketStatsHistory, GenerativeTokenMetadata, GenerativeTokenMetadataV1, GenerativeTokenMetadataV2, GenerativeTokenMetadataV3, GenerativeTokenMetadataV4, GenerativeTokenMetadataV5, GenerativeTokenMetadataV6, GenerativeTokenVersion, GenerativeTokenWithCollection, HistoryMetadata, IAddress, IObjktFeatureFilter, IPricingDutchAuction, IPricingFixed, IReserve, IReserveConsumption, IReserveMintInput, ISplit, IUserCollectionFilters, IWhitelistData, IndexerStatus, IndexerStatusSeverity, InputProps, InsufficientFundsError, JwtAccessTokenPayload, Ledger, Listing, ListingFilters, LiveMintingEvent, LiveMintingEventWithArtists, LiveMintingPass, LiveMintingPassGroup, MarketplaceMetadataEvm, MediaImage$1 as MediaImage, MessageSigned, MetadataError, MetadataEthResponse, MetadataResponse, MintError, MintErrors, MintGenUploadProjectResponse, MintGenerativeData, MintGenerativeParams, MintProgressMessage, MintResponse, MintTicket, MintTicketMetadata, MintTicketSettings, ModerationReason, NFTArticle, NFTArticleFilters, NFTArticleGenerativeToken, NFTArticleInfos, NFTArticleRevision, NTFArticleLedger, NetworkError, NetworkStatus, Objkt, ObjktFilters, ObjktMetadata, Offer, OnboardingComponent, PendingSigningRequestError, PreviewError, PreviewErrorResponse, PreviewResponse, ProcessRawTokenFeatureError, ProcessRawTokenFeatureErrorType, ProcessRawTokenFeatureErrorTypes, ProfileUploadError, ProfileUploadResponse, RawTokenFeatures, Redeemable, RedeemableDetails, RedeemableOption, RedeemableOptionValue, RedeemablePublicDefinition, RedeemableUserAction, RedeemableUserActionInputType, RedeemableUserActionOptions, RedeemableUserActionType, Redemption, Report, ReserveMintPass, ReserveWhiteList, SandboxFileError, SandboxFiles, SignMessageOptions, SigningData, SigningProgress, SigningState, Split, StaticGenError, StaticGenResponse, TColor, TContractOperation, TWalletManager$1 as TWalletManager, TempGenUploadProjectResponse, TestPreviewError, TestPreviewErrorResponse, TestPreviewResponse, TokenActionType, TokenFeature, TokenFeatureValueType, TokenFormat, TokenMetadata, TokenMetadataFeature, TransactionReceiptError, TransactionRevertedError, TransactionType, TransactionUnknownError, UpdateIssuerForm, User, UserAlias, UserAuthorization, UserFilters, UserFlag, UserFlagValues, UserItems, UserRejectedError, UserType, Vec2, WalletConnectionError, WalletConnectionErrorReason, WalletManager, accountTypeGuard, bigMutezFormatter, chainEnvToChainMap, chainToChainEnvMap, currenciesDef, displayDecimals, displayPercentage, displayPrice, displayRoyalties, isReserveMintPass, isReserveWhiteList, networkToChain, objktFeatureType, offerTypeGuard, prettyPrintBytes };
1618
+ //# sourceMappingURL=index.d.ts.map