@fxhash/shared 0.0.3 → 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,610 +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"
573
+ DELAY = "DELAY",
574
+ FN_TRIGGER = "FN_TRIGGER",
575
+ FN_TRIGGER_GIF = "FN_TRIGGER_GIF",
563
576
  }
564
577
  declare const CaptureTriggerModeList: CaptureTriggerMode[];
565
578
  declare enum CaptureMode {
566
- CANVAS = "CANVAS",
567
- CUSTOM = "CUSTOM",
568
- VIEWPORT = "VIEWPORT"
579
+ CANVAS = "CANVAS",
580
+ CUSTOM = "CUSTOM",
581
+ VIEWPORT = "VIEWPORT",
569
582
  }
570
583
  declare const CaptureModeList: CaptureMode[];
571
584
  interface CaptureSettings {
572
- mode?: CaptureMode;
573
- triggerMode?: CaptureTriggerMode;
574
- canvasSelector?: string;
575
- delay?: number;
576
- resolution?: Vec2;
577
- gpu?: boolean;
578
- gif?: boolean;
579
- frameCount?: number;
580
- captureInterval?: number;
581
- playbackFps?: number;
582
- 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;
583
596
  }
584
597
  interface MintGenerativeParams {
585
- definition: any;
586
- inputBytesSize: number;
598
+ definition: any;
599
+ inputBytesSize: number;
587
600
  }
588
601
  interface MintGenerativeData<N = string> {
589
- onChain?: boolean;
590
- collaboration?: Collaboration | null;
591
- projectZipKey?: string;
592
- cidUrlParams?: string;
593
- authHash1?: string;
594
- previewHash?: string;
595
- previewIteration?: string;
596
- previewMinter?: string;
597
- previewInputBytes?: string | null;
598
- cidPreview?: string;
599
- cidThumbnail?: string;
600
- authHash2?: string;
601
- distribution?: GenTokDistributionForm<N>;
602
- captureSettings?: CaptureSettings;
603
- settings?: GenTokenSettings;
604
- params?: MintGenerativeParams;
605
- informations?: GenTokenInformationsForm;
606
- minted?: boolean;
607
- 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;
608
621
  }
609
622
  /**
610
623
  * This type describes the constraints that can be applied to the minting of a generative token
@@ -616,531 +629,526 @@ interface MintGenerativeData<N = string> {
616
629
  */
617
630
  type ConstraintVariant = [string, string, string, string];
618
631
  interface GenTokConstrains {
619
- hashConstraints?: string[] | null;
620
- minterConstraints?: string[] | null;
621
- iterationConstraints?: string[] | null;
622
- paramsConstraints?: string[] | null;
632
+ hashConstraints?: string[] | null;
633
+ minterConstraints?: string[] | null;
634
+ iterationConstraints?: string[] | null;
635
+ paramsConstraints?: string[] | null;
623
636
  }
624
637
  interface ExplorationSettings extends GenTokConstrains {
625
- enabled: boolean;
638
+ enabled: boolean;
626
639
  }
627
640
  interface GenTokenSettings {
628
- exploration?: {
629
- preMint?: ExplorationSettings;
630
- postMint?: ExplorationSettings;
631
- };
641
+ exploration?: {
642
+ preMint?: ExplorationSettings;
643
+ postMint?: ExplorationSettings;
644
+ };
632
645
  }
633
646
  type FrameMintingFormValues = {
634
- enabled: boolean;
635
- mintsPerFid: number;
647
+ enabled: boolean;
648
+ mintsPerFid: number;
636
649
  };
637
650
  interface GenTokPricingForm<N> {
638
- pricingMethod?: GenTokPricing;
639
- pricingFixed: Partial<IPricingFixed<N>>;
640
- pricingDutchAuction: Partial<IPricingDutchAuction<N>>;
641
- lockForReserves?: boolean;
642
- royalties?: N;
643
- splitsPrimary: ISplit[];
644
- 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[];
645
658
  }
646
659
  declare enum GenTokEditions {
647
- FIXED = "FIXED",
648
- OPENED = "OPENED"
660
+ FIXED = "FIXED",
661
+ OPENED = "OPENED",
649
662
  }
650
663
  type GenTokOpenEditionsForm = {
651
- closesAt?: Date | null;
664
+ closesAt?: Date | null;
652
665
  };
653
666
  type GenTokFixedEditionsForm<N> = {
654
- amount: N;
667
+ amount: N;
655
668
  };
656
669
  type GenTokEditionsForm<N> = {
657
- type: GenTokEditions;
658
- fixed: GenTokFixedEditionsForm<N>;
659
- opened: GenTokOpenEditionsForm;
670
+ type: GenTokEditions;
671
+ fixed: GenTokFixedEditionsForm<N>;
672
+ opened: GenTokOpenEditionsForm;
660
673
  };
661
674
  interface GenTokDistributionForm<N> {
662
- editions: GenTokEditionsForm<N>;
663
- enabled: boolean;
664
- reserves: IReserve<N>[];
665
- gracingPeriod?: N;
666
- frameMinting?: FrameMintingFormValues;
675
+ editions: GenTokEditionsForm<N>;
676
+ enabled: boolean;
677
+ reserves: IReserve<N>[];
678
+ gracingPeriod?: N;
679
+ frameMinting?: FrameMintingFormValues;
667
680
  }
668
681
  interface GenTokenInformationsForm {
669
- name: string;
670
- description: string;
671
- mintingInstructions: string;
672
- childrenDescription: string;
673
- tags: string;
674
- labels: GenTokLabel[];
675
- }
676
-
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
677
691
  interface TokenMetadata {
678
- "": string;
679
- name: string;
680
- symbol: string;
681
- decimals: number;
692
+ "": string;
693
+ name: string;
694
+ symbol: string;
695
+ decimals: number;
682
696
  }
683
697
  interface HistoryMetadata {
684
- [key: string]: any;
698
+ [key: string]: any;
685
699
  }
686
700
  interface TokenFormat {
687
- uri: string;
688
- mimeType: string;
701
+ uri: string;
702
+ mimeType: string;
689
703
  }
690
704
  type RawTokenFeatures = Record<string, any>;
691
705
  type TokenFeatureValueType = string | number | boolean;
692
706
  interface TokenMetadataFeature {
693
- name: string;
694
- value: TokenFeatureValueType;
707
+ name: string;
708
+ value: TokenFeatureValueType;
695
709
  }
