@xoxno/sdk-js 0.1.4-alpha → 0.1.6-alpha
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/collection/index.d.ts +75 -3
- package/dist/collection/index.js +120 -3
- package/dist/collection/index.js.map +1 -1
- package/dist/nft/index.d.ts +1 -1
- package/dist/nft/index.js +2 -2
- package/dist/nft/index.js.map +1 -1
- package/dist/staking/index.js.map +1 -1
- package/dist/types/collection.d.ts +131 -49
- package/dist/types/collection.js +33 -1
- package/dist/types/collection.js.map +1 -1
- package/dist/types/user.d.ts +48 -15
- package/dist/types/user.js.map +1 -1
- package/dist/users/index.d.ts +8 -1
- package/dist/users/index.js +12 -0
- package/dist/users/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NftData } from '../types';
|
|
2
|
+
import { CollectionsNFTsResponse, GetCollectionsArgs, ICollectionAttributes, ICollectionProfile, GetNFTsArgs, SearchNFTsResponse, SuggestNFTsArgs, SuggestResults, CollectionVolume, FloorPriceHistory, FungibleAssets, FungibleAssetsMap, AssetCategory, IOwners, ISingleHolder, CollectionsSummary, CollectionsSummaryFilter } from '../types/collection';
|
|
2
3
|
import { TradincActivityArgs, TradingActivityResponse } from '../types/trading';
|
|
3
4
|
/**
|
|
4
5
|
* CollectionModule provides a set of methods to interact with NFT collections.
|
|
@@ -26,6 +27,31 @@ export default class CollectionModule {
|
|
|
26
27
|
* Finally, it returns a promise that resolves to the fetched collection profile.
|
|
27
28
|
*/
|
|
28
29
|
getCollectionProfile: (collection: string) => Promise<ICollectionProfile>;
|
|
30
|
+
/**
|
|
31
|
+
* @public
|
|
32
|
+
* @async
|
|
33
|
+
* @function getFungibleTokens
|
|
34
|
+
* @param category - The ticker of the collection.
|
|
35
|
+
* @returns {Promise<FungibleAssetsMap>} A promise that resolves a map of ESDT tokens and their info
|
|
36
|
+
* This function fetches all branded fungible assets and their info
|
|
37
|
+
*/
|
|
38
|
+
getFungibleTokens: (categories?: AssetCategory[]) => Promise<FungibleAssetsMap>;
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
* @async
|
|
42
|
+
* @function getFungibleToken
|
|
43
|
+
* @returns {Promise<FungibleAssets>} A promise that resolves the ESDT token info
|
|
44
|
+
* This function fetches the branded fungible asset info
|
|
45
|
+
*/
|
|
46
|
+
getFungibleToken: (identifier: string) => Promise<FungibleAssets>;
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
* @async
|
|
50
|
+
* @function getDailyTrending
|
|
51
|
+
* @returns {Promise<NftData[]>} A promise that resolves to the array of trending NFTs.
|
|
52
|
+
* This function fetches the top NFTs that are trending today based on their floor and volumes
|
|
53
|
+
*/
|
|
54
|
+
getDailyTrending: () => Promise<NftData[]>;
|
|
29
55
|
/**
|
|
30
56
|
* Fetches the floor price of a collection.
|
|
31
57
|
* @param collection - The ticker of the collection.
|
|
@@ -110,6 +136,26 @@ export default class CollectionModule {
|
|
|
110
136
|
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
111
137
|
*/
|
|
112
138
|
getCollectionVolume: (collection: string, after: string, before: string, bin: string) => Promise<CollectionVolume[]>;
|
|
139
|
+
/**
|
|
140
|
+
* @public
|
|
141
|
+
* @async
|
|
142
|
+
* @function getMarketplaceVolume
|
|
143
|
+
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
144
|
+
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
145
|
+
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
146
|
+
* @returns {Promise<CollectionVolume[]>} A promise that resolves to an array of collection volume data.
|
|
147
|
+
*
|
|
148
|
+
* This function fetches volume data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
149
|
+
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
150
|
+
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
151
|
+
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
152
|
+
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
153
|
+
*
|
|
154
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
155
|
+
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
156
|
+
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
157
|
+
*/
|
|
158
|
+
getMarketplaceVolume: (after: string, before: string, bin: string) => Promise<CollectionVolume[]>;
|
|
113
159
|
/**
|
|
114
160
|
* @public
|
|
115
161
|
* @async
|
|
@@ -136,14 +182,40 @@ export default class CollectionModule {
|
|
|
136
182
|
* @async
|
|
137
183
|
* @function getCollectionOwners
|
|
138
184
|
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
139
|
-
* @returns {Promise<
|
|
185
|
+
* @returns {Promise<IOwners>} A promise that resolves a struct of collection information about holders
|
|
140
186
|
*
|
|
141
187
|
* This function fetches owner information for a given collection. It takes the following parameter:
|
|
142
188
|
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
143
189
|
*
|
|
144
190
|
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
145
191
|
* If it is valid, the function fetches the collection owner information using the API.
|
|
192
|
+
* Finally, it returns a promise that resolves a struct of collection information about holders
|
|
193
|
+
*/
|
|
194
|
+
getCollectionOwners: (collection: string) => Promise<IOwners>;
|
|
195
|
+
/**
|
|
196
|
+
* @public
|
|
197
|
+
* @async
|
|
198
|
+
* @function getExportOwners
|
|
199
|
+
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
200
|
+
* @returns {Promise<ISingleHolder[]>} A promise that resolves an array of holders part of the collection.
|
|
201
|
+
*
|
|
202
|
+
* This function fetches owners information for a given collection. It takes the following parameter:
|
|
203
|
+
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
204
|
+
*
|
|
205
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
206
|
+
* If it is valid, the function fetches the collection owner information using the API.
|
|
146
207
|
* Finally, it returns a promise that resolves to an array of collection owner information.
|
|
147
208
|
*/
|
|
148
|
-
|
|
209
|
+
getExportOwners: (collection: string) => Promise<ISingleHolder[]>;
|
|
210
|
+
/**
|
|
211
|
+
* @public
|
|
212
|
+
* @async
|
|
213
|
+
* @function getCollectionsSummary
|
|
214
|
+
* @param {string} type - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
215
|
+
* @param {string} skip - The offset from where to start reading
|
|
216
|
+
* @param {string} take - How many results per call
|
|
217
|
+
* @returns {Promise<CollectionsSummary>} A promise that resolves to a struct with information
|
|
218
|
+
* Finally, it returns a promise that resolves a struct with information
|
|
219
|
+
*/
|
|
220
|
+
getCollectionsSummary: (type: CollectionsSummaryFilter, skip: number, take: number) => Promise<CollectionsSummary>;
|
|
149
221
|
}
|
package/dist/collection/index.js
CHANGED
|
@@ -47,6 +47,54 @@ class CollectionModule {
|
|
|
47
47
|
const response = yield this.api.fetchWithTimeout(`/getCollectionProfile/${collection}`, {
|
|
48
48
|
next: {
|
|
49
49
|
tags: ['getCollectionProfile'],
|
|
50
|
+
revalidate: 30,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
return response;
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
* @async
|
|
58
|
+
* @function getFungibleTokens
|
|
59
|
+
* @param category - The ticker of the collection.
|
|
60
|
+
* @returns {Promise<FungibleAssetsMap>} A promise that resolves a map of ESDT tokens and their info
|
|
61
|
+
* This function fetches all branded fungible assets and their info
|
|
62
|
+
*/
|
|
63
|
+
this.getFungibleTokens = (categories = [collection_1.AssetCategory.ALL]) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const category = categories.join(',');
|
|
65
|
+
const response = yield this.api.fetchWithTimeout(`/getFungibleTokens?category=${category}`, {
|
|
66
|
+
next: {
|
|
67
|
+
tags: ['getFungibleTokens'],
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
return response;
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* @public
|
|
74
|
+
* @async
|
|
75
|
+
* @function getFungibleToken
|
|
76
|
+
* @returns {Promise<FungibleAssets>} A promise that resolves the ESDT token info
|
|
77
|
+
* This function fetches the branded fungible asset info
|
|
78
|
+
*/
|
|
79
|
+
this.getFungibleToken = (identifier) => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const response = yield this.api.fetchWithTimeout(`/getFungibleTokens/${identifier}`, {
|
|
81
|
+
next: {
|
|
82
|
+
tags: ['getFungibleToken'],
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
return response;
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* @public
|
|
89
|
+
* @async
|
|
90
|
+
* @function getDailyTrending
|
|
91
|
+
* @returns {Promise<NftData[]>} A promise that resolves to the array of trending NFTs.
|
|
92
|
+
* This function fetches the top NFTs that are trending today based on their floor and volumes
|
|
93
|
+
*/
|
|
94
|
+
this.getDailyTrending = () => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const response = yield this.api.fetchWithTimeout('/nfts/getDailyTrending', {
|
|
96
|
+
next: {
|
|
97
|
+
tags: ['getDailyTrending'],
|
|
50
98
|
},
|
|
51
99
|
});
|
|
52
100
|
return response;
|
|
@@ -141,7 +189,6 @@ class CollectionModule {
|
|
|
141
189
|
skip: args.skip || 0,
|
|
142
190
|
};
|
|
143
191
|
const buffer = Buffer.from(JSON.stringify(payloadBody)).toString('base64');
|
|
144
|
-
console.log(buffer);
|
|
145
192
|
const response = yield this.api.fetchWithTimeout(`/getNfts/${buffer}`, {
|
|
146
193
|
next: {
|
|
147
194
|
tags: ['getCollectionNFTs'],
|
|
@@ -266,6 +313,33 @@ class CollectionModule {
|
|
|
266
313
|
});
|
|
267
314
|
return response;
|
|
268
315
|
});
|
|
316
|
+
/**
|
|
317
|
+
* @public
|
|
318
|
+
* @async
|
|
319
|
+
* @function getMarketplaceVolume
|
|
320
|
+
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
321
|
+
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
322
|
+
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
323
|
+
* @returns {Promise<CollectionVolume[]>} A promise that resolves to an array of collection volume data.
|
|
324
|
+
*
|
|
325
|
+
* This function fetches volume data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
326
|
+
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
327
|
+
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
328
|
+
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
329
|
+
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
330
|
+
*
|
|
331
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
332
|
+
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
333
|
+
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
334
|
+
*/
|
|
335
|
+
this.getMarketplaceVolume = (after, before, bin) => __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
const response = yield this.api.fetchWithTimeout(`/getMarketplaceVolume?after=${after}&before=${before}&bin=${bin}`, {
|
|
337
|
+
next: {
|
|
338
|
+
tags: ['getMarketplaceVolume'],
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
return response;
|
|
342
|
+
});
|
|
269
343
|
/**
|
|
270
344
|
* @public
|
|
271
345
|
* @async
|
|
@@ -302,14 +376,14 @@ class CollectionModule {
|
|
|
302
376
|
* @async
|
|
303
377
|
* @function getCollectionOwners
|
|
304
378
|
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
305
|
-
* @returns {Promise<
|
|
379
|
+
* @returns {Promise<IOwners>} A promise that resolves a struct of collection information about holders
|
|
306
380
|
*
|
|
307
381
|
* This function fetches owner information for a given collection. It takes the following parameter:
|
|
308
382
|
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
309
383
|
*
|
|
310
384
|
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
311
385
|
* If it is valid, the function fetches the collection owner information using the API.
|
|
312
|
-
* Finally, it returns a promise that resolves
|
|
386
|
+
* Finally, it returns a promise that resolves a struct of collection information about holders
|
|
313
387
|
*/
|
|
314
388
|
this.getCollectionOwners = (collection) => __awaiter(this, void 0, void 0, function* () {
|
|
315
389
|
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
@@ -322,6 +396,49 @@ class CollectionModule {
|
|
|
322
396
|
});
|
|
323
397
|
return response;
|
|
324
398
|
});
|
|
399
|
+
/**
|
|
400
|
+
* @public
|
|
401
|
+
* @async
|
|
402
|
+
* @function getExportOwners
|
|
403
|
+
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
404
|
+
* @returns {Promise<ISingleHolder[]>} A promise that resolves an array of holders part of the collection.
|
|
405
|
+
*
|
|
406
|
+
* This function fetches owners information for a given collection. It takes the following parameter:
|
|
407
|
+
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
408
|
+
*
|
|
409
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
410
|
+
* If it is valid, the function fetches the collection owner information using the API.
|
|
411
|
+
* Finally, it returns a promise that resolves to an array of collection owner information.
|
|
412
|
+
*/
|
|
413
|
+
this.getExportOwners = (collection) => __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
415
|
+
throw new Error('Invalid collection ticker: ' + collection);
|
|
416
|
+
}
|
|
417
|
+
const response = yield this.api.fetchWithTimeout(`/getCollectionOwners/${collection}?exportHolders=true`, {
|
|
418
|
+
next: {
|
|
419
|
+
tags: ['getExportOwners'],
|
|
420
|
+
},
|
|
421
|
+
});
|
|
422
|
+
return response;
|
|
423
|
+
});
|
|
424
|
+
/**
|
|
425
|
+
* @public
|
|
426
|
+
* @async
|
|
427
|
+
* @function getCollectionsSummary
|
|
428
|
+
* @param {string} type - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
429
|
+
* @param {string} skip - The offset from where to start reading
|
|
430
|
+
* @param {string} take - How many results per call
|
|
431
|
+
* @returns {Promise<CollectionsSummary>} A promise that resolves to a struct with information
|
|
432
|
+
* Finally, it returns a promise that resolves a struct with information
|
|
433
|
+
*/
|
|
434
|
+
this.getCollectionsSummary = (type, skip, take) => __awaiter(this, void 0, void 0, function* () {
|
|
435
|
+
const response = yield this.api.fetchWithTimeout(`/getCollectionsSummary/${type}/${skip}/${take}`, {
|
|
436
|
+
next: {
|
|
437
|
+
tags: ['getCollectionsSummary'],
|
|
438
|
+
},
|
|
439
|
+
});
|
|
440
|
+
return response;
|
|
441
|
+
});
|
|
325
442
|
this.api = api_1.default.init();
|
|
326
443
|
}
|
|
327
444
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collection/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collection/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,oDAoB6B;AAE7B,uDAAuC;AACvC,sDAAmD;AACnD,0CAAyD;AAEzD;;;;;;;GAOG;AACH,MAAqB,gBAAgB;IAEnC;QAIA;;;;;;;;;;;;;WAaG;QACI,yBAAoB,GAAG,CAC5B,UAAkB,EACW,EAAE;YAC/B,IAAI,CAAC,IAAA,+B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hBA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAyhBF;AA7hBD,mCA6hBC"}
|
package/dist/nft/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export default class NFTModule {
|
|
|
40
40
|
* If it is valid, the function fetches the NFT data using the API.
|
|
41
41
|
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
42
42
|
*/
|
|
43
|
-
getNFTsOffers: (identifier: string) => Promise<UserOffers>;
|
|
43
|
+
getNFTsOffers: (identifier: string, skip?: number, top?: number) => Promise<UserOffers>;
|
|
44
44
|
/**
|
|
45
45
|
* Gets an NFT by collection and nonce.
|
|
46
46
|
* @param collection The collection ticker.
|
package/dist/nft/index.js
CHANGED
|
@@ -60,11 +60,11 @@ class NFTModule {
|
|
|
60
60
|
* If it is valid, the function fetches the NFT data using the API.
|
|
61
61
|
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
62
62
|
*/
|
|
63
|
-
this.getNFTsOffers = (identifier) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
this.getNFTsOffers = (identifier, skip = 0, top = 25) => __awaiter(this, void 0, void 0, function* () {
|
|
64
64
|
if (!(0, regex_1.isValidNftIdentifier)(identifier)) {
|
|
65
65
|
throw new Error('Invalid identifier: ' + identifier);
|
|
66
66
|
}
|
|
67
|
-
const response = yield this.api.fetchWithTimeout(`/getSingleNft/${identifier}/offers`);
|
|
67
|
+
const response = yield this.api.fetchWithTimeout(`/getSingleNft/${identifier}/offers?skip=${skip}&top=${top}`);
|
|
68
68
|
return response;
|
|
69
69
|
});
|
|
70
70
|
/**
|
package/dist/nft/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,uDAAuC;AACvC,sDAAmD;AACnD,8CAAgE;AAChE,0CAA+E;AAE/E;;;;;;GAMG;AAEH,MAA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;QAC3C,CAAC,CAAA,CAAC;QAlHA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAkHF;AAtHD,4BAsHC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/staking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,uDAAuC;AACvC,8CAAkD;AAClD,0CAAyD;AAEzD,MAAqB,aAAa;IAEhC;QAIA;;;;WAIG;QACI,uBAAkB,GAAG,GAAiC,EAAE;YAC7D,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/staking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,uDAAuC;AACvC,8CAAkD;AAClD,0CAAyD;AAEzD,MAAqB,aAAa;IAEhC;QAIA;;;;WAIG;QACI,uBAAkB,GAAG,GAAiC,EAAE;YAC7D,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAgB,kBAAkB,CAAC,CAAC;YACrE,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACI,qBAAgB,GAAG,CACxB,UAAkB,EACM,EAAE;YAC1B,IAAI,CAAC,IAAA,+BAAuB,EAAC,UAAU,CAAC,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;aAC7D;YACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,qBAAqB,UAAU,EAAE,CAClC,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACI,uBAAkB,GAAG,CAAO,MAAc,EAAwB,EAAE;YACzE,IAAI,OAAO,MAAM,KAAK,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACnE,MAAM,QAAQ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A,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAsGF;AA1GD,gCA0GC"}
|
|
@@ -122,12 +122,18 @@ export declare enum FieldsToSelect {
|
|
|
122
122
|
export declare enum SearchOrderBy {
|
|
123
123
|
PriceHighToLow = "saleInfo.minBidShort desc",
|
|
124
124
|
PriceLowToHigh = "saleInfo.minBidShort asc",
|
|
125
|
+
MaxPriceHighToLow = "saleInfo.maxBidShort desc",
|
|
126
|
+
MaxPriceLowToHigh = "saleInfo.maxBidShort asc",
|
|
127
|
+
BidPriceHighToLow = "saleInfo.currentBidShort desc",
|
|
128
|
+
BidPriceLowToHigh = "saleInfo.currentBidShort asc",
|
|
125
129
|
RarityHighToLow = "metadata.rarity.rank desc",
|
|
126
130
|
RarityLowToHigh = "metadata.rarity.rank asc",
|
|
127
131
|
NonceHighToLow = "nonce desc",
|
|
128
132
|
NonceLowToHigh = "nonce asc",
|
|
129
133
|
RecentListed = "saleInfo.timestamp desc",
|
|
130
|
-
OldestListed = "saleInfo.timestamp asc"
|
|
134
|
+
OldestListed = "saleInfo.timestamp asc",
|
|
135
|
+
EndingLate = "saleInfo.deadline desc",
|
|
136
|
+
EndingSoon = "saleInfo.deadline asc"
|
|
131
137
|
}
|
|
132
138
|
export declare enum SuggestOrderBy {
|
|
133
139
|
TotalVolumeHighToLow = "statistics/tradeData/totalEgldVolume desc",
|
|
@@ -366,70 +372,146 @@ export interface MintStatistics {
|
|
|
366
372
|
}
|
|
367
373
|
export interface CollectionVolume {
|
|
368
374
|
Day: string;
|
|
375
|
+
DR_Trades: number;
|
|
376
|
+
DR_Volume: number;
|
|
377
|
+
DR_VolumeUSD: number;
|
|
378
|
+
DR_Buyers: number;
|
|
379
|
+
DR_Sellers: number;
|
|
380
|
+
DR_FeesPaid: number;
|
|
381
|
+
DR_FeesPaidUSD: number;
|
|
382
|
+
DR_RoyaltiesPaid: number;
|
|
383
|
+
DR_RoyaltiesPaidUSD: number;
|
|
369
384
|
FM_Trades: number;
|
|
370
385
|
FM_Volume: number;
|
|
386
|
+
FM_VolumeUSD: number;
|
|
387
|
+
FM_Buyers: number;
|
|
388
|
+
FM_Sellers: number;
|
|
389
|
+
FM_FeesPaid: number;
|
|
390
|
+
FM_FeesPaidUSD: number;
|
|
391
|
+
FM_RoyaltiesPaid: number;
|
|
392
|
+
FM_RoyaltiesPaidUSD: number;
|
|
371
393
|
KG_Trades: number;
|
|
372
394
|
KG_Volume: number;
|
|
395
|
+
KG_VolumeUSD: number;
|
|
396
|
+
KG_Buyers: number;
|
|
397
|
+
KG_Sellers: number;
|
|
398
|
+
KG_FeesPaid: number;
|
|
399
|
+
KG_FeesPaidUSD: number;
|
|
400
|
+
KG_RoyaltiesPaid: number;
|
|
401
|
+
KG_RoyaltiesPaidUSD: number;
|
|
373
402
|
Total_Trades: number;
|
|
374
403
|
Total_Volume: number;
|
|
404
|
+
Total_VolumeUSD: number;
|
|
405
|
+
Total_Buyers: number;
|
|
406
|
+
Total_Sellers: number;
|
|
407
|
+
Total_FeesPaid: number;
|
|
408
|
+
Total_FeesPaidUSD: number;
|
|
409
|
+
Total_RoyaltiesPaid: number;
|
|
410
|
+
Total_RoyaltiesPaidUSD: number;
|
|
375
411
|
XO_Trades: number;
|
|
376
412
|
XO_Volume: number;
|
|
413
|
+
XO_VolumeUSD: number;
|
|
414
|
+
XO_Buyers: number;
|
|
415
|
+
XO_Sellers: number;
|
|
416
|
+
XO_FeesPaid: number;
|
|
417
|
+
XO_FeesPaidUSD: number;
|
|
418
|
+
XO_RoyaltiesPaid: number;
|
|
419
|
+
XO_RoyaltiesPaidUSD: number;
|
|
377
420
|
}
|
|
378
421
|
export interface FloorPriceHistory {
|
|
379
422
|
Day: string;
|
|
380
423
|
FloorPrice: number;
|
|
381
424
|
AveragePrice: number;
|
|
382
425
|
}
|
|
383
|
-
export
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
426
|
+
export type FungibleAssets = {
|
|
427
|
+
id?: string;
|
|
428
|
+
identifier?: string;
|
|
429
|
+
collection?: string;
|
|
430
|
+
dataType?: string;
|
|
431
|
+
decimals?: number;
|
|
432
|
+
name: string;
|
|
433
|
+
type?: string;
|
|
434
|
+
category?: string[];
|
|
435
|
+
svgUrl: string;
|
|
436
|
+
pngUrl: string;
|
|
437
|
+
ticker: string;
|
|
438
|
+
_ts?: number;
|
|
439
|
+
};
|
|
440
|
+
export type FungibleAssetsMap = {
|
|
441
|
+
[key: string]: FungibleAssets;
|
|
442
|
+
};
|
|
443
|
+
export declare enum AssetCategory {
|
|
444
|
+
ALL = "all",
|
|
445
|
+
Trade = "trade",
|
|
446
|
+
P2P = "p2p",
|
|
447
|
+
Staking = "staking",
|
|
448
|
+
Minting = "minting"
|
|
449
|
+
}
|
|
450
|
+
export type ISingleHolder = {
|
|
400
451
|
address: string;
|
|
401
452
|
count: number;
|
|
402
453
|
weight: number;
|
|
454
|
+
};
|
|
455
|
+
export type IOwners = {
|
|
456
|
+
totalSupply: number;
|
|
457
|
+
onMarket: HoldedDetails;
|
|
458
|
+
staked: HoldedDetails;
|
|
459
|
+
otherSCs: HoldedDetails;
|
|
460
|
+
burnWallet: HoldedDetails;
|
|
461
|
+
uniqueHolders: HoldedDetails;
|
|
462
|
+
holded: AvgHolder;
|
|
463
|
+
walletDetails: ISingleHolder[];
|
|
464
|
+
};
|
|
465
|
+
export type HoldedDetails = {
|
|
466
|
+
count: number;
|
|
467
|
+
weight: number;
|
|
468
|
+
};
|
|
469
|
+
export interface AvgHolder extends HoldedDetails {
|
|
470
|
+
avgPerHodler: number;
|
|
403
471
|
}
|
|
404
|
-
export
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
export
|
|
434
|
-
|
|
472
|
+
export type CollectionsSummary = {
|
|
473
|
+
data: CollectionsSummaryItem[];
|
|
474
|
+
count: number;
|
|
475
|
+
};
|
|
476
|
+
export type CollectionsSummaryItem = {
|
|
477
|
+
Collection: string;
|
|
478
|
+
TotalVolume: number;
|
|
479
|
+
TotalTrades: number;
|
|
480
|
+
DailyVolume: number | null;
|
|
481
|
+
Last2DaysVolume: number | null;
|
|
482
|
+
DailyTrades: number | null;
|
|
483
|
+
Last2DaysTrades: number | null;
|
|
484
|
+
WeekTrades: number;
|
|
485
|
+
LastWeekTrades: number | null;
|
|
486
|
+
WeekVolume: number;
|
|
487
|
+
LastWeekVolume: number | null;
|
|
488
|
+
WeeklyTradesMargin: number | null;
|
|
489
|
+
DailyTradesMargin: number | null;
|
|
490
|
+
WeeklyVolumeMargin: number | null;
|
|
491
|
+
DailyVolumeEgldMargin: number | null;
|
|
492
|
+
CollectionAthTrade: number;
|
|
493
|
+
CollectionAthTxHash: string;
|
|
494
|
+
Name: string;
|
|
495
|
+
AthHash: string;
|
|
496
|
+
Profile: string;
|
|
497
|
+
Banner: string;
|
|
498
|
+
isVerified: boolean;
|
|
499
|
+
FloorPrice: number;
|
|
500
|
+
};
|
|
501
|
+
export declare enum CollectionsSummaryFilter {
|
|
502
|
+
TotalVolume = "TotalVolume",
|
|
503
|
+
TotalTrades = "TotalTrades",
|
|
504
|
+
DailyVolume = "DailyVolume",
|
|
505
|
+
Last2DaysVolume = "Last2DaysVolume",
|
|
506
|
+
DailyTrades = "DailyTrades",
|
|
507
|
+
Last2DaysTrades = "Last2DaysTrades",
|
|
508
|
+
WeekTrades = "WeekTrades",
|
|
509
|
+
LastWeekTrades = "LastWeekTrades",
|
|
510
|
+
WeekVolume = "WeekVolume",
|
|
511
|
+
LastWeekVolume = "LastWeekVolume",
|
|
512
|
+
WeeklyTradesMargin = "WeeklyTradesMargin",
|
|
513
|
+
DailyTradesMargin = "DailyTradesMargin",
|
|
514
|
+
WeeklyVolumeMargin = "WeeklyVolumeMargin",
|
|
515
|
+
DailyVolumeEgldMargin = "DailyVolumeEgldMargin",
|
|
516
|
+
CollectionAthTrade = "CollectionAthTrade"
|
|
435
517
|
}
|
package/dist/types/collection.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CollectionsFieldsToSelect = exports.CollectionsOrderBy = exports.SuggestOrderBy = exports.SearchOrderBy = exports.FieldsToSelect = exports.Marketplace = void 0;
|
|
3
|
+
exports.CollectionsSummaryFilter = exports.AssetCategory = exports.CollectionsFieldsToSelect = exports.CollectionsOrderBy = exports.SuggestOrderBy = exports.SearchOrderBy = exports.FieldsToSelect = exports.Marketplace = void 0;
|
|
4
4
|
var Marketplace;
|
|
5
5
|
(function (Marketplace) {
|
|
6
6
|
Marketplace["XO"] = "xoxno";
|
|
@@ -31,12 +31,18 @@ var SearchOrderBy;
|
|
|
31
31
|
(function (SearchOrderBy) {
|
|
32
32
|
SearchOrderBy["PriceHighToLow"] = "saleInfo.minBidShort desc";
|
|
33
33
|
SearchOrderBy["PriceLowToHigh"] = "saleInfo.minBidShort asc";
|
|
34
|
+
SearchOrderBy["MaxPriceHighToLow"] = "saleInfo.maxBidShort desc";
|
|
35
|
+
SearchOrderBy["MaxPriceLowToHigh"] = "saleInfo.maxBidShort asc";
|
|
36
|
+
SearchOrderBy["BidPriceHighToLow"] = "saleInfo.currentBidShort desc";
|
|
37
|
+
SearchOrderBy["BidPriceLowToHigh"] = "saleInfo.currentBidShort asc";
|
|
34
38
|
SearchOrderBy["RarityHighToLow"] = "metadata.rarity.rank desc";
|
|
35
39
|
SearchOrderBy["RarityLowToHigh"] = "metadata.rarity.rank asc";
|
|
36
40
|
SearchOrderBy["NonceHighToLow"] = "nonce desc";
|
|
37
41
|
SearchOrderBy["NonceLowToHigh"] = "nonce asc";
|
|
38
42
|
SearchOrderBy["RecentListed"] = "saleInfo.timestamp desc";
|
|
39
43
|
SearchOrderBy["OldestListed"] = "saleInfo.timestamp asc";
|
|
44
|
+
SearchOrderBy["EndingLate"] = "saleInfo.deadline desc";
|
|
45
|
+
SearchOrderBy["EndingSoon"] = "saleInfo.deadline asc";
|
|
40
46
|
})(SearchOrderBy || (exports.SearchOrderBy = SearchOrderBy = {}));
|
|
41
47
|
var SuggestOrderBy;
|
|
42
48
|
(function (SuggestOrderBy) {
|
|
@@ -83,4 +89,30 @@ var CollectionsFieldsToSelect;
|
|
|
83
89
|
CollectionsFieldsToSelect["Statistics"] = "statistics";
|
|
84
90
|
CollectionsFieldsToSelect["Collection"] = "collection";
|
|
85
91
|
})(CollectionsFieldsToSelect || (exports.CollectionsFieldsToSelect = CollectionsFieldsToSelect = {}));
|
|
92
|
+
var AssetCategory;
|
|
93
|
+
(function (AssetCategory) {
|
|
94
|
+
AssetCategory["ALL"] = "all";
|
|
95
|
+
AssetCategory["Trade"] = "trade";
|
|
96
|
+
AssetCategory["P2P"] = "p2p";
|
|
97
|
+
AssetCategory["Staking"] = "staking";
|
|
98
|
+
AssetCategory["Minting"] = "minting";
|
|
99
|
+
})(AssetCategory || (exports.AssetCategory = AssetCategory = {}));
|
|
100
|
+
var CollectionsSummaryFilter;
|
|
101
|
+
(function (CollectionsSummaryFilter) {
|
|
102
|
+
CollectionsSummaryFilter["TotalVolume"] = "TotalVolume";
|
|
103
|
+
CollectionsSummaryFilter["TotalTrades"] = "TotalTrades";
|
|
104
|
+
CollectionsSummaryFilter["DailyVolume"] = "DailyVolume";
|
|
105
|
+
CollectionsSummaryFilter["Last2DaysVolume"] = "Last2DaysVolume";
|
|
106
|
+
CollectionsSummaryFilter["DailyTrades"] = "DailyTrades";
|
|
107
|
+
CollectionsSummaryFilter["Last2DaysTrades"] = "Last2DaysTrades";
|
|
108
|
+
CollectionsSummaryFilter["WeekTrades"] = "WeekTrades";
|
|
109
|
+
CollectionsSummaryFilter["LastWeekTrades"] = "LastWeekTrades";
|
|
110
|
+
CollectionsSummaryFilter["WeekVolume"] = "WeekVolume";
|
|
111
|
+
CollectionsSummaryFilter["LastWeekVolume"] = "LastWeekVolume";
|
|
112
|
+
CollectionsSummaryFilter["WeeklyTradesMargin"] = "WeeklyTradesMargin";
|
|
113
|
+
CollectionsSummaryFilter["DailyTradesMargin"] = "DailyTradesMargin";
|
|
114
|
+
CollectionsSummaryFilter["WeeklyVolumeMargin"] = "WeeklyVolumeMargin";
|
|
115
|
+
CollectionsSummaryFilter["DailyVolumeEgldMargin"] = "DailyVolumeEgldMargin";
|
|
116
|
+
CollectionsSummaryFilter["CollectionAthTrade"] = "CollectionAthTrade";
|
|
117
|
+
})(CollectionsSummaryFilter || (exports.CollectionsSummaryFilter = CollectionsSummaryFilter = {}));
|
|
86
118
|
//# sourceMappingURL=collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":";;;AAyFA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,2BAAY,CAAA;IACZ,6BAAc,CAAA;IACd,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAmBD,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACxB,+CAA6B,CAAA;IAC7B,oDAAkC,CAAA;IAClC,sDAAoC,CAAA;IACpC,+BAAa,CAAA;IACb,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,2DAAyC,CAAA;IACzC,+CAA6B,CAAA;IAC7B,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACf,CAAC,EAjBW,cAAc,8BAAd,cAAc,QAiBzB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":";;;AAyFA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,2BAAY,CAAA;IACZ,6BAAc,CAAA;IACd,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAmBD,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACxB,+CAA6B,CAAA;IAC7B,oDAAkC,CAAA;IAClC,sDAAoC,CAAA;IACpC,+BAAa,CAAA;IACb,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,2DAAyC,CAAA;IACzC,+CAA6B,CAAA;IAC7B,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACf,CAAC,EAjBW,cAAc,8BAAd,cAAc,QAiBzB;AAED,IAAY,aAeX;AAfD,WAAY,aAAa;IACvB,6DAA4C,CAAA;IAC5C,4DAA2C,CAAA;IAC3C,gEAA+C,CAAA;IAC/C,+DAA8C,CAAA;IAC9C,oEAAmD,CAAA;IACnD,mEAAkD,CAAA;IAClD,8DAA6C,CAAA;IAC7C,6DAA4C,CAAA;IAC5C,8CAA6B,CAAA;IAC7B,6CAA4B,CAAA;IAC5B,yDAAwC,CAAA;IACxC,wDAAuC,CAAA;IACvC,sDAAqC,CAAA;IACrC,qDAAoC,CAAA;AACtC,CAAC,EAfW,aAAa,6BA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wB;IAClC,uDAA2B,CAAA;IAC3B,uDAA2B,CAAA;IAC3B,uDAA2B,CAAA;IAC3B,+DAAmC,CAAA;IACnC,uDAA2B,CAAA;IAC3B,+DAAmC,CAAA;IACnC,qDAAyB,CAAA;IACzB,6DAAiC,CAAA;IACjC,qDAAyB,CAAA;IACzB,6DAAiC,CAAA;IACjC,qEAAyC,CAAA;IACzC,mEAAuC,CAAA;IACvC,qEAAyC,CAAA;IACzC,2EAA+C,CAAA;IAC/C,qEAAyC,CAAA;AAC3C,CAAC,EAhBW,wBAAwB,wCAAxB,wBAAwB,QAgBnC"}
|
package/dist/types/user.d.ts
CHANGED
|
@@ -52,21 +52,6 @@ export interface UserInventory {
|
|
|
52
52
|
banner: string;
|
|
53
53
|
value: number;
|
|
54
54
|
}
|
|
55
|
-
export interface GroupedByCollection {
|
|
56
|
-
name: string;
|
|
57
|
-
type: string;
|
|
58
|
-
image: string;
|
|
59
|
-
ticker: string;
|
|
60
|
-
isVerified: boolean;
|
|
61
|
-
isVisible: boolean;
|
|
62
|
-
nftsCount: number;
|
|
63
|
-
nfts: NftData[];
|
|
64
|
-
bids: NftData[];
|
|
65
|
-
floorWorth: number;
|
|
66
|
-
maxWorth: number;
|
|
67
|
-
floorPrice: number;
|
|
68
|
-
totalWorth: number;
|
|
69
|
-
}
|
|
70
55
|
export interface UserOffers {
|
|
71
56
|
hasMoreResults: boolean;
|
|
72
57
|
resources: OfferBody[];
|
|
@@ -149,3 +134,51 @@ export type UnClaimedReward = {
|
|
|
149
134
|
reward_token_nonce: string;
|
|
150
135
|
amount: number;
|
|
151
136
|
};
|
|
137
|
+
export type UserAccountInfo = {
|
|
138
|
+
address: string;
|
|
139
|
+
nonce: number;
|
|
140
|
+
totalEsdtUsd: number;
|
|
141
|
+
totalStables: number;
|
|
142
|
+
totalEgldStables: number;
|
|
143
|
+
totalEgldEsdt: number;
|
|
144
|
+
totalUsdBalance: number;
|
|
145
|
+
totalEGLDBalance: number;
|
|
146
|
+
balance: string;
|
|
147
|
+
balanceShort: number;
|
|
148
|
+
balanceUsd: number;
|
|
149
|
+
balanceWalletWeight: number;
|
|
150
|
+
stablesWalletWeight: number;
|
|
151
|
+
esdtWalletWeight: number;
|
|
152
|
+
username?: string;
|
|
153
|
+
ownerAddress?: string;
|
|
154
|
+
esdtTokens: EsdtToken[];
|
|
155
|
+
shard: number;
|
|
156
|
+
guarded: boolean;
|
|
157
|
+
activeGuardian: ActiveGuardian;
|
|
158
|
+
isUpgradeable: boolean;
|
|
159
|
+
isReadable: boolean;
|
|
160
|
+
isPayable: boolean;
|
|
161
|
+
isPayableBySmartContract: boolean;
|
|
162
|
+
};
|
|
163
|
+
export type ActiveGuardian = {
|
|
164
|
+
activationEpoch: number;
|
|
165
|
+
address: string;
|
|
166
|
+
serviceUID: string;
|
|
167
|
+
};
|
|
168
|
+
export type EsdtToken = {
|
|
169
|
+
nonce: number;
|
|
170
|
+
identifier: string;
|
|
171
|
+
decimals: number;
|
|
172
|
+
balance: string;
|
|
173
|
+
ticker: string;
|
|
174
|
+
name: string;
|
|
175
|
+
shortBalance: number;
|
|
176
|
+
assets: Assets;
|
|
177
|
+
isAshSupported?: boolean;
|
|
178
|
+
usdValue: number;
|
|
179
|
+
walletWeight: number;
|
|
180
|
+
};
|
|
181
|
+
export type Assets = {
|
|
182
|
+
pngUrl: string;
|
|
183
|
+
svgUrl: string;
|
|
184
|
+
};
|
package/dist/types/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/types/user.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/types/user.ts"],"names":[],"mappings":";;;AAyFA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA2CD,IAAY,IAEX;AAFD,WAAY,IAAI;IACd,2CAAmC,CAAA;AACrC,CAAC,EAFW,IAAI,oBAAJ,IAAI,QAEf"}
|
package/dist/users/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GetNFTsArgs, SearchNFTsResponse, TradincActivityArgs, TradingActivityResponse } from '../types';
|
|
2
|
-
import { ArgsUserOffers, IUserProfile, UserInventory, UserOffers, UserStakingInfo } from '../types/user';
|
|
2
|
+
import { ArgsUserOffers, IUserProfile, UserAccountInfo, UserInventory, UserOffers, UserStakingInfo } from '../types/user';
|
|
3
3
|
export default class UserModule {
|
|
4
4
|
private api;
|
|
5
5
|
private collection;
|
|
@@ -11,6 +11,13 @@ export default class UserModule {
|
|
|
11
11
|
* @returns {IUserProfile}
|
|
12
12
|
*/
|
|
13
13
|
getUserProfile: (address: string) => Promise<IUserProfile>;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the user account info that inclues nonce, guardian data, esdtTokens
|
|
16
|
+
*
|
|
17
|
+
* @param {String} address - Address of the user
|
|
18
|
+
* @returns {UserAccountInfo}
|
|
19
|
+
*/
|
|
20
|
+
getUserAccount: (address: string) => Promise<UserAccountInfo>;
|
|
14
21
|
/**
|
|
15
22
|
* Gets user's inventory
|
|
16
23
|
*
|
package/dist/users/index.js
CHANGED
|
@@ -30,6 +30,18 @@ class UserModule {
|
|
|
30
30
|
const response = yield this.api.fetchWithTimeout(`/getUserProfile/${address}`);
|
|
31
31
|
return response;
|
|
32
32
|
});
|
|
33
|
+
/**
|
|
34
|
+
* Returns the user account info that inclues nonce, guardian data, esdtTokens
|
|
35
|
+
*
|
|
36
|
+
* @param {String} address - Address of the user
|
|
37
|
+
* @returns {UserAccountInfo}
|
|
38
|
+
*/
|
|
39
|
+
this.getUserAccount = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
41
|
+
throw new Error('Invalid address');
|
|
42
|
+
const response = yield this.api.fetchWithTimeout(`/accounts/${address}`);
|
|
43
|
+
return response;
|
|
44
|
+
});
|
|
33
45
|
/**
|
|
34
46
|
* Gets user's inventory
|
|
35
47
|
*
|
package/dist/users/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6C;AAe7C,uDAAuC;AACvC,sDAAmD;AACnD,8CAAkD;AAElD,MAAqB,UAAU;IAG7B;QAKA;;;;;WAKG;QACI,mBAAc,GAAG,CAAO,OAAe,EAAyB,EAAE;YACvE,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,mBAAmB,OAAO,EAAE,CAC7B,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACI,mBAAc,GAAG,CAAO,OAAe,EAA4B,EAAE;YAC1E,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,aAAa,OAAO,EAAE,CACvB,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QAEI,4BAAuB,GAAG,CAC/B,OAAe,EACW,EAAE;YAC5B,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,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