@embarkai/ui-kit 0.4.69 → 0.4.71

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.
@@ -15,7 +15,7 @@
15
15
  <meta http-equiv="X-Content-Type-Options" content="nosniff" />
16
16
  <meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
17
17
 
18
- <title>EmbarkAI Secure Wallet - iframe version 0.4.69</title>
18
+ <title>EmbarkAI Secure Wallet - iframe version 0.4.71</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -1,5 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
4
  var __esm = (fn, res) => function __init() {
4
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
5
6
  };
@@ -7,6 +8,7 @@ var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
9
10
  };
11
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
12
 
11
13
  // src/iframe/lib/backup/crypto-utils.ts
12
14
  var crypto_utils_exports = {};
@@ -1344,7 +1346,7 @@ var TemplateLoader = class {
1344
1346
  // console.log('[TemplateLoader] Cleared template cache')
1345
1347
  // }
1346
1348
  };
1347
- TemplateLoader.templateCache = /* @__PURE__ */ new Map();
1349
+ __publicField(TemplateLoader, "templateCache", /* @__PURE__ */ new Map());
1348
1350
 
1349
1351
  // src/iframe/templates/data/authorization-template-data.ts
1350
1352
  function buildAuthorizationTemplateData(project, origin, metadata, userProfile) {
@@ -1586,11 +1588,11 @@ function buildConfirmTxTemplateData(project, origin, transaction, risk, metadata
1586
1588
  // src/iframe/lib/authorization-manager.ts
1587
1589
  var AuthorizationManager = class {
1588
1590
  constructor() {
1589
- this.STORAGE_KEY_PREFIX = "auth";
1590
- this.METADATA_API_URL = "https://dashboard.embarkai.io/api/public/project";
1591
- this.METADATA_CACHE_TTL = 36e5;
1591
+ __publicField(this, "STORAGE_KEY_PREFIX", "auth");
1592
+ __publicField(this, "METADATA_API_URL", "https://dashboard.embarkai.io/api/public/project");
1593
+ __publicField(this, "METADATA_CACHE_TTL", 36e5);
1592
1594
  // 1 hour in milliseconds
1593
- this.metadataCache = /* @__PURE__ */ new Map();
1595
+ __publicField(this, "metadataCache", /* @__PURE__ */ new Map());
1594
1596
  console.log("[iframe][Auth] Initialized");
1595
1597
  }
1596
1598
  /**
@@ -1806,16 +1808,16 @@ var AuthorizationManager = class {
1806
1808
  // src/iframe/lib/backup/cloudStorage.ts
1807
1809
  var GoogleDriveProvider = class {
1808
1810
  constructor() {
1809
- this.name = "Google Drive";
1810
- this.id = "google-drive";
1811
- this.icon = "\u{1F4C1}";
1811
+ __publicField(this, "name", "Google Drive");
1812
+ __publicField(this, "id", "google-drive");
1813
+ __publicField(this, "icon", "\u{1F4C1}");
1812
1814
  // Can be replaced with proper icon
1813
- this.accessToken = null;
1814
- this.CLIENT_ID = typeof window.__GOOGLE_DRIVE_CLIENT_ID__ !== "undefined" && window.__GOOGLE_DRIVE_CLIENT_ID__ || "";
1815
- this.DISCOVERY_DOC = "https://www.googleapis.com/discovery/v1/apis/drive/v3/rest";
1816
- this.SCOPES = "https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata";
1817
- this.gapiInitialized = false;
1818
- this.gisInitialized = false;
1815
+ __publicField(this, "accessToken", null);
1816
+ __publicField(this, "CLIENT_ID", typeof window.__GOOGLE_DRIVE_CLIENT_ID__ !== "undefined" && window.__GOOGLE_DRIVE_CLIENT_ID__ || "");
1817
+ __publicField(this, "DISCOVERY_DOC", "https://www.googleapis.com/discovery/v1/apis/drive/v3/rest");
1818
+ __publicField(this, "SCOPES", "https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata");
1819
+ __publicField(this, "gapiInitialized", false);
1820
+ __publicField(this, "gisInitialized", false);
1819
1821
  this.initializeAPIs();
1820
1822
  }
1821
1823
  async initializeAPIs() {
@@ -2069,6 +2071,8 @@ init_server_backup();
2069
2071
  var AccountAbstractionError = class _AccountAbstractionError extends Error {
2070
2072
  constructor(message, code) {
2071
2073
  super(message);
2074
+ /** Machine-readable error code for programmatic handling */
2075
+ __publicField(this, "code");
2072
2076
  this.code = code;
2073
2077
  this.name = "LumiaPassportError";
2074
2078
  if (Error.captureStackTrace) {
@@ -2082,7 +2086,7 @@ var _UserRejectedError = class _UserRejectedError extends AccountAbstractionErro
2082
2086
  this.name = "UserRejectedError";
2083
2087
  }
2084
2088
  };
2085
- _UserRejectedError.CODE = "USER_REJECTED";
2089
+ __publicField(_UserRejectedError, "CODE", "USER_REJECTED");
2086
2090
  var UserRejectedError = _UserRejectedError;
2087
2091
  var _SessionExpiredError = class _SessionExpiredError extends AccountAbstractionError {
2088
2092
  constructor(message = "Session expired, please log in again") {
@@ -2090,7 +2094,7 @@ var _SessionExpiredError = class _SessionExpiredError extends AccountAbstraction
2090
2094
  this.name = "SessionExpiredError";
2091
2095
  }
2092
2096
  };
2093
- _SessionExpiredError.CODE = "SESSION_EXPIRED";
2097
+ __publicField(_SessionExpiredError, "CODE", "SESSION_EXPIRED");
2094
2098
  var SessionExpiredError = _SessionExpiredError;
2095
2099
  var ErrorCodes = {
2096
2100
  MPC_SIGNING_ERROR: "MPC_SIGNING_ERROR",
@@ -2101,7 +2105,8 @@ var ErrorCodes = {
2101
2105
  // src/iframe/lib/token-refresh-client.ts
2102
2106
  var TokenRefreshApiClient = class {
2103
2107
  constructor() {
2104
- this.pendingTokenRefresh = null;
2108
+ __publicField(this, "tssUrl");
2109
+ __publicField(this, "pendingTokenRefresh", null);
2105
2110
  this.tssUrl = "https://api.embarkai.io/tss";
2106
2111
  }
2107
2112
  /**
@@ -2242,6 +2247,7 @@ var LOOCAL_BACKUP_STATUS_KEY = "passport-backup-status";
2242
2247
  var BACKUP_VERSION = "1.0";
2243
2248
  var BackupManager = class {
2244
2249
  constructor() {
2250
+ __publicField(this, "tokenClient");
2245
2251
  this.tokenClient = new TokenRefreshApiClient();
2246
2252
  console.log("[iframe][BackupManager] Initialized");
2247
2253
  }
@@ -2925,7 +2931,7 @@ init_keccak256();
2925
2931
  var DKGManager = class extends TokenRefreshApiClient {
2926
2932
  constructor() {
2927
2933
  super();
2928
- this.wasmLoaded = false;
2934
+ __publicField(this, "wasmLoaded", false);
2929
2935
  console.log("[iframe][DKG] Initialized with TSS URL:", this.tssUrl);
2930
2936
  }
2931
2937
  /**
@@ -3095,6 +3101,7 @@ var API_URL = (
3095
3101
  var HyperlaneAPI = class {
3096
3102
  // private sseAbortController: AbortController | null = null
3097
3103
  constructor(sendResponseFn) {
3104
+ __publicField(this, "sendResponseFn");
3098
3105
  this.sendResponseFn = sendResponseFn;
3099
3106
  }
3100
3107
  // API METHODS
@@ -4743,7 +4750,9 @@ var API_URL2 = (
4743
4750
  );
4744
4751
  var BinanceOnrampAPI = class {
4745
4752
  constructor(sendResponseFn, broadcastFn) {
4746
- this.sseAbortController = null;
4753
+ __publicField(this, "sendResponseFn");
4754
+ __publicField(this, "broadcastFn");
4755
+ __publicField(this, "sseAbortController", null);
4747
4756
  this.sendResponseFn = sendResponseFn;
4748
4757
  this.broadcastFn = broadcastFn;
4749
4758
  }
@@ -4939,7 +4948,9 @@ var API_URL3 = (
4939
4948
  );
4940
4949
  var FinchPayRampAPI = class {
4941
4950
  constructor(sendResponseFn, broadcastFn) {
4942
- this.sseAbortController = null;
4951
+ __publicField(this, "sendResponseFn");
4952
+ __publicField(this, "broadcastFn");
4953
+ __publicField(this, "sseAbortController", null);
4943
4954
  this.sendResponseFn = sendResponseFn;
4944
4955
  this.broadcastFn = broadcastFn;
4945
4956
  }
@@ -5172,6 +5183,7 @@ var API_DOMAIN = (
5172
5183
  );
5173
5184
  var RampnowOnrampAPI = class {
5174
5185
  constructor(sendResponseFn) {
5186
+ __publicField(this, "sendResponseFn");
5175
5187
  this.sendResponseFn = sendResponseFn;
5176
5188
  }
5177
5189
  async getRampnowConfigQuery(accessToken) {
@@ -5311,8 +5323,8 @@ var OptedOutAppsManager = class {
5311
5323
  var SdkChannelManager = class {
5312
5324
  // 30 minutes
5313
5325
  constructor() {
5314
- this.channels = /* @__PURE__ */ new Map();
5315
- this.CHANNEL_TIMEOUT = 30 * 60 * 1e3;
5326
+ __publicField(this, "channels", /* @__PURE__ */ new Map());
5327
+ __publicField(this, "CHANNEL_TIMEOUT", 30 * 60 * 1e3);
5316
5328
  setInterval(() => this.cleanupExpiredChannels(), 5 * 60 * 1e3);
5317
5329
  }
5318
5330
  /**
@@ -5439,18 +5451,18 @@ var SdkChannelManager = class {
5439
5451
  // src/iframe/lib/secure-messenger.ts
5440
5452
  var SecureMessenger = class {
5441
5453
  constructor() {
5442
- this.allowedOrigins = /* @__PURE__ */ new Set();
5443
- this.usedNonces = /* @__PURE__ */ new Set();
5444
- this.pendingMessages = /* @__PURE__ */ new Map();
5445
- this.channelToken = null;
5446
- this.messageHandlers = [];
5447
- this.MESSAGE_TIMEOUT = 6e4;
5454
+ __publicField(this, "allowedOrigins", /* @__PURE__ */ new Set());
5455
+ __publicField(this, "usedNonces", /* @__PURE__ */ new Set());
5456
+ __publicField(this, "pendingMessages", /* @__PURE__ */ new Map());
5457
+ __publicField(this, "channelToken", null);
5458
+ __publicField(this, "messageHandlers", []);
5459
+ __publicField(this, "MESSAGE_TIMEOUT", 6e4);
5448
5460
  // 60 seconds
5449
- this.NONCE_CLEANUP_INTERVAL = 5 * 60 * 1e3;
5461
+ __publicField(this, "NONCE_CLEANUP_INTERVAL", 5 * 60 * 1e3);
5450
5462
  // 5 minutes
5451
5463
  // Debug flag: set to true to log all filtered messages (for debugging only)
5452
5464
  // @ts-ignore - injected during build
5453
- this.DEBUG_FILTERED_MESSAGES = false;
5465
+ __publicField(this, "DEBUG_FILTERED_MESSAGES", false);
5454
5466
  setInterval(() => this.cleanupOldNonces(), this.NONCE_CLEANUP_INTERVAL);
5455
5467
  }
5456
5468
  /**
@@ -5714,6 +5726,7 @@ var SecureMessenger = class {
5714
5726
  // src/iframe/lib/storage-manager.ts
5715
5727
  var StorageManager = class {
5716
5728
  constructor() {
5729
+ __publicField(this, "storage");
5717
5730
  if (typeof window === "undefined" || !window.localStorage) {
5718
5731
  throw new Error("localStorage not available in iframe");
5719
5732
  }
@@ -5950,12 +5963,15 @@ var TrustedAppsManager = class {
5950
5963
  var SigningManager = class extends TokenRefreshApiClient {
5951
5964
  constructor() {
5952
5965
  super();
5953
- this.wasmLoaded = false;
5954
- this.explorerUrl = "https://beam-explorer.lumia.org";
5955
- this.METADATA_API_URL = "https://dashboard.embarkai.io/api/public/project";
5956
- this.METADATA_CACHE_TTL = 36e5;
5966
+ __publicField(this, "wasmLoaded", false);
5967
+ __publicField(this, "storage");
5968
+ __publicField(this, "trustedApps");
5969
+ __publicField(this, "optedOutApps");
5970
+ __publicField(this, "explorerUrl", "https://beam-explorer.lumia.org");
5971
+ __publicField(this, "METADATA_API_URL", "https://dashboard.embarkai.io/api/public/project");
5972
+ __publicField(this, "METADATA_CACHE_TTL", 36e5);
5957
5973
  // 1 hour in milliseconds
5958
- this.metadataCache = /* @__PURE__ */ new Map();
5974
+ __publicField(this, "metadataCache", /* @__PURE__ */ new Map());
5959
5975
  this.storage = new StorageManager();
5960
5976
  this.trustedApps = new TrustedAppsManager();
5961
5977
  this.optedOutApps = new OptedOutAppsManager();
@@ -6398,9 +6414,22 @@ var SigningManager = class extends TokenRefreshApiClient {
6398
6414
  };
6399
6415
 
6400
6416
  // src/iframe/main.ts
6401
- var IFRAME_VERSION = "0.4.69";
6417
+ var IFRAME_VERSION = "0.4.71";
6402
6418
  var IframeWallet = class {
6403
6419
  constructor() {
6420
+ __publicField(this, "messenger");
6421
+ __publicField(this, "sdkChannelManager");
6422
+ __publicField(this, "dkgManager");
6423
+ __publicField(this, "signingManager");
6424
+ __publicField(this, "authManager");
6425
+ __publicField(this, "storage");
6426
+ __publicField(this, "trustedApps");
6427
+ __publicField(this, "optedOutApps");
6428
+ __publicField(this, "backupManager");
6429
+ __publicField(this, "finchpay");
6430
+ __publicField(this, "binance");
6431
+ __publicField(this, "rampnow");
6432
+ __publicField(this, "hyperlane");
6404
6433
  console.log("=".repeat(60));
6405
6434
  console.log(` EmbarkAI Secure Wallet - iframe version ${IFRAME_VERSION}`);
6406
6435
  console.log("=".repeat(60));