696
710
  interface TokenFeature {
697
- name: string;
698
- value: TokenFeatureValueType;
699
- rarity?: number;
711
+ name: string;
712
+ value: TokenFeatureValueType;
713
+ rarity?: number;
700
714
  }
701
715
  declare enum ProcessRawTokenFeatureErrorType {
702
- UNKNOWN = "UNKNOWN",
703
- INVALID_PROPERTY_TYPE = "INVALID_PROPERTY_TYPE",
704
- INVALID_FEATURES_SIGNATURE = "INVALID_FEATURES_SIGNATURE"
716
+ UNKNOWN = "UNKNOWN",
717
+ INVALID_PROPERTY_TYPE = "INVALID_PROPERTY_TYPE",
718
+ INVALID_FEATURES_SIGNATURE = "INVALID_FEATURES_SIGNATURE",
705
719
  }
706
720
  declare const ProcessRawTokenFeatureErrorTypes: ProcessRawTokenFeatureErrorType[];
707
721
  type ProcessRawTokenFeatureError = {
708
- type: ProcessRawTokenFeatureErrorType;
709
- extra?: string;
722
+ type: ProcessRawTokenFeatureErrorType;
723
+ extra?: string;
710
724
  };
711
725
  type GenerativeTokenMetadataVersion = "0.1" | "0.2" | "0.3" | "0.4" | "0.5";
712
726
  type BaseGenerativeTokenMetadata = {
713
- name: string;
714
- description: string;
715
- childrenDescription: string;
716
- mintingInstructions: string;
717
- tags: string[];
718
- artifactUri: string;
719
- displayUri: string;
720
- thumbnailUri: string;
721
- generativeUri: string;
722
- authenticityHash: string;
723
- capture: CaptureSettings;
724
- settings?: GenTokenSettings | null;
725
- symbol: string;
726
- 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;
727
741
  };
728
742
  type GenerativeTokenMetadataV1 = BaseGenerativeTokenMetadata;
729
743
  type GenerativeTokenMetadataV2 = GenerativeTokenMetadataV1 & {
730
- previewHash?: string;
731
- previewIteration?: string;
732
- previewMinter?: string;
733
- previewInputBytes?: string;
734
- mintingInstructions: string;
744
+ previewHash?: string;
745
+ previewIteration?: string;
746
+ previewMinter?: string;
747
+ previewInputBytes?: string;
748
+ mintingInstructions: string;
735
749
  };
736
750
  type GenerativeTokenMetadataV3 = GenerativeTokenMetadataV2 & {
737
- params: {
738
- definition: any;
739
- inputBytesSize: number;
740
- };
741
- snippetVersion: string;
751
+ params: {
752
+ definition: any;
753
+ inputBytesSize: number;
754
+ };
755
+ snippetVersion: string;
742
756
  };
743
757
  type GenerativeTokenMetadataV4 = GenerativeTokenMetadataV3 & {
744
- primarySplits: ISplit[];
758
+ primarySplits: ISplit[];
745
759
  };
746
760
  type GenerativeTokenMetadataV5 = GenerativeTokenMetadataV4 & {
747
- chain: string;
761
+ chain: string;
748
762
  };
749
763
  type GenerativeTokenMetadataV6 = GenerativeTokenMetadataV5 & {
750
- previewParentHashes?: string[];
764
+ previewParentHashes?: string[];
751
765
  };
752
766
  type GenerativeTokenMetadata = GenerativeTokenMetadataV1 | (GenerativeTokenMetadataV2 & {
753
- version: "0.2";
767
+ version: "0.2";
754
768
  }) | (GenerativeTokenMetadataV3 & {
755
- version: "0.3";
769
+ version: "0.3";
756
770
  }) | (GenerativeTokenMetadataV4 & {
757
- version: "0.4";
771
+ version: "0.4";
758
772
  }) | (GenerativeTokenMetadataV5 & {
759
- version: "0.5";
773
+ version: "0.5";
760
774
  }) | (GenerativeTokenMetadataV6 & {
761
- version: "0.6";
775
+ version: "0.6";
762
776
  });
763
777
  type ObjktMetadata = {
764
- features?: TokenMetadataFeature[] | null;
778
+ features?: TokenMetadataFeature[] | null;
765
779
  } & GenerativeTokenMetadata;
766
780
  interface Eth721ContractMetadata {
767
- name: string;
768
- description: string;
769
- image: string;
770
- external_link: string;
771
- collaborators?: string[];
772
- ipfsBackupUri?: string;
773
- }
774
- interface Eth721ContractMetadata {
775
- name: string;
776
- description: string;
777
- image: string;
778
- external_link: string;
779
- collaborators?: string[];
780
- ipfsBackupUri?: string;
781
+ name: string;
782
+ description: string;
783
+ image: string;
784
+ external_link: string;
785
+ collaborators?: string[];
786
+ ipfsBackupUri?: string;
781
787
  }
782
788
  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;
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;
790
804
  }
791
805
  interface Eth721TokenMetadata {
792
- name: string;
793
- description: string;
794
- image: string;
795
- external_url: string;
796
- animation_url?: string;
797
- collaborators?: string[];
798
- 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;
799
813
  }
800
814
  interface ArticleMetadata {
801
- decimals: number;
802
- symbol: "ARTKL";
803
- name: string;
804
- description: string;
805
- minter?: string;
806
- creators?: string[];
807
- contributors?: string[];
808
- type: "article";
809
- tags: string[];
810
- language: string;
811
- artifactUri: string;
812
- displayUri: string;
813
- thumbnailUri: string;
814
- thumbnailCaption?: string;
815
- 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[];
816
830
  }
817
831
  interface MarketplaceMetadataEvm {
818
- external: boolean;
819
- source?: string;
820
- hasRoyalties: boolean;
832
+ external: boolean;
833
+ source?: string;
834
+ hasRoyalties: boolean;
821
835
  }
