@credenza3/contracts-lib-sui 0.0.1 → 0.0.2

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.
@@ -2386,6 +2386,28 @@ var CredenzaAssetCollection = (function (_super) {
2386
2386
  });
2387
2387
  });
2388
2388
  };
2389
+ CredenzaAssetCollection.prototype.getAssetsIds = function () {
2390
+ return __awaiter(this, void 0, Promise, function () {
2391
+ var events, res, _i, _a, event;
2392
+ return __generator(this, function (_b) {
2393
+ switch (_b.label) {
2394
+ case 0: return [4, this.client.suiClient.queryEvents({
2395
+ query: {
2396
+ MoveEventType: "".concat(this.client.getPackageId(), "::credenza_asset_collection::AssetCreated"),
2397
+ },
2398
+ })];
2399
+ case 1:
2400
+ events = _b.sent();
2401
+ res = [];
2402
+ for (_i = 0, _a = events.data; _i < _a.length; _i++) {
2403
+ event = _a[_i];
2404
+ res.push((0, get_1.default)(event, 'parsedJson.asset_id'));
2405
+ }
2406
+ return [2, res];
2407
+ }
2408
+ });
2409
+ });
2410
+ };
2389
2411
  return CredenzaAssetCollection;
2390
2412
  }(CredenzaSuiModule_1.CredenzaSuiModule));
2391
2413
  exports.CredenzaAssetCollection = CredenzaAssetCollection;