emblem-vault-sdk 1.7.1 → 1.7.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 +7 -4
- package/dist/index.js +1 -1
- package/dist/utils.js +6 -3
- package/docs/bundle.js +7 -4
- package/package.json +1 -1
- package/src/utils.ts +5 -3
package/dist/bundle.js
CHANGED
|
@@ -684293,7 +684293,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
684293
684293
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
684294
684294
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
684295
684295
|
const utils_1 = require("./utils");
|
|
684296
|
-
const SDK_VERSION = '1.7.
|
|
684296
|
+
const SDK_VERSION = '1.7.3';
|
|
684297
684297
|
class EmblemVaultSDK {
|
|
684298
684298
|
constructor(apiKey, baseUrl) {
|
|
684299
684299
|
this.apiKey = apiKey;
|
|
@@ -684750,8 +684750,11 @@ function generateTemplate(record) {
|
|
|
684750
684750
|
else if (recordName == "Embels") {
|
|
684751
684751
|
allowed = true;
|
|
684752
684752
|
}
|
|
684753
|
-
else if (
|
|
684754
|
-
allowed = data && data[0].coin ==
|
|
684753
|
+
else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
684754
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase();
|
|
684755
|
+
}
|
|
684756
|
+
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
684757
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name;
|
|
684755
684758
|
}
|
|
684756
684759
|
else { // XCP
|
|
684757
684760
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
@@ -684796,7 +684799,7 @@ function generateTemplate(record) {
|
|
|
684796
684799
|
else if (recordName == "Embels") {
|
|
684797
684800
|
allowedName = true;
|
|
684798
684801
|
}
|
|
684799
|
-
else if (recordName == "BitcoinOrdinals") {
|
|
684802
|
+
else if (recordName == "BitcoinOrdinals" || recordName == "BitcoinPunks" || recordName == "filthyFiat" || recordName == "Megapunks" || recordName == "TwelveFold" || recordName == "Bitcoin DeGods" || recordName == "Bitcoin Frogs" || recordName == "Ordinal Maxi Biz" || recordName == "NodeMonkes" || recordName == "Bitmap" || recordName == "Ordinal Punks" || recordName == "Bitcoin Rocks" || recordName == "OnChainMonkey (OCM) Dimentions") {
|
|
684800
684803
|
allowedName = true;
|
|
684801
684804
|
}
|
|
684802
684805
|
else { // XCP
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
36
36
|
const utils_1 = require("./utils");
|
|
37
|
-
const SDK_VERSION = '1.7.
|
|
37
|
+
const SDK_VERSION = '1.7.3';
|
|
38
38
|
class EmblemVaultSDK {
|
|
39
39
|
constructor(apiKey, baseUrl) {
|
|
40
40
|
this.apiKey = apiKey;
|
package/dist/utils.js
CHANGED
|
@@ -250,8 +250,11 @@ function generateTemplate(record) {
|
|
|
250
250
|
else if (recordName == "Embels") {
|
|
251
251
|
allowed = true;
|
|
252
252
|
}
|
|
253
|
-
else if (
|
|
254
|
-
allowed = data && data[0].coin ==
|
|
253
|
+
else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
254
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase();
|
|
255
|
+
}
|
|
256
|
+
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
257
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name;
|
|
255
258
|
}
|
|
256
259
|
else { // XCP
|
|
257
260
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
@@ -296,7 +299,7 @@ function generateTemplate(record) {
|
|
|
296
299
|
else if (recordName == "Embels") {
|
|
297
300
|
allowedName = true;
|
|
298
301
|
}
|
|
299
|
-
else if (recordName == "BitcoinOrdinals") {
|
|
302
|
+
else if (recordName == "BitcoinOrdinals" || recordName == "BitcoinPunks" || recordName == "filthyFiat" || recordName == "Megapunks" || recordName == "TwelveFold" || recordName == "Bitcoin DeGods" || recordName == "Bitcoin Frogs" || recordName == "Ordinal Maxi Biz" || recordName == "NodeMonkes" || recordName == "Bitmap" || recordName == "Ordinal Punks" || recordName == "Bitcoin Rocks" || recordName == "OnChainMonkey (OCM) Dimentions") {
|
|
300
303
|
allowedName = true;
|
|
301
304
|
}
|
|
302
305
|
else { // XCP
|
package/docs/bundle.js
CHANGED
|
@@ -684293,7 +684293,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
684293
684293
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
684294
684294
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
684295
684295
|
const utils_1 = require("./utils");
|
|
684296
|
-
const SDK_VERSION = '1.7.
|
|
684296
|
+
const SDK_VERSION = '1.7.3';
|
|
684297
684297
|
class EmblemVaultSDK {
|
|
684298
684298
|
constructor(apiKey, baseUrl) {
|
|
684299
684299
|
this.apiKey = apiKey;
|
|
@@ -684750,8 +684750,11 @@ function generateTemplate(record) {
|
|
|
684750
684750
|
else if (recordName == "Embels") {
|
|
684751
684751
|
allowed = true;
|
|
684752
684752
|
}
|
|
684753
|
-
else if (
|
|
684754
|
-
allowed = data && data[0].coin ==
|
|
684753
|
+
else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
684754
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase();
|
|
684755
|
+
}
|
|
684756
|
+
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
684757
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name;
|
|
684755
684758
|
}
|
|
684756
684759
|
else { // XCP
|
|
684757
684760
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
@@ -684796,7 +684799,7 @@ function generateTemplate(record) {
|
|
|
684796
684799
|
else if (recordName == "Embels") {
|
|
684797
684800
|
allowedName = true;
|
|
684798
684801
|
}
|
|
684799
|
-
else if (recordName == "BitcoinOrdinals") {
|
|
684802
|
+
else if (recordName == "BitcoinOrdinals" || recordName == "BitcoinPunks" || recordName == "filthyFiat" || recordName == "Megapunks" || recordName == "TwelveFold" || recordName == "Bitcoin DeGods" || recordName == "Bitcoin Frogs" || recordName == "Ordinal Maxi Biz" || recordName == "NodeMonkes" || recordName == "Bitmap" || recordName == "Ordinal Punks" || recordName == "Bitcoin Rocks" || recordName == "OnChainMonkey (OCM) Dimentions") {
|
|
684800
684803
|
allowedName = true;
|
|
684801
684804
|
}
|
|
684802
684805
|
else { // XCP
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -222,8 +222,10 @@ export function generateTemplate(record: any) {
|
|
|
222
222
|
allowed = data && record.nativeAssets.includes(data[0].coin) ? true: false
|
|
223
223
|
} else if (recordName == "Embels"){
|
|
224
224
|
allowed = true
|
|
225
|
-
} else if (
|
|
226
|
-
allowed = data && data[0].coin ==
|
|
225
|
+
} else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
226
|
+
allowed = data && data[0].coin.toLowerCase() ==_this.collectionChain.toLowerCase()
|
|
227
|
+
} else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection" ) {
|
|
228
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name
|
|
227
229
|
} else { // XCP
|
|
228
230
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
229
231
|
}
|
|
@@ -257,7 +259,7 @@ export function generateTemplate(record: any) {
|
|
|
257
259
|
allowedName = asset? true: false
|
|
258
260
|
} else if (recordName == "Embels"){
|
|
259
261
|
allowedName = true
|
|
260
|
-
} else if (recordName == "BitcoinOrdinals"){
|
|
262
|
+
} else if (recordName == "BitcoinOrdinals" || recordName == "BitcoinPunks" || recordName == "filthyFiat" || recordName == "Megapunks" || recordName == "TwelveFold" || recordName == "Bitcoin DeGods" || recordName == "Bitcoin Frogs" || recordName == "Ordinal Maxi Biz" || recordName == "NodeMonkes" || recordName == "Bitmap" || recordName == "Ordinal Punks" || recordName == "Bitcoin Rocks" || recordName == "OnChainMonkey (OCM) Dimentions") {
|
|
261
263
|
allowedName = true
|
|
262
264
|
} else { // XCP
|
|
263
265
|
let curatedItemFound = NFT_DATA[asset];
|