822
-
836
+ //#endregion
837
+ //#region src/types/entities/Action.d.ts
823
838
  declare enum TokenActionType {
824
- NONE = "NONE",
825
- UPDATE_STATE = "UPDATE_STATE",
826
- UPDATE_PRICING = "UPDATE_PRICING",
827
- BURN_SUPPLY = "BURN_SUPPLY",
828
- CODEX_UPDATED = "CODEX_UPDATED",
829
- MINTED = "MINTED",
830
- MINTED_FROM = "MINTED_FROM",
831
- TICKET_MINTED = "TICKET_MINTED",
832
- TICKET_CLAIMED = "TICKET_CLAIMED",
833
- TICKET_PRICE_UPDATED = "TICKET_PRICE_UPDATED",
834
- GENTK_SIGNED = "GENTK_SIGNED",
835
- GENTK_REVEALED = "GENTK_REVEALED",
836
- GENTK_REDEEMED = "GENTK_REDEEMED",
837
- COMPLETED = "COMPLETED",
838
- TRANSFERED = "TRANSFERED",
839
- LISTING_V1 = "LISTING_V1",
840
- LISTING_V1_CANCELLED = "LISTING_V1_CANCELLED",
841
- LISTING_V1_ACCEPTED = "LISTING_V1_ACCEPTED",
842
- LISTING_ETH_V1 = "LISTING_ETH_V1",
843
- LISTING_BASE_V1 = "LISTING_BASE_V1",
844
- LISTING_ETH_V1_CANCELLED = "LISTING_ETH_V1_CANCELLED",
845
- LISTING_BASE_V1_CANCELLED = "LISTING_BASE_V1_CANCELLED",
846
- LISTING_ETH_V1_ACCEPTED = "LISTING_ETH_V1_ACCEPTED",
847
- LISTING_BASE_V1_ACCEPTED = "LISTING_BASE_V1_ACCEPTED",
848
- LISTING_V2 = "LISTING_V2",
849
- LISTING_V2_CANCELLED = "LISTING_V2_CANCELLED",
850
- LISTING_V2_ACCEPTED = "LISTING_V2_ACCEPTED",
851
- LISTING_V3 = "LISTING_V3",
852
- LISTING_V3_CANCELLED = "LISTING_V3_CANCELLED",
853
- LISTING_V3_ACCEPTED = "LISTING_V3_ACCEPTED",
854
- OFFER = "OFFER",
855
- OFFER_CANCELLED = "OFFER_CANCELLED",
856
- OFFER_ACCEPTED = "OFFER_ACCEPTED",
857
- OFFER_ETH = "OFFER_ETH",
858
- OFFER_BASE = "OFFER_BASE",
859
- OFFER_CANCELLED_ETH = "OFFER_CANCELLED_ETH",
860
- OFFER_CANCELLED_BASE = "OFFER_CANCELLED_BASE",
861
- OFFER_ACCEPTED_ETH = "OFFER_ACCEPTED_ETH",
862
- OFFER_ACCEPTED_BASE = "OFFER_ACCEPTED_BASE",
863
- COLLECTION_OFFER_ETH = "COLLECTION_OFFER_ETH",
864
- COLLECTION_OFFER_BASE = "COLLECTION_OFFER_BASE",
865
- COLLECTION_OFFER_CANCELLED_ETH = "COLLECTION_OFFER_CANCELLED_ETH",
866
- COLLECTION_OFFER_CANCELLED_BASE = "COLLECTION_OFFER_CANCELLED_BASE",
867
- COLLECTION_OFFER_ACCEPTED_ETH = "COLLECTION_OFFER_ACCEPTED_ETH",
868
- COLLECTION_OFFER_ACCEPTED_BASE = "COLLECTION_OFFER_ACCEPTED_BASE",
869
- COLLECTION_OFFER = "COLLECTION_OFFER",
870
- COLLECTION_OFFER_CANCELLED = "COLLECTION_OFFER_CANCELLED",
871
- COLLECTION_OFFER_ACCEPTED = "COLLECTION_OFFER_ACCEPTED",
872
- AUCTION = "AUCTION",
873
- AUCTION_BID = "AUCTION_BID",
874
- AUCTION_CANCELLED = "AUCTION_CANCELLED",
875
- AUCTION_FULFILLED = "AUCTION_FULFILLED",
876
- ARTICLE_MINTED = "ARTICLE_MINTED",
877
- ARTICLE_METADATA_UPDATED = "ARTICLE_METADATA_UPDATED",
878
- ARTICLE_METADATA_LOCKED = "ARTICLE_METADATA_LOCKED",
879
- ARTICLE_EDITIONS_TRANSFERED = "ARTICLE_EDITIONS_TRANSFERED",
880
- OBJKT_STATE_UPDATE_ACTIVE = "OBJKT_STATE_UPDATE_ACTIVE",
881
- OBJKT_STATE_UPDATE_EVOLVED = "OBJKT_STATE_UPDATE_EVOLVED",
882
- OBJKT_STATE_UPDATE_LOCKED = "OBJKT_STATE_UPDATE_LOCKED",
883
- OBJKT_STATE_UPDATE_LIQUIDATED = "OBJKT_STATE_UPDATE_LIQUIDATED",
884
- 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",
885
900
  }
886
901
  interface Action {
887
- id: string;
888
- opHash: string;
889
- type: TokenActionType;
890
- numericValue: number;
891
- issuer?: User;
892
- target?: User;
893
- token?: GenerativeToken;
894
- objkt?: Objkt;
895
- redeemable?: Redeemable;
896
- ticketId?: number;
897
- article?: NFTArticleInfos;
898
- metadata: HistoryMetadata;
899
- createdAt: string;
900
- }
901
-
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
902
918
  interface UserItems {
903
- generativeTokens?: GenerativeToken[];
904
- objkts?: Objkt[];
905
- listings?: Listing[];
906
- actions?: Action[];
919
+ generativeTokens?: GenerativeToken[];
920
+ objkts?: Objkt[];
921
+ listings?: Listing[];
922
+ actions?: Action[];
907
923
  }
908
924
  declare enum UserFlag {
909
- NONE = "NONE",
910
- REVIEW = "REVIEW",
911
- SUSPICIOUS = "SUSPICIOUS",
912
- MALICIOUS = "MALICIOUS",
913
- VERIFIED = "VERIFIED"
925
+ NONE = "NONE",
926
+ REVIEW = "REVIEW",
927
+ SUSPICIOUS = "SUSPICIOUS",
928
+ MALICIOUS = "MALICIOUS",
929
+ VERIFIED = "VERIFIED",
914
930
  }
