emblem-vault-sdk 2.0.0 → 2.2.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 +6 -1
- package/dist/index.js +1 -1
- package/dist/utils.js +5 -0
- package/docs/bundle.js +6 -1
- package/package.json +1 -1
- package/src/utils.ts +4 -0
package/dist/bundle.js
CHANGED
|
@@ -711421,7 +711421,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
711421
711421
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
711422
711422
|
const utils_1 = require("./utils");
|
|
711423
711423
|
const derive_1 = require("./derive");
|
|
711424
|
-
const SDK_VERSION = '2.
|
|
711424
|
+
const SDK_VERSION = '2.2.0';
|
|
711425
711425
|
class EmblemVaultSDK {
|
|
711426
711426
|
constructor(apiKey, baseUrl) {
|
|
711427
711427
|
this.apiKey = apiKey;
|
|
@@ -712398,6 +712398,11 @@ function generateTemplate(record) {
|
|
|
712398
712398
|
message = `Found ${firstAsset.coin} asset, expected ${_this.collectionChain} asset.`;
|
|
712399
712399
|
}
|
|
712400
712400
|
}
|
|
712401
|
+
else if (recordName == "COVAL Timelock") {
|
|
712402
|
+
let covalAssets = data.filter((item) => item.name == "Circuits of Value");
|
|
712403
|
+
let covalTotalBalance = covalAssets.reduce((acc, item) => acc + item.balance, 0);
|
|
712404
|
+
allowed = covalTotalBalance == 5000 || covalTotalBalance == 50000 || covalTotalBalance == 500000;
|
|
712405
|
+
}
|
|
712401
712406
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
712402
712407
|
if (recordName == "Bitcoin Punks") {
|
|
712403
712408
|
firstAsset = _this.filterNativeBalances({ balances: data }, _this)[0];
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
36
36
|
const utils_1 = require("./utils");
|
|
37
37
|
const derive_1 = require("./derive");
|
|
38
|
-
const SDK_VERSION = '2.
|
|
38
|
+
const SDK_VERSION = '2.2.0';
|
|
39
39
|
class EmblemVaultSDK {
|
|
40
40
|
constructor(apiKey, baseUrl) {
|
|
41
41
|
this.apiKey = apiKey;
|
package/dist/utils.js
CHANGED
|
@@ -347,6 +347,11 @@ function generateTemplate(record) {
|
|
|
347
347
|
message = `Found ${firstAsset.coin} asset, expected ${_this.collectionChain} asset.`;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
+
else if (recordName == "COVAL Timelock") {
|
|
351
|
+
let covalAssets = data.filter((item) => item.name == "Circuits of Value");
|
|
352
|
+
let covalTotalBalance = covalAssets.reduce((acc, item) => acc + item.balance, 0);
|
|
353
|
+
allowed = covalTotalBalance == 5000 || covalTotalBalance == 50000 || covalTotalBalance == 500000;
|
|
354
|
+
}
|
|
350
355
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
351
356
|
if (recordName == "Bitcoin Punks") {
|
|
352
357
|
firstAsset = _this.filterNativeBalances({ balances: data }, _this)[0];
|
package/docs/bundle.js
CHANGED
|
@@ -711421,7 +711421,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
711421
711421
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
711422
711422
|
const utils_1 = require("./utils");
|
|
711423
711423
|
const derive_1 = require("./derive");
|
|
711424
|
-
const SDK_VERSION = '2.
|
|
711424
|
+
const SDK_VERSION = '2.2.0';
|
|
711425
711425
|
class EmblemVaultSDK {
|
|
711426
711426
|
constructor(apiKey, baseUrl) {
|
|
711427
711427
|
this.apiKey = apiKey;
|
|
@@ -712398,6 +712398,11 @@ function generateTemplate(record) {
|
|
|
712398
712398
|
message = `Found ${firstAsset.coin} asset, expected ${_this.collectionChain} asset.`;
|
|
712399
712399
|
}
|
|
712400
712400
|
}
|
|
712401
|
+
else if (recordName == "COVAL Timelock") {
|
|
712402
|
+
let covalAssets = data.filter((item) => item.name == "Circuits of Value");
|
|
712403
|
+
let covalTotalBalance = covalAssets.reduce((acc, item) => acc + item.balance, 0);
|
|
712404
|
+
allowed = covalTotalBalance == 5000 || covalTotalBalance == 50000 || covalTotalBalance == 500000;
|
|
712405
|
+
}
|
|
712401
712406
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
712402
712407
|
if (recordName == "Bitcoin Punks") {
|
|
712403
712408
|
firstAsset = _this.filterNativeBalances({ balances: data }, _this)[0];
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -311,6 +311,10 @@ export function generateTemplate(record: any) {
|
|
|
311
311
|
if(!allowed){
|
|
312
312
|
message = `Found ${firstAsset.coin} asset, expected ${_this.collectionChain} asset.`
|
|
313
313
|
}
|
|
314
|
+
} else if (recordName == "COVAL Timelock") {
|
|
315
|
+
let covalAssets = data.filter((item: { name: string; }) => item.name == "Circuits of Value")
|
|
316
|
+
let covalTotalBalance = covalAssets.reduce((acc: number, item: { balance: number; }) => acc + item.balance, 0)
|
|
317
|
+
allowed = covalTotalBalance == 5000 || covalTotalBalance == 50000 || covalTotalBalance == 500000
|
|
314
318
|
} else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
315
319
|
if (recordName == "Bitcoin Punks") {
|
|
316
320
|
firstAsset = _this.filterNativeBalances({balances: data}, _this)[0]
|