@keyringnetwork/keyring-connect-sdk 2.0.2 → 2.1.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.
@@ -272,7 +272,7 @@
272
272
  "label": "Profile information from Kraken"
273
273
  }
274
274
  ],
275
- "target_url": null,
275
+ "target_url": "https://www.kraken.com/",
276
276
  "user_actions": [
277
277
  "Log in",
278
278
  "Navigate to your Profile page",
@@ -597,7 +597,8 @@
597
597
  "headers": [
598
598
  "Cookie",
599
599
  "User-Agent",
600
- "x-device-id"
600
+ "x-device-id",
601
+ "x-client-version"
601
602
  ],
602
603
  "method": "GET",
603
604
  "required_cookies": null,
@@ -607,7 +608,7 @@
607
608
  "label": "User information from revolut"
608
609
  }
609
610
  ],
610
- "target_url": "https://app.revolut.com/api/retail/user/current/wallet",
611
+ "target_url": null,
611
612
  "user_actions": [
612
613
  "Login",
613
614
  "Navigate to your profile page",
@@ -653,7 +654,7 @@
653
654
  "label": "KYC from Keyring Connect"
654
655
  }
655
656
  ],
656
- "target_url": null,
657
+ "target_url": "https://app.keyringdev.network/",
657
658
  "user_actions": [
658
659
  "Make sure you have logged in",
659
660
  "Navigate to the marketplace"
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { KeyringConnect } from './main';
2
- export * from './types';
1
+ export { KeyringConnect } from "./main";
2
+ export * from "./types";
package/dist/main.js CHANGED
@@ -13,6 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.KeyringConnect = void 0;
16
+ const contracts_abi_1 = require("@keyringnetwork/contracts-abi");
16
17
  const datasources_json_1 = __importDefault(require("./constants/datasources.json"));
17
18
  const types_1 = require("./types");
18
19
  /**
@@ -99,8 +100,7 @@ class KeyringConnect {
99
100
  if (!config.credential_config.wallet_address) {
100
101
  throw new Error("Wallet address is required");
101
102
  }
102
- const validChainIds = Object.keys(types_1.CHAIN_IDS[types_1.CHAIN_FAMILY.EVM]).map((key) => types_1.CHAIN_IDS[types_1.CHAIN_FAMILY.EVM][key]);
103
- if (!validChainIds.includes(config.credential_config.chain_id)) {
103
+ if (!(config.credential_config.chain_id in contracts_abi_1.SupportedChainIds)) {
104
104
  throw new Error("Invalid chain ID");
105
105
  }
106
106
  return config;
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { KrnSupportedChainId as SupportedChainId } from "@keyringnetwork/contracts-abi";
1
2
  export declare enum EVENT_ACTIONS {
2
3
  LAUNCH_KEYRING_CONNECT = "LAUNCH_KEYRING_CONNECT",
3
4
  GET_STATUS = "GET_STATUS",
@@ -23,7 +24,7 @@ export type ExtensionSDKConfig = {
23
24
  */
24
25
  logo_url: string;
25
26
  /**
26
- * The policy ID of the client.
27
+ * The onchain policy ID of the client.
27
28
  */
28
29
  policy_id: number;
29
30
  /**
@@ -55,28 +56,6 @@ export type ExtensionSDKConfig = {
55
56
  websocketProxyUrl?: string;
56
57
  };
57
58
  };
58
- export declare enum CHAIN_FAMILY {
59
- EVM = "EVM",
60
- SOLANA = "SOLANA"
61
- }
62
- export declare const CHAIN_IDS: {
63
- readonly EVM: {
64
- readonly MAINNET: 1;
65
- readonly OPTIMISM: 10;
66
- readonly SEPOLIA: 11155111;
67
- readonly ARBITRUM: 42161;
68
- readonly BASE: 8453;
69
- readonly ZKSYNC: 324;
70
- readonly AVALANCHE: 43114;
71
- readonly POLYGON: 137;
72
- readonly HOLESKY: 17000;
73
- };
74
- readonly SOLANA: {
75
- readonly MAINNET: 1915121141;
76
- };
77
- };
78
- export type EVMChainId = (typeof CHAIN_IDS)[typeof CHAIN_FAMILY.EVM][keyof (typeof CHAIN_IDS)[typeof CHAIN_FAMILY.EVM]];
79
- export type SupportedChainId = EVMChainId;
80
59
  export type ExtensionLaunchConfig = {
81
60
  client: {
82
61
  client_name: string;
package/dist/types.js CHANGED
@@ -1,31 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHAIN_IDS = exports.CHAIN_FAMILY = exports.EVENT_ACTIONS = void 0;
3
+ exports.EVENT_ACTIONS = void 0;
4
4
  var EVENT_ACTIONS;
5
5
  (function (EVENT_ACTIONS) {
6
6
  EVENT_ACTIONS["LAUNCH_KEYRING_CONNECT"] = "LAUNCH_KEYRING_CONNECT";
7
7
  EVENT_ACTIONS["GET_STATUS"] = "GET_STATUS";
8
8
  EVENT_ACTIONS["KEYRING_CONNECT_STATUS"] = "KEYRING_CONNECT_STATUS";
9
9
  })(EVENT_ACTIONS || (exports.EVENT_ACTIONS = EVENT_ACTIONS = {}));
10
- var CHAIN_FAMILY;
11
- (function (CHAIN_FAMILY) {
12
- CHAIN_FAMILY["EVM"] = "EVM";
13
- CHAIN_FAMILY["SOLANA"] = "SOLANA";
14
- })(CHAIN_FAMILY || (exports.CHAIN_FAMILY = CHAIN_FAMILY = {}));
15
- // Define chain IDs by family
16
- exports.CHAIN_IDS = {
17
- [CHAIN_FAMILY.EVM]: {
18
- MAINNET: 1,
19
- OPTIMISM: 10,
20
- SEPOLIA: 11155111,
21
- ARBITRUM: 42161,
22
- BASE: 8453,
23
- ZKSYNC: 324,
24
- AVALANCHE: 43114,
25
- POLYGON: 137,
26
- HOLESKY: 17000,
27
- },
28
- [CHAIN_FAMILY.SOLANA]: {
29
- MAINNET: 1915121141,
30
- },
31
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyringnetwork/keyring-connect-sdk",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
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",
@@ -16,9 +16,11 @@
16
16
  "keywords": [],
17
17
  "author": "",
18
18
  "license": "ISC",
19
+ "dependencies": {
20
+ "@keyringnetwork/contracts-abi": "2.2.0"
21
+ },
19
22
  "devDependencies": {
20
23
  "ts-node": "^10.9.2",
21
24
  "typescript": "^5.6.3"
22
- },
23
- "dependencies": {}
25
+ }
24
26
  }