915
931
  declare enum UserAuthorization {
916
- TOKEN_MODERATION = "TOKEN_MODERATION",
917
- ARTICLE_MODERATION = "ARTICLE_MODERATION",
918
- USER_MODERATION = "USER_MODERATION",
919
- GOVERNANCE_MODERATION = "GOVERNANCE_MODERATION"
932
+ TOKEN_MODERATION = "TOKEN_MODERATION",
933
+ ARTICLE_MODERATION = "ARTICLE_MODERATION",
934
+ USER_MODERATION = "USER_MODERATION",
935
+ GOVERNANCE_MODERATION = "GOVERNANCE_MODERATION",
920
936
  }
921
937
  declare enum UserType {
922
- REGULAR = "REGULAR",
923
- COLLAB_CONTRACT_V1 = "COLLAB_CONTRACT_V1"
938
+ REGULAR = "REGULAR",
939
+ COLLAB_CONTRACT_V1 = "COLLAB_CONTRACT_V1",
924
940
  }
925
941
  declare const UserFlagValues: Record<UserFlag, number>;
926
942
  interface User {
927
- id: string;
928
- name?: string;
929
- type: UserType;
930
- authorizations: UserAuthorization[];
931
- flag: UserFlag;
932
- metadata?: Record<string, any>;
933
- metadataUri?: string;
934
- description?: string;
935
- avatarUri?: string;
936
- avatarMedia?: MediaImage$1;
937
- generativeTokens?: GenerativeToken[];
938
- sales: Action[];
939
- actionsAsIssuer: Action[];
940
- actionsAsTarget: Action[];
941
- listings: Listing[];
942
- objkts: Objkt[];
943
- offers: Listing[];
944
- allOffersReceived: AnyOffer[];
945
- allOffersSent: Offer[];
946
- createdAt: Date;
947
- updatedAt: Date;
948
- actions?: Action[];
949
- platformOwned?: boolean;
950
- donationAddress?: boolean;
951
- descriptionLight?: string;
952
- preventLink?: boolean;
953
- collaborationContracts: Collaboration[];
954
- moderationReason?: string | null;
955
- articles: NFTArticle[];
956
- 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[];
957
973
  }
958
974
  interface ConnectedUser extends Partial<User> {
959
- id: string;
960
- authorizations: UserAuthorization[];
975
+ id: string;
976
+ authorizations: UserAuthorization[];
961
977
  }
962
978
  interface Collaboration extends User {
963
- collaborators: User[];
979
+ collaborators: User[];
964
980
  }
965
981
  interface UserAlias {
966
- id: string;
967
- alias: Partial<User>;
982
+ id: string;
983
+ alias: Partial<User>;
968
984
  }
969
985
  interface IUserCollectionFilters {
970
- issuer_in?: number[];
971
- assigned_eq?: boolean;
972
- offer_ne?: string;
973
- createdAt_lt?: string;
974
- createdAt_gt?: string;
975
- assignedAt_gt?: string;
976
- assignedAt_lt?: string;
977
- mintProgress_eq?: "COMPLETED" | "ONGOING" | "ALMOST";
978
- authorVerified_eq?: boolean;
979
- author_in?: string[];
980
- searchQuery_eq?: string;
981
- 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";
982
998
  }
983
999
  interface UserFilters {
984
- flag_in?: UserFlag[];
985
- searchQuery_eq?: string;
1000
+ flag_in?: UserFlag[];
1001
+ searchQuery_eq?: string;
986
1002
  }
987
-
1003
+ //#endregion
1004
+ //#region src/wallet/WalletManager.d.ts
988
1005
  declare class PendingSigningRequestError extends Error {
989
- name: "PendingSigningRequestError";
990
- message: string;
1006
+ name: "PendingSigningRequestError";
1007
+ message: string;
991
1008
  }
992
1009
  declare enum WalletConnectionErrorReason {
993
- INCORRECT_CHAIN = "INCORRECT_CHAIN"
1010
+ INCORRECT_CHAIN = "INCORRECT_CHAIN",
994
1011
  }
995
1012
  declare class WalletConnectionError extends Error {
996
- readonly reason: WalletConnectionErrorReason;
997
- name: "WalletConnectionError";
998
- constructor(reason: WalletConnectionErrorReason);
1013
+ readonly reason: WalletConnectionErrorReason;
1014
+ name: "WalletConnectionError";
1015
+ constructor(reason: WalletConnectionErrorReason);
999
1016
  }
1000
1017
  declare class UserRejectedError extends Error {
1001
- name: "UserRejectedError";
1002
- message: string;
1018
+ name: "UserRejectedError";
1019
+ message: string;
1003
1020
  }
1004
1021
  declare class InsufficientFundsError extends Error {
1005
- name: "InsufficientFundsError";
1006
- message: string;
1022
+ name: "InsufficientFundsError";
1023
+ message: string;
1007
1024
  }
1008
1025
  declare class TransactionRevertedError extends Error {
1009
- readonly paramErrorName: string;
1010
- name: "TransactionRevertedError";
1011
- errorName: string;
1012
- constructor(paramErrorName: string);
1026
+ readonly paramErrorName: string;
1027
+ name: "TransactionRevertedError";
1028
+ errorName: string;
1029
+ constructor(paramErrorName: string);
1013
1030
  }
1014
1031
  declare class TransactionReceiptError extends Error {
1015
- name: "TransactionReceiptError";
1016
- constructor();
1032
+ name: "TransactionReceiptError";
1033
+ constructor();
1017
1034
  }
1018
1035
  declare class TransactionUnknownError extends Error {
1019
- readonly paramErrorName?: string | undefined;
1020
- name: "TransactionUnknownError";
1021
- errorName?: string;
1022
- constructor(paramErrorName?: string | undefined);
1036
+ readonly paramErrorName?: string | undefined;
1037
+ name: "TransactionUnknownError";
1038
+ errorName?: string;
1039
+ constructor(paramErrorName?: string | undefined);
1023
1040
  }
1024
1041
  declare class NetworkError extends Error {
1025
- name: "NetworkError";
1026
- message: string;
1042
+ name: "NetworkError";
1043
+ message: string;
1027
1044
  }
1028
1045
  declare class BadRequestError extends Error {
1029
- name: "BadRequestError";
1030
- message: string;
1046
+ name: "BadRequestError";
1047
+ message: string;
1031
1048
  }
1032
1049
  type SignMessageOptions = {
1033
- /**
1034
- * An string-identifier to define the type of the operation. It is used to
1035
- * classify signatures in the cache.
1036
- */
1037
- type: string;
1038
- /**
1039
- * - wallet-only: the cache is bypassed and signature must come from wallet
1040
- * - cache-first: the cache is checked first, and if a valid signature is
1041
- * found it's returned, otherwise the wallet is
1042
- */
1043
- 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";
1044
1061
  };
1045
1062
  type MessageSigned = {
1046
- signedAt: Date;
1047
- message: string;
1048
- signature: string;
1063
+ signedAt: Date;
1064
+ message: string;
1065
+ signature: string;
1049
1066
  };
1050
1067
  declare abstract class WalletManager {
1051
- address: string;
1052
- private cache;
1053
- constructor(address: string);
1054
- /**
1055
- * Must be implemented by wallets for custom signing of messages.
1056
- * @param message The message to sign.
1057
- * @returns The signature of the message.
1058
- */
1059
- abstract signMessageWithWallet(message: string): PromiseResult<string, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1060
- /**
1061
- * Sign a message using the wallet associated with the manager. Some sign
1062
- * options can be provided, mainly for implementing cache-fetching for
1063
- * avoiding redundant signatures from the wallet.
1064
- *
1065
- * Signatures are stored in cache so that users don't have to repeatedly
1066
- * sign messages for similar operations, as long as messages are considered to
1067
- * be valid for their usage. This function returns a message signed of a
1068
- * given type if it's still valid in cache. A signature is considered valid
1069
- * if it was made less than 4 minutes ago.
1070
- *
1071
- * @remark For now, the cache policy enforces a 5 min cache time for the
1072
- * signatures, after which they are considered invalid. There isn't any way to
1073
- * change this with the current implementation, although it could be added.
1074
- *
1075
- * @param options Sign options, which can be used to determine whether the
1076
- * signature should be fetched from cache or not.
1077
- */
1078
- signMessage(message: string, options?: SignMessageOptions): PromiseResult<MessageSigned, PendingSigningRequestError | UserRejectedError | WalletConnectionError>;
1079
- abstract sendTransaction<TParams>(operation: TContractOperation<this, TParams, any>, params: TParams, chain: BlockchainType): PromiseResult<unknown, WalletConnectionError | PendingSigningRequestError | UserRejectedError | InsufficientFundsError | TransactionRevertedError | TransactionUnknownError>;
1080
- abstract waitForTransaction(params: {
1081
- hash: string;
1082
- }): PromiseResult<unknown, UserRejectedError | TransactionRevertedError | TransactionReceiptError | TransactionUnknownError>;
1083
- }
1084
- type TWalletManager = new (address: string) => WalletManager;
1085
-
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
1086
1104
  /**
1087
1105
  * A Blockchain Environment is based on the classification of the "blockchain
1088
1106
  * engine".
1089
1107
  * TODO: should decide between BlockchainEnv & BlockchainNetwork and harmonize
1090
1108
  */
1091
1109
  declare enum BlockchainEnv {
1092
- EVM = "EVM",
1093
- TEZOS = "TEZOS"
1110
+ EVM = "EVM",
1111
+ TEZOS = "TEZOS",
1094
1112
  }
1095
1113
  /**
1096
1114
  * An array of all the `BlockchainEnv` enum values.
1097
1115
  */
1098
1116
  declare const BlockchainEnvs: BlockchainEnv[];
1099
1117
  declare enum BlockchainNetwork {
1100
- TEZOS = "TEZOS",
1101
- ETHEREUM = "ETHEREUM"
1118
+ TEZOS = "TEZOS",
1119
+ ETHEREUM = "ETHEREUM",
1102
1120
  }
1103
1121
  declare const BlockchainNetworks: BlockchainNetwork[];
1104
1122
  declare enum TransactionType {
1105
- OFFCHAIN = "OFFCHAIN",
1106
- ONCHAIN = "ONCHAIN"
1123
+ OFFCHAIN = "OFFCHAIN",
1124
+ ONCHAIN = "ONCHAIN",
1107
1125
  }
1108
1126
  declare enum BlockchainType {
1109
- ETHEREUM = "ETHEREUM",
1110
- TEZOS = "TEZOS",
1111
- BASE = "BASE"
1127
+ ETHEREUM = "ETHEREUM",
1128
+ TEZOS = "TEZOS",
1129
+ BASE = "BASE",
1112
1130
  }
1113
1131
  type Blockchain = keyof typeof BlockchainType;
1114
1132
  declare const BlockchainTypes: ("TEZOS" | "ETHEREUM" | "BASE")[];
1115
- type ChainNetworkToChainTypemap = {
1116
- [T in BlockchainNetwork]: {
1117
- [BlockchainNetwork.ETHEREUM]: BlockchainType.ETHEREUM;
1118
- [BlockchainNetwork.TEZOS]: BlockchainType.TEZOS;
1119
- }[T];
1120
- };
1133
+ type ChainNetworkToChainTypemap = { [T in BlockchainNetwork]: {
1134
+ [BlockchainNetwork.ETHEREUM]: BlockchainType.ETHEREUM;
1135
+ [BlockchainNetwork.TEZOS]: BlockchainType.TEZOS;
1136
+ }[T] };
1121
1137
  /**
1122
1138
  * Given a BlockchainNetwork, returns an associated BlockchainType of preference
1123
1139
  */
1124
1140
  declare function networkToChain<N extends BlockchainNetwork>(network: N): ChainNetworkToChainTypemap[N];
1125
- type ChainToChainEnvTypemap = {
1126
- [T in BlockchainType]: {
1127
- [BlockchainType.BASE]: BlockchainEnv.EVM;
1128
- [BlockchainType.ETHEREUM]: BlockchainEnv.EVM;
1129
- [BlockchainType.TEZOS]: BlockchainEnv.TEZOS;
1130
- }[T];
1131
- };
1132
- declare const chainToChainEnvMap: {
1133
- [K in BlockchainType]: ChainToChainEnvTypemap[K];
1134
- };
1135
- type ChainEnvToChainTypemap = {
1136
- [E in BlockchainEnv]: {
1137
- [BlockchainEnv.EVM]: BlockchainType.ETHEREUM;
1138
- [BlockchainEnv.TEZOS]: BlockchainType.TEZOS;
1139
- }[E];
1140
- };
1141
- declare const chainEnvToChainMap: {
1142
- [E in BlockchainEnv]: ChainEnvToChainTypemap[E];
1143
- };
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] };
1144
1152
  /**
1145
1153
  * A Contract Operation defines a set of operations to run at different
1146
1154
  * moments of the lifecycle of an operation. When an operation needs to be sent,
@@ -1153,363 +1161,458 @@ declare const chainEnvToChainMap: {
1153
1161
  * is swapped with another one. This logic is handled by an external runner.
1154
1162
  */
