@typus/typus-sdk 1.0.91 → 1.0.92

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.
@@ -86,6 +86,7 @@ exports.necklaces = [
86
86
  "sui_network",
87
87
  "blockvision",
88
88
  "team",
89
+ "nft_vault",
89
90
  ];
90
91
  function getPoolMap(provider, nftConfig) {
91
92
  return __awaiter(this, void 0, void 0, function () {
@@ -98,28 +99,22 @@ function getPoolMap(provider, nftConfig) {
98
99
  return [4 /*yield*/, provider.multiGetObjects({ ids: pools, options: { showContent: true } })];
99
100
  case 1:
100
101
  res = _a.sent();
101
- return [4 /*yield*/, exports.necklaces.reduce(function (promise, necklace, i) { return __awaiter(_this, void 0, void 0, function () {
102
- var map, fields, poolData;
103
- var _a;
104
- return __generator(this, function (_b) {
105
- switch (_b.label) {
106
- case 0: return [4 /*yield*/, promise];
107
- case 1:
108
- map = _b.sent();
109
- fields = (_a = res[i].data) === null || _a === void 0 ? void 0 : _a.content.fields;
110
- poolData = {
111
- pool_id: pools[i],
112
- is_live: fields.is_live,
113
- num: Number(fields.num),
114
- remaining: fields.tails.length,
115
- };
116
- map[necklace] = poolData;
117
- return [2 /*return*/, map];
118
- }
119
- });
120
- }); }, Promise.resolve(new Map()))];
121
- case 2:
122
- poolMap = _a.sent();
102
+ poolMap = new Map();
103
+ exports.necklaces.forEach(function (necklace, i) { return __awaiter(_this, void 0, void 0, function () {
104
+ var fields, poolData;
105
+ var _a;
106
+ return __generator(this, function (_b) {
107
+ fields = (_a = res[i].data) === null || _a === void 0 ? void 0 : _a.content.fields;
108
+ poolData = {
109
+ pool_id: pools[i],
110
+ is_live: fields.is_live,
111
+ num: Number(fields.num),
112
+ remaining: Number(fields.tails.fields.contents.fields.size),
113
+ };
114
+ poolMap.set(necklace, poolData);
115
+ return [2 /*return*/];
116
+ });
117
+ }); });
123
118
  return [2 /*return*/, poolMap];
124
119
  }
125
120
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.0.91",
5
+ "version": "1.0.92",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "^0.3.3",