@keyringnetwork/keyring-connect-sdk 4.1.0-alpha.1 → 4.1.0-alpha.2

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.
@@ -223,7 +223,7 @@ class VerificationSession {
223
223
  return;
224
224
  }
225
225
  else {
226
- (_b = this.uiManager) === null || _b === void 0 ? void 0 : _b.showCompleteModal(data.result.entity_type, data.result.datasource);
226
+ (_b = this.uiManager) === null || _b === void 0 ? void 0 : _b.showCompleteModal(data.result.entity_type, data.result.datasourceObject);
227
227
  this.emit("processingCompleted", data);
228
228
  this.complete(data.result.credential_data);
229
229
  }
@@ -346,14 +346,14 @@ class VerificationSession {
346
346
  case "processing_completed":
347
347
  this.logger.debug("Session completed via polling");
348
348
  const result = session.result;
349
- const hasRequiredData = (result === null || result === void 0 ? void 0 : result.credential_data) && (result === null || result === void 0 ? void 0 : result.entity_type) && (result === null || result === void 0 ? void 0 : result.datasource);
349
+ const hasRequiredData = (result === null || result === void 0 ? void 0 : result.credential_data) && (result === null || result === void 0 ? void 0 : result.entity_type) && (result === null || result === void 0 ? void 0 : result.datasourceObject);
350
350
  if (hasRequiredData) {
351
- (_a = this.uiManager) === null || _a === void 0 ? void 0 : _a.showCompleteModal(result.entity_type, result.datasource);
351
+ (_a = this.uiManager) === null || _a === void 0 ? void 0 : _a.showCompleteModal(result.entity_type, result.datasourceObject);
352
352
  this.emit("processingCompleted", {
353
353
  result: {
354
354
  credential_data: result.credential_data,
355
355
  entity_type: result.entity_type,
356
- datasource: result.datasource,
356
+ datasourceObject: result.datasourceObject,
357
357
  },
358
358
  status: "success",
359
359
  });
@@ -1,4 +1,4 @@
1
- import { DataSource } from "@keyringnetwork/keyring-dtos";
1
+ import { DatasourceTypes } from "@keyringnetwork/keyring-dtos";
2
2
  import { CredentialData, SessionConfig } from "./core";
3
3
  export type SessionStatus = "session_created" | "mobile_connected" | "processing_started" | "processing_completed" | "processing_failed" | "session_expired";
4
4
  export interface CrossDeviceSession {
@@ -12,7 +12,7 @@ export interface CrossDeviceSession {
12
12
  result?: {
13
13
  credential_data?: CredentialData;
14
14
  entity_type?: string;
15
- datasource?: DataSource;
15
+ datasourceObject?: DatasourceTypes.DatasourceObject;
16
16
  };
17
17
  error?: string;
18
18
  platform: "web" | "mobile";
@@ -1,4 +1,4 @@
1
- import { DataSource } from "@keyringnetwork/keyring-dtos";
1
+ import { DatasourceTypes } from "@keyringnetwork/keyring-dtos";
2
2
  import { CredentialData } from "./core";
3
3
  /**
4
4
  * Base structure for all WebSocket messages
@@ -37,7 +37,7 @@ export interface ProcessingCompletedMessage extends BaseMessage {
37
37
  result: {
38
38
  credential_data: CredentialData;
39
39
  entity_type: string;
40
- datasource: DataSource;
40
+ datasourceObject: DatasourceTypes.DatasourceObject;
41
41
  };
42
42
  status: "success" | "error" | "cancelled";
43
43
  };
@@ -5,7 +5,7 @@ import "./composites/keyring-mobile-modal";
5
5
  import "./composites/keyring-qr-modal";
6
6
  import "./composites/keyring-selection-modal";
7
7
  import "./composites/keyring-terminated-modal";
8
- import { DataSource } from "@keyringnetwork/keyring-dtos";
8
+ import { DatasourceTypes } from "@keyringnetwork/keyring-dtos";
9
9
  export declare class UIManager {
10
10
  private currentModal;
11
11
  private onCancel;
@@ -28,7 +28,7 @@ export declare class UIManager {
28
28
  /**
29
29
  * Show completion modal with verification results
30
30
  */
31
- showCompleteModal(entityType: string, dataSource: DataSource): Promise<void>;
31
+ showCompleteModal(entityType: string, dataSourceObject: DatasourceTypes.DatasourceObject): Promise<void>;
32
32
  /**
33
33
  * Show terminated modal with session termination reason
34
34
  */
@@ -144,14 +144,14 @@ class UIManager {
144
144
  /**
145
145
  * Show completion modal with verification results
146
146
  */
147
- showCompleteModal(entityType, dataSource) {
147
+ showCompleteModal(entityType, dataSourceObject) {
148
148
  return __awaiter(this, void 0, void 0, function* () {
149
149
  this.hideModal(); // Clean up any existing modal
150
150
  const modal = document.createElement("keyring-complete-modal");
151
151
  // Set attributes
152
152
  modal.entityType = entityType;
153
- modal.dataSource = dataSource.name;
154
- modal.dataSourceIcon = dataSource.image;
153
+ modal.dataSource = dataSourceObject.datasource.name;
154
+ modal.dataSourceIcon = dataSourceObject.datasource.image;
155
155
  // Set up event listeners
156
156
  modal.addEventListener("close", () => {
157
157
  this.hideModal();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyringnetwork/keyring-connect-sdk",
3
- "version": "4.1.0-alpha.1",
3
+ "version": "4.1.0-alpha.2",
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",
@@ -28,8 +28,8 @@
28
28
  "typescript": "^5.6.3"
29
29
  },
30
30
  "dependencies": {
31
- "@keyringnetwork/contracts-abi": "2.6.0",
32
- "@keyringnetwork/keyring-dtos": "^0.7.2",
31
+ "@keyringnetwork/contracts-abi": "2.6.1",
32
+ "@keyringnetwork/keyring-dtos": "1.0.0",
33
33
  "axios": "^1.12.2",
34
34
  "lit": "^3.3.1",
35
35
  "pino": "^9.13.1",