@keyringnetwork/keyring-connect-sdk 1.1.3 → 2.0.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.
@@ -546,6 +546,24 @@
546
546
  "id": "revolut_kyc_verified",
547
547
  "label": "KYC Verified",
548
548
  "rule_id": "revolut_kyc_verified"
549
+ },
550
+ {
551
+ "entity_type": "individual",
552
+ "id": "revolut_kyc_not_under_review",
553
+ "label": "KYC Not Under Review",
554
+ "rule_id": "revolut_kyc_not_under_review"
555
+ },
556
+ {
557
+ "entity_type": "individual",
558
+ "id": "revolut_kyc_user_status_active",
559
+ "label": "KYC User Status Active",
560
+ "rule_id": "revolut_kyc_user_status_active"
561
+ },
562
+ {
563
+ "entity_type": "individual",
564
+ "id": "revolut_kyc_not_in_fatf_tlsn-revolut-kyc",
565
+ "label": "Revolut Residence Country not on FATF",
566
+ "rule_id": "revolut_kyc_not_in_fatf_tlsn-revolut-kyc"
549
567
  }
550
568
  ],
551
569
  "endpoint": {
@@ -595,5 +613,50 @@
595
613
  "Navigate to your profile page",
596
614
  "The verification process will start automatically"
597
615
  ]
616
+ },
617
+ {
618
+ "id": "tlsn-keyring-connect",
619
+ "image": "https://uploads-ssl.webflow.com/65df8e71bab45b70f5433fba/664359927ac82d0c110ff6be_Keyring%20Icon%20Square.svg",
620
+ "label": "keyring-connect",
621
+ "link": "https://app.keyringdev.network",
622
+ "login_url": "https://app.keyringdev.network/login",
623
+ "name": "Keyring Connect",
624
+ "proof_sources": [
625
+ {
626
+ "claims": [
627
+ {
628
+ "entity_type": "individual",
629
+ "id": "keyring_connect_kyc",
630
+ "label": "KYC from Keyring Connect",
631
+ "rule_id": "keyring_connect_kyc"
632
+ }
633
+ ],
634
+ "endpoint": {
635
+ "body": null,
636
+ "data_bounds": null,
637
+ "disclosable_fields": [
638
+ {
639
+ "label": "user id",
640
+ "path": "id",
641
+ "key": "user_id"
642
+ }
643
+ ],
644
+ "headers": [
645
+ "user-agent",
646
+ "authorization"
647
+ ],
648
+ "method": "GET",
649
+ "required_cookies": null,
650
+ "url": "https://main.api.keyring-backend.krndev.net/api/v1/onboarding/users/me"
651
+ },
652
+ "id": "tlsn-keyring-connect-kyc",
653
+ "label": "KYC from Keyring Connect"
654
+ }
655
+ ],
656
+ "target_url": null,
657
+ "user_actions": [
658
+ "Make sure you have logged in",
659
+ "Navigate to the marketplace"
660
+ ]
598
661
  }
599
662
  ]
package/dist/main.js CHANGED
@@ -124,7 +124,7 @@ class KeyringConnect {
124
124
  return validatedConfig;
125
125
  }
