@medialane/ui 0.221.0 → 0.223.0

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.
@@ -1,35 +1,465 @@
1
1
  import * as swr from 'swr';
2
2
  import * as _medialane_sdk from '@medialane/sdk';
3
- import { ApiCollection, CollectionTokensSort, ApiResponse } from '@medialane/sdk';
3
+ import { CollectionTokensSort, ApiResponse, ApiCollection } from '@medialane/sdk';
4
+ import * as zod from 'zod';
4
5
 
5
6
  type CollectionSort = "recent" | "supply" | "floor" | "volume" | "name";
6
7
  declare function useCollections(page?: number, limit?: number, isFeatured?: boolean, sort?: CollectionSort, hideEmpty?: boolean, service?: string, standard?: string, fallback?: ApiCollection[]): {
7
- collections: ApiCollection[];
8
+ collections: {
9
+ symbol: string | null;
10
+ chain: string;
11
+ owner: string | null;
12
+ collectionId: string | null;
13
+ name: string | null;
14
+ description: string | null;
15
+ image: string | null;
16
+ service: string | null;
17
+ contractAddress: string;
18
+ id: string;
19
+ createdAt: string;
20
+ updatedAt: string;
21
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
22
+ standard: "ERC721" | "ERC1155";
23
+ attributes: zod.objectOutputType<{
24
+ trait_type: zod.ZodString;
25
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
26
+ display_type: zod.ZodOptional<zod.ZodString>;
27
+ }, zod.ZodTypeAny, "passthrough">[] | null;
28
+ holderCount: number;
29
+ startBlock: string;
30
+ isFeatured: boolean;
31
+ isHidden: boolean;
32
+ claimedBy: string | null;
33
+ floorPrice: string | null;
34
+ totalVolume: string | null;
35
+ totalSupply: number;
36
+ profile: {
37
+ description: string | null;
38
+ image: string | null;
39
+ displayName: string | null;
40
+ gatedContentTitle: string | null;
41
+ hasGatedContent: boolean;
42
+ slug: string | null;
43
+ } | null;
44
+ }[];
8
45
  meta: _medialane_sdk.ApiMeta | undefined;
9
46
  isLoading: boolean;
10
47
  error: any;
11
- mutate: swr.KeyedMutator<ApiResponse<ApiCollection[]>>;
48
+ mutate: swr.KeyedMutator<ApiResponse<{
49
+ symbol: string | null;
50
+ chain: string;
51
+ owner: string | null;
52
+ collectionId: string | null;
53
+ name: string | null;
54
+ description: string | null;
55
+ image: string | null;
56
+ service: string | null;
57
+ contractAddress: string;
58
+ id: string;
59
+ createdAt: string;
60
+ updatedAt: string;
61
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
62
+ standard: "ERC721" | "ERC1155";
63
+ attributes: zod.objectOutputType<{
64
+ trait_type: zod.ZodString;
65
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
66
+ display_type: zod.ZodOptional<zod.ZodString>;
67
+ }, zod.ZodTypeAny, "passthrough">[] | null;
68
+ holderCount: number;
69
+ startBlock: string;
70
+ isFeatured: boolean;
71
+ isHidden: boolean;
72
+ claimedBy: string | null;
73
+ floorPrice: string | null;
74
+ totalVolume: string | null;
75
+ totalSupply: number;
76
+ profile: {
77
+ description: string | null;
78
+ image: string | null;
79
+ displayName: string | null;
80
+ gatedContentTitle: string | null;
81
+ hasGatedContent: boolean;
82
+ slug: string | null;
83
+ } | null;
84
+ }[]>>;
12
85
  };