1155
1163
  declare abstract class ContractOperation<TWalletManager extends WalletManager, TParams, TData> {
1156
- manager: TWalletManager;
1157
- params: TParams;
1158
- chain: BlockchainType;
1159
- constructor(manager: TWalletManager, params: TParams, chain: BlockchainType);
1160
- /**
1161
- * Runs the required preparations (such as fetching the contracts to get
1162
- * the entrypoints signature), or any other sync/async operation considered
1163
- * not to be a part of the actual contract call.
1164
- * Can store required values in the members of the instance.
1165
- */
1166
- abstract prepare(): Promise<void>;
1167
- /**
1168
- * The actual calls to the contracts, which results in some Transaction
1169
- * Wallet Operation and can be observed to track the success/failure of
1170
- * the transaction emitted
1171
- */
1172
- abstract call(): Promise<TData>;
1173
- /**
1174
- * Each Contract Operation should implement a success message based on the
1175
- * operation parameters, and so to provide meaningful feedback to users on
1176
- * different parts of the front.
1177
- */
1178
- 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;
1179
1187
  }
1180
1188
  type TContractOperation<TWalletManager extends WalletManager, TParams, TData> = new (manager: TWalletManager, params: TParams, chain: BlockchainType) => ContractOperation<TWalletManager, TParams, TData>;
1181
-
1189
+ //#endregion
1190
+ //#region src/types/entities/Account.d.ts
1182
1191
  /**
1183
1192
  * Model Wallet
1184
1193
  *
1185
1194
  */
1186
1195
  type Wallet = {
1187
- address: string;
1188
- network: BlockchainNetwork;
1189
- accountId: string;
1196
+ address: string;
1197
+ network: BlockchainNetwork;
1198
+ accountId: string;
1190
1199
  };
1191
1200
  /**
1192
1201
  * Model Profile
1193
1202
  *
1194
1203
  */
1195
1204
  type Profile = {
1196
- accountId: string;
1197
- description: string | null;
1198
- website: string | null;
1199
- twitter: string | null;
1200
- instagram: string | null;
1201
- 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;
1202
1211
  };
1203
1212
  interface ConnectedAccount extends Partial<Account> {
1204
- id: string;
1205
- username: string;
1206
- activeWallet: string;
1207
- authorizations: UserAuthorization[];
1213
+ id: string;
1214
+ username: string;
1215
+ activeWallet: string;
1216
+ authorizations: UserAuthorization[];
1208
1217
  }
1209
1218
  interface Account {
1210
- id: string;
1211
- username: string;
1212
- authorizations: UserAuthorization[];
1213
- profile?: Profile;
1214
- wallets?: Wallet[];
1215
- flag: UserFlag;
1216
- metadata?: Record<string, any>;
1217
- metadataUri?: string;
1218
- description?: string;
1219
- avatarUri?: string;
1220
- avatarMedia?: MediaImage;
1221
- generativeTokens?: GenerativeToken[];
1222
- sales: Action[];
1223
- actionsAsIssuer: Action[];
1224
- actionsAsTarget: Action[];
1225
- listings: Listing[];
1226
- objkts: Objkt[];
1227
- offers: Listing[];
1228
- offersReceived: AnyOffer[];
1229
- offersSent: AnyOffer[];
1230
- createdAt: Date;
1231
- updatedAt: Date;
1232
- actions?: Action[];
1233
- platformOwned?: boolean;
1234
- donationAddress?: boolean;
1235
- descriptionLight?: string;
1236
- preventLink?: boolean;
1237
- moderationReason?: string | null;
1238
- articles: NFTArticle[];
1239
- 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[];
1240
1249
  }
1241
1250
  declare const accountTypeGuard: (entity: any) => entity is Account;
1242
-
1251
+ //#endregion
1252
+ //#region src/types/entities/Ledger.d.ts
1243
1253
  interface Ledger {
1244
- amount: number;
1245
- owner: User;
1254
+ amount: number;
1255
+ owner: User;
1246
1256
  }
1247
-
1257
+ //#endregion
1258
+ //#region src/types/entities/LiveMinting.d.ts
1248
1259
  declare enum EventStatus {
1249
- PUBLISHED = "PUBLISHED",
1250
- DRAFT = "DRAFT",
1251
- HIDDEN = "HIDDEN"
1260
+ PUBLISHED = "PUBLISHED",
1261
+ DRAFT = "DRAFT",
1262
+ HIDDEN = "HIDDEN",
1252
1263
  }
1253
1264
  declare enum EventAvailability {
1254
- ONLINE = "ONLINE",
1255
- IRL = "IRL"
1265
+ ONLINE = "ONLINE",
1266
+ IRL = "IRL",
1256
1267
  }
1257
1268
  interface LiveMintingEvent {
1258
- id: string;
1259
- name: string;
1260
- description: string;
1261
- createdAt: string;
1262
- updatedAt: string;
1263
- startsAt: string;
1264
- endsAt: string;
1265
- projectIds: number[];
1266
- onboarding?: EventOnboarding;
1267
- location?: string;
1268
- imageUrl?: string;
1269
- availabilities: EventAvailability[];
1270
- status: EventStatus;
1271
- 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;
1272
1283
  }
1273
1284
  type LiveMintingEventWithArtists = LiveMintingEvent & {
1274
- artists: User[];
1285
+ artists: User[];
1275
1286
  };
1276
1287
  interface LiveMintingPassGroup {
1277
- address: string;
1278
- label: string;
1279
- maxMints: number;
1280
- maxMintsPerProject: number;
1281
- event: LiveMintingEvent;
1288
+ address: string;
1289
+ label: string;
1290
+ maxMints: number;
1291
+ maxMintsPerProject: number;
1292
+ event: LiveMintingEvent;
1282
1293
  }
1283
1294
  interface LiveMintingPass {
1284
- token: string;
1285
- group: LiveMintingPassGroup;
1286
- expiresAt: string;
1295
+ token: string;
1296
+ group: LiveMintingPassGroup;
1297
+ expiresAt: string;
1287
1298
  }
