@embarkai/ui-kit 0.4.10 → 0.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.
@@ -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.10</title>
18
+ <title>EmbarkAI Secure Wallet - iframe version 0.4.12</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -6262,7 +6262,7 @@ var SigningManager = class extends TokenRefreshApiClient {
6262
6262
  };
6263
6263
 
6264
6264
  // src/iframe/main.ts
6265
- var IFRAME_VERSION = "0.4.10";
6265
+ var IFRAME_VERSION = "0.4.12";
6266
6266
  var IframeWallet = class {
6267
6267
  constructor() {
6268
6268
  console.log("=".repeat(60));
package/dist/index.cjs CHANGED
@@ -5281,7 +5281,7 @@ var init_OtpIcon = __esm({
5281
5281
  });
5282
5282
 
5283
5283
  // src/internal/components/AuthMenu/VerifyStep/VerificationCodeInput.tsx
5284
- var import_react16, import_jsx_runtime15, VerificationCodeInput;
5284
+ var import_react16, import_jsx_runtime15, getRemainingSeconds, VerificationCodeInput;
5285
5285
  var init_VerificationCodeInput = __esm({
5286
5286
  "src/internal/components/AuthMenu/VerifyStep/VerificationCodeInput.tsx"() {
5287
5287
  init_i18n();
@@ -5290,16 +5290,39 @@ var init_VerificationCodeInput = __esm({
5290
5290
  init_button();
5291
5291
  init_useAuthStore();
5292
5292
  import_jsx_runtime15 = require("react/jsx-runtime");
5293
+ getRemainingSeconds = (expiresAt) => Math.max(0, Math.ceil((expiresAt - Date.now()) / 1e3));
5293
5294
  VerificationCodeInput = (props) => {
5294
5295
  const { onVerifyCode, onResendCode, isLoading, expiresIn } = props;
5295
5296
  const { t } = useT();
5296
5297
  const setAlert = useAuthStore((st) => st.setAlert);
5297
- const [timeLeft, setTimeLeft] = (0, import_react16.useState)(expiresIn);
5298
+ const [expiresAt, setExpiresAt] = (0, import_react16.useState)(() => Date.now() + Math.max(0, expiresIn) * 1e3);
5299
+ const [timeLeft, setTimeLeft] = (0, import_react16.useState)(() => getRemainingSeconds(expiresAt));
5298
5300
  (0, import_react16.useEffect)(() => {
5299
- if (timeLeft <= 0) return;
5300
- const t2 = setTimeout(() => setTimeLeft((s) => s - 1), 1e3);
5301
- return () => clearTimeout(t2);
5302
- }, [timeLeft]);
5301
+ const nextExpiresAt = Date.now() + Math.max(0, expiresIn) * 1e3;
5302
+ setExpiresAt(nextExpiresAt);
5303
+ setTimeLeft(getRemainingSeconds(nextExpiresAt));
5304
+ }, [expiresIn]);
5305
+ (0, import_react16.useEffect)(() => {
5306
+ let intervalId;
5307
+ const syncTimeLeft = () => {
5308
+ const remaining = getRemainingSeconds(expiresAt);
5309
+ setTimeLeft(remaining);
5310
+ if (remaining <= 0 && intervalId) {
5311
+ window.clearInterval(intervalId);
5312
+ intervalId = void 0;
5313
+ }
5314
+ };
5315
+ syncTimeLeft();
5316
+ if (getRemainingSeconds(expiresAt) <= 0) return;
5317
+ intervalId = window.setInterval(syncTimeLeft, 1e3);
5318
+ window.addEventListener("focus", syncTimeLeft);
5319
+ document.addEventListener("visibilitychange", syncTimeLeft);
5320
+ return () => {
5321
+ if (intervalId) window.clearInterval(intervalId);
5322
+ window.removeEventListener("focus", syncTimeLeft);
5323
+ document.removeEventListener("visibilitychange", syncTimeLeft);
5324
+ };
5325
+ }, [expiresAt]);
5303
5326
  const lastSubmittedRef = (0, import_react16.useRef)(null);
5304
5327
  const inputsRef = (0, import_react16.useRef)([]);
5305
5328
  const [digits, setDigits] = (0, import_react16.useState)(["", "", "", "", "", ""]);
@@ -5480,14 +5503,17 @@ function VerifyStep(props) {
5480
5503
  },
5481
5504
  onError: (error) => {
5482
5505
  let errorMessage = "";
5483
- if (error.message?.includes("Invalid") || error.message?.includes("invalid")) {
5506
+ const rawErrorMessage = error.message || "";
5507
+ const normalizedErrorMessage = rawErrorMessage.toLowerCase();
5508
+ if (normalizedErrorMessage.includes("invalid")) {
5484
5509
  errorMessage = "Invalid verification code. Please try again.";
5485
- } else if (error.message?.includes("expired")) {
5510
+ } else if (normalizedErrorMessage.includes("expired")) {
5486
5511
  errorMessage = "Verification code expired. Please request a new one.";
5487
- } else if (error.message?.includes("429") || error.message?.includes("Too many")) {
5512
+ setExpiresIn(0);
5513
+ } else if (normalizedErrorMessage.includes("429") || normalizedErrorMessage.includes("too many")) {
5488
5514
  errorMessage = "Too many attempts. Please try again later.";
5489
5515
  } else {
5490
- errorMessage = error.message || "Verification failed. Please try again.";
5516
+ errorMessage = rawErrorMessage || "Verification failed. Please try again.";
5491
5517
  }
5492
5518
  setAlert({
5493
5519
  title: "Verification failed",
@@ -13716,7 +13742,17 @@ function useVerifyCode() {
13716
13742
  const qc = (0, import_react_query30.useQueryClient)();
13717
13743
  const address = useSession((st) => st.address);
13718
13744
  const setIsLoading = useSession((st) => st.setIsLoading);
13719
- const { email, emailCode, setEmail, setEmailStep, setEmailCode, setProviderType, setLinkIsLoading, setAlert } = useManageWalletStore();
13745
+ const {
13746
+ email,
13747
+ emailCode,
13748
+ setEmail,
13749
+ setEmailStep,
13750
+ setEmailCode,
13751
+ setEmailCodeExpiresIn,
13752
+ setProviderType,
13753
+ setLinkIsLoading,
13754
+ setAlert
13755
+ } = useManageWalletStore();
13720
13756
  return (0, import_react_query30.useMutation)({
13721
13757
  mutationFn: async (codeToVerify) => {
13722
13758
  const code = codeToVerify ?? emailCode;
@@ -13745,7 +13781,11 @@ function useVerifyCode() {
13745
13781
  setLinkIsLoading(false);
13746
13782
  },
13747
13783
  onError: (error) => {
13748
- setAlert({ title: "Error", message: error?.message || "Failed to verify and link email" });
13784
+ const message = error?.message || "Failed to verify and link email";
13785
+ if (message.toLowerCase().includes("expired")) {
13786
+ setEmailCodeExpiresIn(0);
13787
+ }
13788
+ setAlert({ title: "Error", message });
13749
13789
  setIsLoading(false);
13750
13790
  setLinkIsLoading(false);
13751
13791
  }
@@ -15813,6 +15853,55 @@ var init_constants6 = __esm({
15813
15853
  }
15814
15854
  });
15815
15855
 
15856
+ // src/internal/components/SecurityMenu/hooks.ts
15857
+ function useConnectedApps() {
15858
+ const session = useSession((st) => st.session);
15859
+ const userId = session?.mpcUserId || null;
15860
+ return (0, import_react_query42.useQuery)({
15861
+ retry: false,
15862
+ enabled: !!userId,
15863
+ queryKey: [CONNECTED_TRUSTED_APPS_QUERY, userId],
15864
+ queryFn: async () => {
15865
+ const iframeManager = getIframeManager();
15866
+ return await iframeManager.getTrustedApps(userId).catch(() => {
15867
+ console.error("[ConnectedApps] Failed to load connected apps from iframe");
15868
+ return [];
15869
+ });
15870
+ }
15871
+ });
15872
+ }
15873
+ function useKeyshareRecoveryStats() {
15874
+ const session = useSession((st) => st.session);
15875
+ const userId = session?.mpcUserId || null;
15876
+ return (0, import_react_query42.useQuery)({
15877
+ enabled: !!userId,
15878
+ queryKey: [KEYSHARE_RECOVERY_STATS_QUERY, userId],
15879
+ queryFn: async () => {
15880
+ const iframeManager = getIframeManager();
15881
+ if (!iframeManager) {
15882
+ throw new Error("Iframe manager not available");
15883
+ }
15884
+ const keyshareInfo = await getKeyshareInfo(userId);
15885
+ const shareRecoveryStats = await getShareRecoveryStats();
15886
+ return {
15887
+ keyshareInfo,
15888
+ shareRecoveryStats
15889
+ };
15890
+ }
15891
+ });
15892
+ }
15893
+ var import_react_query42;
15894
+ var init_hooks2 = __esm({
15895
+ "src/internal/components/SecurityMenu/hooks.ts"() {
15896
+ init_SessionContext();
15897
+ import_react_query42 = require("@tanstack/react-query");
15898
+ init_keyshare();
15899
+ init_iframe_manager();
15900
+ init_vaultClient();
15901
+ init_constants6();
15902
+ }
15903
+ });
15904
+
15816
15905
  // src/internal/components/SecurityMenu/ConnectedApps.tsx
15817
15906
  function Application(props) {
15818
15907
  const { appLogo, appName, origin, trustedAt, untrustApp } = props;
@@ -15876,20 +15965,7 @@ function Application(props) {
15876
15965
  function ConnectedApps(props) {
15877
15966
  const { isLoading: isParentLoading, untrustApp } = props;
15878
15967
  const { t } = useT();
15879
- const session = useSession((st) => st.session);
15880
- const userId = session?.mpcUserId || null;
15881
- const { data: connectedApps = [], isLoading: isConnectedAppsLoading } = (0, import_react_query42.useQuery)({
15882
- retry: false,
15883
- enabled: !!userId,
15884
- queryKey: [CONNECTED_TRUSTED_APPS_QUERY, userId],
15885
- queryFn: async () => {
15886
- const iframeManager = getIframeManager();
15887
- return await iframeManager.getTrustedApps(userId).catch(() => {
15888
- console.error("[ConnectedApps] Failed to load connected apps from iframe");
15889
- return [];
15890
- });
15891
- }
15892
- });
15968
+ const { data: connectedApps = [], isLoading: isConnectedAppsLoading } = useConnectedApps();
15893
15969
  const isLoading = isConnectedAppsLoading || isParentLoading;
15894
15970
  if (isLoading) return null;
15895
15971
  if (!isLoading && connectedApps.length === 0)
@@ -15908,20 +15984,17 @@ function ConnectedApps(props) {
15908
15984
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: connectedApps.map((app, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Application, { ...app, untrustApp }, index)) })
15909
15985
  ] });
15910
15986
  }
15911
- var import_react_query42, import_dayjs5, import_lodash_es7, import_lucide_react52, import_jsx_runtime82;
15987
+ var import_dayjs5, import_lodash_es7, import_lucide_react52, import_jsx_runtime82;
15912
15988
  var init_ConnectedApps = __esm({
15913
15989
  "src/internal/components/SecurityMenu/ConnectedApps.tsx"() {
15914
15990
  init_utils2();
15915
- init_SessionContext();
15916
15991
  init_i18n();
15917
- import_react_query42 = require("@tanstack/react-query");
15918
15992
  import_dayjs5 = __toESM(require("dayjs"), 1);
15919
15993
  import_lodash_es7 = require("lodash-es");
15920
15994
  import_lucide_react52 = require("lucide-react");
15921
- init_iframe_manager();
15922
15995
  init_button();
15923
15996
  init_highlight();
15924
- init_constants6();
15997
+ init_hooks2();
15925
15998
  import_jsx_runtime82 = require("react/jsx-runtime");
15926
15999
  }
15927
16000
  });
@@ -16202,22 +16275,7 @@ function SecurityMenu() {
16202
16275
  const userId = import_auth20.jwtTokenManager.getUserId();
16203
16276
  const serverHasKeyshare = import_auth20.jwtTokenManager.getHasKeyshare() ?? false;
16204
16277
  const [appToUntrust, untrustApp] = (0, import_react60.useState)(null);
16205
- const { data: recoveryData, isLoading: isRecoveryLoading } = (0, import_react_query43.useQuery)({
16206
- enabled: !!userId,
16207
- queryKey: [KEYSHARE_RECOVERY_STATS_QUERY, userId],
16208
- queryFn: async () => {
16209
- const iframeManager = getIframeManager();
16210
- if (!iframeManager) {
16211
- throw new Error("Iframe manager not available");
16212
- }
16213
- const keyshareInfo = await getKeyshareInfo(userId);
16214
- const shareRecoveryStats = await getShareRecoveryStats();
16215
- return {
16216
- keyshareInfo,
16217
- shareRecoveryStats
16218
- };
16219
- }
16220
- });
16278
+ const { data: recoveryData, isLoading: isRecoveryLoading } = useKeyshareRecoveryStats();
16221
16279
  const localInfo = recoveryData?.keyshareInfo || {};
16222
16280
  const hasServerBackup = !!recoveryData?.shareRecoveryStats?.created || recoveryData?.shareRecoveryStats?.devices?.length > 0;
16223
16281
  const { mutate: handleUntrustApp, isPending: isUntrustingApp } = (0, import_react_query43.useMutation)({
@@ -16300,15 +16358,14 @@ var init_SecurityMenu = __esm({
16300
16358
  import_lucide_react57 = require("lucide-react");
16301
16359
  import_react60 = require("react");
16302
16360
  init_auth();
16303
- init_keyshare();
16304
16361
  init_useLayoutDataStore();
16305
16362
  init_useLayoutStore();
16306
16363
  init_iframe_manager();
16307
- init_vaultClient();
16308
16364
  init_Expandable2();
16309
16365
  init_button();
16310
16366
  init_ConnectedApps();
16311
16367
  init_constants6();
16368
+ init_hooks2();
16312
16369
  init_Keyshare2();
16313
16370
  init_UntrustApplication();
16314
16371
  import_jsx_runtime88 = require("react/jsx-runtime");
@@ -19223,7 +19280,7 @@ var init_package = __esm({
19223
19280
  "package.json"() {
19224
19281
  package_default = {
19225
19282
  name: "@embarkai/ui-kit",
19226
- version: "0.4.10",
19283
+ version: "0.4.12",
19227
19284
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
19228
19285
  type: "module",
19229
19286
  main: "./dist/index.cjs",
@@ -25083,7 +25140,6 @@ var USER_PROFILE_QUERY_KEY;
25083
25140
  var init_exportedQueryKeys = __esm({
25084
25141
  "src/internal/exportedQueryKeys.ts"() {
25085
25142
  init_profile();
25086
- init_constants6();
25087
25143
  USER_PROFILE_QUERY_KEY = QUERY_KEYS.userProfile;
25088
25144
  }
25089
25145
  });
@@ -25093,11 +25149,9 @@ var index_exports = {};
25093
25149
  __export(index_exports, {
25094
25150
  AccountAbstractionError: () => AccountAbstractionError,
25095
25151
  Address: () => Address,
25096
- CONNECTED_TRUSTED_APPS_QUERY_KEY: () => CONNECTED_TRUSTED_APPS_QUERY,
25097
25152
  ConnectWalletButton: () => ConnectWalletButton,
25098
25153
  ErrorCodes: () => ErrorCodes,
25099
25154
  Hash: () => Hash,
25100
- KEYSHARE_RECOVERY_STATS_QUERY_KEY: () => KEYSHARE_RECOVERY_STATS_QUERY,
25101
25155
  KeyshareBackup: () => KeyshareBackupMenu,
25102
25156
  LOCAL_STORAGE_I18N_KEY: () => LOCAL_STORAGE_I18N_KEY,
25103
25157
  LangToggle: () => LangToggle,
@@ -25141,6 +25195,7 @@ __export(index_exports, {
25141
25195
  useBalance: () => useBalance,
25142
25196
  useBlockscoutAssets: () => useBlockscoutAssets,
25143
25197
  useColorMode: () => useColorMode,
25198
+ useConnectedApps: () => useConnectedApps,
25144
25199
  useDirectWallet: () => useDirectWallet,
25145
25200
  useErc3643Compliance: () => useErc3643Compliance,
25146
25201
  useError: () => useError,
@@ -25148,6 +25203,7 @@ __export(index_exports, {
25148
25203
  useHydrated: () => useHydrated,
25149
25204
  useIFrameReady: () => useIFrameReady,
25150
25205
  useIsMobileView: () => useIsMobileView,
25206
+ useKeyshareRecoveryStats: () => useKeyshareRecoveryStats,
25151
25207
  useLinkedProfiles: () => useLinkedProfiles,
25152
25208
  useLoadingStatus: () => useLoadingStatus,
25153
25209
  useLogout: () => useLogout,
@@ -25218,6 +25274,7 @@ var init_index = __esm({
25218
25274
  init_clients2();
25219
25275
  init_auth();
25220
25276
  init_profile();
25277
+ init_hooks2();
25221
25278
  init_linkedProfiles();
25222
25279
  init_nickname_fingerprint();
25223
25280
  init_errors();
@@ -25239,11 +25296,9 @@ init_index();
25239
25296
  0 && (module.exports = {
25240
25297
  AccountAbstractionError,
25241
25298
  Address,
25242
- CONNECTED_TRUSTED_APPS_QUERY_KEY,
25243
25299
  ConnectWalletButton,
25244
25300
  ErrorCodes,
25245
25301
  Hash,
25246
- KEYSHARE_RECOVERY_STATS_QUERY_KEY,
25247
25302
  KeyshareBackup,
25248
25303
  LOCAL_STORAGE_I18N_KEY,
25249
25304
  LangToggle,
@@ -25287,6 +25342,7 @@ init_index();
25287
25342
  useBalance,
25288
25343
  useBlockscoutAssets,
25289
25344
  useColorMode,
25345
+ useConnectedApps,
25290
25346
  useDirectWallet,
25291
25347
  useErc3643Compliance,
25292
25348
  useError,
@@ -25294,6 +25350,7 @@ init_index();
25294
25350
  useHydrated,
25295
25351
  useIFrameReady,
25296
25352
  useIsMobileView,
25353
+ useKeyshareRecoveryStats,
25297
25354
  useLinkedProfiles,
25298
25355
  useLoadingStatus,
25299
25356
  useLogout,
package/dist/index.d.cts CHANGED
@@ -1802,6 +1802,24 @@ declare function getUserProfile(): Promise<UserProfile>;
1802
1802
  */
1803
1803
  declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
1804
1804
 
1805
+ declare function useConnectedApps(): _tanstack_react_query.UseQueryResult<any[] | {
1806
+ userId: string;
1807
+ projectId: string;
1808
+ origin: string;
1809
+ trustedAt: number;
1810
+ appName?: string;
1811
+ appLogo?: string;
1812
+ }[], Error>;
1813
+ declare function useKeyshareRecoveryStats(): _tanstack_react_query.UseQueryResult<{
1814
+ keyshareInfo: {
1815
+ hasKeyshare: boolean;
1816
+ ownerAddress?: `0x${string}`;
1817
+ sessionId?: string;
1818
+ keyshareSize?: number;
1819
+ };
1820
+ shareRecoveryStats: RecoveryStats;
1821
+ }, Error>;
1822
+
1805
1823
  interface LinkedProfileDisplay extends AuthProvider {
1806
1824
  displayName: string;
1807
1825
  icon?: React.ComponentType<{
@@ -2981,9 +2999,6 @@ declare function combineI18NResources(...resourses: TranslationResources[]): Tra
2981
2999
  declare function getAvailableLanguages(resourses: TranslationResources): string[];
2982
3000
  declare function getLanguageIcon(languageKey: string): string | null;
2983
3001
 
2984
- declare const KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
2985
- declare const CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
2986
-
2987
3002
  declare const USER_PROFILE_QUERY_KEY: string;
2988
3003
 
2989
- export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, CONNECTED_TRUSTED_APPS_QUERY as CONNECTED_TRUSTED_APPS_QUERY_KEY, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KEYSHARE_RECOVERY_STATS_QUERY as KEYSHARE_RECOVERY_STATS_QUERY_KEY, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type SmartAccountEntry, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getExplorerUrl, getIframeManager, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useBlockscoutAssets, useColorMode, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
3004
+ export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type SmartAccountEntry, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getExplorerUrl, getIframeManager, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
package/dist/index.d.ts CHANGED
@@ -1802,6 +1802,24 @@ declare function getUserProfile(): Promise<UserProfile>;
1802
1802
  */
1803
1803
  declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
1804
1804
 
1805
+ declare function useConnectedApps(): _tanstack_react_query.UseQueryResult<any[] | {
1806
+ userId: string;
1807
+ projectId: string;
1808
+ origin: string;
1809
+ trustedAt: number;
1810
+ appName?: string;
1811
+ appLogo?: string;
1812
+ }[], Error>;
1813
+ declare function useKeyshareRecoveryStats(): _tanstack_react_query.UseQueryResult<{
1814
+ keyshareInfo: {
1815
+ hasKeyshare: boolean;
1816
+ ownerAddress?: `0x${string}`;
1817
+ sessionId?: string;
1818
+ keyshareSize?: number;
1819
+ };
1820
+ shareRecoveryStats: RecoveryStats;
1821
+ }, Error>;
1822
+
1805
1823
  interface LinkedProfileDisplay extends AuthProvider {
1806
1824
  displayName: string;
1807
1825
  icon?: React.ComponentType<{
@@ -2981,9 +2999,6 @@ declare function combineI18NResources(...resourses: TranslationResources[]): Tra
2981
2999
  declare function getAvailableLanguages(resourses: TranslationResources): string[];
2982
3000
  declare function getLanguageIcon(languageKey: string): string | null;
2983
3001
 
2984
- declare const KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
2985
- declare const CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
2986
-
2987
3002
  declare const USER_PROFILE_QUERY_KEY: string;
2988
3003
 
2989
- export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, CONNECTED_TRUSTED_APPS_QUERY as CONNECTED_TRUSTED_APPS_QUERY_KEY, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KEYSHARE_RECOVERY_STATS_QUERY as KEYSHARE_RECOVERY_STATS_QUERY_KEY, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type SmartAccountEntry, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getExplorerUrl, getIframeManager, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useBlockscoutAssets, useColorMode, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
3004
+ export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type SmartAccountEntry, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getExplorerUrl, getIframeManager, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
package/dist/index.js CHANGED
@@ -5262,23 +5262,46 @@ var init_OtpIcon = __esm({
5262
5262
  // src/internal/components/AuthMenu/VerifyStep/VerificationCodeInput.tsx
5263
5263
  import { useEffect as useEffect9, useRef as useRef7, useState as useState3 } from "react";
5264
5264
  import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
5265
- var VerificationCodeInput;
5265
+ var getRemainingSeconds, VerificationCodeInput;
5266
5266
  var init_VerificationCodeInput = __esm({
5267
5267
  "src/internal/components/AuthMenu/VerifyStep/VerificationCodeInput.tsx"() {
5268
5268
  init_i18n();
5269
5269
  init_utils2();
5270
5270
  init_button();
5271
5271
  init_useAuthStore();
5272
+ getRemainingSeconds = (expiresAt) => Math.max(0, Math.ceil((expiresAt - Date.now()) / 1e3));
5272
5273
  VerificationCodeInput = (props) => {
5273
5274
  const { onVerifyCode, onResendCode, isLoading, expiresIn } = props;
5274
5275
  const { t } = useT();
5275
5276
  const setAlert = useAuthStore((st) => st.setAlert);
5276
- const [timeLeft, setTimeLeft] = useState3(expiresIn);
5277
+ const [expiresAt, setExpiresAt] = useState3(() => Date.now() + Math.max(0, expiresIn) * 1e3);
5278
+ const [timeLeft, setTimeLeft] = useState3(() => getRemainingSeconds(expiresAt));
5277
5279
  useEffect9(() => {
5278
- if (timeLeft <= 0) return;
5279
- const t2 = setTimeout(() => setTimeLeft((s) => s - 1), 1e3);
5280
- return () => clearTimeout(t2);
5281
- }, [timeLeft]);
5280
+ const nextExpiresAt = Date.now() + Math.max(0, expiresIn) * 1e3;
5281
+ setExpiresAt(nextExpiresAt);
5282
+ setTimeLeft(getRemainingSeconds(nextExpiresAt));
5283
+ }, [expiresIn]);
5284
+ useEffect9(() => {
5285
+ let intervalId;
5286
+ const syncTimeLeft = () => {
5287
+ const remaining = getRemainingSeconds(expiresAt);
5288
+ setTimeLeft(remaining);
5289
+ if (remaining <= 0 && intervalId) {
5290
+ window.clearInterval(intervalId);
5291
+ intervalId = void 0;
5292
+ }
5293
+ };
5294
+ syncTimeLeft();
5295
+ if (getRemainingSeconds(expiresAt) <= 0) return;
5296
+ intervalId = window.setInterval(syncTimeLeft, 1e3);
5297
+ window.addEventListener("focus", syncTimeLeft);
5298
+ document.addEventListener("visibilitychange", syncTimeLeft);
5299
+ return () => {
5300
+ if (intervalId) window.clearInterval(intervalId);
5301
+ window.removeEventListener("focus", syncTimeLeft);
5302
+ document.removeEventListener("visibilitychange", syncTimeLeft);
5303
+ };
5304
+ }, [expiresAt]);
5282
5305
  const lastSubmittedRef = useRef7(null);
5283
5306
  const inputsRef = useRef7([]);
5284
5307
  const [digits, setDigits] = useState3(["", "", "", "", "", ""]);
@@ -5463,14 +5486,17 @@ function VerifyStep(props) {
5463
5486
  },
5464
5487
  onError: (error) => {
5465
5488
  let errorMessage = "";
5466
- if (error.message?.includes("Invalid") || error.message?.includes("invalid")) {
5489
+ const rawErrorMessage = error.message || "";
5490
+ const normalizedErrorMessage = rawErrorMessage.toLowerCase();
5491
+ if (normalizedErrorMessage.includes("invalid")) {
5467
5492
  errorMessage = "Invalid verification code. Please try again.";
5468
- } else if (error.message?.includes("expired")) {
5493
+ } else if (normalizedErrorMessage.includes("expired")) {
5469
5494
  errorMessage = "Verification code expired. Please request a new one.";
5470
- } else if (error.message?.includes("429") || error.message?.includes("Too many")) {
5495
+ setExpiresIn(0);
5496
+ } else if (normalizedErrorMessage.includes("429") || normalizedErrorMessage.includes("too many")) {
5471
5497
  errorMessage = "Too many attempts. Please try again later.";
5472
5498
  } else {
5473
- errorMessage = error.message || "Verification failed. Please try again.";
5499
+ errorMessage = rawErrorMessage || "Verification failed. Please try again.";
5474
5500
  }
5475
5501
  setAlert({
5476
5502
  title: "Verification failed",
@@ -13660,7 +13686,17 @@ function useVerifyCode() {
13660
13686
  const qc = useQueryClient14();
13661
13687
  const address = useSession((st) => st.address);
13662
13688
  const setIsLoading = useSession((st) => st.setIsLoading);
13663
- const { email, emailCode, setEmail, setEmailStep, setEmailCode, setProviderType, setLinkIsLoading, setAlert } = useManageWalletStore();
13689
+ const {
13690
+ email,
13691
+ emailCode,
13692
+ setEmail,
13693
+ setEmailStep,
13694
+ setEmailCode,
13695
+ setEmailCodeExpiresIn,
13696
+ setProviderType,
13697
+ setLinkIsLoading,
13698
+ setAlert
13699
+ } = useManageWalletStore();
13664
13700
  return useMutation14({
13665
13701
  mutationFn: async (codeToVerify) => {
13666
13702
  const code = codeToVerify ?? emailCode;
@@ -13689,7 +13725,11 @@ function useVerifyCode() {
13689
13725
  setLinkIsLoading(false);
13690
13726
  },
13691
13727
  onError: (error) => {
13692
- setAlert({ title: "Error", message: error?.message || "Failed to verify and link email" });
13728
+ const message = error?.message || "Failed to verify and link email";
13729
+ if (message.toLowerCase().includes("expired")) {
13730
+ setEmailCodeExpiresIn(0);
13731
+ }
13732
+ setAlert({ title: "Error", message });
13693
13733
  setIsLoading(false);
13694
13734
  setLinkIsLoading(false);
13695
13735
  }
@@ -15745,8 +15785,55 @@ var init_constants6 = __esm({
15745
15785
  }
15746
15786
  });
15747
15787
 
15748
- // src/internal/components/SecurityMenu/ConnectedApps.tsx
15788
+ // src/internal/components/SecurityMenu/hooks.ts
15749
15789
  import { useQuery as useQuery18 } from "@tanstack/react-query";
15790
+ function useConnectedApps() {
15791
+ const session = useSession((st) => st.session);
15792
+ const userId = session?.mpcUserId || null;
15793
+ return useQuery18({
15794
+ retry: false,
15795
+ enabled: !!userId,
15796
+ queryKey: [CONNECTED_TRUSTED_APPS_QUERY, userId],
15797
+ queryFn: async () => {
15798
+ const iframeManager = getIframeManager();
15799
+ return await iframeManager.getTrustedApps(userId).catch(() => {
15800
+ console.error("[ConnectedApps] Failed to load connected apps from iframe");
15801
+ return [];
15802
+ });
15803
+ }
15804
+ });
15805
+ }
15806
+ function useKeyshareRecoveryStats() {
15807
+ const session = useSession((st) => st.session);
15808
+ const userId = session?.mpcUserId || null;
15809
+ return useQuery18({
15810
+ enabled: !!userId,
15811
+ queryKey: [KEYSHARE_RECOVERY_STATS_QUERY, userId],
15812
+ queryFn: async () => {
15813
+ const iframeManager = getIframeManager();
15814
+ if (!iframeManager) {
15815
+ throw new Error("Iframe manager not available");
15816
+ }
15817
+ const keyshareInfo = await getKeyshareInfo(userId);
15818
+ const shareRecoveryStats = await getShareRecoveryStats();
15819
+ return {
15820
+ keyshareInfo,
15821
+ shareRecoveryStats
15822
+ };
15823
+ }
15824
+ });
15825
+ }
15826
+ var init_hooks2 = __esm({
15827
+ "src/internal/components/SecurityMenu/hooks.ts"() {
15828
+ init_SessionContext();
15829
+ init_keyshare();
15830
+ init_iframe_manager();
15831
+ init_vaultClient();
15832
+ init_constants6();
15833
+ }
15834
+ });
15835
+
15836
+ // src/internal/components/SecurityMenu/ConnectedApps.tsx
15750
15837
  import dayjs5 from "dayjs";
15751
15838
  import { omit } from "lodash-es";
15752
15839
  import { AppWindowMac, Info as Info5, ShieldBanIcon, ShieldCheckIcon } from "lucide-react";
@@ -15813,20 +15900,7 @@ function Application(props) {
15813
15900
  function ConnectedApps(props) {
15814
15901
  const { isLoading: isParentLoading, untrustApp } = props;
15815
15902
  const { t } = useT();
15816
- const session = useSession((st) => st.session);
15817
- const userId = session?.mpcUserId || null;
15818
- const { data: connectedApps = [], isLoading: isConnectedAppsLoading } = useQuery18({
15819
- retry: false,
15820
- enabled: !!userId,
15821
- queryKey: [CONNECTED_TRUSTED_APPS_QUERY, userId],
15822
- queryFn: async () => {
15823
- const iframeManager = getIframeManager();
15824
- return await iframeManager.getTrustedApps(userId).catch(() => {
15825
- console.error("[ConnectedApps] Failed to load connected apps from iframe");
15826
- return [];
15827
- });
15828
- }
15829
- });
15903
+ const { data: connectedApps = [], isLoading: isConnectedAppsLoading } = useConnectedApps();
15830
15904
  const isLoading = isConnectedAppsLoading || isParentLoading;
15831
15905
  if (isLoading) return null;
15832
15906
  if (!isLoading && connectedApps.length === 0)
@@ -15848,12 +15922,10 @@ function ConnectedApps(props) {
15848
15922
  var init_ConnectedApps = __esm({
15849
15923
  "src/internal/components/SecurityMenu/ConnectedApps.tsx"() {
15850
15924
  init_utils2();
15851
- init_SessionContext();
15852
15925
  init_i18n();
15853
- init_iframe_manager();
15854
15926
  init_button();
15855
15927
  init_highlight();
15856
- init_constants6();
15928
+ init_hooks2();
15857
15929
  }
15858
15930
  });
15859
15931
 
@@ -16122,7 +16194,7 @@ var init_UntrustApplication = __esm({
16122
16194
  });
16123
16195
 
16124
16196
  // src/internal/components/SecurityMenu/SecurityMenu.tsx
16125
- import { useMutation as useMutation17, useQuery as useQuery19, useQueryClient as useQueryClient22 } from "@tanstack/react-query";
16197
+ import { useMutation as useMutation17, useQueryClient as useQueryClient22 } from "@tanstack/react-query";
16126
16198
  import { ArrowLeft as ArrowLeft17 } from "lucide-react";
16127
16199
  import { useState as useState23 } from "react";
16128
16200
  import { jsx as jsx88, jsxs as jsxs81 } from "react/jsx-runtime";
@@ -16134,22 +16206,7 @@ function SecurityMenu() {
16134
16206
  const userId = jwtTokenManager2.getUserId();
16135
16207
  const serverHasKeyshare = jwtTokenManager2.getHasKeyshare() ?? false;
16136
16208
  const [appToUntrust, untrustApp] = useState23(null);
16137
- const { data: recoveryData, isLoading: isRecoveryLoading } = useQuery19({
16138
- enabled: !!userId,
16139
- queryKey: [KEYSHARE_RECOVERY_STATS_QUERY, userId],
16140
- queryFn: async () => {
16141
- const iframeManager = getIframeManager();
16142
- if (!iframeManager) {
16143
- throw new Error("Iframe manager not available");
16144
- }
16145
- const keyshareInfo = await getKeyshareInfo(userId);
16146
- const shareRecoveryStats = await getShareRecoveryStats();
16147
- return {
16148
- keyshareInfo,
16149
- shareRecoveryStats
16150
- };
16151
- }
16152
- });
16209
+ const { data: recoveryData, isLoading: isRecoveryLoading } = useKeyshareRecoveryStats();
16153
16210
  const localInfo = recoveryData?.keyshareInfo || {};
16154
16211
  const hasServerBackup = !!recoveryData?.shareRecoveryStats?.created || recoveryData?.shareRecoveryStats?.devices?.length > 0;
16155
16212
  const { mutate: handleUntrustApp, isPending: isUntrustingApp } = useMutation17({
@@ -16228,15 +16285,14 @@ var init_SecurityMenu = __esm({
16228
16285
  "src/internal/components/SecurityMenu/SecurityMenu.tsx"() {
16229
16286
  init_i18n();
16230
16287
  init_auth();
16231
- init_keyshare();
16232
16288
  init_useLayoutDataStore();
16233
16289
  init_useLayoutStore();
16234
16290
  init_iframe_manager();
16235
- init_vaultClient();
16236
16291
  init_Expandable2();
16237
16292
  init_button();
16238
16293
  init_ConnectedApps();
16239
16294
  init_constants6();
16295
+ init_hooks2();
16240
16296
  init_Keyshare2();
16241
16297
  init_UntrustApplication();
16242
16298
  }
@@ -19142,7 +19198,7 @@ var init_package = __esm({
19142
19198
  "package.json"() {
19143
19199
  package_default = {
19144
19200
  name: "@embarkai/ui-kit",
19145
- version: "0.4.10",
19201
+ version: "0.4.12",
19146
19202
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
19147
19203
  type: "module",
19148
19204
  main: "./dist/index.cjs",
@@ -25010,7 +25066,6 @@ var USER_PROFILE_QUERY_KEY;
25010
25066
  var init_exportedQueryKeys = __esm({
25011
25067
  "src/internal/exportedQueryKeys.ts"() {
25012
25068
  init_profile();
25013
- init_constants6();
25014
25069
  USER_PROFILE_QUERY_KEY = QUERY_KEYS.userProfile;
25015
25070
  }
25016
25071
  });
@@ -25061,6 +25116,7 @@ var init_index = __esm({
25061
25116
  init_clients2();
25062
25117
  init_auth();
25063
25118
  init_profile();
25119
+ init_hooks2();
25064
25120
  init_linkedProfiles();
25065
25121
  init_nickname_fingerprint();
25066
25122
  init_errors();
@@ -25081,11 +25137,9 @@ init_index();
25081
25137
  export {
25082
25138
  AccountAbstractionError,
25083
25139
  Address,
25084
- CONNECTED_TRUSTED_APPS_QUERY as CONNECTED_TRUSTED_APPS_QUERY_KEY,
25085
25140
  ConnectWalletButton,
25086
25141
  ErrorCodes,
25087
25142
  Hash,
25088
- KEYSHARE_RECOVERY_STATS_QUERY as KEYSHARE_RECOVERY_STATS_QUERY_KEY,
25089
25143
  KeyshareBackupMenu as KeyshareBackup,
25090
25144
  LOCAL_STORAGE_I18N_KEY,
25091
25145
  LangToggle,
@@ -25129,6 +25183,7 @@ export {
25129
25183
  useBalance,
25130
25184
  useBlockscoutAssets,
25131
25185
  useColorMode,
25186
+ useConnectedApps,
25132
25187
  useDirectWallet,
25133
25188
  useErc3643Compliance,
25134
25189
  useError,
@@ -25136,6 +25191,7 @@ export {
25136
25191
  useHydrated,
25137
25192
  useIFrameReady,
25138
25193
  useIsMobileView,
25194
+ useKeyshareRecoveryStats,
25139
25195
  useLinkedProfiles,
25140
25196
  useLoadingStatus,
25141
25197
  useLogout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embarkai/ui-kit",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",