@xoxno/sdk-js 0.1.54-alpha → 0.1.56-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/236.bundle.js +1 -0
- package/dist/265.bundle.js +2 -0
- package/dist/265.bundle.js.LICENSE.txt +10 -0
- package/dist/collection/index.d.ts +13 -1
- package/dist/common/index.d.ts +1 -9
- package/dist/index.bundle.js +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/interactions.bundle.js +1 -0
- package/dist/launchpad.bundle.js +1 -0
- package/dist/runtime.bundle.js +1 -0
- package/dist/types/collection.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/trading.d.ts +39 -19
- package/dist/types/user.d.ts +2 -33
- package/dist/utils/api.d.ts +1 -1
- package/package.json +11 -8
- package/dist/collection/index.js +0 -520
- package/dist/collection/index.js.map +0 -1
- package/dist/common/index.js +0 -78
- package/dist/common/index.js.map +0 -1
- package/dist/index.js +0 -26
- package/dist/index.js.map +0 -1
- package/dist/interactions/index.js +0 -678
- package/dist/interactions/index.js.map +0 -1
- package/dist/launchpad/index.js +0 -158
- package/dist/launchpad/index.js.map +0 -1
- package/dist/nft/index.js +0 -121
- package/dist/nft/index.js.map +0 -1
- package/dist/staking/index.js +0 -29
- package/dist/staking/index.js.map +0 -1
- package/dist/types/collection.js +0 -183
- package/dist/types/collection.js.map +0 -1
- package/dist/types/common.js +0 -3
- package/dist/types/common.js.map +0 -1
- package/dist/types/index.js +0 -21
- package/dist/types/index.js.map +0 -1
- package/dist/types/interactions.js +0 -11
- package/dist/types/interactions.js.map +0 -1
- package/dist/types/nft.js +0 -3
- package/dist/types/nft.js.map +0 -1
- package/dist/types/staking.js +0 -15
- package/dist/types/staking.js.map +0 -1
- package/dist/types/trading.js +0 -26
- package/dist/types/trading.js.map +0 -1
- package/dist/types/user.js +0 -13
- package/dist/types/user.js.map +0 -1
- package/dist/users/index.js +0 -220
- package/dist/users/index.js.map +0 -1
- package/dist/utils/SmartContractAbis.js +0 -103
- package/dist/utils/SmartContractAbis.js.map +0 -1
- package/dist/utils/SmartContractService.js +0 -13
- package/dist/utils/SmartContractService.js.map +0 -1
- package/dist/utils/api.js +0 -79
- package/dist/utils/api.js.map +0 -1
- package/dist/utils/const.js +0 -17
- package/dist/utils/const.js.map +0 -1
- package/dist/utils/getActivity.js +0 -53
- package/dist/utils/getActivity.js.map +0 -1
- package/dist/utils/helpers.js +0 -27
- package/dist/utils/helpers.js.map +0 -1
- package/dist/utils/regex.js +0 -12
- package/dist/utils/regex.js.map +0 -1
- package/dist/utils/scCalls.js +0 -39
- package/dist/utils/scCalls.js.map +0 -1
package/dist/types/staking.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PoolType = exports.IssuingType = void 0;
|
|
4
|
-
var IssuingType;
|
|
5
|
-
(function (IssuingType) {
|
|
6
|
-
IssuingType["Dynamic"] = "Dynamic";
|
|
7
|
-
IssuingType["Fixed"] = "Fixed";
|
|
8
|
-
})(IssuingType || (exports.IssuingType = IssuingType = {}));
|
|
9
|
-
var PoolType;
|
|
10
|
-
(function (PoolType) {
|
|
11
|
-
PoolType["Duo"] = "Duo";
|
|
12
|
-
PoolType["Single"] = "Single";
|
|
13
|
-
PoolType["Perk"] = "Perk";
|
|
14
|
-
})(PoolType || (exports.PoolType = PoolType = {}));
|
|
15
|
-
//# sourceMappingURL=staking.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staking.js","sourceRoot":"","sources":["../../src/types/staking.ts"],"names":[],"mappings":";;;AAuCA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,6BAAiB,CAAA;IACjB,yBAAa,CAAA;AACf,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB"}
|
package/dist/types/trading.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectFieldsTradingActivity = exports.OrderByTradingActivity = void 0;
|
|
4
|
-
var OrderByTradingActivity;
|
|
5
|
-
(function (OrderByTradingActivity) {
|
|
6
|
-
OrderByTradingActivity["PriceHighToLow"] = "egldValue desc";
|
|
7
|
-
OrderByTradingActivity["PriceLowToHigh"] = "egldValue asc";
|
|
8
|
-
OrderByTradingActivity["RankHighToLow"] = "rank asc";
|
|
9
|
-
OrderByTradingActivity["RankLowToHigh"] = "rank desc";
|
|
10
|
-
OrderByTradingActivity["RecentPlaced"] = "timestamp desc";
|
|
11
|
-
OrderByTradingActivity["OldestPlaced"] = "timestamp asc";
|
|
12
|
-
})(OrderByTradingActivity || (exports.OrderByTradingActivity = OrderByTradingActivity = {}));
|
|
13
|
-
var SelectFieldsTradingActivity;
|
|
14
|
-
(function (SelectFieldsTradingActivity) {
|
|
15
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["attributes"] = 0] = "attributes";
|
|
16
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["collection"] = 1] = "collection";
|
|
17
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["offer_id"] = 2] = "offer_id";
|
|
18
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["owner"] = 3] = "owner";
|
|
19
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["short_price"] = 4] = "short_price";
|
|
20
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["price"] = 5] = "price";
|
|
21
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["id"] = 6] = "id";
|
|
22
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["dataType"] = 7] = "dataType";
|
|
23
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["marketplace"] = 8] = "marketplace";
|
|
24
|
-
SelectFieldsTradingActivity[SelectFieldsTradingActivity["payment_token"] = 9] = "payment_token";
|
|
25
|
-
})(SelectFieldsTradingActivity || (exports.SelectFieldsTradingActivity = SelectFieldsTradingActivity = {}));
|
|
26
|
-
//# sourceMappingURL=trading.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trading.js","sourceRoot":"","sources":["../../src/types/trading.ts"],"names":[],"mappings":";;;AAqEA,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,2DAAiC,CAAA;IACjC,0DAAgC,CAAA;IAChC,oDAA0B,CAAA;IAC1B,qDAA2B,CAAA;IAC3B,yDAA+B,CAAA;IAC/B,wDAA8B,CAAA;AAChC,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAED,IAAY,2BAWX;AAXD,WAAY,2BAA2B;IACrC,yFAAY,CAAA;IACZ,yFAAY,CAAA;IACZ,qFAAU,CAAA;IACV,+EAAO,CAAA;IACP,2FAAa,CAAA;IACb,+EAAO,CAAA;IACP,yEAAI,CAAA;IACJ,qFAAU,CAAA;IACV,2FAAa,CAAA;IACb,+FAAe,CAAA;AACjB,CAAC,EAXW,2BAA2B,2CAA3B,2BAA2B,QAWtC"}
|
package/dist/types/user.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Type = exports.OfferType = void 0;
|
|
4
|
-
var OfferType;
|
|
5
|
-
(function (OfferType) {
|
|
6
|
-
OfferType["Received"] = "received";
|
|
7
|
-
OfferType["Sent"] = "sent";
|
|
8
|
-
})(OfferType || (exports.OfferType = OfferType = {}));
|
|
9
|
-
var Type;
|
|
10
|
-
(function (Type) {
|
|
11
|
-
Type["NonFungibleESDT"] = "NonFungibleESDT";
|
|
12
|
-
})(Type || (exports.Type = Type = {}));
|
|
13
|
-
//# sourceMappingURL=user.js.map
|
package/dist/types/user.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/types/user.ts"],"names":[],"mappings":";;;AAiGA,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.js
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UserModule = void 0;
|
|
13
|
-
const index_1 = require("../index");
|
|
14
|
-
const getActivity_1 = require("../utils/getActivity");
|
|
15
|
-
const helpers_1 = require("../utils/helpers");
|
|
16
|
-
const regex_1 = require("../utils/regex");
|
|
17
|
-
class UserModule {
|
|
18
|
-
constructor() {
|
|
19
|
-
/**
|
|
20
|
-
* Returns the user profile
|
|
21
|
-
*
|
|
22
|
-
* @param {String} address - Address of the user
|
|
23
|
-
* @returns {IUserProfile}
|
|
24
|
-
*/
|
|
25
|
-
this.getUserProfile = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
27
|
-
throw new Error('Invalid address');
|
|
28
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/profile`);
|
|
29
|
-
return response;
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* Returns the wallet accounts
|
|
33
|
-
*
|
|
34
|
-
* @param {String[]} addresses - Addresses of the user
|
|
35
|
-
* @returns {BulkAccount[]}
|
|
36
|
-
*/
|
|
37
|
-
this.getBulkAccounts = (addresses) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const response = yield this.api.fetchWithTimeout(`https://proxy-api.xoxno.com/address/bulk`, {
|
|
39
|
-
method: 'POST',
|
|
40
|
-
body: JSON.stringify(addresses),
|
|
41
|
-
});
|
|
42
|
-
return response;
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* Returns the user account info that inclues nonce, guardian data, esdtTokens
|
|
46
|
-
*
|
|
47
|
-
* @param {String} address - Address of the user
|
|
48
|
-
* @returns {UserAccountInfo}
|
|
49
|
-
*/
|
|
50
|
-
this.getUserAccount = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
52
|
-
throw new Error('Invalid address');
|
|
53
|
-
const response = yield this.api.fetchWithTimeout(`https://proxy-api.xoxno.com/accounts/${address}`);
|
|
54
|
-
return response;
|
|
55
|
-
});
|
|
56
|
-
/**
|
|
57
|
-
* Gets user's inventory
|
|
58
|
-
*
|
|
59
|
-
* @param {String} address - User's address
|
|
60
|
-
* @returns {UserInventory} User's inventory
|
|
61
|
-
*/
|
|
62
|
-
this.getUserSummaryInventory = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
64
|
-
throw new Error('Invalid address');
|
|
65
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/inventory-summary`);
|
|
66
|
-
return response;
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* Fetches the user's NFTs listed on the marketplaces
|
|
70
|
-
* @param address - The user's address
|
|
71
|
-
* @returns {UserInventory} - A list of token ids and the price
|
|
72
|
-
*/
|
|
73
|
-
this.getUserNFTs = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
return yield this.collection.getNFTs(args);
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* @name getUserOffers
|
|
78
|
-
* @description Fetches all offers sent or received associated with a user address
|
|
79
|
-
* @param {String} address - The user's wallet address
|
|
80
|
-
* @returns {UserOffers} - The user's listings
|
|
81
|
-
*/
|
|
82
|
-
this.getUserOffers = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
if (!(0, helpers_1.isAddressValid)(args.address))
|
|
84
|
-
throw new Error('Invalid address');
|
|
85
|
-
const response = yield this.api.fetchWithTimeout(`https://proxy-api.xoxno.com/user/${args.address}/offers?type=${args.type}&skip=${args.skip}&top=${args.top}`);
|
|
86
|
-
return response;
|
|
87
|
-
});
|
|
88
|
-
/**
|
|
89
|
-
* Retrieves trading history based on the provided arguments.
|
|
90
|
-
*
|
|
91
|
-
* @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
|
|
92
|
-
* @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
|
|
93
|
-
* @throws {Error} Throws an error if the 'top' argument is greater than 35.
|
|
94
|
-
*/
|
|
95
|
-
this.getTradingActivity = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
return yield (0, getActivity_1.getActivity)(args, this.api);
|
|
97
|
-
});
|
|
98
|
-
/** Gets user's staking info by ticker
|
|
99
|
-
* @param {String} address - User's address
|
|
100
|
-
* @param {String} ticker - Collection's ticker
|
|
101
|
-
* @returns {GroupStakingInfo[]} User's staking info
|
|
102
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
103
|
-
* */
|
|
104
|
-
this.getUserStakingTickerInfoGrouped = (address, ticker) => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
106
|
-
throw new Error('Invalid address');
|
|
107
|
-
if (!(0, regex_1.isValidCollectionTicker)(ticker))
|
|
108
|
-
throw new Error('Invalid ticker');
|
|
109
|
-
const response = yield this.api.fetchWithTimeout(`https://proxy-api.xoxno.com/getUserStakingInfo/${address}?groupByTicker=true&ticker=${ticker}`);
|
|
110
|
-
return response;
|
|
111
|
-
});
|
|
112
|
-
/** Gets user's creator profile
|
|
113
|
-
* @param {String} address - User's address
|
|
114
|
-
* @returns {CreatorProfile} User's creator profile struct
|
|
115
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
116
|
-
* */
|
|
117
|
-
this.getUserCreatorProfile = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
119
|
-
throw new Error('Invalid address');
|
|
120
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/creator/profile`);
|
|
121
|
-
return response;
|
|
122
|
-
});
|
|
123
|
-
/** Gets user's creator profile
|
|
124
|
-
* @param {String} address - User's address
|
|
125
|
-
* @returns {IMintInfo[]} User's creator profile struct
|
|
126
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
127
|
-
* */
|
|
128
|
-
this.getCreatorListings = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
130
|
-
throw new Error('Invalid address');
|
|
131
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/creator/listing`);
|
|
132
|
-
return response;
|
|
133
|
-
});
|
|
134
|
-
/** Gets user's staking info
|
|
135
|
-
* @param {String} address - User's address
|
|
136
|
-
* @returns {UserStakingSummary[]} User's staking info
|
|
137
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
138
|
-
* */
|
|
139
|
-
this.getUserStakingSummary = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
141
|
-
throw new Error('Invalid address');
|
|
142
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/staking/summary`);
|
|
143
|
-
return response;
|
|
144
|
-
});
|
|
145
|
-
/** Gets user's staking info
|
|
146
|
-
* @param {String} address - User's address
|
|
147
|
-
* @returns {UserStakingAvaiblePools[]} User's staking info
|
|
148
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
149
|
-
* */
|
|
150
|
-
this.getUserStakingAailable = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
152
|
-
throw new Error('Invalid address');
|
|
153
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/staking/available-pools`);
|
|
154
|
-
return response;
|
|
155
|
-
});
|
|
156
|
-
/** Gets user's creator info
|
|
157
|
-
* @param {String} address - User's address
|
|
158
|
-
* @returns {CreatorInfo} User's creator info
|
|
159
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
160
|
-
* */
|
|
161
|
-
this.getUserCreatorInfo = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
163
|
-
throw new Error('Invalid address');
|
|
164
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/creator/details`);
|
|
165
|
-
return response;
|
|
166
|
-
});
|
|
167
|
-
/** Gets pool details
|
|
168
|
-
* @param {String} address - User's address
|
|
169
|
-
* @param {String} collection - Collection ticker
|
|
170
|
-
* @returns {UserCollectionStaking} User's creator info
|
|
171
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
172
|
-
* */
|
|
173
|
-
this.getUserCollectionStaking = (address, collection) => __awaiter(this, void 0, void 0, function* () {
|
|
174
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
175
|
-
throw new Error('Invalid address');
|
|
176
|
-
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
177
|
-
throw new Error('Invalid collection ticker: ' + collection);
|
|
178
|
-
}
|
|
179
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/staking/collection/${collection}`);
|
|
180
|
-
return response;
|
|
181
|
-
});
|
|
182
|
-
/** Gets pool details
|
|
183
|
-
* @param {number} poolId - User's address
|
|
184
|
-
* @returns {CreatoPoolDetailsrInfo} User's creator info
|
|
185
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
186
|
-
* */
|
|
187
|
-
this.getUserPoolStaking = (address, poolId) => __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
189
|
-
throw new Error('Invalid address');
|
|
190
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/staking/pool/${poolId}`);
|
|
191
|
-
return response;
|
|
192
|
-
});
|
|
193
|
-
/** Gets pool details
|
|
194
|
-
* @param {number} poolId - User's address
|
|
195
|
-
* @returns {CreatoPoolDetailsrInfo} User's creator info
|
|
196
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
197
|
-
* */
|
|
198
|
-
this.getAvailableNFTsForStakingPool = (address, poolId) => __awaiter(this, void 0, void 0, function* () {
|
|
199
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
200
|
-
throw new Error('Invalid address');
|
|
201
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/staking/pool/${poolId}/nfts`);
|
|
202
|
-
return response;
|
|
203
|
-
});
|
|
204
|
-
/** Gets owned pools by address
|
|
205
|
-
* @param {string} address - User's address
|
|
206
|
-
* @returns {PoolDetails[]} User pools
|
|
207
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
208
|
-
* */
|
|
209
|
-
this.getOwnedPoolsByAddress = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
210
|
-
if (!(0, helpers_1.isAddressValid)(address))
|
|
211
|
-
throw new Error('Invalid address');
|
|
212
|
-
const response = yield this.api.fetchWithTimeout(`/user/${address}/staking/owned-pools`);
|
|
213
|
-
return response;
|
|
214
|
-
});
|
|
215
|
-
this.api = index_1.XOXNOClient.init();
|
|
216
|
-
this.collection = new index_1.CollectionModule();
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
exports.UserModule = UserModule;
|
|
220
|
-
//# sourceMappingURL=index.js.map
|
package/dist/users/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAyD;AAwBzD,sDAAmD;AACnD,8CAAkD;AAClD,0CAAyD;AAEzD,MAAa,UAAU;IAGrB;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,SAAS,OAAO,UAAU,CAC3B,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACI,oBAAe,GAAG,CACvB,SAAmB,EACK,EAAE;YAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,0CAA0C,EAC1C;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;aAChC,CACF,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,wCAAwC,OAAO,EAAE,CAClD,CAAC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AAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,SAAS,OAAO,iBAAiB,MAAM,EAAE,CAC1C,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;cAIM;QACC,mCAA8B,GAAG,CACtC,OAAe,EACf,MAAc,EACM,EAAE;YACtB,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,SAAS,OAAO,iBAAiB,MAAM,OAAO,CAC/C,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;cAIM;QACC,2BAAsB,GAAG,CAC9B,OAAe,EACS,EAAE;YAC1B,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,SAAS,OAAO,sBAAsB,CACvC,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QA1QA,IAAI,CAAC,GAAG,GAAG,mBAAW,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAgB,EAAE,CAAC;IAC3C,CAAC;CAyQF;AA/QD,gCA+QC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SmartContractAbis = void 0;
|
|
13
|
-
const abiRegistry_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/abiRegistry");
|
|
14
|
-
const api_1 = require("./api");
|
|
15
|
-
class SmartContractAbis {
|
|
16
|
-
static getMarket() {
|
|
17
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
if (!SmartContractAbis.market) {
|
|
19
|
-
const data = yield api_1.XOXNOClient.init().fetchWithTimeout('https://media.xoxno.com/smartcontractabi/esdt-nft-marketplace.abi.json', {
|
|
20
|
-
next: {
|
|
21
|
-
tags: ['getMarket'],
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
const abiRegistry = abiRegistry_1.AbiRegistry.create(data);
|
|
25
|
-
SmartContractAbis.market = abiRegistry;
|
|
26
|
-
}
|
|
27
|
-
return SmartContractAbis.market;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
static getManager() {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
if (!SmartContractAbis.manager) {
|
|
33
|
-
const data = yield api_1.XOXNOClient.init().fetchWithTimeout('https://media.xoxno.com/smartcontractabi/manage.json', {
|
|
34
|
-
next: {
|
|
35
|
-
tags: ['getManager'],
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
const abiRegistry = abiRegistry_1.AbiRegistry.create(data);
|
|
39
|
-
SmartContractAbis.manager = abiRegistry;
|
|
40
|
-
}
|
|
41
|
-
return SmartContractAbis.manager;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
static getMinter() {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
if (!SmartContractAbis.minter) {
|
|
47
|
-
const data = yield api_1.XOXNOClient.init().fetchWithTimeout('https://media.xoxno.com/smartcontractabi/minter.json', {
|
|
48
|
-
next: {
|
|
49
|
-
tags: ['getMinter'],
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
const abiRegistry = abiRegistry_1.AbiRegistry.create(data);
|
|
53
|
-
SmartContractAbis.minter = abiRegistry;
|
|
54
|
-
}
|
|
55
|
-
return SmartContractAbis.minter;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
static getStaking() {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
if (!SmartContractAbis.staking) {
|
|
61
|
-
const data = yield api_1.XOXNOClient.init().fetchWithTimeout('https://media.xoxno.com/smartcontractabi/staking-nfts.abi.json', {
|
|
62
|
-
next: {
|
|
63
|
-
tags: ['getStaking'],
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
const abiRegistry = abiRegistry_1.AbiRegistry.create(data);
|
|
67
|
-
SmartContractAbis.staking = abiRegistry;
|
|
68
|
-
}
|
|
69
|
-
return SmartContractAbis.staking;
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
static getExchange() {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
if (!SmartContractAbis.exchange) {
|
|
75
|
-
const data = yield api_1.XOXNOClient.init().fetchWithTimeout('https://media.xoxno.com/smartcontractabi/rs-exchange.abi.json', {
|
|
76
|
-
next: {
|
|
77
|
-
tags: ['getExchange'],
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
const abiRegistry = abiRegistry_1.AbiRegistry.create(data);
|
|
81
|
-
SmartContractAbis.exchange = abiRegistry;
|
|
82
|
-
}
|
|
83
|
-
return SmartContractAbis.exchange;
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
static getP2P() {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
if (!SmartContractAbis.p2p) {
|
|
89
|
-
const data = yield api_1.XOXNOClient.init().fetchWithTimeout('https://media.xoxno.com/smartcontractabi/p2p.abi.json', {
|
|
90
|
-
next: {
|
|
91
|
-
tags: ['getP2P'],
|
|
92
|
-
revalidate: 500,
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
const abiRegistry = abiRegistry_1.AbiRegistry.create(data);
|
|
96
|
-
SmartContractAbis.p2p = abiRegistry;
|
|
97
|
-
}
|
|
98
|
-
return SmartContractAbis.p2p;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.SmartContractAbis = SmartContractAbis;
|
|
103
|
-
//# sourceMappingURL=SmartContractAbis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SmartContractAbis.js","sourceRoot":"","sources":["../../src/utils/SmartContractAbis.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gGAA6F;AAC7F,+BAAoC;AAEpC,MAAa,iBAAiB;IAQrB,MAAM,CAAO,SAAS;;YAC3B,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;gBAC9B,MAAM,IAAI,GAAG,MAAM,iBAAW,CAAC,IAAI,EAAE,CAAC,gBAAgB,CACpD,wEAAwE,EACxE;oBACE,IAAI,EAAE;wBACJ,IAAI,EAAE,CAAC,WAAW,CAAC;qBACpB;iBACF,CACF,CAAC;gBACF,MAAM,WAAW,GAAG,yBAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC7C,iBAAiB,CAAC,MAAM,GAAG,WAAW,CAAC;YACzC,CAAC;YAED,OAAO,iBAAiB,CAAC,MAAM,CAAC;QAClC,CAAC;KAAA;IAEM,MAAM,CAAO,UAAU;;YAC5B,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBA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WAAW;;YAC7B,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;gBAChC,MAAM,IAAI,GAAG,MAAM,iBAAW,CAAC,IAAI,EAAE,CAAC,gBAAgB,CACpD,+DAA+D,EAC/D;oBACE,IAAI,EAAE;wBACJ,IAAI,EAAE,CAAC,aAAa,CAAC;qBACtB;iBACF,CACF,CAAC;gBACF,MAAM,WAAW,GAAG,yBAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC7C,iBAAiB,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC3C,CAAC;YAED,OAAO,iBAAiB,CAAC,QAAQ,CAAC;QACpC,CAAC;KAAA;IAEM,MAAM,CAAO,MAAM;;YACxB,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;gBAC3B,MAAM,IAAI,GAAG,MAAM,iBAAW,CAAC,IAAI,EAAE,CAAC,gBAAgB,CACpD,uDAAuD,EACvD;oBACE,IAAI,EAAE;wBACJ,IAAI,EAAE,CAAC,QAAQ,CAAC;wBAChB,UAAU,EAAE,GAAG;qBAChB;iBACF,CACF,CAAC;gBACF,MAAM,WAAW,GAAG,yBAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC7C,iBAAiB,CAAC,GAAG,GAAG,WAAW,CAAC;YACtC,CAAC;YAED,OAAO,iBAAiB,CAAC,GAAG,CAAC;QAC/B,CAAC;KAAA;CACF;AA9GD,8CA8GC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSmartContract = void 0;
|
|
4
|
-
const address_1 = require("@multiversx/sdk-core/out/address");
|
|
5
|
-
const smartContract_1 = require("@multiversx/sdk-core/out/smartcontracts/smartContract");
|
|
6
|
-
const getSmartContract = (abiRegistry, address) => {
|
|
7
|
-
return new smartContract_1.SmartContract({
|
|
8
|
-
address: new address_1.Address(address),
|
|
9
|
-
abi: abiRegistry,
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
exports.getSmartContract = getSmartContract;
|
|
13
|
-
//# sourceMappingURL=SmartContractService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SmartContractService.js","sourceRoot":"","sources":["../../src/utils/SmartContractService.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,yFAAsF;AAG/E,MAAM,gBAAgB,GAAG,CAAC,WAAwB,EAAE,OAAe,EAAE,EAAE;IAC5E,OAAO,IAAI,6BAAa,CAAC;QACvB,OAAO,EAAE,IAAI,iBAAO,CAAC,OAAO,CAAC;QAC7B,GAAG,EAAE,WAAW;KACjB,CAAC,CAAC;AACL,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B"}
|
package/dist/utils/api.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.XOXNOClient = exports.Chain = void 0;
|
|
13
|
-
const const_1 = require("./const");
|
|
14
|
-
var Chain;
|
|
15
|
-
(function (Chain) {
|
|
16
|
-
Chain["MAINNET"] = "1";
|
|
17
|
-
Chain["DEVNET"] = "D";
|
|
18
|
-
})(Chain || (exports.Chain = Chain = {}));
|
|
19
|
-
class XOXNOClient {
|
|
20
|
-
constructor(apiUrl = const_1.API_URL, apiKey = '', chain = Chain.MAINNET) {
|
|
21
|
-
this.fetchWithTimeout = (path, options = {}, timeout = 40000) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
var _a, _b;
|
|
23
|
-
const headers = Object.assign(Object.assign({ 'Accept-Encoding': 'gzip,deflate,br', Referer: 'https://xoxno.sdk', 'User-Agent': 'XOXNO/1.0/SDK' }, (options.method === 'POST'
|
|
24
|
-
? { 'Content-Type': 'application/json' }
|
|
25
|
-
: {})), ((_a = options.headers) !== null && _a !== void 0 ? _a : {}));
|
|
26
|
-
const shouldInsertOrigin = typeof path === 'string' && path.startsWith('/');
|
|
27
|
-
const url = `${shouldInsertOrigin ? `${this.apiUrl}${path}` : path}${options.params
|
|
28
|
-
? '?' +
|
|
29
|
-
Object.keys(options.params)
|
|
30
|
-
.map((key) => {
|
|
31
|
-
return `${key}=${encodeURIComponent(options.params[key])}`;
|
|
32
|
-
})
|
|
33
|
-
.join('&')
|
|
34
|
-
: ''}`;
|
|
35
|
-
const controller = new AbortController();
|
|
36
|
-
setTimeout(() => controller.abort(), timeout);
|
|
37
|
-
const res = yield fetch(url, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, options), ((options === null || options === void 0 ? void 0 : options.next) && options.next.revalidate
|
|
38
|
-
? {}
|
|
39
|
-
: { cache: 'no-store' })), { signal: controller.signal }), (Object.keys(headers).length ? { headers } : {})), { method: (_b = options.method) !== null && _b !== void 0 ? _b : 'GET' }));
|
|
40
|
-
if (!res.ok)
|
|
41
|
-
throw new Error((yield res.json()).message.toString());
|
|
42
|
-
return res.json();
|
|
43
|
-
});
|
|
44
|
-
this.apiUrl = apiUrl;
|
|
45
|
-
this.apiKey = apiKey;
|
|
46
|
-
this.chain = chain;
|
|
47
|
-
this.config =
|
|
48
|
-
chain === Chain.MAINNET
|
|
49
|
-
? {
|
|
50
|
-
XO_SC: const_1.XOXNO_SC,
|
|
51
|
-
FM_SC: const_1.FM_SC,
|
|
52
|
-
DR_SC: const_1.DR_SC,
|
|
53
|
-
KG_SC: const_1.KG_SC,
|
|
54
|
-
Staking_SC: const_1.Staking_SC,
|
|
55
|
-
Manager_SC: const_1.Manager_SC,
|
|
56
|
-
P2P_SC: const_1.P2P_SC,
|
|
57
|
-
}
|
|
58
|
-
: {
|
|
59
|
-
XO_SC: const_1.XOXNO_SC_DEV,
|
|
60
|
-
FM_SC: const_1.FM_SC,
|
|
61
|
-
DR_SC: const_1.DR_SC,
|
|
62
|
-
KG_SC: const_1.KG_SC,
|
|
63
|
-
Staking_SC: const_1.Staking_SC_DEV,
|
|
64
|
-
Manager_SC: const_1.Manager_SC_DEV,
|
|
65
|
-
P2P_SC: const_1.P2P_SC_DEV,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
static init({ apiUrl = const_1.API_URL, apiKey = '', chain = Chain.MAINNET, } = {}) {
|
|
69
|
-
if (!XOXNOClient.instance) {
|
|
70
|
-
if (chain == Chain.DEVNET) {
|
|
71
|
-
XOXNOClient.instance = new XOXNOClient(const_1.API_URL_DEV, apiKey, chain);
|
|
72
|
-
}
|
|
73
|
-
XOXNOClient.instance = new XOXNOClient(apiUrl, apiKey, chain);
|
|
74
|
-
}
|
|
75
|
-
return XOXNOClient.instance;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
exports.XOXNOClient = XOXNOClient;
|
|
79
|
-
//# sourceMappingURL=api.js.map
|
package/dist/utils/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAciB;AAEjB,IAAY,KAGX;AAHD,WAAY,KAAK;IACf,sBAAa,CAAA;IACb,qBAAY,CAAA;AACd,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB;AACD,MAAa,WAAW;IAetB,YACE,SAAiB,eAAO,EACxB,MAAM,GAAG,EAAE,EACX,QAAe,K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,KAAK,GAAG,KAAK,CAAC,OAAO,MAKlB,EAAE;QACL,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC1B,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC1B,WAAW,CAAC,QAAQ,GAAG,IAAI,WAAW,CAAC,mBAAW,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;YACrE,CAAC;YACD,WAAW,CAAC,QAAQ,GAAG,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,WAAW,CAAC,QAAQ,CAAC;IAC9B,CAAC;CA4CF;AAzGD,kCAyGC"}
|
package/dist/utils/const.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.P2P_SC_DEV = exports.Manager_SC_DEV = exports.Staking_SC_DEV = exports.XOXNO_SC_DEV = exports.P2P_SC = exports.Manager_SC = exports.Staking_SC = exports.KG_SC = exports.DR_SC = exports.FM_SC = exports.XOXNO_SC = exports.API_URL_DEV = exports.API_URL = void 0;
|
|
4
|
-
exports.API_URL = 'https://api.xoxno.com';
|
|
5
|
-
exports.API_URL_DEV = 'https://api-dev.xoxno.com';
|
|
6
|
-
exports.XOXNO_SC = 'erd1qqqqqqqqqqqqqpgq6wegs2xkypfpync8mn2sa5cmpqjlvrhwz5nqgepyg8';
|
|
7
|
-
exports.FM_SC = 'erd1qqqqqqqqqqqqqpgq705fxpfrjne0tl3ece0rrspykq88mynn4kxs2cg43s';
|
|
8
|
-
exports.DR_SC = 'erd1qqqqqqqqqqqqqpgqd9rvv2n378e27jcts8vfwynpx0gfl5ufz6hqhfy0u0';
|
|
9
|
-
exports.KG_SC = 'erd1qqqqqqqqqqqqqpgq8xwzu82v8ex3h4ayl5lsvxqxnhecpwyvwe0sf2qj4e';
|
|
10
|
-
exports.Staking_SC = 'erd1qqqqqqqqqqqqqpgqvpkd3g3uwludduv3797j54qt6c888wa59w2shntt6z';
|
|
11
|
-
exports.Manager_SC = 'erd1qqqqqqqqqqqqqpgqg9fa0dmpn8fu3fnleeqn5zt8rl8mdqjkys5s2gtas7';
|
|
12
|
-
exports.P2P_SC = 'erd1qqqqqqqqqqqqqpgq47y8hnct68v6asjv6gxem6h9rumn9frzah0skhxxt6';
|
|
13
|
-
exports.XOXNO_SC_DEV = 'erd1qqqqqqqqqqqqqpgqn4fnwl43hhchz9emdy66eh5azzhl599zd8ssxjdyh3';
|
|
14
|
-
exports.Staking_SC_DEV = 'erd1qqqqqqqqqqqqqpgqmkt2fvumf0zgum5qd0awl2l46x2pxdgmr5rswjr6r8';
|
|
15
|
-
exports.Manager_SC_DEV = 'erd1qqqqqqqqqqqqqpgq6sysl7mga393a850xemfpawaqanf4da5d8ssp3xamn';
|
|
16
|
-
exports.P2P_SC_DEV = 'erd1qqqqqqqqqqqqqpgqhuvnvkwwmucdzy3g7pvgvjumjfcgfwf69w2svch5c2';
|
|
17
|
-
//# sourceMappingURL=const.js.map
|
package/dist/utils/const.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../src/utils/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,uBAAuB,CAAC;AAClC,QAAA,WAAW,GAAG,2BAA2B,CAAC;AAE1C,QAAA,QAAQ,GACnB,gEAAgE,CAAC;AACtD,QAAA,KAAK,GAChB,gEAAgE,CAAC;AACtD,QAAA,KAAK,GAChB,gEAAgE,CAAC;AACtD,QAAA,KAAK,GAChB,gEAAgE,CAAC;AACtD,QAAA,UAAU,GACrB,gEAAgE,CAAC;AACtD,QAAA,UAAU,GACrB,gEAAgE,CAAC;AACtD,QAAA,MAAM,GACjB,gEAAgE,CAAC;AAEtD,QAAA,YAAY,GACvB,gEAAgE,CAAC;AACtD,QAAA,cAAc,GACzB,gEAAgE,CAAC;AACtD,QAAA,cAAc,GACzB,gEAAgE,CAAC;AACtD,QAAA,UAAU,GACrB,gEAAgE,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getActivity = void 0;
|
|
13
|
-
/**
|
|
14
|
-
* Fetches the trading activity of the given collections
|
|
15
|
-
* @param args - The trading activity arguments
|
|
16
|
-
* @param api - The API client
|
|
17
|
-
* @returns - The trading activity response
|
|
18
|
-
* @throws - If the top is greater than 35
|
|
19
|
-
*/
|
|
20
|
-
const getActivity = (args, api) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
if (args.top && args.top > 35) {
|
|
23
|
-
throw new Error('Top cannot be greater than 35');
|
|
24
|
-
}
|
|
25
|
-
const payloadBody = {
|
|
26
|
-
filters: {
|
|
27
|
-
collection: args.collections,
|
|
28
|
-
identifier: args.identifiers || undefined,
|
|
29
|
-
address: args.wallets || undefined,
|
|
30
|
-
tokens: args.placedInToken || undefined,
|
|
31
|
-
marketplace: args.marketplaces || undefined,
|
|
32
|
-
action: args.actions || undefined,
|
|
33
|
-
range: args.priceRange,
|
|
34
|
-
rankRange: args.rankRange,
|
|
35
|
-
timestampRange: args.timestampRange,
|
|
36
|
-
attributes: args.attributes,
|
|
37
|
-
},
|
|
38
|
-
orderBy: args.orderBy,
|
|
39
|
-
select: args.select,
|
|
40
|
-
top: args.top || 35,
|
|
41
|
-
skip: args.skip || 0,
|
|
42
|
-
};
|
|
43
|
-
const buffer = Buffer.from(JSON.stringify(payloadBody)).toString('base64');
|
|
44
|
-
const response = yield api.fetchWithTimeout(`https://proxy-api.xoxno.com/getTradingActivityNew/${buffer}`, {
|
|
45
|
-
next: {
|
|
46
|
-
tags: ['getActivity'],
|
|
47
|
-
revalidate: 180,
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
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) }), empty: response.resources.length === 0 });
|
|
51
|
-
});
|
|
52
|
-
exports.getActivity = getActivity;
|
|
53
|
-
//# sourceMappingURL=getActivity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getActivity.js","sourceRoot":"","sources":["../../src/utils/getActivity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,CACzB,IAAyB,EACzB,GAAgB,EACkB,EAAE;;IACpC,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,WAAW,GAA+B;QAC9C,OAAO,EAAE;YACP,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,UAAU,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;YAClC,MAAM,EAAE,IAAI,CAAC,aAAa,IAAI,SAAS;YACvC,WAAW,EAAE,IAAI,CAAC,YAAY,IAAI,SAAS;YAC3C,MAAM,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;YACjC,KAAK,EAAE,IAAI,CAAC,UAAU;YACtB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B;QACD,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;KACrB,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,gBAAgB,CACzC,qDAAqD,MAAM,EAAE,EAC7D;QACE,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC,aAAa,CAAC;YACrB,UAAU,EAAE,GAAG;SAChB;KACF,CACF,CAAC;IAEF,uCACK,QAAQ,KACX,kBAAkB,kCACb,IAAI,KACP,IAAI,EAAE,CAAC,MAAA,IAAI,CAAC,IAAI,mCAAI,CAAC,CAAC,GAAG,CAAC,MAAA,IAAI,CAAC,GAAG,mCAAI,EAAE,CAAC,KAE3C,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IACtC;AACJ,CAAC,CAAA,CAAC;AA9CW,QAAA,WAAW,eA8CtB"}
|
package/dist/utils/helpers.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAddressValid = exports.getIdentifierFromColAndNonce = exports.nonceToHex = void 0;
|
|
4
|
-
const address_1 = require("@multiversx/sdk-core/out/address");
|
|
5
|
-
const nonceToHex = (nonce) => {
|
|
6
|
-
let nonceHex = nonce.toString(16);
|
|
7
|
-
if (nonceHex.length % 2 !== 0) {
|
|
8
|
-
nonceHex = '0' + nonceHex;
|
|
9
|
-
}
|
|
10
|
-
return nonceHex;
|
|
11
|
-
};
|
|
12
|
-
exports.nonceToHex = nonceToHex;
|
|
13
|
-
const getIdentifierFromColAndNonce = (collection, nonce) => {
|
|
14
|
-
return [collection, (0, exports.nonceToHex)(nonce)].join('-');
|
|
15
|
-
};
|
|
16
|
-
exports.getIdentifierFromColAndNonce = getIdentifierFromColAndNonce;
|
|
17
|
-
const isAddressValid = (address) => {
|
|
18
|
-
try {
|
|
19
|
-
new address_1.Address(address);
|
|
20
|
-
return true && address.includes('erd1');
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.isAddressValid = isAddressValid;
|
|
27
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAEpD,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE;IAClD,IAAI,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,QAAQ,GAAG,GAAG,GAAG,QAAQ,CAAC;IAC5B,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,UAAU,cAMrB;AAEK,MAAM,4BAA4B,GAAG,CAC1C,UAAkB,EAClB,KAAa,EACL,EAAE;IACV,OAAO,CAAC,UAAU,EAAE,IAAA,kBAAU,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC,CAAC;AALW,QAAA,4BAA4B,gCAKvC;AAEK,MAAM,cAAc,GAAG,CAAC,OAAwB,EAAW,EAAE;IAClE,IAAI,CAAC;QACH,IAAI,iBAAO,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB"}
|