emblem-vault-sdk 1.4.1 → 1.4.3
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/bundle.js +8 -3
- package/dist/curated/metadata.json +684176 -0
- package/dist/index.js +109 -18
- package/dist/utils.js +514 -0
- package/docs/bundle.js +8 -3
- package/docs/index.html +1 -1
- package/package.json +2 -2
- package/readme.md +1 -0
- package/script/version.js +1 -1
- package/src/index.ts +7 -2
- package/tsconfig.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -684212,7 +684212,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
684212
684212
|
};
|
|
684213
684213
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
684214
684214
|
const utils_1 = require("./utils");
|
|
684215
|
-
const SDK_VERSION = '1.4.
|
|
684215
|
+
const SDK_VERSION = '1.4.2';
|
|
684216
684216
|
class EmblemVaultSDK {
|
|
684217
684217
|
constructor(apiKey, baseUrl) {
|
|
684218
684218
|
this.apiKey = apiKey;
|
|
@@ -684243,7 +684243,7 @@ class EmblemVaultSDK {
|
|
|
684243
684243
|
}
|
|
684244
684244
|
// ** Curated **
|
|
684245
684245
|
//
|
|
684246
|
-
|
|
684246
|
+
fetchCuratedContractsz(hideUnMintable = false, overrideFunc = false) {
|
|
684247
684247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
684248
684248
|
let url = `${this.baseUrl}/curated`;
|
|
684249
684249
|
// Fetch using URL or override function
|
|
@@ -684255,8 +684255,13 @@ class EmblemVaultSDK {
|
|
|
684255
684255
|
// Map over the sorted data and generate a template for each item
|
|
684256
684256
|
.map((item) => {
|
|
684257
684257
|
const template = (0, utils_1.generateTemplate)(item);
|
|
684258
|
+
Object.keys(template).forEach(key => {
|
|
684259
|
+
if (key != 'id' && key != 'created_at' && key != 'contracts' && key != 'imageHandler' && key != 'placeholderImages' && key != 'loadingImages')
|
|
684260
|
+
item[key] = template[key];
|
|
684261
|
+
});
|
|
684258
684262
|
// Return a new object that combines the properties of the item and the template
|
|
684259
|
-
return
|
|
684263
|
+
// return { ...item, ...template };
|
|
684264
|
+
return item;
|
|
684260
684265
|
});
|
|
684261
684266
|
return data;
|
|
684262
684267
|
});
|