emblem-vault-sdk 1.10.2 → 1.10.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 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.10.2';
711424
+ const SDK_VERSION = '1.10.3';
711425
711425
  class EmblemVaultSDK {
711426
711426
  constructor(apiKey, baseUrl) {
711427
711427
  this.apiKey = apiKey;
@@ -711532,7 +711532,7 @@ class EmblemVaultSDK {
711532
711532
  if (callback) {
711533
711533
  callback('refreshing Balance');
711534
711534
  }
711535
- let url = `${this.v1Url}/vault/balance/${tokenId}?live=true`;
711535
+ let url = `${this.v3Url}/vault/balance/${tokenId}?live=true`;
711536
711536
  let balance = yield (0, utils_1.fetchData)(url, this.apiKey);
711537
711537
  if (callback) {
711538
711538
  callback('received Balance', balance.balances);
@@ -712631,7 +712631,7 @@ function checkContentType(url) {
712631
712631
  // Function to make fetch requests
712632
712632
  function fetchUrl(method) {
712633
712633
  const controller = new AbortController();
712634
- const timeoutId = setTimeout(() => controller.abort(), 3000); // 10 seconds timeout
712634
+ const timeoutId = setTimeout(() => controller.abort(), 3000); // 3 seconds timeout (probably need to make this timeout only for HEAD)
712635
712635
  return fetch(url, { method: method, signal: controller.signal })
712636
712636
  .then(response => {
712637
712637
  clearTimeout(timeoutId);
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.10.2';
38
+ const SDK_VERSION = '1.10.3';
39
39
  class EmblemVaultSDK {
40
40
  constructor(apiKey, baseUrl) {
41
41
  this.apiKey = apiKey;
@@ -146,7 +146,7 @@ class EmblemVaultSDK {
146
146
  if (callback) {
147
147
  callback('refreshing Balance');
148
148
  }
149
- let url = `${this.v1Url}/vault/balance/${tokenId}?live=true`;
149
+ let url = `${this.v3Url}/vault/balance/${tokenId}?live=true`;
150
150
  let balance = yield (0, utils_1.fetchData)(url, this.apiKey);
151
151
  if (callback) {
152
152
  callback('received Balance', balance.balances);
package/dist/utils.js CHANGED
@@ -602,7 +602,7 @@ function checkContentType(url) {
602
602
  // Function to make fetch requests
603
603
  function fetchUrl(method) {
604
604
  const controller = new AbortController();
605
- const timeoutId = setTimeout(() => controller.abort(), 3000); // 10 seconds timeout
605
+ const timeoutId = setTimeout(() => controller.abort(), 3000); // 3 seconds timeout (probably need to make this timeout only for HEAD)
606
606
  return fetch(url, { method: method, signal: controller.signal })
607
607
  .then(response => {
608
608
  clearTimeout(timeoutId);
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.10.2';
711424
+ const SDK_VERSION = '1.10.3';
711425
711425
  class EmblemVaultSDK {
711426
711426
  constructor(apiKey, baseUrl) {
711427
711427
  this.apiKey = apiKey;
@@ -711532,7 +711532,7 @@ class EmblemVaultSDK {
711532
711532
  if (callback) {
711533
711533
  callback('refreshing Balance');
711534
711534
  }
711535
- let url = `${this.v1Url}/vault/balance/${tokenId}?live=true`;
711535
+ let url = `${this.v3Url}/vault/balance/${tokenId}?live=true`;
711536
711536
  let balance = yield (0, utils_1.fetchData)(url, this.apiKey);
711537
711537
  if (callback) {
711538
711538
  callback('received Balance', balance.balances);
@@ -712631,7 +712631,7 @@ function checkContentType(url) {
712631
712631
  // Function to make fetch requests
712632
712632
  function fetchUrl(method) {
712633
712633
  const controller = new AbortController();
712634
- const timeoutId = setTimeout(() => controller.abort(), 3000); // 10 seconds timeout
712634
+ const timeoutId = setTimeout(() => controller.abort(), 3000); // 3 seconds timeout (probably need to make this timeout only for HEAD)
712635
712635
  return fetch(url, { method: method, signal: controller.signal })
712636
712636
  .then(response => {
712637
712637
  clearTimeout(timeoutId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emblem-vault-sdk",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "Emblem Vault Software Development Kit",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -112,7 +112,7 @@ class EmblemVaultSDK {
112
112
  async refreshBalance(tokenId: string, callback: any = null): Promise<MetaData> {
113
113
  genericGuard(tokenId, "string", "tokenId");
114
114
  if (callback) { callback('refreshing Balance')}
115
- let url = `${this.v1Url}/vault/balance/${tokenId}?live=true`;
115
+ let url = `${this.v3Url}/vault/balance/${tokenId}?live=true`;
116
116
  let balance = await fetchData(url, this.apiKey);
117
117
  if (callback) { callback('received Balance', balance.balances)}
118
118
  return balance?.balances || [];