1288
1299
  interface OnboardingComponent {
1289
- id: number;
1290
- description: string;
1291
- content: string;
1300
+ id: number;
1301
+ description: string;
1302
+ content: string;
1292
1303
  }
1293
1304
  interface EventOnboardingOnComponent {
1294
- component: OnboardingComponent;
1295
- index: number;
1305
+ component: OnboardingComponent;
1306
+ index: number;
1296
1307
  }
1297
1308
  interface EventOnboarding {
1298
- id: number;
1299
- enabled: boolean;
1300
- description: string;
1301
- components: EventOnboardingOnComponent[];
1309
+ id: number;
1310
+ enabled: boolean;
1311
+ description: string;
1312
+ components: EventOnboardingOnComponent[];
1302
1313
  }
1303
-
1314
+ //#endregion
1315
+ //#region src/types/entities/ManagedWallet.d.ts
1304
1316
  declare enum EWalletOperatorState {
1305
- EMPTY = "EMPTY",
1306
- INITIALIZING = "INITIALIZING",
1307
- AVAILABLE = "AVAILABLE",
1308
- PREPARING = "PREPARING",
1309
- WAITING_CONFIRMATION = "WAITING_CONFIRMATION"
1310
- }
1311
-
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
1312
1325
  interface ModerationReason {
1313
- id: string;
1314
- reason: string;
1326
+ id: string;
1327
+ reason: string;
1315
1328
  }
1316
-
1329
+ //#endregion
1330
+ //#region src/types/Auth.d.ts
1317
1331
  interface JwtAccessTokenPayload extends JwtPayload {
1318
- id: string;
1332
+ id: string;
1319
1333
  }
1320
-
1334
+ //#endregion
1335
+ //#region src/types/UpdateIssuer.d.ts
1321
1336
  type UpdateIssuerForm<N = string> = Omit<Omit<Omit<GenTokDistributionForm<N>, "pricing">, "reserves">, "gracingPeriod">;
1322
-
1337
+ //#endregion
1338
+ //#region src/types/Sandbox.d.ts
1323
1339
  type SandboxFiles = Record<string, {
1324
- blob?: Blob;
1325
- url: string;
1340
+ blob?: Blob;
1341
+ url: string;
1326
1342
  }>;
1327
1343
  declare enum SandboxFileError {
1328
- UNKNOWN = "UNKNOWN",
1329
- WRONG_FORMAT = "WRONG_FORMAT",
1330
- NO_INDEX_HTML = "NO_INDEX_HTML",
1331
- NO_SNIPPET = "NO_SNIPPET",
1332
- FAILED_UNZIP = "FAILED_UNZIP"
1333
- }
1334
-
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
1335
1352
  declare enum ProfileUploadError {
1336
- UNKNOWN = "UNKNOWN",
1337
- WRONG_FORMAT = "WRONG_FORMAT",
1338
- IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED"
1353
+ UNKNOWN = "UNKNOWN",
1354
+ WRONG_FORMAT = "WRONG_FORMAT",
1355
+ IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1339
1356
  }
1340
1357
  interface ProfileUploadResponse {
1341
- metadataUri: string;
1358
+ metadataUri: string;
1342
1359
  }
1343
1360
  declare enum AvatarUploadError {
1344
- UNKNOWN = "UNKNOWN",
1345
- NO_FILE = "NO_FILE",
1346
- WRONG_FORMAT = "WRONG_FORMAT",
1347
- 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",
1348
1365
  }
1349
1366
  interface AvatarUploadResponse {
1350
- avatarUri: string;
1351
- }
1352
- interface TempGenUploadProjectResponse {
1353
- zipKey: string;
1354
- projectCid: string;
1355
- authenticationHash: string;
1367
+ avatarUri: string;
1356
1368
  }
1357
1369
  interface MintGenUploadProjectResponse {
1358
- cidParams: string;
1359
- authenticationHash: string;
1370
+ cidParams: string;
1371
+ authenticationHash: string;
1372
+ }
1373
+ interface TempGenUploadProjectResponse {
1374
+ zipKey: string;
1375
+ projectCid: string;
1376
+ authenticationHash: string;
1360
1377
  }
1361
1378
  interface MintGenUploadProjectResponse {
1362
- zipKey: string;
1363
- projectCid: string;
1364
- authenticationHash: string;
1379
+ zipKey: string;
1380
+ projectCid: string;
1381
+ authenticationHash: string;
1365
1382
  }
1366
1383
  declare enum StaticGenError {
1367
- UNKNOWN = "UNKNOWN",
1368
- MISSING_PARAMETERS = "MISSING_PARAMETERS",
1369
- AUTH_FAILED = "AUTH_FAILED",
1370
- INVALID_HASH = "INVALID_HASH",
1371
- IPFS_UPLOAD_FAILED = "IPFS_UPLOAD_FAILED",
1372
- 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",
1373
1390
  }
1374
1391
  interface StaticGenResponse {
1375
- cidStatic: string;
1376
- authenticationHash: string;
1392
+ cidStatic: string;
1393
+ authenticationHash: string;
1377
1394
  }
1378
1395
  declare enum PreviewError {
1379
- UNKNOWN = "UNKNOWN",
1380
- MISSING_PARAMETERS = "MISSING_PARAMETERS",
1381
- AUTH_FAILED = "AUTH_FAILED",
1382
- INCORRECT_PARAMETERS = "INCORRECT_PARAMETERS",
1383
- PREVIEW_ERROR = "PREVIEW_ERROR",
1384
- 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",
1385
1402
  }
1386
1403
  interface PreviewErrorResponse {
1387
- error: PreviewError;
1404
+ error: PreviewError;
1388
1405
  }
1389
1406
  interface PreviewResponse {
1390
- cidPreview: string;
1391
- cidThumbnail: string;
1392
- authenticationHash: string;
1393
- mode: CaptureMode;
1394
- triggerMode: CaptureTriggerMode;
1395
- resX: number;
1396
- resY: number;
1397
- delay: number;
1398
- canvasSelector: string;
1399
- 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;
1400
1417
  }
1401
1418
  declare enum TestPreviewError {
1402
- UNKNOWN = "UNKNOWN",
1403
- TIMEOUT = "TIMEOUT",
1404
- EXTRACT_SERVICE_UNREACHABLE = "EXTRACT_SERVICE_UNREACHABLE",
1405
- INVALID_INPUT_PARAMETERS = "INVALID_INPUT_PARAMETERS",
1406
- JOB_QUEUE_FAILED = "JOB_QUEUE_FAILED",
1407
- 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",
1408
1425
  }
