@lumiapassport/ui-kit 1.4.9 → 1.4.12

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/index.js CHANGED
@@ -43,14 +43,12 @@ function getServiceUrls() {
43
43
  tssRequireWasm: globalOverride.tssRequireWasm ?? buildRequireWasm ?? config.services.tssRequireWasm ?? false,
44
44
  tssWasmDebug: globalOverride.tssWasmDebug ?? buildWasmDebug ?? config.services.tssWasmDebug ?? false
45
45
  };
46
- console.debug("[getServiceUrls] globalOverride:", globalOverride, "buildTss:", buildTss, "result:", result);
47
46
  return result;
48
47
  }
49
48
  function getIframeUrl() {
50
49
  const config = defaultLumiaPassportConfig;
51
50
  const buildIframeUrl = "https://auth.lumiapassport.com";
52
51
  const iframeUrl = buildIframeUrl || config.services.iframeUrl || "https://auth.lumiapassport.com";
53
- console.log("[getIframeUrl] Using iframe URL:", iframeUrl);
54
52
  return iframeUrl;
55
53
  }
56
54
  var GoogleIcon, TelegramIcon, TwitterIcon, DiscordIcon, defaultLumiaPassportConfig;
@@ -2397,10 +2395,8 @@ var init_iframe_manager = __esm({
2397
2395
  */
2398
2396
  async initialize() {
2399
2397
  if (this.iframe) {
2400
- this.log("[IframeManager] Already initialized");
2401
2398
  return this.readyPromise;
2402
2399
  }
2403
- this.log("[IframeManager] Initializing iframe...");
2404
2400
  this.iframe = document.createElement("iframe");
2405
2401
  this.iframe.src = this.iframeUrl;
2406
2402
  this.iframe.id = "lumia-passport-iframe";
@@ -2432,13 +2428,11 @@ var init_iframe_manager = __esm({
2432
2428
  * Authenticate SDK with iframe to establish session
2433
2429
  */
2434
2430
  async authenticateSDK() {
2435
- this.log("[IframeManager] Authenticating SDK...");
2436
2431
  const response = await this.sendMessage("SDK_AUTH", {
2437
2432
  projectId: this.projectId
2438
2433
  });
2439
2434
  if (response.type === "LUMIA_PASSPORT_SDK_AUTH_SUCCESS") {
2440
2435
  this.sessionToken = response.sessionToken;
2441
- this.log("[IframeManager] \u2705 SDK authenticated, session token received");
2442
2436
  } else {
2443
2437
  throw new Error("SDK authentication failed");
2444
2438
  }
@@ -2523,13 +2517,11 @@ var init_iframe_manager = __esm({
2523
2517
  * Handle token refresh request from iframe
2524
2518
  */
2525
2519
  async handleTokenRefreshRequest(message) {
2526
- this.log("[IframeManager] Handling token refresh request...");
2527
2520
  try {
2528
2521
  const { jwtTokenManager: jwtTokenManager3 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
2529
2522
  const refreshSuccess = await jwtTokenManager3.refreshAccessToken();
2530
2523
  if (refreshSuccess) {
2531
2524
  const newAccessToken = jwtTokenManager3.getAccessToken();
2532
- this.log("[IframeManager] \u2705 Token refreshed successfully");
2533
2525
  if (this.iframe && this.iframe.contentWindow) {
2534
2526
  const iframeOrigin = new URL(this.iframeUrl).origin;
2535
2527
  this.iframe.contentWindow.postMessage(
@@ -2541,10 +2533,8 @@ var init_iframe_manager = __esm({
2541
2533
  },
2542
2534
  iframeOrigin
2543
2535
  );
2544
- this.log("[IframeManager] \u{1F4E4} Sent new token to iframe");
2545
2536
  }
2546
2537
  } else {
2547
- this.log("[IframeManager] \u274C Token refresh failed");
2548
2538
  if (this.iframe && this.iframe.contentWindow) {
2549
2539
  const iframeOrigin = new URL(this.iframeUrl).origin;
2550
2540
  this.iframe.contentWindow.postMessage(
@@ -2559,7 +2549,6 @@ var init_iframe_manager = __esm({
2559
2549
  }
2560
2550
  }
2561
2551
  } catch (error) {
2562
- this.log("[IframeManager] \u274C Error during token refresh:", error);
2563
2552
  if (this.iframe && this.iframe.contentWindow) {
2564
2553
  const iframeOrigin = new URL(this.iframeUrl).origin;
2565
2554
  this.iframe.contentWindow.postMessage(
@@ -2663,7 +2652,6 @@ var init_iframe_manager = __esm({
2663
2652
  showIframe() {
2664
2653
  if (this.iframe) {
2665
2654
  this.iframe.style.display = "block";
2666
- this.log("[IframeManager] Iframe shown");
2667
2655
  }
2668
2656
  }
2669
2657
  /**
@@ -2672,7 +2660,6 @@ var init_iframe_manager = __esm({
2672
2660
  hideIframe() {
2673
2661
  if (this.iframe) {
2674
2662
  this.iframe.style.display = "none";
2675
- this.log("[IframeManager] Iframe hidden");
2676
2663
  }
2677
2664
  }
2678
2665
  // ========================================
@@ -2682,7 +2669,6 @@ var init_iframe_manager = __esm({
2682
2669
  * Authenticate user with application
2683
2670
  */
2684
2671
  async authenticate(userId) {
2685
- this.log("[IframeManager] Authenticating user:", userId);
2686
2672
  const response = await this.sendMessage("AUTHENTICATE", {
2687
2673
  userId,
2688
2674
  projectId: this.projectId
@@ -2699,7 +2685,6 @@ var init_iframe_manager = __esm({
2699
2685
  * Start DKG (Distributed Key Generation)
2700
2686
  */
2701
2687
  async startDKG(userId, accessToken) {
2702
- this.log("[IframeManager] Starting DKG for user:", userId);
2703
2688
  const response = await this.sendMessage("START_DKG", {
2704
2689
  userId,
2705
2690
  projectId: this.projectId,
@@ -2715,7 +2700,6 @@ var init_iframe_manager = __esm({
2715
2700
  * Sign transaction
2716
2701
  */
2717
2702
  async signTransaction(userId, transaction, accessToken) {
2718
- this.log("[IframeManager] Signing transaction for user:", userId);
2719
2703
  const response = await this.sendMessage("SIGN_TRANSACTION", {
2720
2704
  userId,
2721
2705
  projectId: this.projectId,
@@ -2732,7 +2716,6 @@ var init_iframe_manager = __esm({
2732
2716
  * Get user's wallet address
2733
2717
  */
2734
2718
  async getAddress(userId) {
2735
- this.log("[IframeManager] Getting address for user:", userId);
2736
2719
  const response = await this.sendMessage("GET_ADDRESS", {
2737
2720
  userId
2738
2721
  });
@@ -2745,7 +2728,6 @@ var init_iframe_manager = __esm({
2745
2728
  * Check if user has a keyshare
2746
2729
  */
2747
2730
  async checkKeyshare(userId) {
2748
- this.log("[IframeManager] Checking keyshare for user:", userId);
2749
2731
  const response = await this.sendMessage("CHECK_KEYSHARE", {
2750
2732
  userId
2751
2733
  });
@@ -2761,7 +2743,6 @@ var init_iframe_manager = __esm({
2761
2743
  * Get trusted apps for user
2762
2744
  */
2763
2745
  async getTrustedApps(userId) {
2764
- this.log("[IframeManager] Getting trusted apps for user:", userId);
2765
2746
  const response = await this.sendMessage("GET_TRUSTED_APPS", {
2766
2747
  userId
2767
2748
  });
@@ -2774,7 +2755,6 @@ var init_iframe_manager = __esm({
2774
2755
  * Remove app from trusted list
2775
2756
  */
2776
2757
  async removeTrustedApp(userId, projectId, origin) {
2777
- this.log("[IframeManager] Removing trusted app:", { userId, projectId, origin });
2778
2758
  const response = await this.sendMessage("REMOVE_TRUSTED_APP", {
2779
2759
  userId,
2780
2760
  projectId,
@@ -2789,7 +2769,6 @@ var init_iframe_manager = __esm({
2789
2769
  * Create backup of keyshare
2790
2770
  */
2791
2771
  async createBackup(userId, backupRequest, accessToken) {
2792
- this.log("[IframeManager] Creating backup...");
2793
2772
  const response = await this.sendMessage("CREATE_BACKUP", {
2794
2773
  userId,
2795
2774
  backupRequest,
@@ -2805,7 +2784,6 @@ var init_iframe_manager = __esm({
2805
2784
  * Restore keyshare from server backup
2806
2785
  */
2807
2786
  async restoreFromServer(userId, password, accessToken) {
2808
- this.log("[IframeManager] Restoring backup from server...");
2809
2787
  const response = await this.sendMessage("RESTORE_BACKUP", {
2810
2788
  userId,
2811
2789
  password,
@@ -2822,7 +2800,6 @@ var init_iframe_manager = __esm({
2822
2800
  * Returns encrypted data that parent can upload/download
2823
2801
  */
2824
2802
  async encryptBackupData(userId, password) {
2825
- this.log("[IframeManager] Encrypting backup data...");
2826
2803
  const response = await this.sendMessage("ENCRYPT_BACKUP_DATA", {
2827
2804
  userId,
2828
2805
  password
@@ -2836,7 +2813,6 @@ var init_iframe_manager = __esm({
2836
2813
  * Restore keyshare from local file backup
2837
2814
  */
2838
2815
  async restoreFromLocalFile(userId, fileContent, password) {
2839
- this.log("[IframeManager] Restoring backup from local file...");
2840
2816
  const response = await this.sendMessage("RESTORE_FROM_FILE", {
2841
2817
  userId,
2842
2818
  fileContent,
@@ -2851,7 +2827,6 @@ var init_iframe_manager = __esm({
2851
2827
  * Get backup status for user
2852
2828
  */
2853
2829
  async getBackupStatus(userId) {
2854
- this.log("[IframeManager] Getting backup status...");
2855
2830
  const response = await this.sendMessage("GET_BACKUP_STATUS", {
2856
2831
  userId
2857
2832
  });
@@ -2864,7 +2839,6 @@ var init_iframe_manager = __esm({
2864
2839
  * Get available cloud providers
2865
2840
  */
2866
2841
  async getCloudProviders() {
2867
- this.log("[IframeManager] Getting cloud providers...");
2868
2842
  const response = await this.sendMessage("GET_CLOUD_PROVIDERS", {});
2869
2843
  if (response.type === "LUMIA_PASSPORT_CLOUD_PROVIDERS") {
2870
2844
  return response.providers;
@@ -8512,7 +8486,7 @@ function useLumiaPassportLinkedProfiles() {
8512
8486
  // package.json
8513
8487
  var package_default = {
8514
8488
  name: "@lumiapassport/ui-kit",
8515
- version: "1.4.9",
8489
+ version: "1.4.12",
8516
8490
  description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
8517
8491
  type: "module",
8518
8492
  main: "./dist/index.cjs",