126
126
  static convertToLaunchConfig(config) {
127
- var _a, _b, _c;
127
+ var _a, _b;
128
128
  const launchConfig = {
129
129
  client: {
130
130
  client_name: config.name,
@@ -132,22 +132,20 @@ class KeyringConnect {
132
132
  client_logo_url: config.logo_url,
133
133
  client_policy_id: config.policy_id,
134
134
  client_entity_id: (_a = config.krn_config) === null || _a === void 0 ? void 0 : _a.entity_id,
135
+ isolate_proving: config.isolate_proving,
135
136
  },
136
137
  krn_config: config.krn_config
137
138
  ? {
138
139
  keyring_api_url: config.krn_config.keyring_api_url,
139
140
  keyring_user_app_url: config.krn_config.keyring_user_app_url,
140
141
  analytics_api_url: config.krn_config.analytics_api_url,
141
- isolate_proving: config.krn_config.isolate_proving,
142
142
  notaryUrl: config.krn_config.notaryUrl,
143
- notaryWebsocketUrl: config.krn_config.notaryWebsocketUrl,
144
143
  websocketProxyUrl: config.krn_config.websocketProxyUrl,
145
144
  }
146
145
  : undefined,
147
146
  proof_config: config.proof_config,
148
147
  session_info: {
149
148
  access_token: (_b = config.krn_config) === null || _b === void 0 ? void 0 : _b.keyring_access_token,
150
- refresh_token: (_c = config.krn_config) === null || _c === void 0 ? void 0 : _c.keyring_refresh_token,
151
149
  },
152
150
  };
153
151
  return launchConfig;
package/dist/types.d.ts CHANGED
@@ -26,6 +26,10 @@ export type ExtensionSDKConfig = {
26
26
  * The policy ID of the client.
27
27
  */
28
28
  policy_id: number;
29
+ /**
30
+ * Whether to isolate the proving process. If true, will skip wallet interaction and on-chain credential creation
31
+ */
32
+ isolate_proving?: boolean;
29
33
  /**
30
34
  * Additional configuration to customize the extension's verification process.
31
35
  * @note should be used with caution as strict validation is applied to the proof config.
@@ -43,11 +47,8 @@ export type ExtensionSDKConfig = {
43
47
  keyring_user_app_url?: string;
44
48
  analytics_api_url?: string;
45
49
  keyring_access_token?: string;
46
- keyring_refresh_token?: string;
47
50
  entity_id?: string;
48
- isolate_proving?: boolean;
49
51
  notaryUrl?: string;
50
- notaryWebsocketUrl?: string;
51
52
  websocketProxyUrl?: string;
52
53
  };
53
54
  };
@@ -58,6 +59,7 @@ export type ExtensionLaunchConfig = {
58
59
  client_logo_url: string;
59
60
  client_policy_id: number;
60
61
  client_entity_id?: string;
62
+ isolate_proving?: boolean;
61
63
  };
62
64
  proof_config?: {
63
65
  datasource?: DataSource;
@@ -67,14 +69,11 @@ export type ExtensionLaunchConfig = {
67
69
  keyring_api_url?: string;
68
70
  keyring_user_app_url?: string;
69
71
  analytics_api_url?: string;
70
- isolate_proving?: boolean;
71
72
  notaryUrl?: string;
72
- notaryWebsocketUrl?: string;
73
73
  websocketProxyUrl?: string;
74
74
  };
75
75
  session_info?: {
76
76
  access_token?: string;
77
- refresh_token?: string;
78
77
  };
79
78
  };
80
79
  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": "1.1.3",
3
+ "version": "2.0.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",
@@ -20,7 +20,5 @@
20
20
  "ts-node": "^10.9.2",
21
21
  "typescript": "^5.6.3"
22
22
  },
23
- "dependencies": {
24
- "jwt-decode": "^4.0.0"
25
- }
23
+ "dependencies": {}
26
24
  }
package/readme.md CHANGED
@@ -17,6 +17,7 @@ pnpm install @keyringnetwork/keyring-connect-sdk
17
17
  - Redirect the user back to the app where they left off after extension installation
18
18
  - Monitor extension status and user state
19
19
  - Full TypeScript support with comprehensive type definitions
20
+ - Support for isolated proving mode (verification without credential creation)
20
21
 
21
22
  ## Usage
22
23
 
@@ -40,6 +41,8 @@ const extensionConfig = {
40
41
  app_url: "https://myapp.com",
41
42
  logo_url: "https://myapp.com/logo.png",
42
43
  policy_id: 123,
44
+ // Optional: Enable isolated proving mode
45
+ // isolate_proving: true,
43
46
  };
44
47
 
45
48
  // This method handles both launching the extension if installed
@@ -93,6 +96,8 @@ function KeyringConnectButton() {
93
96
  name: "My App",
94
97
  logo_url: "https://myapp.com/logo.png",
95
98
  policy_id: 7,
99
+ // For verification without credential creation:
100
+ // isolate_proving: true,
96
101
  };
97
102
 
98
103
  // Launch the extension (handles both installed and not installed cases)
@@ -112,6 +117,12 @@ function KeyringConnectButton() {
112
117
  }
113
118
  ```
114
119
 
120
+ With isolated proving mode enabled, the extension will:
121
+ - Focus solely on the verification process
122
+ - Skip wallet connection and credential creation
123
+ - Redirect back to your app when verification is complete
124
+ - Provide simplified UI with no tabs or credential options
125
+
115
126
  ## API Reference
116
127
 
117
128
  #### Core Types Overview