13
86
  declare function useCollection(contract: string | null): {
14
- collection: ApiCollection | null;
87
+ collection: {
88
+ symbol: string | null;
89
+ chain: string;
90
+ owner: string | null;
91
+ collectionId: string | null;
92
+ name: string | null;
93
+ description: string | null;
94
+ image: string | null;
95
+ service: string | null;
96
+ contractAddress: string;
97
+ id: string;
98
+ createdAt: string;
99
+ updatedAt: string;
100
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
101
+ standard: "ERC721" | "ERC1155";
102
+ attributes: zod.objectOutputType<{
103
+ trait_type: zod.ZodString;
104
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
105
+ display_type: zod.ZodOptional<zod.ZodString>;
106
+ }, zod.ZodTypeAny, "passthrough">[] | null;
107
+ holderCount: number;
108
+ startBlock: string;
109
+ isFeatured: boolean;
110
+ isHidden: boolean;
111
+ claimedBy: string | null;
112
+ floorPrice: string | null;
113
+ totalVolume: string | null;
114
+ totalSupply: number;
115
+ profile: {
116
+ description: string | null;
117
+ image: string | null;
118
+ displayName: string | null;
119
+ gatedContentTitle: string | null;
120
+ hasGatedContent: boolean;
121
+ slug: string | null;
122
+ } | null;
123
+ } | null;
15
124
  isLoading: boolean;
16
125
  error: any;
17
126
  };
18
127
  declare function useCollectionsByOwner(owner: string | null): {
19
- collections: ApiCollection[];
128
+ collections: {
129
+ symbol: string | null;
130
+ chain: string;
131
+ owner: string | null;
132
+ collectionId: string | null;
133
+ name: string | null;
134
+ description: string | null;
135
+ image: string | null;
136
+ service: string | null;
137
+ contractAddress: string;
138
+ id: string;
139
+ createdAt: string;
140
+ updatedAt: string;
141
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
142
+ standard: "ERC721" | "ERC1155";
143
+ attributes: zod.objectOutputType<{
144
+ trait_type: zod.ZodString;
145
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
146
+ display_type: zod.ZodOptional<zod.ZodString>;
147
+ }, zod.ZodTypeAny, "passthrough">[] | null;
148
+ holderCount: number;
149
+ startBlock: string;
150
+ isFeatured: boolean;
151
+ isHidden: boolean;
152
+ claimedBy: string | null;
153
+ floorPrice: string | null;
154
+ totalVolume: string | null;
155
+ totalSupply: number;
156
+ profile: {
157
+ description: string | null;
158
+ image: string | null;
159
+ displayName: string | null;
160
+ gatedContentTitle: string | null;
161
+ hasGatedContent: boolean;
162
+ slug: string | null;
163
+ } | null;
164
+ }[];
20
165
  isLoading: boolean;
21
166
  error: any;
22
- mutate: swr.KeyedMutator<ApiResponse<ApiCollection[]>>;
167
+ mutate: swr.KeyedMutator<ApiResponse<{
168
+ symbol: string | null;
169
+ chain: string;
170
+ owner: string | null;
171
+ collectionId: string | null;
172
+ name: string | null;
173
+ description: string | null;
174
+ image: string | null;
175
+ service: string | null;
176
+ contractAddress: string;
177
+ id: string;
178
+ createdAt: string;
179
+ updatedAt: string;
180
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
181
+ standard: "ERC721" | "ERC1155";
182
+ attributes: zod.objectOutputType<{
183
+ trait_type: zod.ZodString;
184
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
185
+ display_type: zod.ZodOptional<zod.ZodString>;
186
+ }, zod.ZodTypeAny, "passthrough">[] | null;
187
+ holderCount: number;
188
+ startBlock: string;
189
+ isFeatured: boolean;
190
+ isHidden: boolean;
191
+ claimedBy: string | null;
192
+ floorPrice: string | null;
193
+ totalVolume: string | null;
194
+ totalSupply: number;
195
+ profile: {
196
+ description: string | null;
197
+ image: string | null;
198
+ displayName: string | null;
199
+ gatedContentTitle: string | null;
200
+ hasGatedContent: boolean;
201
+ slug: string | null;
202
+ } | null;
203
+ }[]>>;
23
204
  };
