@keyringnetwork/keyring-connect-sdk 0.0.7 → 0.0.8

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.d.ts CHANGED
@@ -1,6 +1,19 @@
1
1
  import { ExtensionConfig, ExtensionState } from './types';
2
+ /**
3
+ * Class for interacting with the Keyring Connect browser extension
4
+ */
2
5
  export declare class KeyringConnect {
6
+ /**
7
+ * Launch the Keyring Connect Extension with the provided configuration
8
+ * @note This will throw an error if the extension is not installed
9
+ */
3
10
  static launchExtension(data: ExtensionConfig): Promise<void>;
11
+ /**
12
+ * Check if Keyring Connect Extension is installed and ready to use
13
+ */
4
14
  static isKeyringConnectInstalled(): Promise<boolean>;
15
+ /**
16
+ * Get the current state of the Keyring Connect Extension to allow for UI updates
17
+ */
5
18
  static getExtensionState(): Promise<ExtensionState>;
6
19
  }
package/dist/main.js CHANGED
@@ -11,7 +11,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.KeyringConnect = void 0;
13
13
  const types_1 = require("./types");
14
+ /**
15
+ * Class for interacting with the Keyring Connect browser extension
16
+ */
14
17
  class KeyringConnect {
18
+ /**
19
+ * Launch the Keyring Connect Extension with the provided configuration
20
+ * @note This will throw an error if the extension is not installed
21
+ */
15
22
  static launchExtension(data) {
16
23
  return __awaiter(this, void 0, void 0, function* () {
17
24
  const keyringConnectAvailable = yield this.isKeyringConnectInstalled();
@@ -22,6 +29,9 @@ class KeyringConnect {
22
29
  window.postMessage({ type: types_1.EVENT_ACTIONS.LAUNCH_KEYRING_CONNECT, data }, '*');
23
30
  });
24
31
  }
32
+ /**
33
+ * Check if Keyring Connect Extension is installed and ready to use
34
+ */
25
35
  static isKeyringConnectInstalled() {
26
36
  return __awaiter(this, void 0, void 0, function* () {
27
37
  try {
@@ -36,6 +46,9 @@ class KeyringConnect {
36
46
  }
37
47
  });
38
48
  }
49
+ /**
50
+ * Get the current state of the Keyring Connect Extension to allow for UI updates
51
+ */
39
52
  static getExtensionState() {
40
53
  return __awaiter(this, void 0, void 0, function* () {
41
54
  return new Promise((resolve) => {
package/dist/types.d.ts CHANGED
@@ -45,6 +45,10 @@ export type ExtensionConfig = {
45
45
  * The URL of the datastore API.
46
46
  */
47
47
  datastore_api_url?: string;
48
+ /**
49
+ * The URL of the analytics API.
50
+ */
51
+ analytics_api_url?: string;
48
52
  };
49
53
  };
50
54
  export type ExtensionStatus = 'idle' | 'mounted' | 'proving' | 'prove_success' | 'error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyringnetwork/keyring-connect-sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
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",