1409
1426
  interface TestPreviewResponse {
1410
- capture: string;
1411
- features?: string;
1427
+ capture: string;
1428
+ features?: string;
1412
1429
  }
1413
1430
  interface TestPreviewErrorResponse {
1414
- error: TestPreviewError;
1431
+ error: TestPreviewError;
1415
1432
  }
1416
1433
  declare enum MetadataError {
1417
- UNKNOWN = "UNKNOWN",
1418
- IPFS_ERROR = "IPFS_ERROR",
1419
- UPLOAD_ERROR = "UPLOAD_ERROR",
1420
- METADATA_EXISTS = "METADATA_EXISTS"
1434
+ UNKNOWN = "UNKNOWN",
1435
+ IPFS_ERROR = "IPFS_ERROR",
1436
+ UPLOAD_ERROR = "UPLOAD_ERROR",
1437
+ METADATA_EXISTS = "METADATA_EXISTS",
1421
1438
  }
1422
1439
  interface MetadataResponse {
1423
- cid: string;
1440
+ cid: string;
1424
1441
  }
1425
1442
  interface MetadataEthResponse {
1426
- key: string;
1443
+ key: string;
1427
1444
  }
1428
1445
  declare enum MintError {
1429
- UNKNOWN = "UNKNOWN",
1430
- BAD_REQUEST = "BAD_REQUEST",
1431
- TOKEN_NOT_EXISTS = "TOKEN_NOT_EXISTS",
1432
- TOKEN_UNAVAILABLE = "TOKEN_UNAVAILABLE",
1433
- FAIL_GET_METADATA = "FAIL_GET_METADATA",
1434
- WRONG_TOKEN_METADATA = "WRONG_TOKEN_METADATA",
1435
- FAIL_AUTHENTICATE = "FAIL_AUTHENTICATE",
1436
- FAIL_GET_TOKEN = "FAIL_GET_TOKEN",
1437
- INVALID_TOKEN = "INVALID_TOKEN",
1438
- FAIL_ADD_IPFS = "FAIL_ADD_IPFS",
1439
- 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",
1440
1457
  }
1441
1458
  declare const MintErrors: MintError[];
1442
1459
  declare enum MintProgressMessage {
1443
- GET_TOKEN_DATA = "GET_TOKEN_DATA",
1444
- GET_TOKEN_METADATA = "GET_TOKEN_METADATA",
1445
- GET_GENERATIVE_TOKEN_CONTENTS = "GET_GENERATIVE_TOKEN_CONTENTS",
1446
- ADD_CONTENT_IPFS = "ADD_CONTENT_IPFS",
1447
- GENERATE_PREVIEW = "GENERATE_PREVIEW",
1448
- 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",
1449
1466
  }
1450
1467
  interface MintResponse {
1451
- cidMetadata: string;
1452
- cidGenerative: string;
1453
- cidPreview: string;
1468
+ cidMetadata: string;
1469
+ cidGenerative: string;
1470
+ cidPreview: string;
1454
1471
  }
1455
1472
  declare enum SigningState {
1456
- NONE = "NONE",
1457
- NOT_FOUND = "NOT_FOUND",
1458
- QUEUED = "QUEUED",
1459
- GENERATING_METADATA = "GENERATING_METADATA",
1460
- METADATA_GENERATED = "METADATA_GENERATED",
1461
- CALLING_CONTRACT = "CALLING_CONTRACT",
1462
- 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",
1463
1480
  }
1464
1481
  interface SigningProgress {
1465
- state: SigningState;
1466
- extra?: any;
1482
+ state: SigningState;
1483
+ extra?: any;
1467
1484
  }
1468
1485
  interface SigningData {
1469
- cidGenerative?: string;
1470
- cidPreview?: string;
1471
- features?: TokenFeature[];
1486
+ cidGenerative?: string;
1487
+ cidPreview?: string;
1488
+ features?: TokenFeature[];
1472
1489
  }
1473
-
1490
+ //#endregion
1491
+ //#region src/types/Reserve.d.ts
1474
1492
  interface IReserveConsumption {
1475
- method: EReserveMethod;
1476
- data: any;
1493
+ method: EReserveMethod;
1494
+ data: any;
1477
1495
  }
1478
-
1496
+ //#endregion
1497
+ //#region src/types/Inputs.d.ts
1479
1498
  interface InputProps<T = string> {
1480
- value: T;
1481
- onChange: (value: T) => void;
1499
+ value: T;
1500
+ onChange: (value: T) => void;
1482
1501
  }
1483
-
1502
+ //#endregion
1503
+ //#region src/types/IndexerStatus.d.ts
1484
1504
  type IndexerStatusSeverity = "low" | "medium" | "high";
1485
1505
  interface IndexerStatus {
1486
- level: number;
1487
- id: number;
1488
- originatedAt: string;
1489
- lastIndexedAt: string;
1506
+ level: number;
1507
+ id: number;
1508
+ originatedAt: string;
1509
+ lastIndexedAt: string;
1490
1510
  }
1491
1511
  interface NetworkStatus {
1492
- level: number;
1493
- lastSyncedAt: string;
1512
+ level: number;
1513
+ lastSyncedAt: string;
1494
1514
  }
1495
-
1515
+ //#endregion
1516
+ //#region src/types/Files.d.ts
1496
1517
  interface FileSandboxResponse {
1497
- filename: string;
1498
- contents: string[];
1499
- url: string;
1518
+ filename: string;
1519
+ contents: string[];
1520
+ url: string;
1500
1521
  }
1501
-
1522
+ //#endregion
1523
+ //#region src/types/Cycles.d.ts
1502
1524
  interface Cycle {
1503
- start: Date;
1504
- opening: number;
1505
- closing: number;
1525
+ start: Date;
1526
+ opening: number;
1527
+ closing: number;
1506
1528
  }
1507
1529
  interface CyclesState {
1508
- opened: boolean;
1509
- nextOpening: Date;
1510
- nextClosing: Date;
1530
+ opened: boolean;
1531
+ nextOpening: Date;
1532
+ nextClosing: Date;
1511
1533
  }
1512
-
1534
+ //#endregion
1535
+ //#region src/types/Colors.d.ts
1513
1536
  type TColor = "success" | "warning" | "error";
1514
-
1515
- 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