emblem-vault-sdk 1.4.8 → 1.5.0
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 +9 -2
- package/dist/index.js +1 -1
- package/dist/utils.js +8 -1
- package/docs/bundle.js +9 -2
- package/package.json +1 -1
- package/src/utils.ts +6 -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.
|
|
684215
|
+
const SDK_VERSION = '1.5.0';
|
|
684216
684216
|
class EmblemVaultSDK {
|
|
684217
684217
|
constructor(apiKey, baseUrl) {
|
|
684218
684218
|
this.apiKey = apiKey;
|
|
@@ -684573,6 +684573,9 @@ function generateTemplate(record) {
|
|
|
684573
684573
|
else if (recordName == "Namecoin") {
|
|
684574
684574
|
allowed = data && record.nativeAssets.includes(data[0].coin) ? true : false;
|
|
684575
684575
|
}
|
|
684576
|
+
else if (recordName == "Embels") {
|
|
684577
|
+
allowed = true;
|
|
684578
|
+
}
|
|
684576
684579
|
else { // XCP
|
|
684577
684580
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
684578
684581
|
}
|
|
@@ -684613,6 +684616,9 @@ function generateTemplate(record) {
|
|
|
684613
684616
|
else if (recordName == "Namecoin") {
|
|
684614
684617
|
allowedName = asset ? true : false;
|
|
684615
684618
|
}
|
|
684619
|
+
else if (recordName == "Embels") {
|
|
684620
|
+
allowedName = true;
|
|
684621
|
+
}
|
|
684616
684622
|
else { // XCP
|
|
684617
684623
|
let curatedItemFound = exports.NFT_DATA[asset];
|
|
684618
684624
|
allowedName = asset && curatedItemFound ? true : false;
|
|
@@ -684742,7 +684748,8 @@ function generateTemplate(record) {
|
|
|
684742
684748
|
balanceDescription = '1';
|
|
684743
684749
|
}
|
|
684744
684750
|
}
|
|
684745
|
-
|
|
684751
|
+
let descriptionContents = balanceDescription ? `This vault contains ${balanceDescription} ${nameAndImage.assetName} ${nameAndImage.explorer}.` : '';
|
|
684752
|
+
nameAndImage.description = nameAndImage.description + `${descriptionContents}\n\n${_this.description}`;
|
|
684746
684753
|
}
|
|
684747
684754
|
let viewOnEmblemFinanceLink = '';
|
|
684748
684755
|
if (_this.collectionType === "ERC1155") {
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
const utils_1 = require("./utils");
|
|
36
|
-
const SDK_VERSION = '1.
|
|
36
|
+
const SDK_VERSION = '1.5.0';
|
|
37
37
|
class EmblemVaultSDK {
|
|
38
38
|
constructor(apiKey, baseUrl) {
|
|
39
39
|
this.apiKey = apiKey;
|
package/dist/utils.js
CHANGED
|
@@ -246,6 +246,9 @@ function generateTemplate(record) {
|
|
|
246
246
|
else if (recordName == "Namecoin") {
|
|
247
247
|
allowed = data && record.nativeAssets.includes(data[0].coin) ? true : false;
|
|
248
248
|
}
|
|
249
|
+
else if (recordName == "Embels") {
|
|
250
|
+
allowed = true;
|
|
251
|
+
}
|
|
249
252
|
else { // XCP
|
|
250
253
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
251
254
|
}
|
|
@@ -286,6 +289,9 @@ function generateTemplate(record) {
|
|
|
286
289
|
else if (recordName == "Namecoin") {
|
|
287
290
|
allowedName = asset ? true : false;
|
|
288
291
|
}
|
|
292
|
+
else if (recordName == "Embels") {
|
|
293
|
+
allowedName = true;
|
|
294
|
+
}
|
|
289
295
|
else { // XCP
|
|
290
296
|
let curatedItemFound = exports.NFT_DATA[asset];
|
|
291
297
|
allowedName = asset && curatedItemFound ? true : false;
|
|
@@ -415,7 +421,8 @@ function generateTemplate(record) {
|
|
|
415
421
|
balanceDescription = '1';
|
|
416
422
|
}
|
|
417
423
|
}
|
|
418
|
-
|
|
424
|
+
let descriptionContents = balanceDescription ? `This vault contains ${balanceDescription} ${nameAndImage.assetName} ${nameAndImage.explorer}.` : '';
|
|
425
|
+
nameAndImage.description = nameAndImage.description + `${descriptionContents}\n\n${_this.description}`;
|
|
419
426
|
}
|
|
420
427
|
let viewOnEmblemFinanceLink = '';
|
|
421
428
|
if (_this.collectionType === "ERC1155") {
|
package/docs/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.
|
|
684215
|
+
const SDK_VERSION = '1.5.0';
|
|
684216
684216
|
class EmblemVaultSDK {
|
|
684217
684217
|
constructor(apiKey, baseUrl) {
|
|
684218
684218
|
this.apiKey = apiKey;
|
|
@@ -684573,6 +684573,9 @@ function generateTemplate(record) {
|
|
|
684573
684573
|
else if (recordName == "Namecoin") {
|
|
684574
684574
|
allowed = data && record.nativeAssets.includes(data[0].coin) ? true : false;
|
|
684575
684575
|
}
|
|
684576
|
+
else if (recordName == "Embels") {
|
|
684577
|
+
allowed = true;
|
|
684578
|
+
}
|
|
684576
684579
|
else { // XCP
|
|
684577
684580
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
684578
684581
|
}
|
|
@@ -684613,6 +684616,9 @@ function generateTemplate(record) {
|
|
|
684613
684616
|
else if (recordName == "Namecoin") {
|
|
684614
684617
|
allowedName = asset ? true : false;
|
|
684615
684618
|
}
|
|
684619
|
+
else if (recordName == "Embels") {
|
|
684620
|
+
allowedName = true;
|
|
684621
|
+
}
|
|
684616
684622
|
else { // XCP
|
|
684617
684623
|
let curatedItemFound = exports.NFT_DATA[asset];
|
|
684618
684624
|
allowedName = asset && curatedItemFound ? true : false;
|
|
@@ -684742,7 +684748,8 @@ function generateTemplate(record) {
|
|
|
684742
684748
|
balanceDescription = '1';
|
|
684743
684749
|
}
|
|
684744
684750
|
}
|
|
684745
|
-
|
|
684751
|
+
let descriptionContents = balanceDescription ? `This vault contains ${balanceDescription} ${nameAndImage.assetName} ${nameAndImage.explorer}.` : '';
|
|
684752
|
+
nameAndImage.description = nameAndImage.description + `${descriptionContents}\n\n${_this.description}`;
|
|
684746
684753
|
}
|
|
684747
684754
|
let viewOnEmblemFinanceLink = '';
|
|
684748
684755
|
if (_this.collectionType === "ERC1155") {
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -219,6 +219,8 @@ export function generateTemplate(record: any) {
|
|
|
219
219
|
allowed = data[0].name == "Bel" && data[0].balance > 0 && Number.isInteger(data[0].balance)
|
|
220
220
|
} else if (recordName == "Namecoin") {
|
|
221
221
|
allowed = data && record.nativeAssets.includes(data[0].coin) ? true: false
|
|
222
|
+
} else if (recordName == "Embels"){
|
|
223
|
+
allowed = true
|
|
222
224
|
} else { // XCP
|
|
223
225
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
224
226
|
}
|
|
@@ -250,6 +252,8 @@ export function generateTemplate(record: any) {
|
|
|
250
252
|
allowedName = asset == "Bel" ? true : false
|
|
251
253
|
} else if (recordName == "Namecoin") {
|
|
252
254
|
allowedName = asset? true: false
|
|
255
|
+
} else if (recordName == "Embels"){
|
|
256
|
+
allowedName = true
|
|
253
257
|
} else { // XCP
|
|
254
258
|
let curatedItemFound = NFT_DATA[asset];
|
|
255
259
|
allowedName = asset && curatedItemFound ? true : false;
|
|
@@ -382,7 +386,8 @@ export function generateTemplate(record: any) {
|
|
|
382
386
|
balanceDescription = '1';
|
|
383
387
|
}
|
|
384
388
|
}
|
|
385
|
-
|
|
389
|
+
let descriptionContents = balanceDescription ? `This vault contains ${balanceDescription} ${nameAndImage.assetName} ${nameAndImage.explorer}.`: ''
|
|
390
|
+
nameAndImage.description = nameAndImage.description + `${descriptionContents}\n\n${_this.description}`;
|
|
386
391
|
}
|
|
387
392
|
|
|
388
393
|
let viewOnEmblemFinanceLink = '';
|