@embarkai/ui-kit 0.4.96 → 0.4.98

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.d.cts CHANGED
@@ -150,9 +150,10 @@ declare global {
150
150
  __EMBARK_SERVICES__?: Partial<{
151
151
  assetApiUrl: string;
152
152
  tssUrl: string;
153
+ dwhUrl: string;
153
154
  iframeUrl: string;
154
155
  shareVaultUrl: string;
155
- dashboardApiUrl: string;
156
+ dashboardUrl: string;
156
157
  tssRequireWasm: boolean;
157
158
  tssWasmDebug: boolean;
158
159
  }>;
@@ -205,6 +206,8 @@ interface WatchToken {
205
206
  /** Logo URL (optional) */
206
207
  logo?: string;
207
208
  }
209
+ /** real ID from @wagmi/connectors, extensionProvider = injected plugin */
210
+ type AlowedWallet = 'walletConnect' | 'metaMaskSDK' | 'extensionProvider' | 'baseAccount' | 'coinbaseWalletSDK';
208
211
  type WalletMode = 'linked' | 'direct' | 'both';
209
212
  interface ProviderConfig {
210
213
  projectId: string;
@@ -212,26 +215,27 @@ interface ProviderConfig {
212
215
  enabled: boolean;
213
216
  showCreateButton: boolean;
214
217
  primaryButtonText: string;
218
+ order?: number;
215
219
  };
216
220
  email: {
217
221
  enabled: boolean;
218
- placeholder: string;
219
- buttonText: string;
220
- verificationTitle: string;
222
+ order?: number;
221
223
  };
222
224
  social: {
223
225
  enabled: boolean;
224
226
  providers: SocialProvider[];
227
+ order?: number;
225
228
  };
226
229
  wallet: {
227
230
  enabled: boolean;
228
231
  supportedChains?: number[];
229
232
  requireSignature: boolean;
230
- walletConnectProjectId?: string;
231
233
  /** Operating mode: 'linked' = AA (current), 'direct' = external wallet signs, 'both' = user choice */
232
234
  mode?: WalletMode;
233
235
  /** Filter the wallet connector list shown in ConnectExternalWalletMenu. undefined = show all wallets */
234
- allowedWallets?: string[];
236
+ allowedWallets?: AlowedWallet[];
237
+ order?: number;
238
+ as?: 'menu' | 'social';
235
239
  };
236
240
  preferedColorMode?: 'light' | 'dark';
237
241
  /**
@@ -278,7 +282,6 @@ interface ProviderConfig {
278
282
  subtitle?: string;
279
283
  useExternalIcons?: boolean;
280
284
  dialogClassName?: string;
281
- authOrder?: ('email' | 'social' | 'wallet')[];
282
285
  };
283
286
  network: {
284
287
  name: string;
@@ -302,8 +305,9 @@ interface ProviderConfig {
302
305
  services: {
303
306
  assetApiUrl?: string;
304
307
  tssUrl: string;
308
+ dwhUrl: string;
305
309
  shareVaultUrl: string;
306
- dashboardApiUrl?: string;
310
+ dashboardUrl?: string;
307
311
  iframeUrl?: string;
308
312
  tssRequireWasm?: boolean;
309
313
  tssWasmDebug?: boolean;
@@ -314,6 +318,7 @@ interface ProviderConfig {
314
318
  requestDeduplication: boolean;
315
319
  kycNeeded?: boolean;
316
320
  displayNameNeeded?: boolean;
321
+ allowUserWalletPolicy?: boolean;
317
322
  /**
318
323
  * Display header balance asset as USD(T) representation via current asset rate from Binance.
319
324
  * - Asset can be set by "showBalanceAs" prop & has to be supported by Binance if "showActiveBalanceAsFiat" true.
@@ -1082,8 +1087,8 @@ declare const useHydrated: () => boolean;
1082
1087
  declare enum PageKey {
1083
1088
  AUTH = "auth",
1084
1089
  LANGUAGES = "languages",
1085
- TERMS_OF_SERVICE = "terms-of-service",
1086
1090
  MAIN_MENU = "main-menu",
1091
+ ACTIVITY_LOG = "activity-log",
1087
1092
  SETTINGS = "settings",
1088
1093
  SEND = "send",
1089
1094
  RECEIVE = "receive",
@@ -1142,7 +1147,6 @@ declare const buttonVariants: (props?: {
1142
1147
  size?: "small" | "large" | "medium" | "icon";
1143
1148
  } & class_variance_authority_types.ClassProp) => string;
1144
1149
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
1145
- asChild?: boolean;
1146
1150
  }
1147
1151
 
1148
1152
  /** EmbarkAI Color Mode Switcher */
@@ -1902,6 +1906,51 @@ declare function getUserProfile(): Promise<UserProfile>;
1902
1906
  */
1903
1907
  declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
1904
1908
 
1909
+ interface PolicyRules {
1910
+ destinations?: {
1911
+ allow?: string[];
1912
+ deny?: string[];
1913
+ };
1914
+ limits?: {
1915
+ perTx?: string;
1916
+ perDay?: string;
1917
+ perMonth?: string;
1918
+ txPerDay?: number;
1919
+ };
1920
+ }
1921
+ type PendingChange<S> = {
1922
+ op: 'update';
1923
+ state: S;
1924
+ activatesAt: string;
1925
+ } | {
1926
+ op: 'delete';
1927
+ activatesAt: string;
1928
+ };
1929
+ interface UserPolicy {
1930
+ id: string;
1931
+ version: number;
1932
+ chainId: number;
1933
+ active: PolicyRules;
1934
+ pending: PendingChange<PolicyRules> | null;
1935
+ updatedAt: string;
1936
+ }
1937
+ interface UserPolicyView {
1938
+ policy: UserPolicy | null;
1939
+ overriddenBy: {
1940
+ projectId: string;
1941
+ field: string;
1942
+ }[];
1943
+ }
1944
+
1945
+ type SecuritySubmenu = 'connected-apps' | 'user-assets-policies';
1946
+ interface SecurityMenuParams extends PageOpenParams {
1947
+ submenu: SecuritySubmenu;
1948
+ /** open the policy editor pre-populated with these rules (e.g. the caller's own last-fetched policy) */
1949
+ policyRules?: PolicyRules;
1950
+ /** open the policy editor with empty/default rules */
1951
+ openPolicyEditor?: boolean;
1952
+ }
1953
+
1905
1954
  interface ConnectedApp {
1906
1955
  projectId: string;
1907
1956
  name: string;
@@ -1927,6 +1976,22 @@ declare function useKeyshareRecoveryStats(): _tanstack_react_query.UseQueryResul
1927
1976
  shareRecoveryStats: RecoveryStats;
1928
1977
  }>, Error>;
1929
1978
 
1979
+ /** The user's own policy for the active chain (one policy per wallet per chain) */
1980
+ declare function useUserAssetsPolicies(activeChainId: number): _tanstack_react_query.UseQueryResult<NoInfer<UserPolicyView>, Error>;
1981
+
1982
+ declare function getUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
1983
+ declare function putUserPolicy(userId: string, chainId: number, rules: PolicyRules): Promise<UserPolicyView>;
1984
+ declare function cancelPendingPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
1985
+ declare function deleteUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
1986
+ declare const USER_ASSETS_POLICIES_API: {
1987
+ getUserPolicy: typeof getUserPolicy;
1988
+ putUserPolicy: typeof putUserPolicy;
1989
+ cancelPendingPolicy: typeof cancelPendingPolicy;
1990
+ deleteUserPolicy: typeof deleteUserPolicy;
1991
+ };
1992
+
1993
+ declare const DEFAULT_POLICY_RULES: PolicyRules;
1994
+
1930
1995
  declare function checkWrapedTokenSymbol(symbol: string): string;
1931
1996
  /**
1932
1997
  * get asset rate for a specific symbol against a USDT by default
@@ -2632,14 +2697,20 @@ declare const PASSPORT_TRANSLATIONS: {
2632
2697
  };
2633
2698
  main: {
2634
2699
  send: string;
2700
+ bridge: string;
2635
2701
  receive: string;
2636
2702
  buy: string;
2637
2703
  assets: string;
2704
+ activity: string;
2638
2705
  onboarding: {
2639
2706
  sendButton: {
2640
2707
  title: string;
2641
2708
  description: string;
2642
2709
  };
2710
+ bridgeButton: {
2711
+ title: string;
2712
+ description: string;
2713
+ };
2643
2714
  receiveButton: {
2644
2715
  title: string;
2645
2716
  description: string;
@@ -2648,12 +2719,19 @@ declare const PASSPORT_TRANSLATIONS: {
2648
2719
  title: string;
2649
2720
  description: string;
2650
2721
  };
2722
+ portfolioSection: {
2723
+ title: string;
2724
+ description: string;
2725
+ };
2651
2726
  portfolioButton: {
2652
2727
  title: string;
2653
2728
  description: string;
2654
2729
  };
2655
2730
  };
2656
2731
  };
2732
+ activityLogMenu: {
2733
+ title: string;
2734
+ };
2657
2735
  connectMenu: {
2658
2736
  connectWallet: string;
2659
2737
  noWallets: string;
@@ -2949,6 +3027,36 @@ declare const PASSPORT_TRANSLATIONS: {
2949
3027
  removalNoteMsg1: string;
2950
3028
  removalNoteMsg2: string;
2951
3029
  };
3030
+ assetsPolicies: {
3031
+ assetsPolicies: string;
3032
+ noLimits: string;
3033
+ disabled: string;
3034
+ editPolicy: string;
3035
+ deletePolicy: string;
3036
+ deletePolicyConfirm: string;
3037
+ overriddenBy: string;
3038
+ pendingUpdateMessage: string;
3039
+ pendingDeleteMessage: string;
3040
+ cancelPending: string;
3041
+ form: {
3042
+ destinations: {
3043
+ title: string;
3044
+ allow: string;
3045
+ deny: string;
3046
+ };
3047
+ limits: {
3048
+ title: string;
3049
+ perTx: string;
3050
+ perDay: string;
3051
+ perMonth: string;
3052
+ txPerDay: string;
3053
+ };
3054
+ actions: {
3055
+ submit: string;
3056
+ saving: string;
3057
+ };
3058
+ };
3059
+ };
2952
3060
  keyshareStatus: {
2953
3061
  title: string;
2954
3062
  serverReady: string;
@@ -3506,6 +3614,36 @@ declare const PASSPORT_TRANSLATIONS: {
3506
3614
  removalNoteMsg1: string;
3507
3615
  removalNoteMsg2: string;
3508
3616
  };
3617
+ assetsPolicies: {
3618
+ assetsPolicies: string;
3619
+ noLimits: string;
3620
+ disabled: string;
3621
+ editPolicy: string;
3622
+ deletePolicy: string;
3623
+ deletePolicyConfirm: string;
3624
+ overriddenBy: string;
3625
+ pendingUpdateMessage: string;
3626
+ pendingDeleteMessage: string;
3627
+ cancelPending: string;
3628
+ form: {
3629
+ destinations: {
3630
+ title: string;
3631
+ allow: string;
3632
+ deny: string;
3633
+ };
3634
+ limits: {
3635
+ title: string;
3636
+ perTx: string;
3637
+ perDay: string;
3638
+ perMonth: string;
3639
+ txPerDay: string;
3640
+ };
3641
+ actions: {
3642
+ submit: string;
3643
+ saving: string;
3644
+ };
3645
+ };
3646
+ };
3509
3647
  keyshareStatus: {
3510
3648
  title: string;
3511
3649
  serverReady: string;
@@ -4063,6 +4201,36 @@ declare const PASSPORT_TRANSLATIONS: {
4063
4201
  removalNoteMsg1: string;
4064
4202
  removalNoteMsg2: string;
4065
4203
  };
4204
+ assetsPolicies: {
4205
+ assetsPolicies: string;
4206
+ noLimits: string;
4207
+ disabled: string;
4208
+ editPolicy: string;
4209
+ deletePolicy: string;
4210
+ deletePolicyConfirm: string;
4211
+ overriddenBy: string;
4212
+ pendingUpdateMessage: string;
4213
+ pendingDeleteMessage: string;
4214
+ cancelPending: string;
4215
+ form: {
4216
+ destinations: {
4217
+ title: string;
4218
+ allow: string;
4219
+ deny: string;
4220
+ };
4221
+ limits: {
4222
+ title: string;
4223
+ perTx: string;
4224
+ perDay: string;
4225
+ perMonth: string;
4226
+ txPerDay: string;
4227
+ };
4228
+ actions: {
4229
+ submit: string;
4230
+ saving: string;
4231
+ };
4232
+ };
4233
+ };
4066
4234
  keyshareStatus: {
4067
4235
  title: string;
4068
4236
  serverReady: string;
@@ -4221,4 +4389,4 @@ declare function getLanguageIcon(languageKey: string): string | null;
4221
4389
 
4222
4390
  declare const USER_PROFILE_QUERY_KEY: string;
4223
4391
 
4224
- export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, 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, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, 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, waitForStoreHydration, waitForUserOperationReceipt };
4392
+ export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, DEFAULT_POLICY_RULES, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PolicyRules, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SecurityMenuParams, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_ASSETS_POLICIES_API, 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 UserPolicy, type UserPolicyView, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, 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, useUserAssetsPolicies, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
package/dist/index.d.ts CHANGED
@@ -150,9 +150,10 @@ declare global {
150
150
  __EMBARK_SERVICES__?: Partial<{
151
151
  assetApiUrl: string;
152
152
  tssUrl: string;
153
+ dwhUrl: string;
153
154
  iframeUrl: string;
154
155
  shareVaultUrl: string;
155
- dashboardApiUrl: string;
156
+ dashboardUrl: string;
156
157
  tssRequireWasm: boolean;
157
158
  tssWasmDebug: boolean;
158
159
  }>;
@@ -205,6 +206,8 @@ interface WatchToken {
205
206
  /** Logo URL (optional) */
206
207
  logo?: string;
207
208
  }
209
+ /** real ID from @wagmi/connectors, extensionProvider = injected plugin */
210
+ type AlowedWallet = 'walletConnect' | 'metaMaskSDK' | 'extensionProvider' | 'baseAccount' | 'coinbaseWalletSDK';
208
211
  type WalletMode = 'linked' | 'direct' | 'both';
209
212
  interface ProviderConfig {
210
213
  projectId: string;
@@ -212,26 +215,27 @@ interface ProviderConfig {
212
215
  enabled: boolean;
213
216
  showCreateButton: boolean;
214
217
  primaryButtonText: string;
218
+ order?: number;
215
219
  };
216
220
  email: {
217
221
  enabled: boolean;
218
- placeholder: string;
219
- buttonText: string;
220
- verificationTitle: string;
222
+ order?: number;
221
223
  };
222
224
  social: {
223
225
  enabled: boolean;
224
226
  providers: SocialProvider[];
227
+ order?: number;
225
228
  };
226
229
  wallet: {
227
230
  enabled: boolean;
228
231
  supportedChains?: number[];
229
232
  requireSignature: boolean;
230
- walletConnectProjectId?: string;
231
233
  /** Operating mode: 'linked' = AA (current), 'direct' = external wallet signs, 'both' = user choice */
232
234
  mode?: WalletMode;
233
235
  /** Filter the wallet connector list shown in ConnectExternalWalletMenu. undefined = show all wallets */
234
- allowedWallets?: string[];
236
+ allowedWallets?: AlowedWallet[];
237
+ order?: number;
238
+ as?: 'menu' | 'social';
235
239
  };
236
240
  preferedColorMode?: 'light' | 'dark';
237
241
  /**
@@ -278,7 +282,6 @@ interface ProviderConfig {
278
282
  subtitle?: string;
279
283
  useExternalIcons?: boolean;
280
284
  dialogClassName?: string;
281
- authOrder?: ('email' | 'social' | 'wallet')[];
282
285
  };
283
286
  network: {
284
287
  name: string;
@@ -302,8 +305,9 @@ interface ProviderConfig {
302
305
  services: {
303
306
  assetApiUrl?: string;
304
307
  tssUrl: string;
308
+ dwhUrl: string;
305
309
  shareVaultUrl: string;
306
- dashboardApiUrl?: string;
310
+ dashboardUrl?: string;
307
311
  iframeUrl?: string;
308
312
  tssRequireWasm?: boolean;
309
313
  tssWasmDebug?: boolean;
@@ -314,6 +318,7 @@ interface ProviderConfig {
314
318
  requestDeduplication: boolean;
315
319
  kycNeeded?: boolean;
316
320
  displayNameNeeded?: boolean;
321
+ allowUserWalletPolicy?: boolean;
317
322
  /**
318
323
  * Display header balance asset as USD(T) representation via current asset rate from Binance.
319
324
  * - Asset can be set by "showBalanceAs" prop & has to be supported by Binance if "showActiveBalanceAsFiat" true.
@@ -1082,8 +1087,8 @@ declare const useHydrated: () => boolean;
1082
1087
  declare enum PageKey {
1083
1088
  AUTH = "auth",
1084
1089
  LANGUAGES = "languages",
1085
- TERMS_OF_SERVICE = "terms-of-service",
1086
1090
  MAIN_MENU = "main-menu",
1091
+ ACTIVITY_LOG = "activity-log",
1087
1092
  SETTINGS = "settings",
1088
1093
  SEND = "send",
1089
1094
  RECEIVE = "receive",
@@ -1142,7 +1147,6 @@ declare const buttonVariants: (props?: {
1142
1147
  size?: "small" | "large" | "medium" | "icon";
1143
1148
  } & class_variance_authority_types.ClassProp) => string;
1144
1149
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
1145
- asChild?: boolean;
1146
1150
  }
1147
1151
 
1148
1152
  /** EmbarkAI Color Mode Switcher */
@@ -1902,6 +1906,51 @@ declare function getUserProfile(): Promise<UserProfile>;
1902
1906
  */
1903
1907
  declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
1904
1908
 
1909
+ interface PolicyRules {
1910
+ destinations?: {
1911
+ allow?: string[];
1912
+ deny?: string[];
1913
+ };
1914
+ limits?: {
1915
+ perTx?: string;
1916
+ perDay?: string;
1917
+ perMonth?: string;
1918
+ txPerDay?: number;
1919
+ };
1920
+ }
1921
+ type PendingChange<S> = {
1922
+ op: 'update';
1923
+ state: S;
1924
+ activatesAt: string;
1925
+ } | {
1926
+ op: 'delete';
1927
+ activatesAt: string;
1928
+ };
1929
+ interface UserPolicy {
1930
+ id: string;
1931
+ version: number;
1932
+ chainId: number;
1933
+ active: PolicyRules;
1934
+ pending: PendingChange<PolicyRules> | null;
1935
+ updatedAt: string;
1936
+ }
1937
+ interface UserPolicyView {
1938
+ policy: UserPolicy | null;
1939
+ overriddenBy: {
1940
+ projectId: string;
1941
+ field: string;
1942
+ }[];
1943
+ }
1944
+
1945
+ type SecuritySubmenu = 'connected-apps' | 'user-assets-policies';
1946
+ interface SecurityMenuParams extends PageOpenParams {
1947
+ submenu: SecuritySubmenu;
1948
+ /** open the policy editor pre-populated with these rules (e.g. the caller's own last-fetched policy) */
1949
+ policyRules?: PolicyRules;
1950
+ /** open the policy editor with empty/default rules */
1951
+ openPolicyEditor?: boolean;
1952
+ }
1953
+
1905
1954
  interface ConnectedApp {
1906
1955
  projectId: string;
1907
1956
  name: string;
@@ -1927,6 +1976,22 @@ declare function useKeyshareRecoveryStats(): _tanstack_react_query.UseQueryResul
1927
1976
  shareRecoveryStats: RecoveryStats;
1928
1977
  }>, Error>;
1929
1978
 
1979
+ /** The user's own policy for the active chain (one policy per wallet per chain) */
1980
+ declare function useUserAssetsPolicies(activeChainId: number): _tanstack_react_query.UseQueryResult<NoInfer<UserPolicyView>, Error>;
1981
+
1982
+ declare function getUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
1983
+ declare function putUserPolicy(userId: string, chainId: number, rules: PolicyRules): Promise<UserPolicyView>;
1984
+ declare function cancelPendingPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
1985
+ declare function deleteUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
1986
+ declare const USER_ASSETS_POLICIES_API: {
1987
+ getUserPolicy: typeof getUserPolicy;
1988
+ putUserPolicy: typeof putUserPolicy;
1989
+ cancelPendingPolicy: typeof cancelPendingPolicy;
1990
+ deleteUserPolicy: typeof deleteUserPolicy;
1991
+ };
1992
+
1993
+ declare const DEFAULT_POLICY_RULES: PolicyRules;
1994
+
1930
1995
  declare function checkWrapedTokenSymbol(symbol: string): string;
1931
1996
  /**
1932
1997
  * get asset rate for a specific symbol against a USDT by default
@@ -2632,14 +2697,20 @@ declare const PASSPORT_TRANSLATIONS: {
2632
2697
  };
2633
2698
  main: {
2634
2699
  send: string;
2700
+ bridge: string;
2635
2701
  receive: string;
2636
2702
  buy: string;
2637
2703
  assets: string;
2704
+ activity: string;
2638
2705
  onboarding: {
2639
2706
  sendButton: {
2640
2707
  title: string;
2641
2708
  description: string;
2642
2709
  };
2710
+ bridgeButton: {
2711
+ title: string;
2712
+ description: string;
2713
+ };
2643
2714
  receiveButton: {
2644
2715
  title: string;
2645
2716
  description: string;
@@ -2648,12 +2719,19 @@ declare const PASSPORT_TRANSLATIONS: {
2648
2719
  title: string;
2649
2720
  description: string;
2650
2721
  };
2722
+ portfolioSection: {
2723
+ title: string;
2724
+ description: string;
2725
+ };
2651
2726
  portfolioButton: {
2652
2727
  title: string;
2653
2728
  description: string;
2654
2729
  };
2655
2730
  };
2656
2731
  };
2732
+ activityLogMenu: {
2733
+ title: string;
2734
+ };
2657
2735
  connectMenu: {
2658
2736
  connectWallet: string;
2659
2737
  noWallets: string;
@@ -2949,6 +3027,36 @@ declare const PASSPORT_TRANSLATIONS: {
2949
3027
  removalNoteMsg1: string;
2950
3028
  removalNoteMsg2: string;
2951
3029
  };
3030
+ assetsPolicies: {
3031
+ assetsPolicies: string;
3032
+ noLimits: string;
3033
+ disabled: string;
3034
+ editPolicy: string;
3035
+ deletePolicy: string;
3036
+ deletePolicyConfirm: string;
3037
+ overriddenBy: string;
3038
+ pendingUpdateMessage: string;
3039
+ pendingDeleteMessage: string;
3040
+ cancelPending: string;
3041
+ form: {
3042
+ destinations: {
3043
+ title: string;
3044
+ allow: string;
3045
+ deny: string;
3046
+ };
3047
+ limits: {
3048
+ title: string;
3049
+ perTx: string;
3050
+ perDay: string;
3051
+ perMonth: string;
3052
+ txPerDay: string;
3053
+ };
3054
+ actions: {
3055
+ submit: string;
3056
+ saving: string;
3057
+ };
3058
+ };
3059
+ };
2952
3060
  keyshareStatus: {
2953
3061
  title: string;
2954
3062
  serverReady: string;
@@ -3506,6 +3614,36 @@ declare const PASSPORT_TRANSLATIONS: {
3506
3614
  removalNoteMsg1: string;
3507
3615
  removalNoteMsg2: string;
3508
3616
  };
3617
+ assetsPolicies: {
3618
+ assetsPolicies: string;
3619
+ noLimits: string;
3620
+ disabled: string;
3621
+ editPolicy: string;
3622
+ deletePolicy: string;
3623
+ deletePolicyConfirm: string;
3624
+ overriddenBy: string;
3625
+ pendingUpdateMessage: string;
3626
+ pendingDeleteMessage: string;
3627
+ cancelPending: string;
3628
+ form: {
3629
+ destinations: {
3630
+ title: string;
3631
+ allow: string;
3632
+ deny: string;
3633
+ };
3634
+ limits: {
3635
+ title: string;
3636
+ perTx: string;
3637
+ perDay: string;
3638
+ perMonth: string;
3639
+ txPerDay: string;
3640
+ };
3641
+ actions: {
3642
+ submit: string;
3643
+ saving: string;
3644
+ };
3645
+ };
3646
+ };
3509
3647
  keyshareStatus: {
3510
3648
  title: string;
3511
3649
  serverReady: string;
@@ -4063,6 +4201,36 @@ declare const PASSPORT_TRANSLATIONS: {
4063
4201
  removalNoteMsg1: string;
4064
4202
  removalNoteMsg2: string;
4065
4203
  };
4204
+ assetsPolicies: {
4205
+ assetsPolicies: string;
4206
+ noLimits: string;
4207
+ disabled: string;
4208
+ editPolicy: string;
4209
+ deletePolicy: string;
4210
+ deletePolicyConfirm: string;
4211
+ overriddenBy: string;
4212
+ pendingUpdateMessage: string;
4213
+ pendingDeleteMessage: string;
4214
+ cancelPending: string;
4215
+ form: {
4216
+ destinations: {
4217
+ title: string;
4218
+ allow: string;
4219
+ deny: string;
4220
+ };
4221
+ limits: {
4222
+ title: string;
4223
+ perTx: string;
4224
+ perDay: string;
4225
+ perMonth: string;
4226
+ txPerDay: string;
4227
+ };
4228
+ actions: {
4229
+ submit: string;
4230
+ saving: string;
4231
+ };
4232
+ };
4233
+ };
4066
4234
  keyshareStatus: {
4067
4235
  title: string;
4068
4236
  serverReady: string;
@@ -4221,4 +4389,4 @@ declare function getLanguageIcon(languageKey: string): string | null;
4221
4389
 
4222
4390
  declare const USER_PROFILE_QUERY_KEY: string;
4223
4391
 
4224
- export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, 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, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, 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, waitForStoreHydration, waitForUserOperationReceipt };
4392
+ export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, DEFAULT_POLICY_RULES, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PolicyRules, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SecurityMenuParams, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_ASSETS_POLICIES_API, 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 UserPolicy, type UserPolicyView, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, 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, useUserAssetsPolicies, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };