emblem-vault-sdk 1.6.1 → 1.6.2

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
@@ -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.6.1';
684296
+ const SDK_VERSION = '1.6.2';
684297
684297
  class EmblemVaultSDK {
684298
684298
  constructor(apiKey, baseUrl) {
684299
684299
  this.apiKey = apiKey;
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.6.1';
37
+ const SDK_VERSION = '1.6.2';
38
38
  class EmblemVaultSDK {
39
39
  constructor(apiKey, baseUrl) {
40
40
  this.apiKey = apiKey;
package/docs/bels.html CHANGED
@@ -16,7 +16,9 @@
16
16
  <h1>Embels Emblem Steps</h1>
17
17
  <script src="./bundle.js"></script>
18
18
  <script>
19
- const sdk = new EmblemVaultSDK('demo');
19
+ const sdk = new EmblemVaultSDK('demo'); // Instantiate SDK
20
+
21
+ // Template used for creating vaults
20
22
  let embelsTemplate = {
21
23
  "fromAddress": null,
22
24
  "toAddress": null,
@@ -40,19 +42,23 @@
40
42
 
41
43
  <script>
42
44
  async function connectWeb3() {
43
- if (!defaultAccount) {
45
+ if (!defaultAccount) { // Only load web3 if not already loaded
44
46
  await sdk.loadWeb3()
45
47
  defaultAccount = await web3.eth.getAccounts().then(accounts => accounts[0])
46
48
  }
47
- await performCreateAndMint();
49
+ await performCreateAndMint(); // Create and mint a vault
48
50
  }
49
51
 
50
52
  async function performCreateAndMint() {
51
53
  clearLog();
54
+ // populate the template
52
55
  embelsTemplate.toAddress = defaultAccount;
53
56
  embelsTemplate.fromAddress = defaultAccount;
57
+
58
+ // Create a vault
54
59
  let vaultData = await sdk.createCuratedVault(embelsTemplate, updateLogCallback);
55
60
  if (vaultData.tokenId) {
61
+ // Perform Mint steps
56
62
  sdk.performMintChain(web3, vaultData.tokenId, embelsTemplate.targetContract.name, updateLogCallback).then(result => {
57
63
  updateLogCallback('Minting success', 'tokenId: ' + vaultData.tokenId)
58
64
  })
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.6.1';
684296
+ const SDK_VERSION = '1.6.2';
684297
684297
  class EmblemVaultSDK {
684298
684298
  constructor(apiKey, baseUrl) {
684299
684299
  this.apiKey = apiKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emblem-vault-sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Emble Vault Software Development Kit",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {