@xoxno/sdk-js 0.0.18-alpha → 0.0.20-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 +108 -10
- package/dist/collection/index.js +181 -10
- package/dist/collection/index.js.map +1 -1
- package/dist/interactions/index.d.ts +65 -4
- package/dist/interactions/index.js +190 -1
- package/dist/interactions/index.js.map +1 -1
- package/dist/nft/index.d.ts +12 -3
- package/dist/nft/index.js +12 -3
- package/dist/nft/index.js.map +1 -1
- package/dist/types/collection.d.ts +131 -23
- package/dist/types/collection.js +9 -1
- package/dist/types/collection.js.map +1 -1
- package/dist/types/interactions.d.ts +32 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionsNFTsResponse, GetCollectionsArgs, ICollectionAttributes, ICollectionProfile,
|
|
1
|
+
import { CollectionsNFTsResponse, GetCollectionsArgs, ICollectionAttributes, ICollectionProfile, GetCollectionNFTsArgs, SearchNFTsResponse, SuggestNFTsArgs, SuggestResults, CollectionVolume, FloorPriceHistory, CollectionHoldersInfo } from '../types/collection';
|
|
2
2
|
import { TradincActivityArgs, TradingActivityResponse } from '../types/trading';
|
|
3
3
|
/**
|
|
4
4
|
* CollectionModule provides a set of methods to interact with NFT collections.
|
|
@@ -12,10 +12,18 @@ export default class CollectionModule {
|
|
|
12
12
|
private api;
|
|
13
13
|
constructor();
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
15
|
+
* @public
|
|
16
|
+
* @async
|
|
17
|
+
* @function getCollectionProfile
|
|
18
|
+
* @param {string} collection - The ticker of the collection to fetch the profile for.
|
|
19
|
+
* @returns {Promise<ICollectionProfile>} A promise that resolves to the fetched collection profile.
|
|
20
|
+
*
|
|
21
|
+
* This function fetches the profile of a given collection. It takes the following parameter:
|
|
22
|
+
* - collection (string): The ticker of the collection to fetch the profile for.
|
|
23
|
+
*
|
|
24
|
+
* The function first validates the input ticker and checks if it is a valid collection ticker.
|
|
25
|
+
* If it is valid, the function fetches the collection profile using the API.
|
|
26
|
+
* Finally, it returns a promise that resolves to the fetched collection profile.
|
|
19
27
|
*/
|
|
20
28
|
getCollectionProfile: (collection: string) => Promise<ICollectionProfile>;
|
|
21
29
|
/**
|
|
@@ -27,10 +35,18 @@ export default class CollectionModule {
|
|
|
27
35
|
*/
|
|
28
36
|
getCollectionFloorPrice: (collection: string, token?: string) => Promise<number>;
|
|
29
37
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
33
|
-
* @
|
|
38
|
+
* @public
|
|
39
|
+
* @async
|
|
40
|
+
* @function getCollectionAttributes
|
|
41
|
+
* @param {string} collection - The ticker of the collection to fetch the attributes for.
|
|
42
|
+
* @returns {Promise<ICollectionAttributes>} A promise that resolves to the fetched collection attributes.
|
|
43
|
+
*
|
|
44
|
+
* This function fetches the attributes of a given collection. It takes the following parameter:
|
|
45
|
+
* - collection (string): The ticker of the collection to fetch the attributes for.
|
|
46
|
+
*
|
|
47
|
+
* The function first validates the input ticker and checks if it is a valid collection ticker.
|
|
48
|
+
* If it is valid, the function fetches the collection attributes using the API.
|
|
49
|
+
* Finally, it returns a promise that resolves to the fetched collection attributes.
|
|
34
50
|
*/
|
|
35
51
|
getCollectionAttributes: (collection: string) => Promise<ICollectionAttributes>;
|
|
36
52
|
/**
|
|
@@ -39,7 +55,32 @@ export default class CollectionModule {
|
|
|
39
55
|
* @returns {Promise<SearchNFTsResponse>} A Promise that resolves to the SearchNFTsResponse object.
|
|
40
56
|
* @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 35.
|
|
41
57
|
*/
|
|
42
|
-
|
|
58
|
+
getCollectionNFTs: (args: GetCollectionNFTsArgs) => Promise<SearchNFTsResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Searches for Global NFTs or in specific collections based on the provided arguments.
|
|
61
|
+
* @param {ExploreNFTsArgs} args - The SearchNFTsArgs object containing the search parameters.
|
|
62
|
+
* @returns {Promise<SearchNFTsResponse>} A Promise that resolves to the SearchNFTsResponse object.
|
|
63
|
+
* @throws An error if the 'top' value is greater than 35.
|
|
64
|
+
*/
|
|
65
|
+
getGlobalNFTs: (args: GetCollectionNFTsArgs) => Promise<SearchNFTsResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
* @async
|
|
69
|
+
* @function suggestResults
|
|
70
|
+
* @param {SuggestNFTsArgs} args - An object containing the necessary parameters to fetch suggested NFT results.
|
|
71
|
+
* @returns {Promise<SuggestResults>} A promise that resolves to the fetched NFT results.
|
|
72
|
+
*
|
|
73
|
+
* This function fetches suggested NFT results based on the provided arguments. It takes an object with the following properties:
|
|
74
|
+
* - name (string): The name to search for (required).
|
|
75
|
+
* - orderBy (SuggestOrderBy[], optional): An array of ordering preferences for the results.
|
|
76
|
+
* - top (number, optional): The maximum number of results to return (default is 35, cannot be greater than 35).
|
|
77
|
+
* - skip (number, optional): The number of results to skip (default is 0).
|
|
78
|
+
*
|
|
79
|
+
* The function first validates the input arguments and constructs a payload body with the provided parameters.
|
|
80
|
+
* Then, it converts the payload body into a base64 string and fetches the suggested results using the API.
|
|
81
|
+
* Finally, it returns a promise that resolves to the fetched NFT results.
|
|
82
|
+
*/
|
|
83
|
+
suggestResults: (args: SuggestNFTsArgs) => Promise<SuggestResults>;
|
|
43
84
|
/**
|
|
44
85
|
* Retrieves trading history based on the provided arguments.
|
|
45
86
|
*
|
|
@@ -55,4 +96,61 @@ export default class CollectionModule {
|
|
|
55
96
|
* @throws An error if the 'top' value is greater than 35.
|
|
56
97
|
*/
|
|
57
98
|
getCollections: (args?: GetCollectionsArgs) => Promise<CollectionsNFTsResponse>;
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
* @async
|
|
102
|
+
* @function getCollectionVolume
|
|
103
|
+
* @param {string} collection - The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
104
|
+
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
105
|
+
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
106
|
+
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
107
|
+
* @returns {Promise<CollectionVolume[]>} A promise that resolves to an array of collection volume data.
|
|
108
|
+
*
|
|
109
|
+
* This function fetches volume data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
110
|
+
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
111
|
+
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
112
|
+
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
113
|
+
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
114
|
+
*
|
|
115
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
116
|
+
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
117
|
+
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
118
|
+
*/
|
|
119
|
+
getCollectionVolume: (collection: string, after: string, before: string, bin: string) => Promise<CollectionVolume[]>;
|
|
120
|
+
/**
|
|
121
|
+
* @public
|
|
122
|
+
* @async
|
|
123
|
+
* @function getCollectionFloor
|
|
124
|
+
* @param {string} collection - The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
125
|
+
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
126
|
+
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
127
|
+
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
128
|
+
* @returns {Promise<FloorPriceHistory[]>} A promise that resolves to an array of floor price history data.
|
|
129
|
+
*
|
|
130
|
+
* This function fetches floor data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
131
|
+
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
132
|
+
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
133
|
+
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
134
|
+
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
135
|
+
*
|
|
136
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
137
|
+
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
138
|
+
* Finally, it returns a promise that resolves to an array of floor price history data.
|
|
139
|
+
*/
|
|
140
|
+
getCollectionFloor: (collection: string, after: string, before: string, bin: string) => Promise<FloorPriceHistory[]>;
|
|
141
|
+
/**
|
|
142
|
+
* @public
|
|
143
|
+
* @async
|
|
144
|
+
* @function getCollectionOwners
|
|
145
|
+
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
146
|
+
* @returns {Promise<CollectionHoldersInfo[]>} A promise that resolves to an array of collection owner information.
|
|
147
|
+
*
|
|
148
|
+
* This function fetches owner information for a given collection. It takes the following parameter:
|
|
149
|
+
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
150
|
+
*
|
|
151
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
152
|
+
* If it is valid, the function fetches the collection owner information using the API.
|
|
153
|
+
* Finally, it returns a promise that resolves to an array of collection owner information.
|
|
154
|
+
*/
|
|
155
|
+
getCollectionOwners: (collection: string) => Promise<CollectionHoldersInfo>;
|
|
58
156
|
}
|
package/dist/collection/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const collection_1 = require("../types/collection");
|
|
15
16
|
const api_1 = __importDefault(require("../utils/api"));
|
|
16
17
|
const getActivity_1 = require("../utils/getActivity");
|
|
17
18
|
const regex_1 = require("../utils/regex");
|
|
@@ -26,10 +27,18 @@ const regex_1 = require("../utils/regex");
|
|
|
26
27
|
class CollectionModule {
|
|
27
28
|
constructor() {
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
30
|
+
* @public
|
|
31
|
+
* @async
|
|
32
|
+
* @function getCollectionProfile
|
|
33
|
+
* @param {string} collection - The ticker of the collection to fetch the profile for.
|
|
34
|
+
* @returns {Promise<ICollectionProfile>} A promise that resolves to the fetched collection profile.
|
|
35
|
+
*
|
|
36
|
+
* This function fetches the profile of a given collection. It takes the following parameter:
|
|
37
|
+
* - collection (string): The ticker of the collection to fetch the profile for.
|
|
38
|
+
*
|
|
39
|
+
* The function first validates the input ticker and checks if it is a valid collection ticker.
|
|
40
|
+
* If it is valid, the function fetches the collection profile using the API.
|
|
41
|
+
* Finally, it returns a promise that resolves to the fetched collection profile.
|
|
33
42
|
*/
|
|
34
43
|
this.getCollectionProfile = (collection) => __awaiter(this, void 0, void 0, function* () {
|
|
35
44
|
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
@@ -53,10 +62,18 @@ class CollectionModule {
|
|
|
53
62
|
return response;
|
|
54
63
|
});
|
|
55
64
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @
|
|
58
|
-
* @
|
|
59
|
-
* @
|
|
65
|
+
* @public
|
|
66
|
+
* @async
|
|
67
|
+
* @function getCollectionAttributes
|
|
68
|
+
* @param {string} collection - The ticker of the collection to fetch the attributes for.
|
|
69
|
+
* @returns {Promise<ICollectionAttributes>} A promise that resolves to the fetched collection attributes.
|
|
70
|
+
*
|
|
71
|
+
* This function fetches the attributes of a given collection. It takes the following parameter:
|
|
72
|
+
* - collection (string): The ticker of the collection to fetch the attributes for.
|
|
73
|
+
*
|
|
74
|
+
* The function first validates the input ticker and checks if it is a valid collection ticker.
|
|
75
|
+
* If it is valid, the function fetches the collection attributes using the API.
|
|
76
|
+
* Finally, it returns a promise that resolves to the fetched collection attributes.
|
|
60
77
|
*/
|
|
61
78
|
this.getCollectionAttributes = (collection) => __awaiter(this, void 0, void 0, function* () {
|
|
62
79
|
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
@@ -71,9 +88,9 @@ class CollectionModule {
|
|
|
71
88
|
* @returns {Promise<SearchNFTsResponse>} A Promise that resolves to the SearchNFTsResponse object.
|
|
72
89
|
* @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 35.
|
|
73
90
|
*/
|
|
74
|
-
this.
|
|
91
|
+
this.getCollectionNFTs = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
75
92
|
var _a, _b, _c, _d;
|
|
76
|
-
if (!(0, regex_1.isValidCollectionTicker)(args.collection)) {
|
|
93
|
+
if (args.collection && !(0, regex_1.isValidCollectionTicker)(args.collection)) {
|
|
77
94
|
throw new Error('Invalid collection ticker: ' + args.collection);
|
|
78
95
|
}
|
|
79
96
|
if (args.top && args.top > 35) {
|
|
@@ -108,6 +125,85 @@ class CollectionModule {
|
|
|
108
125
|
const response = yield this.api.fetchWithTimeout(`/searchNFTs/${buffer}`);
|
|
109
126
|
return Object.assign(Object.assign({}, response), { getNextPagePayload: Object.assign(Object.assign({}, args), { skip: ((_a = args.skip) !== null && _a !== void 0 ? _a : 0) + ((_b = args.top) !== null && _b !== void 0 ? _b : 35) }), hasMoreResults: response.resultsCount > ((_c = args.skip) !== null && _c !== void 0 ? _c : 0) + ((_d = args.top) !== null && _d !== void 0 ? _d : 35) });
|
|
110
127
|
});
|
|
128
|
+
/**
|
|
129
|
+
* Searches for Global NFTs or in specific collections based on the provided arguments.
|
|
130
|
+
* @param {ExploreNFTsArgs} args - The SearchNFTsArgs object containing the search parameters.
|
|
131
|
+
* @returns {Promise<SearchNFTsResponse>} A Promise that resolves to the SearchNFTsResponse object.
|
|
132
|
+
* @throws An error if the 'top' value is greater than 35.
|
|
133
|
+
*/
|
|
134
|
+
this.getGlobalNFTs = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
var _e, _f, _g, _h;
|
|
136
|
+
if (args.top && args.top > 35) {
|
|
137
|
+
throw new Error('Top cannot be greater than 35');
|
|
138
|
+
}
|
|
139
|
+
const payloadBody = {
|
|
140
|
+
curated: args.onlyVerified || true,
|
|
141
|
+
filters: {
|
|
142
|
+
onSale: args.onlyOnSale || false,
|
|
143
|
+
marketplace: args.listedOnlyOn || undefined,
|
|
144
|
+
auctionTypes: args.onlyOnSale
|
|
145
|
+
? args.onlyAuctions
|
|
146
|
+
? ['NftBid', 'SftAll']
|
|
147
|
+
: ['Nft', 'SftOnePerPayment']
|
|
148
|
+
: undefined,
|
|
149
|
+
tokens: args.listedInToken || undefined,
|
|
150
|
+
attributes: args.attributes || undefined,
|
|
151
|
+
range: args.priceRange
|
|
152
|
+
? Object.assign(Object.assign({}, args.priceRange), { type: args.onlyAuctions
|
|
153
|
+
? 'saleInfoNft/current_bid_short'
|
|
154
|
+
: 'saleInfoNft/min_bid_short' }) : undefined,
|
|
155
|
+
rankRange: args.rankRange || undefined,
|
|
156
|
+
},
|
|
157
|
+
search: args.extraSearch || [],
|
|
158
|
+
name: args.searchName || '',
|
|
159
|
+
orderBy: args.orderBy || undefined,
|
|
160
|
+
collections: args.collections || [],
|
|
161
|
+
select: args.onlySelectFields || undefined,
|
|
162
|
+
top: args.top || 35,
|
|
163
|
+
skip: args.skip || 0,
|
|
164
|
+
};
|
|
165
|
+
const buffer = Buffer.from(JSON.stringify(payloadBody)).toString('base64');
|
|
166
|
+
const response = yield this.api.fetchWithTimeout(`/exploreNFTs/${buffer}`);
|
|
167
|
+
return Object.assign(Object.assign({}, response), { getNextPagePayload: Object.assign(Object.assign({}, args), { skip: ((_e = args.skip) !== null && _e !== void 0 ? _e : 0) + ((_f = args.top) !== null && _f !== void 0 ? _f : 35) }), hasMoreResults: response.resultsCount > ((_g = args.skip) !== null && _g !== void 0 ? _g : 0) + ((_h = args.top) !== null && _h !== void 0 ? _h : 35) });
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* @public
|
|
171
|
+
* @async
|
|
172
|
+
* @function suggestResults
|
|
173
|
+
* @param {SuggestNFTsArgs} args - An object containing the necessary parameters to fetch suggested NFT results.
|
|
174
|
+
* @returns {Promise<SuggestResults>} A promise that resolves to the fetched NFT results.
|
|
175
|
+
*
|
|
176
|
+
* This function fetches suggested NFT results based on the provided arguments. It takes an object with the following properties:
|
|
177
|
+
* - name (string): The name to search for (required).
|
|
178
|
+
* - orderBy (SuggestOrderBy[], optional): An array of ordering preferences for the results.
|
|
179
|
+
* - top (number, optional): The maximum number of results to return (default is 35, cannot be greater than 35).
|
|
180
|
+
* - skip (number, optional): The number of results to skip (default is 0).
|
|
181
|
+
*
|
|
182
|
+
* The function first validates the input arguments and constructs a payload body with the provided parameters.
|
|
183
|
+
* Then, it converts the payload body into a base64 string and fetches the suggested results using the API.
|
|
184
|
+
* Finally, it returns a promise that resolves to the fetched NFT results.
|
|
185
|
+
*/
|
|
186
|
+
this.suggestResults = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
if (args.top && args.top > 35) {
|
|
188
|
+
throw new Error('Top cannot be greater than 35');
|
|
189
|
+
}
|
|
190
|
+
if (!args.name) {
|
|
191
|
+
throw new Error('Name is required');
|
|
192
|
+
}
|
|
193
|
+
const payloadBody = {
|
|
194
|
+
name: args.name,
|
|
195
|
+
orderBy: args.orderBy || [
|
|
196
|
+
collection_1.SuggestOrderBy.TotalVolumeHighToLow,
|
|
197
|
+
collection_1.SuggestOrderBy.FollowersHighToLow,
|
|
198
|
+
collection_1.SuggestOrderBy.IsVerifiedTrueToFalse,
|
|
199
|
+
collection_1.SuggestOrderBy.HasImageTrueToFalse,
|
|
200
|
+
],
|
|
201
|
+
top: args.top || 35,
|
|
202
|
+
skip: args.skip || 0,
|
|
203
|
+
};
|
|
204
|
+
const buffer = Buffer.from(JSON.stringify(payloadBody)).toString('base64');
|
|
205
|
+
return yield this.api.fetchWithTimeout(`/search/${buffer}`);
|
|
206
|
+
});
|
|
111
207
|
/**
|
|
112
208
|
* Retrieves trading history based on the provided arguments.
|
|
113
209
|
*
|
|
@@ -148,6 +244,81 @@ class CollectionModule {
|
|
|
148
244
|
hasMoreResults: response.length >= ((args === null || args === void 0 ? void 0 : args.top) || 25),
|
|
149
245
|
};
|
|
150
246
|
});
|
|
247
|
+
/**
|
|
248
|
+
* @public
|
|
249
|
+
* @async
|
|
250
|
+
* @function getCollectionVolume
|
|
251
|
+
* @param {string} collection - The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
252
|
+
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
253
|
+
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
254
|
+
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
255
|
+
* @returns {Promise<CollectionVolume[]>} A promise that resolves to an array of collection volume data.
|
|
256
|
+
*
|
|
257
|
+
* This function fetches volume data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
258
|
+
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
259
|
+
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
260
|
+
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
261
|
+
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
262
|
+
*
|
|
263
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
264
|
+
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
265
|
+
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
266
|
+
*/
|
|
267
|
+
this.getCollectionVolume = (collection, after, before, bin) => __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
269
|
+
throw new Error('Invalid collection ticker: ' + collection);
|
|
270
|
+
}
|
|
271
|
+
const response = yield this.api.fetchWithTimeout(`/getCollectionVolume/${collection}?after=${after}&before=${before}&bin=${bin}`);
|
|
272
|
+
return response;
|
|
273
|
+
});
|
|
274
|
+
/**
|
|
275
|
+
* @public
|
|
276
|
+
* @async
|
|
277
|
+
* @function getCollectionFloor
|
|
278
|
+
* @param {string} collection - The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
279
|
+
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
280
|
+
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
281
|
+
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
282
|
+
* @returns {Promise<FloorPriceHistory[]>} A promise that resolves to an array of floor price history data.
|
|
283
|
+
*
|
|
284
|
+
* This function fetches floor data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
285
|
+
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
286
|
+
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
287
|
+
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
288
|
+
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
289
|
+
*
|
|
290
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
291
|
+
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
292
|
+
* Finally, it returns a promise that resolves to an array of floor price history data.
|
|
293
|
+
*/
|
|
294
|
+
this.getCollectionFloor = (collection, after, before, bin) => __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
296
|
+
throw new Error('Invalid collection ticker: ' + collection);
|
|
297
|
+
}
|
|
298
|
+
const response = yield this.api.fetchWithTimeout(`/getCollectionFloor/${collection}?after=${after}&before=${before}&bin=${bin}`);
|
|
299
|
+
return response;
|
|
300
|
+
});
|
|
301
|
+
/**
|
|
302
|
+
* @public
|
|
303
|
+
* @async
|
|
304
|
+
* @function getCollectionOwners
|
|
305
|
+
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
306
|
+
* @returns {Promise<CollectionHoldersInfo[]>} A promise that resolves to an array of collection owner information.
|
|
307
|
+
*
|
|
308
|
+
* This function fetches owner information for a given collection. It takes the following parameter:
|
|
309
|
+
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
310
|
+
*
|
|
311
|
+
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
312
|
+
* If it is valid, the function fetches the collection owner information using the API.
|
|
313
|
+
* Finally, it returns a promise that resolves to an array of collection owner information.
|
|
314
|
+
*/
|
|
315
|
+
this.getCollectionOwners = (collection) => __awaiter(this, void 0, void 0, function* () {
|
|
316
|
+
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
317
|
+
throw new Error('Invalid collection ticker: ' + collection);
|
|
318
|
+
}
|
|
319
|
+
const response = yield this.api.fetchWithTimeout(`/getCollectionOwners/${collection}`);
|
|
320
|
+
return response;
|
|
321
|
+
});
|
|
151
322
|
this.api = api_1.default.init();
|
|
152
323
|
}
|
|
153
324
|
}
|
|
@@ -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":";;;;;;;;;;;;;;AAAA,oDAc6B;AAE7B,uDAAuC;AACvC,sDAAmD;AACnD,0CAAyD;AAEzD;;;;;;;GAOG;AACH,MAAqB,gBAAgB;IAEnC;QAIA;;;;;;;;;;;;;WAaG;QACI,yBAAoB,GAAG,CAC5B,UAAkB,EACW,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,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,wBAAwB,UAAU,EAAE,CACrC,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAtYA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAsYF;AA1YD,mCA0YC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Interaction } from '@multiversx/sdk-core/out/smartcontracts/interaction';
|
|
2
2
|
import { GlobalOffer } from '../types/collection';
|
|
3
|
-
import
|
|
4
|
-
import { Auction, ChangeListing } from '../types/interactions';
|
|
3
|
+
import { AcceptGlobalOffer, Auction, ChangeListing, NFTBody, NewListingArgs, Payment, SendCustomOffer, SendGlobalOffer } from '../types/interactions';
|
|
5
4
|
export default class SCInteraction {
|
|
6
5
|
private xo;
|
|
7
6
|
private call;
|
|
8
7
|
private api;
|
|
9
|
-
constructor(
|
|
10
|
-
static
|
|
8
|
+
private constructor();
|
|
9
|
+
static init(): Promise<SCInteraction>;
|
|
11
10
|
private getResult;
|
|
12
11
|
/**
|
|
13
12
|
* Gets the percentage of each transaction that will be paid to the marketplace.
|
|
@@ -101,6 +100,35 @@ export default class SCInteraction {
|
|
|
101
100
|
* @returns {Interaction} The interaction object of the smart contract
|
|
102
101
|
*/
|
|
103
102
|
withdrawGlobalOffer(offerID: number): Interaction;
|
|
103
|
+
/**
|
|
104
|
+
* Accept a global offer
|
|
105
|
+
*
|
|
106
|
+
* @param offerID The offer ID
|
|
107
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
108
|
+
*/
|
|
109
|
+
acceptGlobalOffer({ signature, offer_id, auction_id_opt, nft, }: AcceptGlobalOffer): Interaction;
|
|
110
|
+
/**
|
|
111
|
+
* Send a global offer
|
|
112
|
+
* @param payment_token The token used for payment
|
|
113
|
+
* @param payment_nonce The nonce of the payment token
|
|
114
|
+
* @param price The price of the offer
|
|
115
|
+
* @param collection The collection of the NFT
|
|
116
|
+
* @param attributes The attributes of the NFT
|
|
117
|
+
* @param depositAmount The deposit amount
|
|
118
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
119
|
+
* */
|
|
120
|
+
sendGlobalOffer({ payment_token, payment_nonce, price, collection, attributes, depositAmount, }: SendGlobalOffer): Interaction;
|
|
121
|
+
/**
|
|
122
|
+
* Send a custom offer
|
|
123
|
+
* @param payment_token The token used for payment
|
|
124
|
+
* @param payment_nonce The nonce of the payment token
|
|
125
|
+
* @param price The price of the offer
|
|
126
|
+
* @param deadline The deadline of the offer
|
|
127
|
+
* @param nft The NFT to be sold
|
|
128
|
+
* @param depositAmount The deposit amount
|
|
129
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
130
|
+
* */
|
|
131
|
+
sendCustomOffer({ payment_token, payment_nonce, price, deadline, nft, depositAmount, }: SendCustomOffer): Interaction;
|
|
104
132
|
/**
|
|
105
133
|
* Withdraws a custom offer
|
|
106
134
|
*
|
|
@@ -108,6 +136,20 @@ export default class SCInteraction {
|
|
|
108
136
|
* @returns {Interaction} The interaction object of the smart contract
|
|
109
137
|
*/
|
|
110
138
|
withdrawCustomOffer(offerID: number): Interaction;
|
|
139
|
+
/**
|
|
140
|
+
* Decline a custom offer
|
|
141
|
+
*
|
|
142
|
+
* @param offerID The offer ID
|
|
143
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
144
|
+
*/
|
|
145
|
+
declineCustomOffer(offerID: number, nft?: NFTBody): Interaction;
|
|
146
|
+
/**
|
|
147
|
+
* Accept a custom offer
|
|
148
|
+
*
|
|
149
|
+
* @param offerID The offer ID
|
|
150
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
151
|
+
*/
|
|
152
|
+
acceptCustomOffer(offerID: number, nft?: NFTBody): Interaction;
|
|
111
153
|
/**
|
|
112
154
|
* @public
|
|
113
155
|
* @function endAuction
|
|
@@ -121,6 +163,24 @@ export default class SCInteraction {
|
|
|
121
163
|
* Finally, it returns the resulting interaction with the specified chainID and gas limit.
|
|
122
164
|
*/
|
|
123
165
|
endAuction(auctionID: number): Interaction;
|
|
166
|
+
/**
|
|
167
|
+
* Bid on an auction
|
|
168
|
+
*
|
|
169
|
+
* @param auctionID The auction ID
|
|
170
|
+
* @param collection The NFT Collection
|
|
171
|
+
* @param nonce The NFT nonce
|
|
172
|
+
* @param payment The payment object
|
|
173
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
174
|
+
*/
|
|
175
|
+
bidOnAuctionId(auctionID: number, collection: string, nonce: number, payment: Payment): Interaction;
|
|
176
|
+
/**
|
|
177
|
+
* Bulk buy auctions
|
|
178
|
+
*
|
|
179
|
+
* @param auctionIDs The auction IDs
|
|
180
|
+
* @param payment The payment object
|
|
181
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
182
|
+
*/
|
|
183
|
+
bulkBuy(auctionIDs: number[], payment: Payment): Interaction;
|
|
124
184
|
/**
|
|
125
185
|
* @public
|
|
126
186
|
* @async
|
|
@@ -179,4 +239,5 @@ export default class SCInteraction {
|
|
|
179
239
|
* with the specified chainID and gas limit.
|
|
180
240
|
*/
|
|
181
241
|
changeListing(listings: ChangeListing[]): Promise<Interaction>;
|
|
242
|
+
listNFTs(listings: NewListingArgs[]): Promise<Interaction>;
|
|
182
243
|
}
|
|
@@ -23,6 +23,7 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
|
23
23
|
const struct_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/struct");
|
|
24
24
|
const tokenIdentifier_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/tokenIdentifier");
|
|
25
25
|
const fields_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/fields");
|
|
26
|
+
const boolean_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/boolean");
|
|
26
27
|
class SCInteraction {
|
|
27
28
|
constructor(marketAbiXOXNO) {
|
|
28
29
|
/**
|
|
@@ -123,7 +124,7 @@ class SCInteraction {
|
|
|
123
124
|
this.call = new scCalls_1.ContractQueryRunner();
|
|
124
125
|
this.api = api_1.default.init();
|
|
125
126
|
}
|
|
126
|
-
static
|
|
127
|
+
static init() {
|
|
127
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
129
|
const config = api_1.default.init().config;
|
|
129
130
|
const marketAbiXOXNO = yield SmartContractAbis_1.SmartContractAbis.getMarket();
|
|
@@ -266,6 +267,78 @@ class SCInteraction {
|
|
|
266
267
|
const interaction = this.xo.methods.withdrawGlobalOffer([offerID]);
|
|
267
268
|
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
268
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Accept a global offer
|
|
272
|
+
*
|
|
273
|
+
* @param offerID The offer ID
|
|
274
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
275
|
+
*/
|
|
276
|
+
acceptGlobalOffer({ signature, offer_id, auction_id_opt, nft, }) {
|
|
277
|
+
var _a;
|
|
278
|
+
const interaction = signature
|
|
279
|
+
? this.xo.methods.acceptGlobalOffer([offer_id, auction_id_opt, signature])
|
|
280
|
+
: this.xo.methods.acceptGlobalOffer([offer_id, auction_id_opt]);
|
|
281
|
+
if (nft) {
|
|
282
|
+
interaction.withSingleESDTNFTTransfer(tokenTransfer_1.TokenTransfer.semiFungible(nft.collection, nft.nonce, (_a = nft.amount) !== null && _a !== void 0 ? _a : 1));
|
|
283
|
+
}
|
|
284
|
+
return interaction.withChainID(this.api.chain).withGasLimit(30000000);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Send a global offer
|
|
288
|
+
* @param payment_token The token used for payment
|
|
289
|
+
* @param payment_nonce The nonce of the payment token
|
|
290
|
+
* @param price The price of the offer
|
|
291
|
+
* @param collection The collection of the NFT
|
|
292
|
+
* @param attributes The attributes of the NFT
|
|
293
|
+
* @param depositAmount The deposit amount
|
|
294
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
295
|
+
* */
|
|
296
|
+
sendGlobalOffer({ payment_token, payment_nonce, price, collection, attributes, depositAmount, }) {
|
|
297
|
+
const interaction = attributes
|
|
298
|
+
? this.xo.methods.sendGlobalOffer([
|
|
299
|
+
payment_token,
|
|
300
|
+
payment_nonce,
|
|
301
|
+
tokenTransfer_1.TokenTransfer.egldFromAmount(price).toString(),
|
|
302
|
+
collection,
|
|
303
|
+
attributes,
|
|
304
|
+
])
|
|
305
|
+
: this.xo.methods.sendGlobalOffer([
|
|
306
|
+
payment_token,
|
|
307
|
+
payment_nonce,
|
|
308
|
+
tokenTransfer_1.TokenTransfer.egldFromAmount(price).toString(),
|
|
309
|
+
collection,
|
|
310
|
+
]);
|
|
311
|
+
if (depositAmount) {
|
|
312
|
+
interaction.withValue(tokenTransfer_1.TokenTransfer.egldFromAmount(depositAmount));
|
|
313
|
+
}
|
|
314
|
+
return interaction.withChainID(this.api.chain).withGasLimit(30000000);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Send a custom offer
|
|
318
|
+
* @param payment_token The token used for payment
|
|
319
|
+
* @param payment_nonce The nonce of the payment token
|
|
320
|
+
* @param price The price of the offer
|
|
321
|
+
* @param deadline The deadline of the offer
|
|
322
|
+
* @param nft The NFT to be sold
|
|
323
|
+
* @param depositAmount The deposit amount
|
|
324
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
325
|
+
* */
|
|
326
|
+
sendCustomOffer({ payment_token, payment_nonce, price, deadline, nft, depositAmount, }) {
|
|
327
|
+
var _a;
|
|
328
|
+
const interaction = this.xo.methods.sendOffer([
|
|
329
|
+
payment_token,
|
|
330
|
+
payment_nonce,
|
|
331
|
+
tokenTransfer_1.TokenTransfer.egldFromAmount(price).toString(),
|
|
332
|
+
nft.collection,
|
|
333
|
+
nft.nonce,
|
|
334
|
+
(_a = nft.amount) !== null && _a !== void 0 ? _a : 1,
|
|
335
|
+
deadline,
|
|
336
|
+
]);
|
|
337
|
+
if (depositAmount) {
|
|
338
|
+
interaction.withValue(tokenTransfer_1.TokenTransfer.egldFromAmount(depositAmount));
|
|
339
|
+
}
|
|
340
|
+
return interaction.withChainID(this.api.chain).withGasLimit(30000000);
|
|
341
|
+
}
|
|
269
342
|
/**
|
|
270
343
|
* Withdraws a custom offer
|
|
271
344
|
*
|
|
@@ -276,6 +349,34 @@ class SCInteraction {
|
|
|
276
349
|
const interaction = this.xo.methods.withdrawOffer([offerID]);
|
|
277
350
|
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
278
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Decline a custom offer
|
|
354
|
+
*
|
|
355
|
+
* @param offerID The offer ID
|
|
356
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
357
|
+
*/
|
|
358
|
+
declineCustomOffer(offerID, nft) {
|
|
359
|
+
var _a;
|
|
360
|
+
const interaction = this.xo.methods.declineOffer([offerID]);
|
|
361
|
+
if (nft) {
|
|
362
|
+
interaction.withSingleESDTNFTTransfer(tokenTransfer_1.TokenTransfer.semiFungible(nft.collection, nft.nonce, (_a = nft.amount) !== null && _a !== void 0 ? _a : 1));
|
|
363
|
+
}
|
|
364
|
+
return interaction.withChainID(this.api.chain).withGasLimit(20000000);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Accept a custom offer
|
|
368
|
+
*
|
|
369
|
+
* @param offerID The offer ID
|
|
370
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
371
|
+
*/
|
|
372
|
+
acceptCustomOffer(offerID, nft) {
|
|
373
|
+
var _a;
|
|
374
|
+
const interaction = this.xo.methods.acceptOffer([offerID]);
|
|
375
|
+
if (nft) {
|
|
376
|
+
interaction.withSingleESDTNFTTransfer(tokenTransfer_1.TokenTransfer.semiFungible(nft.collection, nft.nonce, (_a = nft.amount) !== null && _a !== void 0 ? _a : 1));
|
|
377
|
+
}
|
|
378
|
+
return interaction.withChainID(this.api.chain).withGasLimit(30000000);
|
|
379
|
+
}
|
|
279
380
|
/**
|
|
280
381
|
* @public
|
|
281
382
|
* @function endAuction
|
|
@@ -292,6 +393,52 @@ class SCInteraction {
|
|
|
292
393
|
const interaction = this.xo.methods.endAuction([auctionID]);
|
|
293
394
|
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
294
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Bid on an auction
|
|
398
|
+
*
|
|
399
|
+
* @param auctionID The auction ID
|
|
400
|
+
* @param collection The NFT Collection
|
|
401
|
+
* @param nonce The NFT nonce
|
|
402
|
+
* @param payment The payment object
|
|
403
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
404
|
+
*/
|
|
405
|
+
bidOnAuctionId(auctionID, collection, nonce, payment) {
|
|
406
|
+
var _a;
|
|
407
|
+
const interaction = this.xo.methods.bid([auctionID, collection, nonce]);
|
|
408
|
+
if (!payment.amount) {
|
|
409
|
+
throw new Error('Payment amount is required');
|
|
410
|
+
}
|
|
411
|
+
if (payment.collection == 'EGLD' && payment.amount) {
|
|
412
|
+
interaction.withValue(tokenTransfer_1.TokenTransfer.egldFromAmount(payment.amount));
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
interaction.withSingleESDTTransfer(tokenTransfer_1.TokenTransfer.fungibleFromAmount(payment.collection, payment.amount, (_a = payment.decimals) !== null && _a !== void 0 ? _a : 18));
|
|
416
|
+
}
|
|
417
|
+
return interaction.withChainID(this.api.chain).withGasLimit(30000000);
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Bulk buy auctions
|
|
421
|
+
*
|
|
422
|
+
* @param auctionIDs The auction IDs
|
|
423
|
+
* @param payment The payment object
|
|
424
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
425
|
+
*/
|
|
426
|
+
bulkBuy(auctionIDs, payment) {
|
|
427
|
+
var _a;
|
|
428
|
+
const interaction = this.xo.methods.bid(auctionIDs);
|
|
429
|
+
if (!payment.amount) {
|
|
430
|
+
throw new Error('Payment amount is required');
|
|
431
|
+
}
|
|
432
|
+
if (payment.collection == 'EGLD' && payment.amount) {
|
|
433
|
+
interaction.withValue(tokenTransfer_1.TokenTransfer.egldFromAmount(payment.amount));
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
interaction.withSingleESDTTransfer(tokenTransfer_1.TokenTransfer.fungibleFromAmount(payment.collection, payment.amount, (_a = payment.decimals) !== null && _a !== void 0 ? _a : 18));
|
|
437
|
+
}
|
|
438
|
+
return interaction
|
|
439
|
+
.withChainID(this.api.chain)
|
|
440
|
+
.withGasLimit(Math.min(600000000, 20000000 + auctionIDs.length * 5000000));
|
|
441
|
+
}
|
|
295
442
|
/**
|
|
296
443
|
* @public
|
|
297
444
|
* @async
|
|
@@ -409,6 +556,48 @@ class SCInteraction {
|
|
|
409
556
|
.withGasLimit(Math.min(600000000, 8000000 + listings.length * 2000000));
|
|
410
557
|
});
|
|
411
558
|
}
|
|
559
|
+
listNFTs(listings) {
|
|
560
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
561
|
+
const fooType = new struct_1.StructType('BulkListing', [
|
|
562
|
+
new fields_1.FieldDefinition('min_bid', '', new numerical_1.BigUIntType()),
|
|
563
|
+
new fields_1.FieldDefinition('max_bid', '', new numerical_1.BigUIntType()),
|
|
564
|
+
new fields_1.FieldDefinition('deadline', '', new numerical_1.U64Type()),
|
|
565
|
+
new fields_1.FieldDefinition('accepted_payment_token', '', new tokenIdentifier_1.TokenIdentifierType()),
|
|
566
|
+
new fields_1.FieldDefinition('bid', '', new boolean_1.BooleanType()),
|
|
567
|
+
new fields_1.FieldDefinition('opt_sft_max_one_per_payment', '', new boolean_1.BooleanType()),
|
|
568
|
+
new fields_1.FieldDefinition('opt_start_time', '', new numerical_1.U64Type()),
|
|
569
|
+
new fields_1.FieldDefinition('collection', '', new tokenIdentifier_1.TokenIdentifierType()),
|
|
570
|
+
new fields_1.FieldDefinition('nonce', '', new numerical_1.U64Type()),
|
|
571
|
+
new fields_1.FieldDefinition('nft_amount', '', new numerical_1.BigUIntType()),
|
|
572
|
+
]);
|
|
573
|
+
const structs = [];
|
|
574
|
+
const tokens = [];
|
|
575
|
+
listings.forEach((listing) => {
|
|
576
|
+
var _a, _b, _c, _d, _e, _f;
|
|
577
|
+
const decimals = (_a = listing.accepted_payment_token_decimals) !== null && _a !== void 0 ? _a : 18;
|
|
578
|
+
const minBID = new bignumber_js_1.default(listing.min_bid).shiftedBy(decimals);
|
|
579
|
+
const maxBID = new bignumber_js_1.default((_b = listing.max_bid) !== null && _b !== void 0 ? _b : 0).shiftedBy(decimals);
|
|
580
|
+
tokens.push(tokenTransfer_1.TokenTransfer.semiFungible(listing.collection, listing.nonce, listing.nft_amount));
|
|
581
|
+
structs.push(new struct_1.Struct(fooType, [
|
|
582
|
+
new fields_1.Field(new numerical_1.BigUIntValue(minBID), 'min_bid'),
|
|
583
|
+
new fields_1.Field(new numerical_1.BigUIntValue(maxBID), 'max_bid'),
|
|
584
|
+
new fields_1.Field(new numerical_1.U64Value(new bignumber_js_1.default((_c = listing.deadline) !== null && _c !== void 0 ? _c : 0)), 'deadline'),
|
|
585
|
+
new fields_1.Field(new tokenIdentifier_1.TokenIdentifierValue((_d = listing.accepted_payment_token) !== null && _d !== void 0 ? _d : 'EGLD'), 'accepted_payment_token'),
|
|
586
|
+
new fields_1.Field(new boolean_1.BooleanValue((_e = listing.bid) !== null && _e !== void 0 ? _e : false), 'bid'),
|
|
587
|
+
new fields_1.Field(new boolean_1.BooleanValue((_f = listing.isSFTPack) !== null && _f !== void 0 ? _f : false), 'opt_sft_max_one_per_payment'),
|
|
588
|
+
new fields_1.Field(new numerical_1.U64Value(new bignumber_js_1.default(listing.opt_start_time ? listing.opt_start_time : 0)), 'opt_start_time'),
|
|
589
|
+
new fields_1.Field(new tokenIdentifier_1.TokenIdentifierValue(listing.collection), 'collection'),
|
|
590
|
+
new fields_1.Field(new numerical_1.U64Value(listing.nonce), 'nonce'),
|
|
591
|
+
new fields_1.Field(new numerical_1.BigUIntValue(new bignumber_js_1.default(listing.nft_amount)), 'nft_amount'),
|
|
592
|
+
]));
|
|
593
|
+
});
|
|
594
|
+
const interaction = this.xo.methods.listings(structs);
|
|
595
|
+
interaction.withMultiESDTNFTTransfer(tokens);
|
|
596
|
+
return interaction
|
|
597
|
+
.withChainID(this.api.chain)
|
|
598
|
+
.withGasLimit(Math.min(600000000, 8000000 + listings.length * 2000000));
|
|
599
|
+
});
|
|
600
|
+
}
|
|
412
601
|
}
|
|
413
602
|
exports.default = SCInteraction;
|
|
414
603
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,uDAAuC;AACvC,8CAAuD;AACvD,kEAA+D;AAC/D,wEAAiE;AAEjE,4FAKsE;AACtE,wDAA4E;AAC5E,0EAAuE;AACvE,gEAAqC;AACrC,sFAGmE;AACnE,wGAG4E;AAC5E,sFAGmE;AACnE,MAAqB,aAAa;IAIhC,YAAY,cAA6B;QAkBzC;;;;WAIG;QACI,uBAAkB,GAAG,GAA0B,EAAE;;YACtD,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,2BAA2B,EAAE,CAAC;YAClE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YACjD,OAAO,QAAQ,CAAC,MAAA,MAAM,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACI,6BAAwB,GAAG,GAA4B,EAAE;;YAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YACjD,OAAO,MAAA,MAAM,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC;QACtC,CAAC,CAAA,CAAC;QAEF;;;WAGG;QAEI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IAAI,sCAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;oBACrE,IAAI,cAAK,CAAC,IAAI,oBAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;oBAC/C,IAAI,cAAK,CACP,IAAI,wBAAY,CAAC,IAAI,sBAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,EACnD,YAAY,CACb;iBACF,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACtD,WAAW,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;YAC7C,OAAO,WAAW;iBACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;iBAC3B,YAAY,CACX,IAAI,CAAC,GAAG,CAAC,SAAW,EAAE,OAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,OAAS,CAAC,CAC/D,CAAC;QACN,CAAC;KAAA;CACF;AA3tBD,gCA2tBC"}
|
package/dist/nft/index.d.ts
CHANGED
|
@@ -11,9 +11,18 @@ export default class NFTModule {
|
|
|
11
11
|
private api;
|
|
12
12
|
constructor();
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
14
|
+
* @public
|
|
15
|
+
* @async
|
|
16
|
+
* @function getNFTByIdentifier
|
|
17
|
+
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
18
|
+
* @returns {Promise<NftData>} A promise that resolves to the fetched NFT data.
|
|
19
|
+
*
|
|
20
|
+
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
21
|
+
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
22
|
+
*
|
|
23
|
+
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
24
|
+
* If it is valid, the function fetches the NFT data using the API.
|
|
25
|
+
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
17
26
|
*/
|
|
18
27
|
getNFTByIdentifier: (identifier: string) => Promise<NftData>;
|
|
19
28
|
/**
|
package/dist/nft/index.js
CHANGED
|
@@ -26,9 +26,18 @@ const regex_1 = require("../utils/regex");
|
|
|
26
26
|
class NFTModule {
|
|
27
27
|
constructor() {
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @
|
|
31
|
-
* @
|
|
29
|
+
* @public
|
|
30
|
+
* @async
|
|
31
|
+
* @function getNFTByIdentifier
|
|
32
|
+
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
33
|
+
* @returns {Promise<NftData>} A promise that resolves to the fetched NFT data.
|
|
34
|
+
*
|
|
35
|
+
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
36
|
+
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
37
|
+
*
|
|
38
|
+
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
39
|
+
* If it is valid, the function fetches the NFT data using the API.
|
|
40
|
+
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
32
41
|
*/
|
|
33
42
|
this.getNFTByIdentifier = (identifier) => __awaiter(this, void 0, void 0, function* () {
|
|
34
43
|
if (!(0, regex_1.isValidNftIdentifier)(identifier)) {
|
package/dist/nft/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,uDAAuC;AACvC,sDAAmD;AACnD,8CAAgE;AAChE,0CAA+E;AAE/E;;;;;;GAMG;AAEH,MAAqB,SAAS;IAE5B;QAIA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,uDAAuC;AACvC,sDAAmD;AACnD,8CAAgE;AAChE,0CAA+E;AAE/E;;;;;;GAMG;AAEH,MAAqB,SAAS;IAE5B;QAIA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AE,CAC5C,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACI,uBAAkB,GAAG,CAC1B,IAAyB,EACS,EAAE;YACpC,OAAO,MAAM,IAAA,yBAAW,EAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC,CAAA,CAAC;QAtFA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAsFF;AA1FD,4BA0FC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NftData } from './nft';
|
|
2
|
+
import { IUserProfile } from './user';
|
|
2
3
|
export interface ISocials {
|
|
3
4
|
twitter: string;
|
|
4
5
|
instagram: string;
|
|
@@ -31,25 +32,9 @@ export interface ICollectionProfile {
|
|
|
31
32
|
profile: string;
|
|
32
33
|
banner: string;
|
|
33
34
|
statistics: {
|
|
34
|
-
tradeData:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
totalEgldVolume: number;
|
|
38
|
-
averageEgldPrice: number;
|
|
39
|
-
athEgldPrice: number;
|
|
40
|
-
athTxHash: string;
|
|
41
|
-
totalTrades: number;
|
|
42
|
-
};
|
|
43
|
-
mintData: {
|
|
44
|
-
totalMintEgldVolume: number;
|
|
45
|
-
weekMintEgldVolume: number;
|
|
46
|
-
dayMintEgldVolume: number;
|
|
47
|
-
};
|
|
48
|
-
other: {
|
|
49
|
-
nftCount: number;
|
|
50
|
-
followCount: number;
|
|
51
|
-
holdersCount?: number;
|
|
52
|
-
};
|
|
35
|
+
tradeData: TradeData;
|
|
36
|
+
mintData: MintStatistics;
|
|
37
|
+
other: OtherStatistics;
|
|
53
38
|
};
|
|
54
39
|
owner: string;
|
|
55
40
|
creator: string;
|
|
@@ -144,6 +129,13 @@ export declare enum SearchOrderBy {
|
|
|
144
129
|
RecentListed = "saleInfoNft/timestamp desc",
|
|
145
130
|
OldestListed = "saleInfoNft/timestamp asc"
|
|
146
131
|
}
|
|
132
|
+
export declare enum SuggestOrderBy {
|
|
133
|
+
TotalVolumeHighToLow = "statistics/tradeData/totalEgldVolume desc",
|
|
134
|
+
FollowersHighToLow = "statistics/other/followCount desc",
|
|
135
|
+
IsVerifiedTrueToFalse = "isVerified desc",
|
|
136
|
+
HasImageTrueToFalse = "profile desc",
|
|
137
|
+
HasBannerTrueToFalse = "banner desc"
|
|
138
|
+
}
|
|
147
139
|
export declare enum CollectionsOrderBy {
|
|
148
140
|
WeekVolumeHighToLow = "statistics.tradeData.weekEgldVolume desc",
|
|
149
141
|
WeekVolumeLowToHigh = "statistics.tradeData.weekEgldVolume asc",
|
|
@@ -202,15 +194,22 @@ export interface Filter {
|
|
|
202
194
|
export interface SearchNFTs {
|
|
203
195
|
filters: Filter;
|
|
204
196
|
name?: string;
|
|
197
|
+
collections?: string[];
|
|
198
|
+
curated?: boolean;
|
|
199
|
+
search?: string[];
|
|
205
200
|
orderBy?: SearchOrderBy[];
|
|
206
|
-
collection
|
|
201
|
+
collection?: string;
|
|
207
202
|
top: number;
|
|
208
203
|
skip: number;
|
|
209
204
|
select?: FieldsToSelect[];
|
|
210
205
|
}
|
|
211
|
-
export interface
|
|
206
|
+
export interface GetCollectionNFTsArgs {
|
|
212
207
|
/** The collection to search in */
|
|
213
|
-
collection
|
|
208
|
+
collection?: string;
|
|
209
|
+
/** If set, will return only NFTs from the specified collections */
|
|
210
|
+
collections?: string[];
|
|
211
|
+
/** If set, will return only NFTs from verified collections */
|
|
212
|
+
onlyVerified?: boolean;
|
|
214
213
|
/** If true, will return only NFTs that are on sale */
|
|
215
214
|
onlyOnSale?: boolean;
|
|
216
215
|
/** If true, will return only NFTs that are on auction */
|
|
@@ -232,6 +231,8 @@ export interface SearchNFTsArgs {
|
|
|
232
231
|
min: number;
|
|
233
232
|
max: number;
|
|
234
233
|
};
|
|
234
|
+
/** If set, will apply the extra manual filters on top of the main payload */
|
|
235
|
+
extraSearch?: string[];
|
|
235
236
|
/** If set, will return only NFTs with a name that contains the specified string */
|
|
236
237
|
searchName?: string;
|
|
237
238
|
/** The number of results to return */
|
|
@@ -247,6 +248,16 @@ export interface SearchNFTsArgs {
|
|
|
247
248
|
/** If set, will return only NFTs with the specified attributes */
|
|
248
249
|
attributes?: MetadataAttribute[];
|
|
249
250
|
}
|
|
251
|
+
export interface SuggestNFTsArgs {
|
|
252
|
+
/** If set, will return only collections or users with a name that contains the specified string */
|
|
253
|
+
name: string;
|
|
254
|
+
/** The number of results to return */
|
|
255
|
+
top?: number;
|
|
256
|
+
/** The order by to use */
|
|
257
|
+
skip?: number;
|
|
258
|
+
/** The order of the results based on a field */
|
|
259
|
+
orderBy?: SuggestOrderBy[];
|
|
260
|
+
}
|
|
250
261
|
export interface SearchNFTsResponse {
|
|
251
262
|
/** The total count of the results for the specific query */
|
|
252
263
|
count: number;
|
|
@@ -257,7 +268,7 @@ export interface SearchNFTsResponse {
|
|
|
257
268
|
/** If the results are empty */
|
|
258
269
|
empty: boolean;
|
|
259
270
|
/** The payload to use to get the next page */
|
|
260
|
-
getNextPagePayload:
|
|
271
|
+
getNextPagePayload: GetCollectionNFTsArgs;
|
|
261
272
|
/** If there are more results to fetch */
|
|
262
273
|
hasMoreResults: boolean;
|
|
263
274
|
}
|
|
@@ -311,3 +322,100 @@ export interface CollectionsNFTsResponse {
|
|
|
311
322
|
/** If there are more results to fetch */
|
|
312
323
|
hasMoreResults: boolean;
|
|
313
324
|
}
|
|
325
|
+
export interface SuggestResults {
|
|
326
|
+
count: number;
|
|
327
|
+
results: ResultsBody;
|
|
328
|
+
}
|
|
329
|
+
export interface ResultsBody {
|
|
330
|
+
collections: ICollectionProfile[];
|
|
331
|
+
users: IUserProfile[];
|
|
332
|
+
nft: NftData[];
|
|
333
|
+
}
|
|
334
|
+
export interface OtherStatistics {
|
|
335
|
+
nftCount: number;
|
|
336
|
+
followCount: number;
|
|
337
|
+
holdersCount?: number;
|
|
338
|
+
}
|
|
339
|
+
export interface TradeData {
|
|
340
|
+
dayEgldVolume: number;
|
|
341
|
+
weekEgldVolume: number;
|
|
342
|
+
totalEgldVolume: number;
|
|
343
|
+
averageEgldPrice: number;
|
|
344
|
+
athEgldPrice: number;
|
|
345
|
+
athTxHash: string;
|
|
346
|
+
totalTrades: number;
|
|
347
|
+
}
|
|
348
|
+
export interface MintStatistics {
|
|
349
|
+
totalMintEgldVolume: number;
|
|
350
|
+
weekMintEgldVolume: number;
|
|
351
|
+
dayMintEgldVolume: number;
|
|
352
|
+
}
|
|
353
|
+
export interface CollectionVolume {
|
|
354
|
+
Day: string;
|
|
355
|
+
FM_Trades: number;
|
|
356
|
+
FM_Volume: number;
|
|
357
|
+
KG_Trades: number;
|
|
358
|
+
KG_Volume: number;
|
|
359
|
+
Total_Trades: number;
|
|
360
|
+
Total_Volume: number;
|
|
361
|
+
XO_Trades: number;
|
|
362
|
+
XO_Volume: number;
|
|
363
|
+
}
|
|
364
|
+
export interface FloorPriceHistory {
|
|
365
|
+
Day: string;
|
|
366
|
+
FloorPrice: number;
|
|
367
|
+
AveragePrice: number;
|
|
368
|
+
}
|
|
369
|
+
export interface CollectionHoldersInfo {
|
|
370
|
+
totalSupply: number;
|
|
371
|
+
onMarketInfo: OnMarketInfo;
|
|
372
|
+
stakingInfo: StakingInfo;
|
|
373
|
+
otherHolders: OtherHolders;
|
|
374
|
+
hodlersInfo: HodlersInfo;
|
|
375
|
+
}
|
|
376
|
+
export interface HodlersInfo {
|
|
377
|
+
hodlCount: number;
|
|
378
|
+
hodlWeight: number;
|
|
379
|
+
uniqueHodlWeight: number;
|
|
380
|
+
uniqueHodlers: number;
|
|
381
|
+
avgPerHodler: number;
|
|
382
|
+
hodlersSummary: HodlersSummary;
|
|
383
|
+
hodlers: OtherSc[];
|
|
384
|
+
}
|
|
385
|
+
export interface OtherSc {
|
|
386
|
+
address: string;
|
|
387
|
+
count: number;
|
|
388
|
+
weight: number;
|
|
389
|
+
}
|
|
390
|
+
export interface HodlersSummary {
|
|
391
|
+
one: number;
|
|
392
|
+
twoToFive: number;
|
|
393
|
+
six20ToFour: number;
|
|
394
|
+
twenty5ToFifthy: number;
|
|
395
|
+
fifthy1ToHoundred: number;
|
|
396
|
+
overHoundred: number;
|
|
397
|
+
}
|
|
398
|
+
export interface OnMarketInfo {
|
|
399
|
+
tradingCount: number;
|
|
400
|
+
tradingWeight: number;
|
|
401
|
+
holders: OnMarketInfoHolders;
|
|
402
|
+
}
|
|
403
|
+
export interface OnMarketInfoHolders {
|
|
404
|
+
listedOnXO: OtherSc;
|
|
405
|
+
listedOnFM: OtherSc;
|
|
406
|
+
listedOnKG: OtherSc;
|
|
407
|
+
listedOnIG: OtherSc;
|
|
408
|
+
listedOnET: OtherSc;
|
|
409
|
+
lotteryFM: OtherSc;
|
|
410
|
+
}
|
|
411
|
+
export interface OtherHolders {
|
|
412
|
+
otherSC: OtherSc;
|
|
413
|
+
}
|
|
414
|
+
export interface StakingInfo {
|
|
415
|
+
stakingCount: number;
|
|
416
|
+
stakingWeight: number;
|
|
417
|
+
holders: StakingInfoHolders;
|
|
418
|
+
}
|
|
419
|
+
export interface StakingInfoHolders {
|
|
420
|
+
stakingOnXO: OtherSc;
|
|
421
|
+
}
|
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.SearchOrderBy = exports.FieldsToSelect = exports.Marketplace = void 0;
|
|
3
|
+
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"] = "XO";
|
|
@@ -38,6 +38,14 @@ var SearchOrderBy;
|
|
|
38
38
|
SearchOrderBy["RecentListed"] = "saleInfoNft/timestamp desc";
|
|
39
39
|
SearchOrderBy["OldestListed"] = "saleInfoNft/timestamp asc";
|
|
40
40
|
})(SearchOrderBy = exports.SearchOrderBy || (exports.SearchOrderBy = {}));
|
|
41
|
+
var SuggestOrderBy;
|
|
42
|
+
(function (SuggestOrderBy) {
|
|
43
|
+
SuggestOrderBy["TotalVolumeHighToLow"] = "statistics/tradeData/totalEgldVolume desc";
|
|
44
|
+
SuggestOrderBy["FollowersHighToLow"] = "statistics/other/followCount desc";
|
|
45
|
+
SuggestOrderBy["IsVerifiedTrueToFalse"] = "isVerified desc";
|
|
46
|
+
SuggestOrderBy["HasImageTrueToFalse"] = "profile desc";
|
|
47
|
+
SuggestOrderBy["HasBannerTrueToFalse"] = "banner desc";
|
|
48
|
+
})(SuggestOrderBy = exports.SuggestOrderBy || (exports.SuggestOrderBy = {}));
|
|
41
49
|
var CollectionsOrderBy;
|
|
42
50
|
(function (CollectionsOrderBy) {
|
|
43
51
|
CollectionsOrderBy["WeekVolumeHighToLow"] = "statistics.tradeData.weekEgldVolume desc";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":";;;AAyFA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;AACX,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAmBD,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACxB,+CAA6B,CAAA;IAC7B,oDAAkC,CAAA;IAClC,sDAAoC,CAAA;IACpC,+BAAa,CAAA;IACb,mCAAiB,CAAA;IACjB,0CAAwB,CAAA;IACxB,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;IACnB,iCAAe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B,CAAA;IACzB,kDAAqB,CAAA;IACrB,sDAAyB,CAAA;IACzB,0CAAa,CAAA;IACb,8CAAiB,CAAA;IACjB,sDAAyB,CAAA;IACzB,sDAAyB,CAAA;IACzB,sDAAyB,CAAA;IACzB,sDAAyB,CAAA;AAC3B,CAAC,EAhBW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAgBpC"}
|
|
@@ -37,6 +37,36 @@ export interface Auction {
|
|
|
37
37
|
marketplace_cut_percentage: string;
|
|
38
38
|
creator_royalties_percentage: string;
|
|
39
39
|
}
|
|
40
|
+
export interface NFTBody {
|
|
41
|
+
collection: string;
|
|
42
|
+
nonce: number;
|
|
43
|
+
amount?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface Payment extends NFTBody {
|
|
46
|
+
decimals?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface SendGlobalOffer {
|
|
49
|
+
payment_token: string;
|
|
50
|
+
payment_nonce: number;
|
|
51
|
+
price: number;
|
|
52
|
+
collection: string;
|
|
53
|
+
attributes?: string;
|
|
54
|
+
depositAmount?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface SendCustomOffer {
|
|
57
|
+
payment_token: string;
|
|
58
|
+
payment_nonce: number;
|
|
59
|
+
price: number;
|
|
60
|
+
nft: NFTBody;
|
|
61
|
+
deadline: number;
|
|
62
|
+
depositAmount?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface AcceptGlobalOffer {
|
|
65
|
+
nft?: NFTBody;
|
|
66
|
+
offer_id: number;
|
|
67
|
+
auction_id_opt?: number;
|
|
68
|
+
signature?: string;
|
|
69
|
+
}
|
|
40
70
|
export interface ChangeListing {
|
|
41
71
|
paymentToken: string;
|
|
42
72
|
price: string;
|
|
@@ -48,8 +78,10 @@ export interface NewListingArgs {
|
|
|
48
78
|
max_bid?: string;
|
|
49
79
|
deadline?: number;
|
|
50
80
|
accepted_payment_token: string;
|
|
81
|
+
accepted_payment_token_decimals?: number;
|
|
51
82
|
bid: boolean;
|
|
52
83
|
opt_sft_max_one_per_payment?: boolean;
|
|
84
|
+
isSFTPack?: boolean;
|
|
53
85
|
opt_start_time?: number;
|
|
54
86
|
collection: string;
|
|
55
87
|
nonce: number;
|