emblem-vault-sdk 1.12.6 → 2.0.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 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 = '1.12.6';
711424
+ const SDK_VERSION = '2.0.0';
711425
711425
  class EmblemVaultSDK {
711426
711426
  constructor(apiKey, baseUrl) {
711427
711427
  this.apiKey = apiKey;
@@ -711431,7 +711431,7 @@ class EmblemVaultSDK {
711431
711431
  }
711432
711432
  this.v1Url = 'https://api2.emblemvault.io';
711433
711433
  this.baseUrl = baseUrl || 'https://v2.emblemvault.io';
711434
- this.v3Url = 'https://emblemvault-io-v3-6156a7b1ac82.herokuapp.com';
711434
+ this.v3Url = 'https://v3.emblemvault.io';
711435
711435
  this.sigUrl = 'https://tor-us-signer-coval.vercel.app';
711436
711436
  }
711437
711437
  // Example method structure
@@ -712573,7 +712573,11 @@ function generateTemplate(record) {
712573
712573
  toAddress: { type: "user-provided" },
712574
712574
  chainId: { type: "user-provided" },
712575
712575
  experimental: true,
712576
- targetContract: _this,
712576
+ targetContract: {
712577
+ "name": _this.name,
712578
+ "description": _this.description,
712579
+ "fusion": _this.fusion
712580
+ },
712577
712581
  targetAsset: {
712578
712582
  name: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : "Loading...",
712579
712583
  image: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : _this.loading(),
@@ -712582,6 +712586,9 @@ function generateTemplate(record) {
712582
712586
  projectName: _this.loadTypes.includes('select') ? _this.name : null
712583
712587
  }
712584
712588
  };
712589
+ Object.keys(_this.contracts).forEach(address => {
712590
+ template.targetContract[address] = _this.contracts[address];
712591
+ });
712585
712592
  const removeNulls = (obj) => {
712586
712593
  Object.keys(obj).forEach(key => {
712587
712594
  if (obj[key] && typeof obj[key] === 'object')
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 = '1.12.6';
38
+ const SDK_VERSION = '2.0.0';
39
39
  class EmblemVaultSDK {
40
40
  constructor(apiKey, baseUrl) {
41
41
  this.apiKey = apiKey;
@@ -45,7 +45,7 @@ class EmblemVaultSDK {
45
45
  }
46
46
  this.v1Url = 'https://api2.emblemvault.io';
47
47
  this.baseUrl = baseUrl || 'https://v2.emblemvault.io';
48
- this.v3Url = 'https://emblemvault-io-v3-6156a7b1ac82.herokuapp.com';
48
+ this.v3Url = 'https://v3.emblemvault.io';
49
49
  this.sigUrl = 'https://tor-us-signer-coval.vercel.app';
50
50
  }
51
51
  // Example method structure
package/dist/utils.js CHANGED
@@ -522,7 +522,11 @@ function generateTemplate(record) {
522
522
  toAddress: { type: "user-provided" },
523
523
  chainId: { type: "user-provided" },
524
524
  experimental: true,
525
- targetContract: _this,
525
+ targetContract: {
526
+ "name": _this.name,
527
+ "description": _this.description,
528
+ "fusion": _this.fusion
529
+ },
526
530
  targetAsset: {
527
531
  name: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : "Loading...",
528
532
  image: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : _this.loading(),
@@ -531,6 +535,9 @@ function generateTemplate(record) {
531
535
  projectName: _this.loadTypes.includes('select') ? _this.name : null
532
536
  }
533
537
  };
538
+ Object.keys(_this.contracts).forEach(address => {
539
+ template.targetContract[address] = _this.contracts[address];
540
+ });
534
541
  const removeNulls = (obj) => {
535
542
  Object.keys(obj).forEach(key => {
536
543
  if (obj[key] && typeof obj[key] === 'object')
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 = '1.12.6';
711424
+ const SDK_VERSION = '2.0.0';
711425
711425
  class EmblemVaultSDK {
711426
711426
  constructor(apiKey, baseUrl) {
711427
711427
  this.apiKey = apiKey;
@@ -711431,7 +711431,7 @@ class EmblemVaultSDK {
711431
711431
  }
711432
711432
  this.v1Url = 'https://api2.emblemvault.io';
711433
711433
  this.baseUrl = baseUrl || 'https://v2.emblemvault.io';
711434
- this.v3Url = 'https://emblemvault-io-v3-6156a7b1ac82.herokuapp.com';
711434
+ this.v3Url = 'https://v3.emblemvault.io';
711435
711435
  this.sigUrl = 'https://tor-us-signer-coval.vercel.app';
711436
711436
  }
711437
711437
  // Example method structure
@@ -712573,7 +712573,11 @@ function generateTemplate(record) {
712573
712573
  toAddress: { type: "user-provided" },
712574
712574
  chainId: { type: "user-provided" },
712575
712575
  experimental: true,
712576
- targetContract: _this,
712576
+ targetContract: {
712577
+ "name": _this.name,
712578
+ "description": _this.description,
712579
+ "fusion": _this.fusion
712580
+ },
712577
712581
  targetAsset: {
712578
712582
  name: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : "Loading...",
712579
712583
  image: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : _this.loading(),
@@ -712582,6 +712586,9 @@ function generateTemplate(record) {
712582
712586
  projectName: _this.loadTypes.includes('select') ? _this.name : null
712583
712587
  }
712584
712588
  };
712589
+ Object.keys(_this.contracts).forEach(address => {
712590
+ template.targetContract[address] = _this.contracts[address];
712591
+ });
712585
712592
  const removeNulls = (obj) => {
712586
712593
  Object.keys(obj).forEach(key => {
712587
712594
  if (obj[key] && typeof obj[key] === 'object')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emblem-vault-sdk",
3
- "version": "1.12.6",
3
+ "version": "2.0.0",
4
4
  "description": "Emblem Vault Software Development Kit",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -17,7 +17,7 @@ class EmblemVaultSDK {
17
17
  }
18
18
  this.v1Url = 'https://api2.emblemvault.io';
19
19
  this.baseUrl = baseUrl || 'https://v2.emblemvault.io';
20
- this.v3Url = 'https://emblemvault-io-v3-6156a7b1ac82.herokuapp.com';
20
+ this.v3Url = 'https://v3.emblemvault.io';
21
21
  this.sigUrl = 'https://tor-us-signer-coval.vercel.app';
22
22
  }
23
23
 
package/src/utils.ts CHANGED
@@ -484,20 +484,27 @@ export function generateTemplate(record: any) {
484
484
  return nameAndImage
485
485
  },
486
486
  generateCreateTemplate: (_this: any) =>{
487
- let template: any = {
487
+ let template = {
488
488
  fromAddress: { type: "user-provided" },
489
489
  toAddress: { type: "user-provided" },
490
490
  chainId: { type: "user-provided" },
491
491
  experimental: true,
492
- targetContract: _this,
492
+ targetContract: {
493
+ "name": _this.name,
494
+ "description": _this.description,
495
+ "fusion": _this.fusion
496
+ },
493
497
  targetAsset: {
494
- name: _this.loadTypes.includes('detailed') ? { type: "user-provided"}: _this.loadTypes.includes('select')? { type: "selection-provided"}: "Loading...",
495
- image: _this.loadTypes.includes('detailed') ? { type: "user-provided"}: _this.loadTypes.includes('select')? { type: "selection-provided"}: _this.loading(),
496
- description: _this.loadTypes.includes('detailed') ? { type: "user-provided"}: null,
497
- ownedImage: _this.loadTypes.includes('detailed') ? { type: "user-provided"}: null,
498
- projectName: _this.loadTypes.includes('select')? _this.name: null
498
+ name: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : "Loading...",
499
+ image: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : _this.loadTypes.includes('select') ? { type: "selection-provided" } : _this.loading(),
500
+ description: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : null,
501
+ ownedImage: _this.loadTypes.includes('detailed') ? { type: "user-provided" } : null,
502
+ projectName: _this.loadTypes.includes('select') ? _this.name : null
499
503
  }
500
- }
504
+ };
505
+ Object.keys(_this.contracts).forEach(address=>{
506
+ (template.targetContract as any)[address] = _this.contracts[address]
507
+ })
501
508
  const removeNulls = (obj: { [x: string]: any; }) => {
502
509
  Object.keys(obj).forEach(key => {
503
510
  if (obj[key] && typeof obj[key] === 'object') removeNulls(obj[key]);