@fxhash/shared 0.0.1

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.
@@ -0,0 +1,1501 @@
1
+ import { GPURenderingConfig } from '@fxhash/config';
2
+ import { PromiseResult } from '@fxhash/utils';
3
+ import { JwtPayload } from 'jwt-decode';
4
+
5
+ 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
+ };
13
+ }
14
+ 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
+
24
+ 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
+
34
+ interface ISplit {
35
+ address: string;
36
+ pct: number;
37
+ }
38
+ interface Split {
39
+ pct: number;
40
+ user: User;
41
+ }
42
+
43
+ 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"
50
+ }
51
+ interface NTFArticleLedger {
52
+ article: NFTArticle;
53
+ owner: User;
54
+ amount: number;
55
+ }
56
+ interface NFTArticleRevision {
57
+ article: NFTArticle;
58
+ iteration: number;
59
+ metadataUri: string;
60
+ createdAt: string;
61
+ opHash: string;
62
+ }
63
+ interface NFTArticleGenerativeToken {
64
+ article: NFTArticle;
65
+ generativeToken: GenerativeToken;
66
+ line: number;
67
+ }
68
+ type NFTArticleInfos = Pick<NFTArticle, "id" | "title" | "flag" | "slug" | "thumbnailUri" | "thumbnailMedia" | "description" | "tags" | "author" | "createdAt" | "metadataLocked"> & {
69
+ revisions?: NFTArticleRevision[];
70
+ };
71
+ 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;
101
+ }
102
+ 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
+
115
+ interface ArticleGenerativeTokenMention {
116
+ line: number;
117
+ article: NFTArticle;
118
+ generativeToken: GenerativeToken;
119
+ }
120
+
121
+ 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;
133
+ }
134
+ 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
+
144
+ 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;
153
+ }
154
+ 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;
164
+ }
165
+ type AnyOffer = Offer | CollectionOffer;
166
+ declare const offerTypeGuard: (offer: AnyOffer) => offer is Offer;
167
+
168
+ interface EventMedia {
169
+ s3key: string;
170
+ name: string;
171
+ url: string;
172
+ }
173
+
174
+ interface IAddress {
175
+ firstName: string;
176
+ lastName: string;
177
+ address: string;
178
+ postalCode: string;
179
+ city: string;
180
+ state: string;
181
+ country: string;
182
+ }
183
+ 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;
192
+ }
193
+ interface RedeemableOptionValue {
194
+ label: string;
195
+ amount: number;
196
+ }
197
+ interface RedeemableOption {
198
+ label: string;
199
+ values: RedeemableOptionValue[];
200
+ }
201
+ declare enum RedeemableUserActionType {
202
+ INPUT_ADDRESS = "INPUT_ADDRESS",
203
+ INPUT_EMAIL = "INPUT_EMAIL",
204
+ INPUT_PHONE = "INPUT_PHONE",
205
+ INPUT_LIST = "INPUT_LIST"
206
+ }
207
+ interface RedeemableUserAction {
208
+ id: string;
209
+ type: RedeemableUserActionType;
210
+ options: any;
211
+ }
212
+ interface RedeemablePublicDefinition {
213
+ userActions: RedeemableUserAction[];
214
+ }
215
+ 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;
272
+ }
273
+
274
+ 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[];
304
+ }
305
+ interface ObjktFilters {
306
+ activeListing_exist?: boolean;
307
+ redeemable_eq?: boolean;
308
+ redeemed_eq?: boolean;
309
+ }
310
+ declare enum EObjktFeatureType {
311
+ BOOLEAN = "BOOLEAN",
312
+ STRING = "STRING",
313
+ NUMBER = "NUMBER"
314
+ }
315
+ interface IObjktFeatureFilter {
316
+ name: string;
317
+ values: string[];
318
+ type: EObjktFeatureType;
319
+ }
320
+ declare function objktFeatureType(value: any): EObjktFeatureType;
321
+
322
+ interface Report {
323
+ id: string;
324
+ user?: User;
325
+ token?: GenerativeToken;
326
+ createdAt: Date;
327
+ }
328
+
329
+ declare enum EReserveMethod {
330
+ WHITELIST = "WHITELIST",
331
+ MINT_PASS = "MINT_PASS"
332
+ }
333
+ interface IWhitelistData<T = number> {
334
+ address: string;
335
+ pct: T;
336
+ }
337
+ type ReserveWhiteList<T = number> = {
338
+ method: EReserveMethod.WHITELIST;
339
+ data: IWhitelistData<T>[];
340
+ amount: T;
341
+ };
342
+ declare function isReserveWhiteList(reserve: IReserve): reserve is ReserveWhiteList;
343
+ type ReserveMintPass<T = number> = {
344
+ method: EReserveMethod.MINT_PASS;
345
+ data: string;
346
+ amount: T;
347
+ };
348
+ declare function isReserveMintPass<T = number>(reserve: IReserve<T>): reserve is ReserveMintPass<T>;
349
+ type IReserve<T = number> = ReserveWhiteList<T> | ReserveMintPass<T>;
350
+ interface IReserveMintInput {
351
+ method: EReserveMethod;
352
+ data: any;
353
+ }
354
+
355
+ 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;
365
+ }
366
+ interface MintTicketSettings {
367
+ token: GenerativeToken;
368
+ gracingPeriod: number;
369
+ metadata: MintTicketMetadata;
370
+ metadataUri?: string;
371
+ captureMedia?: MediaImage$1;
372
+ }
373
+ interface MintTicketMetadata {
374
+ }
375
+
376
+ 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"
383
+ }
384
+ declare enum GenTokPricing {
385
+ FIXED = "FIXED",
386
+ DUTCH_AUCTION = "DUTCH_AUCTION"
387
+ }
388
+ declare enum GenTokLabel {
389
+ EPILEPTIC_TRIGGER = 0,
390
+ SEXUAL_CONTENT = 1,
391
+ SENSITIVE = 2,
392
+ IMAGE_COMPOSITION = 100,
393
+ ANIMATED = 101,
394
+ INTERACTIVE = 102,
395
+ PFP = 103,
396
+ AUDIO = 104,
397
+ INCLUDE_PRERENDERED_COMPONENTS = 105,
398
+ CUSTOM_MINTING_INTERFACE = 106,
399
+ FXHACKATHON2023 = 302023
400
+ }
401
+ declare enum GenTokLabelGroup {
402
+ WARNING = "WARNING",
403
+ DETAILS = "DETAILS",
404
+ HIGHLIGHT = "HIGHLIGHT"
405
+ }
406
+ interface GenTokLabelDefinition {
407
+ label: string;
408
+ shortLabel: string;
409
+ group: GenTokLabelGroup;
410
+ description?: string;
411
+ icon?: string;
412
+ showWarningSetting?: string;
413
+ showWarningOn?: "preview" | "run";
414
+ }
415
+ declare const GenTokLabel_Params: GenTokLabelDefinition;
416
+ declare const GenTokLabel_Redeemable: GenTokLabelDefinition;
417
+ interface GenerativeTokenMarketStats {
418
+ floor: number | null;
419
+ median: number | null;
420
+ listed: number | null;
421
+ highestSold: number | null;
422
+ lowestSold: number | null;
423
+ primVolume: number | null;
424
+ primVolumeFiat: number | null;
425
+ primVolumeNb: number | null;
426
+ secVolume: number | null;
427
+ secVolumeFiat: number | null;
428
+ secVolumeNb: number | null;
429
+ secVolume24: number | null;
430
+ secVolumeFiat24: number | null;
431
+ secVolumeNb24: number | null;
432
+ secVolume7d: number | null;
433
+ secVolumeFiat7d: number | null;
434
+ secVolumeNb7d: number | null;
435
+ secVolume30d: number | null;
436
+ secVolumeFiat30d: number | null;
437
+ secVolumeNb30d: number | null;
438
+ generativeToken?: GenerativeToken;
439
+ }
440
+ interface GenerativeTokenMarketStatsHistory {
441
+ floor: number | null;
442
+ median: number | null;
443
+ listed: number | null;
444
+ highestSold: number | null;
445
+ lowestSold: number | null;
446
+ primVolume: number | null;
447
+ primVolumeFiat: number | null;
448
+ primVolumeNb: number | null;
449
+ secVolume: number | null;
450
+ secVolumeFiat: number | null;
451
+ secVolumeNb: number | null;
452
+ from: string;
453
+ to: string;
454
+ }
455
+ declare enum GenerativeTokenVersion {
456
+ "PRE_V3" = "PRE_V3",
457
+ V3 = "V3",
458
+ ETH_V1 = "ETH_V1",
459
+ BASE_V1 = "BASE_V1"
460
+ }
461
+ interface GenerativeToken {
462
+ id: string;
463
+ version: GenerativeTokenVersion;
464
+ author: User;
465
+ name: string;
466
+ flag: GenTokFlag;
467
+ reports?: Report[];
468
+ slug?: string;
469
+ metadata: GenerativeTokenMetadata;
470
+ metadataUri?: string;
471
+ generativeUri?: string;
472
+ thumbnailUri?: string;
473
+ displayUri?: string;
474
+ tags?: string[];
475
+ labels?: number[];
476
+ price: number;
477
+ pricingFixed?: IPricingFixed;
478
+ pricingDutchAuction?: IPricingDutchAuction;
479
+ originalSupply: number;
480
+ supply: number;
481
+ balance: number;
482
+ iterationsCount?: number;
483
+ openEditions: boolean;
484
+ openEditionsEndsAt?: string | null;
485
+ enabled: boolean;
486
+ royalties: number;
487
+ splitsPrimary: Split[];
488
+ splitsSecondary: Split[];
489
+ reserves: IReserve[];
490
+ lockedSeconds: number;
491
+ lockEnd: string;
492
+ mintOpensAt?: string;
493
+ objkts: Objkt[];
494
+ actions: Action[];
495
+ objktsCount?: number;
496
+ createdAt: string;
497
+ marketStats?: GenerativeTokenMarketStats;
498
+ marketStatsHistory?: GenerativeTokenMarketStatsHistory[];
499
+ features?: GenerativeTokenFeature[];
500
+ moderationReason?: string | null;
501
+ entireCollection?: Objkt[];
502
+ articleMentions?: ArticleGenerativeTokenMention[];
503
+ captureMedia?: MediaImage$1;
504
+ redeemables: Redeemable[];
505
+ underAuctionMintTickets: MintTicket[];
506
+ mintTickets: MintTicket[];
507
+ mintTicketSettings: MintTicketSettings | null;
508
+ inputBytesSize: number;
509
+ gentkContractAddress: string;
510
+ collectionOffers: CollectionOffer[];
511
+ isFrame: boolean;
512
+ maxMintsPerFid?: number;
513
+ }
514
+ interface GenerativeTokenWithCollection extends GenerativeToken {
515
+ entireCollection: Objkt[];
516
+ }
517
+ interface GenerativeTokenFilters {
518
+ id_in?: number[];
519
+ flag_eq?: GenTokFlag;
520
+ flag_in?: GenTokFlag[];
521
+ flag_neq?: GenTokFlag;
522
+ price_gte?: number;
523
+ price_lte?: number;
524
+ mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
525
+ authorVerified_eq?: boolean;
526
+ searchQuery_eq?: string;
527
+ supply_lte?: number;
528
+ supply_gte?: number;
529
+ pricingMethod_eq?: GenTokPricing;
530
+ locked_eq?: boolean;
531
+ mintOpened_eq?: boolean;
532
+ fxparams_eq?: boolean;
533
+ redeemable_eq?: boolean;
534
+ }
535
+ interface GenerativeTokenFeatureValue {
536
+ value: string | boolean | number;
537
+ occur: number;
538
+ }
539
+ interface GenerativeTokenFeature {
540
+ name: string;
541
+ values: GenerativeTokenFeatureValue[];
542
+ }
543
+
544
+ type Vec2 = {
545
+ x: number;
546
+ y: number;
547
+ };
548
+
549
+ interface GenerativeTokenInformations {
550
+ metadata: GenerativeTokenMetadata;
551
+ editions: number;
552
+ enabled: boolean;
553
+ price?: number;
554
+ royaties?: number;
555
+ }
556
+ declare enum CaptureTriggerMode {
557
+ DELAY = "DELAY",
558
+ FN_TRIGGER = "FN_TRIGGER"
559
+ }
560
+ declare const CaptureTriggerModeList: CaptureTriggerMode[];
561
+ declare enum CaptureMode {
562
+ CANVAS = "CANVAS",
563
+ CUSTOM = "CUSTOM",
564
+ VIEWPORT = "VIEWPORT"
565
+ }
566
+ declare const CaptureModeList: CaptureMode[];
567
+ interface CaptureSettings {
568
+ mode?: CaptureMode;
569
+ triggerMode?: CaptureTriggerMode;
570
+ canvasSelector?: string;
571
+ delay?: number;
572
+ resolution?: Vec2;
573
+ gpu?: boolean;
574
+ gif?: boolean;
575
+ frameCount?: number;
576
+ captureInterval?: number;
577
+ playbackFps?: number;
578
+ gpuVersion?: keyof GPURenderingConfig;
579
+ }
580
+ interface MintGenerativeParams {
581
+ definition: any;
582
+ inputBytesSize: number;
583
+ }
584
+ interface MintGenerativeData<N = string> {
585
+ onChain?: boolean;
586
+ collaboration?: Collaboration | null;
587
+ projectZipKey?: string;
588
+ cidUrlParams?: string;
589
+ authHash1?: string;
590
+ previewHash?: string;
591
+ previewIteration?: string;
592
+ previewMinter?: string;
593
+ previewInputBytes?: string | null;
594
+ cidPreview?: string;
595
+ cidThumbnail?: string;
596
+ authHash2?: string;
597
+ distribution?: GenTokDistributionForm<N>;
598
+ captureSettings?: CaptureSettings;
599
+ settings?: GenTokenSettings;
600
+ params?: MintGenerativeParams;
601
+ informations?: GenTokenInformationsForm;
602
+ minted?: boolean;
603
+ snippetVersion?: string | null;
604
+ }
605
+ /**
606
+ * This type describes the constraints that can be applied to the minting of a generative token
607
+ * The different types in order are:
608
+ * hash: the hash of the project
609
+ * minter: the minter of the project
610
+ * iteration: the iteration of the project
611
+ * inputBytes: the serialized input bytes of the project
612
+ */
613
+ type ConstraintVariant = [string, string, string, string];
614
+ interface GenTokConstrains {
615
+ hashConstraints?: string[] | null;
616
+ minterConstraints?: string[] | null;
617
+ iterationConstraints?: string[] | null;
618
+ paramsConstraints?: string[] | null;
619
+ }
620
+ interface ExplorationSettings extends GenTokConstrains {
621
+ enabled: boolean;
622
+ }
623
+ interface GenTokenSettings {
624
+ exploration?: {
625
+ preMint?: ExplorationSettings;
626
+ postMint?: ExplorationSettings;
627
+ };
628
+ }
629
+ type FrameMintingFormValues = {
630
+ enabled: boolean;
631
+ mintsPerFid: number;
632
+ };
633
+ interface GenTokPricingForm<N> {
634
+ pricingMethod?: GenTokPricing;
635
+ pricingFixed: Partial<IPricingFixed<N>>;
636
+ pricingDutchAuction: Partial<IPricingDutchAuction<N>>;
637
+ lockForReserves?: boolean;
638
+ royalties?: N;
639
+ splitsPrimary: ISplit[];
640
+ splitsSecondary: ISplit[];
641
+ }
642
+ declare enum GenTokEditions {
643
+ FIXED = "FIXED",
644
+ OPENED = "OPENED"
645
+ }
646
+ type GenTokOpenEditionsForm = {
647
+ closesAt?: Date | null;
648
+ };
649
+ type GenTokFixedEditionsForm<N> = {
650
+ amount: N;
651
+ };
652
+ type GenTokEditionsForm<N> = {
653
+ type: GenTokEditions;
654
+ fixed: GenTokFixedEditionsForm<N>;
655
+ opened: GenTokOpenEditionsForm;
656
+ };
657
+ interface GenTokDistributionForm<N> {
658
+ editions: GenTokEditionsForm<N>;
659
+ enabled: boolean;
660
+ reserves: IReserve<N>[];
661
+ gracingPeriod?: N;
662
+ frameMinting?: FrameMintingFormValues;
663
+ }
664
+ interface GenTokenInformationsForm {
665
+ name: string;
666
+ description: string;
667
+ mintingInstructions: string;
668
+ childrenDescription: string;
669
+ tags: string;
670
+ labels: GenTokLabel[];
671
+ }
672
+
673
+ interface TokenMetadata {
674
+ "": string;
675
+ name: string;
676
+ symbol: string;
677
+ decimals: number;
678
+ }
679
+ interface HistoryMetadata {
680
+ [key: string]: any;
681
+ }
682
+ interface TokenFormat {
683
+ uri: string;
684
+ mimeType: string;
685
+ }
686
+ type RawTokenFeatures = Record<string, any>;
687
+ type TokenFeatureValueType = string | number | boolean;
688
+ interface TokenMetadataFeature {
689
+ name: string;
690
+ value: TokenFeatureValueType;
691
+ }
692
+ interface TokenFeature {
693
+ name: string;
694
+ value: TokenFeatureValueType;
695
+ rarity?: number;
696
+ }
697
+ declare enum ProcessRawTokenFeatureErrorType {
698
+ UNKNOWN = "UNKNOWN",
699
+ INVALID_PROPERTY_TYPE = "INVALID_PROPERTY_TYPE",
700
+ INVALID_FEATURES_SIGNATURE = "INVALID_FEATURES_SIGNATURE"
701
+ }
702
+ declare const ProcessRawTokenFeatureErrorTypes: ProcessRawTokenFeatureErrorType[];
703
+ type ProcessRawTokenFeatureError = {
704
+ type: ProcessRawTokenFeatureErrorType;
705
+ extra?: string;
706
+ };
707
+ type GenerativeTokenMetadataVersion = "0.1" | "0.2" | "0.3" | "0.4" | "0.5";
708
+ type BaseGenerativeTokenMetadata = {
709
+ name: string;
710
+ description: string;
711
+ childrenDescription: string;
712
+ mintingInstructions: string;
713
+ tags: string[];
714
+ artifactUri: string;
715
+ displayUri: string;
716
+ thumbnailUri: string;
717
+ generativeUri: string;
718
+ authenticityHash: string;
719
+ capture: CaptureSettings;
720
+ settings?: GenTokenSettings | null;
721
+ symbol: string;
722
+ version?: GenerativeTokenMetadataVersion;
723
+ };
724
+ type GenerativeTokenMetadataV1 = BaseGenerativeTokenMetadata;
725
+ type GenerativeTokenMetadataV2 = GenerativeTokenMetadataV1 & {
726
+ previewHash?: string;
727
+ previewIteration?: string;
728
+ previewMinter?: string;
729
+ previewInputBytes?: string;
730
+ mintingInstructions: string;
731
+ };
732
+ type GenerativeTokenMetadataV3 = GenerativeTokenMetadataV2 & {
733
+ params: {
734
+ definition: any;
735
+ inputBytesSize: number;
736
+ };
737
+ snippetVersion: string;
738
+ };
739
+ type GenerativeTokenMetadataV4 = GenerativeTokenMetadataV3 & {
740
+ primarySplits: ISplit[];
741
+ };
742
+ type GenerativeTokenMetadataV5 = GenerativeTokenMetadataV4 & {
743
+ chain: string;
744
+ };
745
+ type GenerativeTokenMetadata = GenerativeTokenMetadataV1 | (GenerativeTokenMetadataV2 & {
746
+ version: "0.2";
747
+ }) | (GenerativeTokenMetadataV3 & {
748
+ version: "0.3";
749
+ }) | (GenerativeTokenMetadataV4 & {
750
+ version: "0.4";
751
+ }) | (GenerativeTokenMetadataV5 & {
752
+ version: "0.5";
753
+ });
754
+ type ObjktMetadata = {
755
+ features?: TokenMetadataFeature[] | null;
756
+ } & GenerativeTokenMetadata;
757
+ interface Eth721ContractMetadata {
758
+ name: string;
759
+ description: string;
760
+ image: string;
761
+ external_link: string;
762
+ collaborators?: string[];
763
+ ipfsBackupUri?: string;
764
+ }
765
+ interface Eth721ContractMetadata {
766
+ name: string;
767
+ description: string;
768
+ image: string;
769
+ external_link: string;
770
+ collaborators?: string[];
771
+ ipfsBackupUri?: string;
772
+ }
773
+ interface Eth721TokenMetadata {
774
+ name: string;
775
+ description: string;
776
+ image: string;
777
+ external_url: string;
778
+ animation_url?: string;
779
+ collaborators?: string[];
780
+ ipfsBackupUri?: string;
781
+ }
782
+ interface Eth721TokenMetadata {
783
+ name: string;
784
+ description: string;
785
+ image: string;
786
+ external_url: string;
787
+ animation_url?: string;
788
+ collaborators?: string[];
789
+ ipfsBackupUri?: string;
790
+ }
791
+ interface ArticleMetadata {
792
+ decimals: number;
793
+ symbol: "ARTKL";
794
+ name: string;
795
+ description: string;
796
+ minter?: string;
797
+ creators?: string[];
798
+ contributors?: string[];
799
+ type: "article";
800
+ tags: string[];
801
+ language: string;
802
+ artifactUri: string;
803
+ displayUri: string;
804
+ thumbnailUri: string;
805
+ thumbnailCaption?: string;
806
+ platforms?: string[];
807
+ }
808
+ interface MarketplaceMetadataEvm {
809
+ external: boolean;
810
+ source?: string;
811
+ hasRoyalties: boolean;
812
+ }
813
+
814
+ declare enum TokenActionType {
815
+ NONE = "NONE",
816
+ UPDATE_STATE = "UPDATE_STATE",
817
+ UPDATE_PRICING = "UPDATE_PRICING",
818
+ BURN_SUPPLY = "BURN_SUPPLY",
819
+ CODEX_UPDATED = "CODEX_UPDATED",
820
+ MINTED = "MINTED",
821
+ MINTED_FROM = "MINTED_FROM",
822
+ TICKET_MINTED = "TICKET_MINTED",
823
+ TICKET_CLAIMED = "TICKET_CLAIMED",
824
+ TICKET_PRICE_UPDATED = "TICKET_PRICE_UPDATED",
825
+ GENTK_SIGNED = "GENTK_SIGNED",
826
+ GENTK_REVEALED = "GENTK_REVEALED",
827
+ GENTK_REDEEMED = "GENTK_REDEEMED",
828
+ COMPLETED = "COMPLETED",
829
+ TRANSFERED = "TRANSFERED",
830
+ LISTING_V1 = "LISTING_V1",
831
+ LISTING_V1_CANCELLED = "LISTING_V1_CANCELLED",
832
+ LISTING_V1_ACCEPTED = "LISTING_V1_ACCEPTED",
833
+ LISTING_ETH_V1 = "LISTING_ETH_V1",
834
+ LISTING_BASE_V1 = "LISTING_BASE_V1",
835
+ LISTING_ETH_V1_CANCELLED = "LISTING_ETH_V1_CANCELLED",
836
+ LISTING_BASE_V1_CANCELLED = "LISTING_BASE_V1_CANCELLED",
837
+ LISTING_ETH_V1_ACCEPTED = "LISTING_ETH_V1_ACCEPTED",
838
+ LISTING_BASE_V1_ACCEPTED = "LISTING_BASE_V1_ACCEPTED",
839
+ LISTING_V2 = "LISTING_V2",
840
+ LISTING_V2_CANCELLED = "LISTING_V2_CANCELLED",
841
+ LISTING_V2_ACCEPTED = "LISTING_V2_ACCEPTED",
842
+ LISTING_V3 = "LISTING_V3",
843
+ LISTING_V3_CANCELLED = "LISTING_V3_CANCELLED",
844
+ LISTING_V3_ACCEPTED = "LISTING_V3_ACCEPTED",
845
+ OFFER = "OFFER",
846
+ OFFER_CANCELLED = "OFFER_CANCELLED",
847
+ OFFER_ACCEPTED = "OFFER_ACCEPTED",
848
+ OFFER_ETH = "OFFER_ETH",
849
+ OFFER_BASE = "OFFER_BASE",
850
+ OFFER_CANCELLED_ETH = "OFFER_CANCELLED_ETH",
851
+ OFFER_CANCELLED_BASE = "OFFER_CANCELLED_BASE",
852
+ OFFER_ACCEPTED_ETH = "OFFER_ACCEPTED_ETH",
853
+ OFFER_ACCEPTED_BASE = "OFFER_ACCEPTED_BASE",
854
+ COLLECTION_OFFER_ETH = "COLLECTION_OFFER_ETH",
855
+ COLLECTION_OFFER_BASE = "COLLECTION_OFFER_BASE",
856
+ COLLECTION_OFFER_CANCELLED_ETH = "COLLECTION_OFFER_CANCELLED_ETH",
857
+ COLLECTION_OFFER_CANCELLED_BASE = "COLLECTION_OFFER_CANCELLED_BASE",
858
+ COLLECTION_OFFER_ACCEPTED_ETH = "COLLECTION_OFFER_ACCEPTED_ETH",
859
+ COLLECTION_OFFER_ACCEPTED_BASE = "COLLECTION_OFFER_ACCEPTED_BASE",
860
+ COLLECTION_OFFER = "COLLECTION_OFFER",
861
+ COLLECTION_OFFER_CANCELLED = "COLLECTION_OFFER_CANCELLED",
862
+ COLLECTION_OFFER_ACCEPTED = "COLLECTION_OFFER_ACCEPTED",
863
+ AUCTION = "AUCTION",
864
+ AUCTION_BID = "AUCTION_BID",
865
+ AUCTION_CANCELLED = "AUCTION_CANCELLED",
866
+ AUCTION_FULFILLED = "AUCTION_FULFILLED",
867
+ ARTICLE_MINTED = "ARTICLE_MINTED",
868
+ ARTICLE_METADATA_UPDATED = "ARTICLE_METADATA_UPDATED",
869
+ ARTICLE_METADATA_LOCKED = "ARTICLE_METADATA_LOCKED",
870
+ ARTICLE_EDITIONS_TRANSFERED = "ARTICLE_EDITIONS_TRANSFERED"
871
+ }
872
+ interface Action {
873
+ id: string;
874
+ opHash: string;
875
+ type: TokenActionType;
876
+ numericValue: number;
877
+ issuer?: User;
878
+ target?: User;
879
+ token?: GenerativeToken;
880
+ objkt?: Objkt;
881
+ redeemable?: Redeemable;
882
+ ticketId?: number;
883
+ article?: NFTArticleInfos;
884
+ metadata: HistoryMetadata;
885
+ createdAt: string;
886
+ }
887
+
888
+ interface UserItems {
889
+ generativeTokens?: GenerativeToken[];
890
+ objkts?: Objkt[];
891
+ listings?: Listing[];
892
+ actions?: Action[];
893
+ }
894
+ declare enum UserFlag {
895
+ NONE = "NONE",
896
+ REVIEW = "REVIEW",
897
+ SUSPICIOUS = "SUSPICIOUS",
898
+ MALICIOUS = "MALICIOUS",
899
+ VERIFIED = "VERIFIED"
900
+ }
901
+ declare enum UserAuthorization {
902
+ TOKEN_MODERATION = "TOKEN_MODERATION",
903
+ ARTICLE_MODERATION = "ARTICLE_MODERATION",
904
+ USER_MODERATION = "USER_MODERATION",
905
+ GOVERNANCE_MODERATION = "GOVERNANCE_MODERATION"
906
+ }
907
+ declare enum UserType {
908
+ REGULAR = "REGULAR",
909
+ COLLAB_CONTRACT_V1 = "COLLAB_CONTRACT_V1"
910
+ }
911
+ declare const UserFlagValues: Record<UserFlag, number>;
912
+ interface User {
913
+ id: string;
914
+ name?: string;
915
+ type: UserType;
916
+ authorizations: UserAuthorization[];
917
+ flag: UserFlag;
918
+ metadata?: Record<string, any>;
919
+ metadataUri?: string;
920
+ description?: string;
921
+ avatarUri?: string;
922
+ avatarMedia?: MediaImage$1;
923
+ generativeTokens?: GenerativeToken[];
924
+ sales: Action[];
925
+ actionsAsIssuer: Action[];
926
+ actionsAsTarget: Action[];
927
+ listings: Listing[];
928
+ objkts: Objkt[];
929
+ offers: Listing[];
930
+ allOffersReceived: AnyOffer[];
931
+ allOffersSent: Offer[];
932
+ createdAt: Date;
933
+ updatedAt: Date;
934
+ actions?: Action[];
935
+ platformOwned?: boolean;
936
+ donationAddress?: boolean;
937
+ descriptionLight?: string;
938
+ preventLink?: boolean;
939
+ collaborationContracts: Collaboration[];
940
+ moderationReason?: string | null;
941
+ articles: NFTArticle[];
942
+ mintTickets: MintTicket[];
943
+ }
944
+ interface ConnectedUser extends Partial<User> {
945
+ id: string;
946
+ authorizations: UserAuthorization[];
947
+ }
948
+ interface Collaboration extends User {
949
+ collaborators: User[];
950
+ }
951
+ interface UserAlias {
952
+ id: string;
953
+ alias: Partial<User>;
954
+ }
955
+ interface IUserCollectionFilters {
956
+ issuer_in?: number[];
957
+ assigned_eq?: boolean;
958
+ offer_ne?: string;
959
+ createdAt_lt?: string;
960
+ createdAt_gt?: string;
961
+ assignedAt_gt?: string;
962
+ assignedAt_lt?: string;
963
+ mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
964
+ authorVerified_eq?: boolean;
965
+ author_in?: string[];
966
+ searchQuery_eq?: string;
967
+ activeListing_exist?: "LISTED" | "NOT LISTED";
968
+ }
969
+ interface UserFilters {
970
+ flag_in?: UserFlag[];
971
+ searchQuery_eq?: string;
972
+ }
973
+
974
+ declare class PendingSigningRequestError extends Error {
975
+ name: "PendingSigningRequestError";
976
+ message: string;
977
+ }
978
+ declare enum WalletConnectionErrorReason {
979
+ INCORRECT_CHAIN = "INCORRECT_CHAIN"
980
+ }
981
+ declare class WalletConnectionError extends Error {
982
+ readonly reason: WalletConnectionErrorReason;
983
+ name: "WalletConnectionError";
984
+ constructor(reason: WalletConnectionErrorReason);
985
+ }
986
+ declare class UserRejectedError extends Error {
987
+ name: "UserRejectedError";
988
+ message: string;
989
+ }
990
+ declare class InsufficientFundsError extends Error {
991
+ name: "InsufficientFundsError";
992
+ message: string;
993
+ }
994
+ declare class TransactionRevertedError extends Error {
995
+ readonly paramErrorName: string;
996
+ name: "TransactionRevertedError";
997
+ errorName: string;
998
+ constructor(paramErrorName: string);
999
+ }
1000
+ declare class TransactionReceiptError extends Error {
1001
+ name: "TransactionReceiptError";
1002
+ constructor();
1003
+ }
1004
+ declare class TransactionUnknownError extends Error {
1005
+ readonly paramErrorName?: string | undefined;
1006
+ name: "TransactionUnknownError";
1007
+ errorName?: string;
1008
+ constructor(paramErrorName?: string | undefined);
1009
+ }
1010
+ declare class NetworkError extends Error {
1011
+ name: "NetworkError";
1012
+ message: string;
1013
+ }
1014
+ declare class BadRequestError extends Error {
1015
+ name: "BadRequestError";
1016
+ message: string;
1017
+ }
1018
+ type SignMessageOptions = {
1019
+ /**
1020
+ * An string-identifier to define the type of the operation. It is used to
1021
+ * classify signatures in the cache.
1022
+ */
1023
+ type: string;
1024
+ /**
1025
+ * - wallet-only: the cache is bypassed and signature must come from wallet
1026
+ * - cache-first: the cache is checked first, and if a valid signature is
1027
+ * found it's returned, otherwise the wallet is
1028
+ */
1029
+ policy: "wallet-only" | "cache-first";
1030
+ };
1031
+ type MessageSigned = {
1032
+ signedAt: Date;
1033
+ message: string;
1034
+ signature: string;
1035
+ };
1036
+ declare abstract class WalletManager {
1037
+ address: string;
1038
+ private cache;
1039
+ constructor(address: string);
1040
+ /**
1041
+ * Must be implemented by wallets for custom signing of messages.
1042
+ * @param message The message to sign.
1043
+ * @returns The signature of the message.
1044
+ */
1045
+ abstract signMessageWithWallet(message: string): PromiseResult<string, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1046
+ /**
1047
+ * Sign a message using the wallet associated with the manager. Some sign
1048
+ * options can be provided, mainly for implementing cache-fetching for
1049
+ * avoiding redundant signatures from the wallet.
1050
+ *
1051
+ * Signatures are stored in cache so that users don't have to repeatedly
1052
+ * sign messages for similar operations, as long as messages are considered to
1053
+ * be valid for their usage. This function returns a message signed of a
1054
+ * given type if it's still valid in cache. A signature is considered valid
1055
+ * if it was made less than 4 minutes ago.
1056
+ *
1057
+ * @remark For now, the cache policy enforces a 5 min cache time for the
1058
+ * signatures, after which they are considered invalid. There isn't any way to
1059
+ * change this with the current implementation, although it could be added.
1060
+ *
1061
+ * @param options Sign options, which can be used to determine whether the
1062
+ * signature should be fetched from cache or not.
1063
+ */
1064
+ signMessage(message: string, options?: SignMessageOptions): PromiseResult<MessageSigned, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1065
+ abstract sendTransaction<TParams>(operation: TContractOperation<this, TParams, any>, params: TParams, chain: BlockchainType): PromiseResult<unknown, WalletConnectionError | PendingSigningRequestError | UserRejectedError | InsufficientFundsError | TransactionRevertedError | TransactionUnknownError>;
1066
+ abstract waitForTransaction(params: {
1067
+ hash: string;
1068
+ }): PromiseResult<unknown, UserRejectedError | TransactionRevertedError | TransactionReceiptError | TransactionUnknownError>;
1069
+ }
1070
+ type TWalletManager = new (address: string) => WalletManager;
1071
+
1072
+ /**
1073
+ * A Blockchain Environment is based on the classification of the "blockchain
1074
+ * engine".
1075
+ * TODO: should decide between BlockchainEnv & BlockchainNetwork and harmonize
1076
+ */
1077
+ declare enum BlockchainEnv {
1078
+ EVM = "EVM",
1079
+ TEZOS = "TEZOS"
1080
+ }
1081
+ /**
1082
+ * An array of all the `BlockchainEnv` enum values.
1083
+ */
1084
+ declare const BlockchainEnvs: BlockchainEnv[];
1085
+ declare enum BlockchainNetwork {
1086
+ TEZOS = "TEZOS",
1087
+ ETHEREUM = "ETHEREUM"
1088
+ }
1089
+ declare const BlockchainNetworks: BlockchainNetwork[];
1090
+ declare enum TransactionType {
1091
+ OFFCHAIN = "OFFCHAIN",
1092
+ ONCHAIN = "ONCHAIN"
1093
+ }
1094
+ declare enum BlockchainType {
1095
+ ETHEREUM = "ETHEREUM",
1096
+ TEZOS = "TEZOS",
1097
+ BASE = "BASE"
1098
+ }
1099
+ type Blockchain = keyof typeof BlockchainType;
1100
+ declare const BlockchainTypes: ("TEZOS" | "ETHEREUM" | "BASE")[];
1101
+ type ChainNetworkToChainTypemap = {
1102
+ [T in BlockchainNetwork]: {
1103
+ [BlockchainNetwork.ETHEREUM]: BlockchainType.ETHEREUM;
1104
+ [BlockchainNetwork.TEZOS]: BlockchainType.TEZOS;
1105
+ }[T];
1106
+ };
1107
+ /**
1108
+ * Given a BlockchainNetwork, returns an associated BlockchainType of preference
1109
+ */
1110
+ declare function networkToChain<N extends BlockchainNetwork>(network: N): ChainNetworkToChainTypemap[N];
1111
+ type ChainToChainEnvTypemap = {
1112
+ [T in BlockchainType]: {
1113
+ [BlockchainType.BASE]: BlockchainEnv.EVM;
1114
+ [BlockchainType.ETHEREUM]: BlockchainEnv.EVM;
1115
+ [BlockchainType.TEZOS]: BlockchainEnv.TEZOS;
1116
+ }[T];
1117
+ };
1118
+ declare const chainToChainEnvMap: {
1119
+ [K in BlockchainType]: ChainToChainEnvTypemap[K];
1120
+ };
1121
+ type ChainEnvToChainTypemap = {
1122
+ [E in BlockchainEnv]: {
1123
+ [BlockchainEnv.EVM]: BlockchainType.ETHEREUM;
1124
+ [BlockchainEnv.TEZOS]: BlockchainType.TEZOS;
1125
+ }[E];
1126
+ };
1127
+ declare const chainEnvToChainMap: {
1128
+ [E in BlockchainEnv]: ChainEnvToChainTypemap[E];
1129
+ };
1130
+ /**
1131
+ * A Contract Operation defines a set of operations to run at different
1132
+ * moments of the lifecycle of an operation. When an operation needs to be sent,
1133
+ * its corresponding class is instantiated with the operation parameters and
1134
+ * the following steps are performed:
1135
+ * - prepare: preparation steps before calling a contract
1136
+ * - call: the actual contract call
1137
+ * - success: a message is emitted
1138
+ * In case of failure, the whole lifecycle restarts, if the RPC is at cause it
1139
+ * is swapped with another one. This logic is handled by an external runner.
1140
+ */
1141
+ declare abstract class ContractOperation<TWalletManager extends WalletManager, TParams, TData> {
1142
+ manager: TWalletManager;
1143
+ params: TParams;
1144
+ chain: BlockchainType;
1145
+ constructor(manager: TWalletManager, params: TParams, chain: BlockchainType);
1146
+ /**
1147
+ * Runs the required preparations (such as fetching the contracts to get
1148
+ * the entrypoints signature), or any other sync/async operation considered
1149
+ * not to be a part of the actual contract call.
1150
+ * Can store required values in the members of the instance.
1151
+ */
1152
+ abstract prepare(): Promise<void>;
1153
+ /**
1154
+ * The actual calls to the contracts, which results in some Transaction
1155
+ * Wallet Operation and can be observed to track the success/failure of
1156
+ * the transaction emitted
1157
+ */
1158
+ abstract call(): Promise<TData>;
1159
+ /**
1160
+ * Each Contract Operation should implement a success message based on the
1161
+ * operation parameters, and so to provide meaningful feedback to users on
1162
+ * different parts of the front.
1163
+ */
1164
+ abstract success(): string;
1165
+ }
1166
+ type TContractOperation<TWalletManager extends WalletManager, TParams, TData> = new (manager: TWalletManager, params: TParams, chain: BlockchainType) => ContractOperation<TWalletManager, TParams, TData>;
1167
+
1168
+ /**
1169
+ * Model Wallet
1170
+ *
1171
+ */
1172
+ type Wallet = {
1173
+ address: string;
1174
+ network: BlockchainNetwork;
1175
+ accountId: string;
1176
+ };
1177
+ /**
1178
+ * Model Profile
1179
+ *
1180
+ */
1181
+ type Profile = {
1182
+ accountId: string;
1183
+ description: string | null;
1184
+ website: string | null;
1185
+ twitter: string | null;
1186
+ instagram: string | null;
1187
+ picture: string | null;
1188
+ };
1189
+ interface ConnectedAccount extends Partial<Account> {
1190
+ id: string;
1191
+ username: string;
1192
+ activeWallet: string;
1193
+ authorizations: UserAuthorization[];
1194
+ }
1195
+ interface Account {
1196
+ id: string;
1197
+ username: string;
1198
+ authorizations: UserAuthorization[];
1199
+ profile?: Profile;
1200
+ wallets?: Wallet[];
1201
+ flag: UserFlag;
1202
+ metadata?: Record<string, any>;
1203
+ metadataUri?: string;
1204
+ description?: string;
1205
+ avatarUri?: string;
1206
+ avatarMedia?: MediaImage;
1207
+ generativeTokens?: GenerativeToken[];
1208
+ sales: Action[];
1209
+ actionsAsIssuer: Action[];
1210
+ actionsAsTarget: Action[];
1211
+ listings: Listing[];
1212
+ objkts: Objkt[];
1213
+ offers: Listing[];
1214
+ offersReceived: AnyOffer[];
1215
+ offersSent: AnyOffer[];
1216
+ createdAt: Date;
1217
+ updatedAt: Date;
1218
+ actions?: Action[];
1219
+ platformOwned?: boolean;
1220
+ donationAddress?: boolean;
1221
+ descriptionLight?: string;
1222
+ preventLink?: boolean;
1223
+ moderationReason?: string | null;
1224
+ articles: NFTArticle[];
1225
+ mintTickets: MintTicket[];
1226
+ }
1227
+ declare const accountTypeGuard: (entity: any) => entity is Account;
1228
+
1229
+ interface Ledger {
1230
+ amount: number;
1231
+ owner: User;
1232
+ }
1233
+
1234
+ declare enum EventStatus {
1235
+ PUBLISHED = "PUBLISHED",
1236
+ DRAFT = "DRAFT",
1237
+ HIDDEN = "HIDDEN"
1238
+ }
1239
+ declare enum EventAvailability {
1240
+ ONLINE = "ONLINE",
1241
+ IRL = "IRL"
1242
+ }
1243
+ interface LiveMintingEvent {
1244
+ id: string;
1245
+ name: string;
1246
+ description: string;
1247
+ createdAt: string;
1248
+ updatedAt: string;
1249
+ startsAt: string;
1250
+ endsAt: string;
1251
+ projectIds: number[];
1252
+ onboarding?: EventOnboarding;
1253
+ location?: string;
1254
+ imageUrl?: string;
1255
+ availabilities: EventAvailability[];
1256
+ status: EventStatus;
1257
+ freeLiveMinting: boolean;
1258
+ }
1259
+ type LiveMintingEventWithArtists = LiveMintingEvent & {
1260
+ artists: User[];
1261
+ };
1262
+ interface LiveMintingPassGroup {
1263
+ address: string;
1264
+ label: string;
1265
+ maxMints: number;
1266
+ maxMintsPerProject: number;
1267
+ event: LiveMintingEvent;
1268
+ }
1269
+ interface LiveMintingPass {
1270
+ token: string;
1271
+ group: LiveMintingPassGroup;
1272
+ expiresAt: string;
1273
+ }
1274
+ interface OnboardingComponent {
1275
+ id: number;
1276
+ description: string;
1277
+ content: string;
1278
+ }
1279
+ interface EventOnboardingOnComponent {
1280
+ component: OnboardingComponent;
1281
+ index: number;
1282
+ }
1283
+ interface EventOnboarding {
1284
+ id: number;
1285
+ enabled: boolean;
1286
+ description: string;
1287
+ components: EventOnboardingOnComponent[];
1288
+ }
1289
+
1290
+ declare enum EWalletOperatorState {
1291
+ EMPTY = "EMPTY",
1292
+ INITIALIZING = "INITIALIZING",
1293
+ AVAILABLE = "AVAILABLE",
1294
+ PREPARING = "PREPARING",
1295
+ WAITING_CONFIRMATION = "WAITING_CONFIRMATION"
1296
+ }
1297
+
1298
+ interface ModerationReason {
1299
+ id: string;
1300
+ reason: string;
1301
+ }
1302
+
1303
+ interface JwtAccessTokenPayload extends JwtPayload {
1304
+ id: string;
1305
+ }
1306
+
1307
+ type UpdateIssuerForm<N = string> = Omit<Omit<Omit<GenTokDistributionForm<N>, "pricing">, "reserves">, "gracingPeriod">;
1308
+
1309
+ type SandboxFiles = Record<string, {
1310
+ blob?: Blob;
1311
+ url: string;
1312
+ }>;
1313
+ declare enum SandboxFileError {
1314
+ UNKNOWN = "UNKNOWN",
1315
+ WRONG_FORMAT = "WRONG_FORMAT",
1316
+ NO_INDEX_HTML = "NO_INDEX_HTML",
1317
+ NO_SNIPPET = "NO_SNIPPET",
1318
+ FAILED_UNZIP = "FAILED_UNZIP"
1319
+ }
1320
+
1321
+ declare enum ProfileUploadError {
1322
+ UNKNOWN = "UNKNOWN",
1323
+ WRONG_FORMAT = "WRONG_FORMAT",
1324
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED"
1325
+ }
1326
+ interface ProfileUploadResponse {
1327
+ metadataUri: string;
1328
+ }
1329
+ declare enum AvatarUploadError {
1330
+ UNKNOWN = "UNKNOWN",
1331
+ NO_FILE = "NO_FILE",
1332
+ WRONG_FORMAT = "WRONG_FORMAT",
1333
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED"
1334
+ }
1335
+ interface AvatarUploadResponse {
1336
+ avatarUri: string;
1337
+ }
1338
+ interface TempGenUploadProjectResponse {
1339
+ zipKey: string;
1340
+ projectCid: string;
1341
+ authenticationHash: string;
1342
+ }
1343
+ interface MintGenUploadProjectResponse {
1344
+ cidParams: string;
1345
+ authenticationHash: string;
1346
+ }
1347
+ interface MintGenUploadProjectResponse {
1348
+ zipKey: string;
1349
+ projectCid: string;
1350
+ authenticationHash: string;
1351
+ }
1352
+ declare enum StaticGenError {
1353
+ UNKNOWN = "UNKNOWN",
1354
+ MISSING_PARAMETERS = "MISSING_PARAMETERS",
1355
+ AUTH_FAILED = "AUTH_FAILED",
1356
+ INVALID_HASH = "INVALID_HASH",
1357
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1358
+ NO_SNIPPET = "NO_SNIPPET"
1359
+ }
1360
+ interface StaticGenResponse {
1361
+ cidStatic: string;
1362
+ authenticationHash: string;
1363
+ }
1364
+ declare enum PreviewError {
1365
+ UNKNOWN = "UNKNOWN",
1366
+ MISSING_PARAMETERS = "MISSING_PARAMETERS",
1367
+ AUTH_FAILED = "AUTH_FAILED",
1368
+ INCORRECT_PARAMETERS = "INCORRECT_PARAMETERS",
1369
+ PREVIEW_ERROR = "PREVIEW_ERROR",
1370
+ IPFS_ERROR = "IPFS_ERROR"
1371
+ }
1372
+ interface PreviewErrorResponse {
1373
+ error: PreviewError;
1374
+ }
1375
+ interface PreviewResponse {
1376
+ cidPreview: string;
1377
+ cidThumbnail: string;
1378
+ authenticationHash: string;
1379
+ mode: CaptureMode;
1380
+ triggerMode: CaptureTriggerMode;
1381
+ resX: number;
1382
+ resY: number;
1383
+ delay: number;
1384
+ canvasSelector: string;
1385
+ gpu: boolean;
1386
+ }
1387
+ declare enum TestPreviewError {
1388
+ UNKNOWN = "UNKNOWN",
1389
+ TIMEOUT = "TIMEOUT",
1390
+ EXTRACT_SERVICE_UNREACHABLE = "EXTRACT_SERVICE_UNREACHABLE",
1391
+ INVALID_INPUT_PARAMETERS = "INVALID_INPUT_PARAMETERS",
1392
+ JOB_QUEUE_FAILED = "JOB_QUEUE_FAILED",
1393
+ JOB_EXECUTION_FAILED = "JOB_EXECUTION_FAILED"
1394
+ }
1395
+ interface TestPreviewResponse {
1396
+ capture: string;
1397
+ features?: string;
1398
+ }
1399
+ interface TestPreviewErrorResponse {
1400
+ error: TestPreviewError;
1401
+ }
1402
+ declare enum MetadataError {
1403
+ UNKNOWN = "UNKNOWN",
1404
+ IPFS_ERROR = "IPFS_ERROR",
1405
+ UPLOAD_ERROR = "UPLOAD_ERROR",
1406
+ METADATA_EXISTS = "METADATA_EXISTS"
1407
+ }
1408
+ interface MetadataResponse {
1409
+ cid: string;
1410
+ }
1411
+ interface MetadataEthResponse {
1412
+ key: string;
1413
+ }
1414
+ declare enum MintError {
1415
+ UNKNOWN = "UNKNOWN",
1416
+ BAD_REQUEST = "BAD_REQUEST",
1417
+ TOKEN_NOT_EXISTS = "TOKEN_NOT_EXISTS",
1418
+ TOKEN_UNAVAILABLE = "TOKEN_UNAVAILABLE",
1419
+ FAIL_GET_METADATA = "FAIL_GET_METADATA",
1420
+ WRONG_TOKEN_METADATA = "WRONG_TOKEN_METADATA",
1421
+ FAIL_AUTHENTICATE = "FAIL_AUTHENTICATE",
1422
+ FAIL_GET_TOKEN = "FAIL_GET_TOKEN",
1423
+ INVALID_TOKEN = "INVALID_TOKEN",
1424
+ FAIL_ADD_IPFS = "FAIL_ADD_IPFS",
1425
+ FAIL_PREVIEW = "FAIL_PREVIEW"
1426
+ }
1427
+ declare const MintErrors: MintError[];
1428
+ declare enum MintProgressMessage {
1429
+ GET_TOKEN_DATA = "GET_TOKEN_DATA",
1430
+ GET_TOKEN_METADATA = "GET_TOKEN_METADATA",
1431
+ GET_GENERATIVE_TOKEN_CONTENTS = "GET_GENERATIVE_TOKEN_CONTENTS",
1432
+ ADD_CONTENT_IPFS = "ADD_CONTENT_IPFS",
1433
+ GENERATE_PREVIEW = "GENERATE_PREVIEW",
1434
+ AUTHENTICATE_TOKEN = "AUTHENTICATE_TOKEN"
1435
+ }
1436
+ interface MintResponse {
1437
+ cidMetadata: string;
1438
+ cidGenerative: string;
1439
+ cidPreview: string;
1440
+ }
1441
+ declare enum SigningState {
1442
+ NONE = "NONE",
1443
+ NOT_FOUND = "NOT_FOUND",
1444
+ QUEUED = "QUEUED",
1445
+ GENERATING_METADATA = "GENERATING_METADATA",
1446
+ METADATA_GENERATED = "METADATA_GENERATED",
1447
+ CALLING_CONTRACT = "CALLING_CONTRACT",
1448
+ SIGNED = "SIGNED"
1449
+ }
1450
+ interface SigningProgress {
1451
+ state: SigningState;
1452
+ extra?: any;
1453
+ }
1454
+ interface SigningData {
1455
+ cidGenerative?: string;
1456
+ cidPreview?: string;
1457
+ features?: TokenFeature[];
1458
+ }
1459
+
1460
+ interface IReserveConsumption {
1461
+ method: EReserveMethod;
1462
+ data: any;
1463
+ }
1464
+
1465
+ interface InputProps<T = string> {
1466
+ value: T;
1467
+ onChange: (value: T) => void;
1468
+ }
1469
+
1470
+ type IndexerStatusSeverity = "low" | "medium" | "high";
1471
+ interface IndexerStatus {
1472
+ level: number;
1473
+ id: number;
1474
+ originatedAt: string;
1475
+ lastIndexedAt: string;
1476
+ }
1477
+ interface NetworkStatus {
1478
+ level: number;
1479
+ lastSyncedAt: string;
1480
+ }
1481
+
1482
+ interface FileSandboxResponse {
1483
+ filename: string;
1484
+ contents: string[];
1485
+ url: string;
1486
+ }
1487
+
1488
+ interface Cycle {
1489
+ start: Date;
1490
+ opening: number;
1491
+ closing: number;
1492
+ }
1493
+ interface CyclesState {
1494
+ opened: boolean;
1495
+ nextOpening: Date;
1496
+ nextClosing: Date;
1497
+ }
1498
+
1499
+ type TColor = "success" | "warning" | "error";
1500
+
1501
+ 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, type GenerativeTokenInformations, type GenerativeTokenMarketStats, type GenerativeTokenMarketStatsHistory, type GenerativeTokenMetadata, type GenerativeTokenMetadataV1, type GenerativeTokenMetadataV2, type GenerativeTokenMetadataV3, type GenerativeTokenMetadataV4, type GenerativeTokenMetadataV5, 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 };