@keyringnetwork/keyring-connect-sdk 0.0.5 → 0.0.7

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/main.js CHANGED
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.KeyringConnect = void 0;
13
- const env_1 = require("./env");
14
13
  const types_1 = require("./types");
15
14
  class KeyringConnect {
16
15
  static launchExtension(data) {
@@ -26,12 +25,11 @@ class KeyringConnect {
26
25
  static isKeyringConnectInstalled() {
27
26
  return __awaiter(this, void 0, void 0, function* () {
28
27
  try {
29
- const url = `chrome-extension://${env_1.ENV.EXTENSION_ID}/icon/16.png`;
30
- const { statusText } = yield fetch(url);
31
- if (statusText === 'OK') {
32
- return true;
33
- }
34
- return false;
28
+ const timeout = new Promise((resolve) => {
29
+ setTimeout(() => resolve(false), 2000);
30
+ });
31
+ const checkExtension = this.getExtensionState().then((state) => Boolean(state.manifest));
32
+ return Promise.race([timeout, checkExtension]);
35
33
  }
36
34
  catch (error) {
37
35
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyringnetwork/keyring-connect-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "An SDK for interacting with Keyring Connect browser extension",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -94,6 +94,7 @@ type ExtensionConfig = {
94
94
  krn_config?: {
95
95
  onboarding_api_url?: string; // URL of the onboarding API
96
96
  datastore_api_url?: string; // URL of the datastore API
97
+ analytics_api_url?: string; // URL of the analytics API
97
98
  };
98
99
  };
99
100
  ```
@@ -1 +0,0 @@
1
- export declare const EXTENSION_ID = "pninfjlkopblipjddjdannflkbdkcmpi";
package/dist/constants.js DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EXTENSION_ID = void 0;
4
- exports.EXTENSION_ID = 'pninfjlkopblipjddjdannflkbdkcmpi';
package/dist/env.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export declare const ENV: {
2
- EXTENSION_ID: string;
3
- };
package/dist/env.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ENV = void 0;
4
- exports.ENV = {
5
- EXTENSION_ID: 'pninfjlkopblipjddjdannflkbdkcmpi',
6
- };