24
205
  declare function useCollectionTokens(contract: string | null, page?: number, limit?: number, sort?: CollectionTokensSort): {
25
- tokens: _medialane_sdk.ApiToken[];
206
+ tokens: {
207
+ chain: string;
208
+ tokenId: string;
209
+ owner: string | null;
210
+ tokenUri: string | null;
211
+ contractAddress: string;
212
+ id: string;
213
+ createdAt: string;
214
+ updatedAt: string;
215
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
216
+ standard: "ERC721" | "ERC1155" | null;
217
+ metadata: {
218
+ name: string | null;
219
+ description: string | null;
220
+ image: string | null;
221
+ author: string | null;
222
+ animationUrl: string | null;
223
+ attributes: zod.objectOutputType<{
224
+ trait_type: zod.ZodString;
225
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
226
+ display_type: zod.ZodOptional<zod.ZodString>;
227
+ }, zod.ZodTypeAny, "passthrough">[] | null;
228
+ ipType: string | null;
229
+ licenseType: string | null;
230
+ commercialUse: boolean | null;
231
+ };
232
+ balances: {
233
+ amount: string;
234
+ owner: string;
235
+ }[] | null;
236
+ activeOrders: {
237
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
238
+ chain: string;
239
+ offerer: string;
240
+ nftContract: string | null;
241
+ price: {
242
+ currency: string | null;
243
+ raw: string | null;
244
+ formatted: string | null;
245
+ decimals: number;
246
+ };
247
+ endTime: string;
248
+ fulfiller: string | null;
249
+ orderHash: string;
250
+ startTime: string;
251
+ txHash: {
252
+ created: string | null;
253
+ fulfilled: string | null;
254
+ cancelled: string | null;
255
+ };
256
+ token: {
257
+ name: string | null;
258
+ description: string | null;
259
+ image: string | null;
260
+ animationUrl: string | null;
261
+ } | null;
262
+ offer: {
263
+ token: string;
264
+ itemType: string;
265
+ identifier: string;
266
+ startAmount: string;
267
+ endAmount: string;
268
+ };
269
+ id: string;
270
+ consideration: {
271
+ recipient: string;
272
+ token: string;
273
+ itemType: string;
274
+ identifier: string;
275
+ startAmount: string;
276
+ endAmount: string;
277
+ };
278
+ nftTokenId: string | null;
279
+ createdBlockNumber: string;
280
+ remainingAmount: string | null;
281
+ createdAt: string;
282
+ updatedAt: string;
283
+ parentOrderHash?: string | null | undefined;
284
+ counterOfferMessage?: string | null | undefined;
285
+ hasActiveCounterOffer?: boolean | undefined;
286
+ }[];
287
+ holderCount?: number | undefined;
288
+ supply?: string | undefined;
289
+ }[];
26
290
  meta: _medialane_sdk.ApiMeta | undefined;
27
291
  isLoading: boolean;
28
292
  error: any;
29
- mutate: swr.KeyedMutator<ApiResponse<_medialane_sdk.ApiToken[]>>;
293
+ mutate: swr.KeyedMutator<ApiResponse<{
294
+ chain: string;
295
+ tokenId: string;
296
+ owner: string | null;
297
+ tokenUri: string | null;
298
+ contractAddress: string;
299
+ id: string;
300
+ createdAt: string;
301
+ updatedAt: string;
302
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
303
+ standard: "ERC721" | "ERC1155" | null;
304
+ metadata: {
305
+ name: string | null;
306
+ description: string | null;
307
+ image: string | null;
308
+ author: string | null;
309
+ animationUrl: string | null;
310
+ attributes: zod.objectOutputType<{
311
+ trait_type: zod.ZodString;
312
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
313
+ display_type: zod.ZodOptional<zod.ZodString>;
314
+ }, zod.ZodTypeAny, "passthrough">[] | null;
315
+ ipType: string | null;
316
+ licenseType: string | null;
317
+ commercialUse: boolean | null;
318
+ };
319
+ balances: {
320
+ amount: string;
321
+ owner: string;
322
+ }[] | null;
323
+ activeOrders: {
324
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
325
+ chain: string;
326
+ offerer: string;
327
+ nftContract: string | null;
328
+ price: {
329
+ currency: string | null;
330
+ raw: string | null;
331
+ formatted: string | null;
332
+ decimals: number;
333
+ };
334
+ endTime: string;
335
+ fulfiller: string | null;
336
+ orderHash: string;
337
+ startTime: string;
338
+ txHash: {
339
+ created: string | null;
340
+ fulfilled: string | null;
341
+ cancelled: string | null;
342
+ };
343
+ token: {
344
+ name: string | null;
345
+ description: string | null;
346
+ image: string | null;
347
+ animationUrl: string | null;
348
+ } | null;
349
+ offer: {
350
+ token: string;
351
+ itemType: string;
352
+ identifier: string;
353
+ startAmount: string;
354
+ endAmount: string;
355
+ };
356
+ id: string;
357
+ consideration: {
358
+ recipient: string;
359
+ token: string;
360
+ itemType: string;
361
+ identifier: string;
362
+ startAmount: string;
363
+ endAmount: string;
364
+ };
365
+ nftTokenId: string | null;
366
+ createdBlockNumber: string;
367
+ remainingAmount: string | null;
368
+ createdAt: string;
369
+ updatedAt: string;
370
+ parentOrderHash?: string | null | undefined;
371
+ counterOfferMessage?: string | null | undefined;
372
+ hasActiveCounterOffer?: boolean | undefined;
373
+ }[];
374
+ holderCount?: number | undefined;
375
+ supply?: string | undefined;
376
+ }[]>>;
30
377
  };
31
378
  declare function useNearbyCollectionTokens(contract: string | null, currentTokenId: string | null, count?: number, poolSize?: number): {
32
- tokens: _medialane_sdk.ApiToken[];
379
+ tokens: {
380
+ chain: string;
381
+ tokenId: string;
382
+ owner: string | null;
383
+ tokenUri: string | null;
384
+ contractAddress: string;
385
+ id: string;
386
+ createdAt: string;
387
+ updatedAt: string;
388
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
389
+ standard: "ERC721" | "ERC1155" | null;
390
+ metadata: {
391
+ name: string | null;
392
+ description: string | null;
393
+ image: string | null;
394
+ author: string | null;
395
+ animationUrl: string | null;
396
+ attributes: zod.objectOutputType<{
397
+ trait_type: zod.ZodString;
398
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
399
+ display_type: zod.ZodOptional<zod.ZodString>;
400
+ }, zod.ZodTypeAny, "passthrough">[] | null;
401
+ ipType: string | null;
402
+ licenseType: string | null;
403
+ commercialUse: boolean | null;
404
+ };
405
+ balances: {
406
+ amount: string;
407
+ owner: string;
408
+ }[] | null;
409
+ activeOrders: {
410
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
411
+ chain: string;
412
+ offerer: string;
413
+ nftContract: string | null;
414
+ price: {
415
+ currency: string | null;
416
+ raw: string | null;
417
+ formatted: string | null;
418
+ decimals: number;
419
+ };
420
+ endTime: string;
421
+ fulfiller: string | null;
422
+ orderHash: string;
423
+ startTime: string;
424
+ txHash: {
425
+ created: string | null;
426
+ fulfilled: string | null;
427
+ cancelled: string | null;
428
+ };
429
+ token: {
430
+ name: string | null;
431
+ description: string | null;
432
+ image: string | null;
433
+ animationUrl: string | null;
434
+ } | null;
435
+ offer: {
436
+ token: string;
437
+ itemType: string;
438
+ identifier: string;
439
+ startAmount: string;
440
+ endAmount: string;
441
+ };
442
+ id: string;
443
+ consideration: {
444
+ recipient: string;
445
+ token: string;
446
+ itemType: string;
447
+ identifier: string;
448
+ startAmount: string;
449
+ endAmount: string;
450
+ };
451
+ nftTokenId: string | null;
452
+ createdBlockNumber: string;
453
+ remainingAmount: string | null;
454
+ createdAt: string;
455
+ updatedAt: string;
456
+ parentOrderHash?: string | null | undefined;
457
+ counterOfferMessage?: string | null | undefined;
458
+ hasActiveCounterOffer?: boolean | undefined;
459
+ }[];
460
+ holderCount?: number | undefined;
461
+ supply?: string | undefined;
462
+ }[];
33
463
  isLoading: boolean;
34
464
  error: any;
35
465
  };