@embarkai/ui-kit 0.4.12 → 0.4.16

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 DELETED
@@ -1,3004 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React$1 from 'react';
3
- import React__default, { ReactNode, MutableRefObject, FC, HTMLAttributes, ButtonHTMLAttributes } from 'react';
4
- import * as viem from 'viem';
5
- import { Address as Address$1, Hex, PublicClient, Chain, Hash as Hash$1, TransactionReceipt } from 'viem';
6
- import * as _tanstack_react_query from '@tanstack/react-query';
7
- import * as zustand_middleware from 'zustand/middleware';
8
- import * as zustand from 'zustand';
9
- import { ChainConfig, createPublicClientForChain, createBundlerClientForChain, getChainConfig, getViemChain, lumiaTestnetChain, lumiaMainnetChain } from '@embarkai/core/read';
10
- import { BundlerClient } from 'viem/account-abstraction';
11
- import { UserOperationV07 } from '@embarkai/core/bundler';
12
- import * as class_variance_authority_types from 'class-variance-authority/types';
13
- import { VariantProps } from 'class-variance-authority';
14
- import * as wagmi from 'wagmi';
15
- export { JwtTokens, LoginResponse, VerifyResponse, getValidTokens, jwtTokenManager, logout } from '@embarkai/core/auth';
16
-
17
- interface TokenBalance {
18
- address: `0x${string}`;
19
- name: string;
20
- symbol: string;
21
- decimals: number;
22
- balance: string;
23
- formattedBalance: string;
24
- logo?: string;
25
- }
26
- /**
27
- * Asset type classification
28
- */
29
- type AssetType = 'native' | 'erc20' | 'erc721' | 'erc1155' | 'erc3643';
30
- /**
31
- * NFT metadata from token instance
32
- */
33
- interface NFTMetadata {
34
- /** NFT name from metadata */
35
- name?: string;
36
- /** NFT description */
37
- description?: string;
38
- /** Image URL (resolved from IPFS if needed) */
39
- image?: string;
40
- /** External URL for more info */
41
- externalUrl?: string;
42
- /** Collection name */
43
- collectionName?: string;
44
- /** Additional attributes */
45
- attributes?: Array<{
46
- trait_type: string;
47
- value: string | number;
48
- }>;
49
- }
50
- /**
51
- * Compliance status for security tokens (ERC3643)
52
- */
53
- interface ComplianceStatus {
54
- /** Whether the token is a security token (ERC3643) */
55
- isSecurityToken: boolean;
56
- /** Identity registry address */
57
- identityRegistry?: `0x${string}`;
58
- /** Whether current user is verified */
59
- isVerified?: boolean;
60
- /** Transfer restrictions message */
61
- transferRestrictions?: string;
62
- }
63
- /**
64
- * Error state for asset list
65
- */
66
- interface AssetListError {
67
- /** Error type for categorization */
68
- type: 'network' | 'api' | 'timeout' | 'unknown';
69
- /** Human-readable error message */
70
- message: string;
71
- /** Whether the request can be retried */
72
- retryable: boolean;
73
- }
74
- /**
75
- * Represents a token or NFT asset
76
- */
77
- interface Asset {
78
- /** Asset type classification */
79
- type: AssetType;
80
- /** Contract address (undefined for native token) */
81
- address?: `0x${string}`;
82
- /** Human-readable token name */
83
- name: string;
84
- /** Token symbol (e.g., "LUMIA", "USDC") */
85
- symbol: string;
86
- /** Raw balance as string (wei for fungible, count for NFT) */
87
- balance: string;
88
- /** Human-readable formatted balance */
89
- formattedBalance: string;
90
- /** Decimal precision (undefined for NFTs) */
91
- decimals?: number;
92
- /** NFT token ID (only for ERC721/ERC1155) */
93
- tokenId?: string;
94
- /** Token logo URL */
95
- logo?: string;
96
- /** NFT image URL (only for ERC721/ERC1155) */
97
- image?: string;
98
- /** NFT metadata (only for ERC721/ERC1155) */
99
- nftMetadata?: NFTMetadata;
100
- /** Security token compliance status (only for ERC3643) */
101
- complianceStatus?: ComplianceStatus;
102
- }
103
- declare function useAssets(address?: `0x${string}`): {
104
- nativeBalance: {
105
- decimals: number;
106
- formatted: string;
107
- symbol: string;
108
- value: bigint;
109
- };
110
- tokenBalances: any;
111
- assets: Asset[];
112
- getTokenBalance: (tokenAddress: `0x${string}`) => {
113
- address: `0x${string}`;
114
- name: string;
115
- symbol: string;
116
- decimals: number;
117
- balance: string;
118
- formattedBalance: string;
119
- logo: string;
120
- };
121
- refreshBalances: () => Promise<void>;
122
- isLoading: any;
123
- isConnected: boolean;
124
- };
125
- declare function useTokenInfo(tokenAddress: `0x${string}`): {
126
- isLoading: any;
127
- tokenInfo: any;
128
- } | {
129
- isLoading: boolean;
130
- tokenInfo: {
131
- name: string;
132
- symbol: string;
133
- decimals: number;
134
- address: `0x${string}`;
135
- };
136
- };
137
- declare function useTokenBalance(tokenAddress: `0x${string}`, userAddress?: `0x${string}`): {
138
- balance: bigint;
139
- formattedBalance: string;
140
- tokenInfo: any;
141
- isLoading: boolean;
142
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, viem.ReadContractErrorType>>;
143
- };
144
-
145
- /** Default config can be overridden via Provider initialConfig */
146
-
147
- declare global {
148
- interface Window {
149
- __EMBARK_SERVICES__?: Partial<{
150
- tssUrl: string;
151
- shareVaultUrl: string;
152
- dashboardApiUrl: string;
153
- tssRequireWasm: boolean;
154
- tssWasmDebug: boolean;
155
- }>;
156
- __EMBARK_PROJECT_ID__?: string;
157
- }
158
- }
159
- interface SocialProvider {
160
- id: string;
161
- name: string;
162
- enabled: boolean;
163
- icon: React__default.ComponentType<{
164
- className?: string;
165
- }>;
166
- comingSoon?: boolean;
167
- meta?: Record<string, any>;
168
- }
169
- interface ProjectAsset extends Omit<Asset, 'type'> {
170
- type: 'project';
171
- balanceQueryKey: string[];
172
- balanceQuery: () => Promise<{
173
- cryptoFormatted: number;
174
- cryptoFiatRate: number;
175
- cryptoSymbol: string;
176
- fiatFormatted: number;
177
- fiatSymbol: string;
178
- }>;
179
- hideInPortfolio?: boolean;
180
- }
181
- /**
182
- * Token configuration for custom token watching.
183
- * Used when chain doesn't have Blockscout API or for project-specific tokens.
184
- * SDK will fetch balances via RPC multicall.
185
- */
186
- interface WatchToken {
187
- /** Contract address (required) */
188
- address: `0x${string}`;
189
- /** Token symbol for display (required) */
190
- symbol: string;
191
- /** Token name (optional, fetched from contract if missing) */
192
- name?: string;
193
- /** Token decimals (optional, fetched from contract if missing) */
194
- decimals?: number;
195
- /** Logo URL (optional) */
196
- logo?: string;
197
- }
198
- type WalletMode = 'linked' | 'direct' | 'both';
199
- interface ProviderConfig {
200
- projectId: string;
201
- passkey: {
202
- enabled: boolean;
203
- showCreateButton: boolean;
204
- primaryButtonText: string;
205
- };
206
- email: {
207
- enabled: boolean;
208
- placeholder: string;
209
- buttonText: string;
210
- verificationTitle: string;
211
- };
212
- social: {
213
- enabled: boolean;
214
- providers: SocialProvider[];
215
- };
216
- wallet: {
217
- enabled: boolean;
218
- supportedChains?: number[];
219
- requireSignature: boolean;
220
- walletConnectProjectId?: string;
221
- /** Operating mode: 'linked' = AA (current), 'direct' = external wallet signs, 'both' = user choice */
222
- mode?: WalletMode;
223
- /** Filter RainbowKit wallet list. undefined = show all wallets */
224
- allowedWallets?: string[];
225
- };
226
- preferedColorMode?: 'light' | 'dark';
227
- projectAssets?: {
228
- assets: ProjectAsset[];
229
- showBalanceAs?: ProjectAsset['symbol'];
230
- };
231
- /**
232
- * Custom tokens to monitor per chain.
233
- * SDK will fetch balances via RPC multicall.
234
- * Useful for chains without Blockscout API (BSC, Sepolia, Arbitrum, Base, etc.).
235
- * Can also be used on Blockscout chains - tokens are merged with discovered ones.
236
- *
237
- * @example
238
- * watchTokens: {
239
- * 97: [ // BSC Testnet
240
- * { address: '0x...', symbol: 'USDT', decimals: 18 },
241
- * { address: '0x...', symbol: 'BUSD', decimals: 18, logo: 'https://...' },
242
- * ],
243
- * 11155111: [ // Sepolia
244
- * { address: '0x...', symbol: 'LINK', decimals: 18 },
245
- * ]
246
- * }
247
- */
248
- watchTokens?: {
249
- [chainId: number]: WatchToken[];
250
- };
251
- ui: {
252
- title: string;
253
- subtitle?: string;
254
- useExternalIcons?: boolean;
255
- dialogClassName?: string;
256
- authOrder?: ('email' | 'social' | 'wallet')[];
257
- };
258
- network: {
259
- name: string;
260
- symbol: string;
261
- /**
262
- * Default chain ID for new users.
263
- * Priority: User's explicit selection > dApp config chainId > SDK default (Testnet).
264
- * If user manually switches chains, their choice is preserved in localStorage.
265
- */
266
- chainId: number;
267
- rpcUrl: string;
268
- explorerUrl?: string;
269
- testnet?: boolean;
270
- forceChain?: boolean;
271
- };
272
- services: {
273
- tssUrl: string;
274
- shareVaultUrl: string;
275
- dashboardApiUrl?: string;
276
- iframeUrl?: string;
277
- tssRequireWasm?: boolean;
278
- tssWasmDebug?: boolean;
279
- };
280
- features: {
281
- mpcSecurity: boolean;
282
- strictMode: boolean;
283
- requestDeduplication: boolean;
284
- kycNeeded?: boolean;
285
- displayNameNeeded?: boolean;
286
- showActiveBalanceAsFiat?: boolean;
287
- };
288
- warnings: {
289
- backupWarning: boolean;
290
- emailNotConnectedWarning: boolean;
291
- };
292
- kyc?: {
293
- provider?: 'sumsub' | 'uaepass' | 'custom';
294
- options?: Record<string, any>;
295
- };
296
- /** language -> project namespace -> resource map */
297
- translations?: Record<string, Record<string, unknown>>;
298
- }
299
-
300
- interface WalletReadyStatus$1 {
301
- ready: boolean;
302
- userId?: string;
303
- address?: `0x${string}`;
304
- hasKeyshare: boolean;
305
- hasSession: boolean;
306
- timestamp: number;
307
- }
308
- interface CallbacksConfig {
309
- onConnecting?: (payload: {
310
- method: 'passkey' | 'email' | 'social' | 'wallet';
311
- provider?: string;
312
- }) => void;
313
- onConnect?: (payload: {
314
- address: `0x${string}`;
315
- session: any;
316
- }) => void;
317
- onAccount?: (payload: {
318
- userId?: string | null;
319
- address?: `0x${string}` | null;
320
- session?: any;
321
- hasKeyshare?: boolean;
322
- }) => void;
323
- onAccountUpdate?: (payload: {
324
- providers?: Array<any>;
325
- }) => void;
326
- onDisconnect?: (payload: {
327
- address?: `0x${string}` | null;
328
- userId?: string | null;
329
- }) => void;
330
- onError?: (payload: {
331
- error: Error;
332
- code?: string;
333
- message: string;
334
- }) => void;
335
- onChainChange?: (payload: {
336
- chainId: number;
337
- previousChainId: number;
338
- }) => void;
339
- onWalletReady?: (status: WalletReadyStatus$1) => void;
340
- }
341
- interface UIContextType {
342
- config: MutableRefObject<ProviderConfig>;
343
- updateConfig: (updates: Partial<ProviderConfig>) => void;
344
- /**
345
- * Legacy snapshot of callbacks from provider props.
346
- * This field is not reactive and may become stale after calling updateCallbacks().
347
- * Use callbacksRef to read the current callbacks.
348
- * @deprecated
349
- */
350
- callbacks?: CallbacksConfig;
351
- callbacksRef: MutableRefObject<CallbacksConfig | undefined>;
352
- updateCallbacks: (updates: Partial<CallbacksConfig> | null) => void;
353
- }
354
- interface ProviderProps {
355
- children: ReactNode;
356
- projectId?: string;
357
- initialConfig?: Partial<ProviderConfig>;
358
- callbacks?: CallbacksConfig;
359
- }
360
- /** NEVER EVER declare here any state (useState or whatever). This Provider should NEVER trigger self of child-app re-renders */
361
- declare function Provider(props: ProviderProps): react_jsx_runtime.JSX.Element;
362
- declare const useProviderConfig: () => UIContextType;
363
-
364
- interface ConnectWalletButtonProps {
365
- /** Button Component to render as unsigned button instance */
366
- ConnectButton?: FC<HTMLAttributes<HTMLButtonElement>>;
367
- className?: string;
368
- label?: string;
369
- usePaymaster?: boolean;
370
- }
371
- declare function ConnectWalletButton(props: ConnectWalletButtonProps): react_jsx_runtime.JSX.Element;
372
-
373
- /**
374
- * Account session containing wallet and smart account information.
375
- * Shared across multiple modules (session, user-operations, signing, deployment).
376
- */
377
- interface AccountSession$1 {
378
- ownerAddress: `0x${string}`;
379
- smartAccountAddress: `0x${string}`;
380
- factoryAddress: `0x${string}`;
381
- ownerPrivateKey?: `0x${string}`;
382
- mpcUserId?: string;
383
- usePaymaster?: boolean;
384
- kind: 'lumia';
385
- address: `0x${string}`;
386
- }
387
-
388
- /**
389
- * Deploy smart account contract if not already deployed.
390
- *
391
- * This sends a minimal UserOperation (to 0x0, value 0, data 0x) which triggers
392
- * account deployment via factory without requiring user consent.
393
- *
394
- * By default, checks if account is already deployed to avoid unnecessary gas costs.
395
- * If already deployed, returns null without sending a transaction.
396
- *
397
- * @param session - Account session with signing credentials
398
- * @param feeType - Fee type: 'economy', 'standard', or 'fast' (default: 'economy')
399
- * @param options - Deployment options
400
- * @param options.force - If true, sends transaction even if already deployed (default: false)
401
- * @param options.chainId - Chain ID
402
- * @returns UserOperation hash if deployed, null if already deployed (when force=false)
403
- *
404
- * @example
405
- * ```typescript
406
- * // Deploy account immediately after DKG (skips if already deployed)
407
- * const userOpHash = await deployAccount(session, 'economy');
408
- * if (userOpHash) {
409
- * console.log('Account deployed:', userOpHash);
410
- * } else {
411
- * console.log('Account already deployed');
412
- * }
413
- *
414
- * // Force deployment even if already deployed (not recommended)
415
- * const hash = await deployAccount(session, 'economy', { force: true });
416
- * ```
417
- */
418
- declare function deployAccount(session: AccountSession$1, feeType?: 'economy' | 'standard' | 'fast', options?: {
419
- force?: boolean;
420
- chainId?: number;
421
- }): Promise<`0x${string}` | null>;
422
-
423
- interface SmartAccountEntry {
424
- chainId: number;
425
- address: string;
426
- factoryAddress?: string;
427
- registeredAt: string;
428
- }
429
- interface RegisterSmartAccountResult {
430
- success: boolean;
431
- chainId: number;
432
- smartAccountAddress: string;
433
- alreadySet: boolean;
434
- }
435
- /**
436
- * Get all registered Smart Accounts across all chains.
437
- *
438
- * @returns List of Smart Account entries with chain IDs
439
- */
440
- declare function getAllSmartAccounts(): Promise<SmartAccountEntry[]>;
441
- /**
442
- * Get Smart Account for a specific chain.
443
- *
444
- * @param chainId - The chain ID to get Smart Account for
445
- * @returns Smart Account entry or null if not registered
446
- */
447
- declare function getSmartAccountForChain(chainId: number): Promise<SmartAccountEntry | null>;
448
-
449
- interface AccountSession {
450
- ownerAddress: `0x${string}`;
451
- smartAccountAddress: `0x${string}`;
452
- factoryAddress: `0x${string}`;
453
- ownerPrivateKey?: `0x${string}`;
454
- mpcUserId?: string;
455
- usePaymaster?: boolean;
456
- kind: 'lumia';
457
- address: `0x${string}`;
458
- }
459
- /**
460
- * Parameters for preparing a UserOperation
461
- */
462
- interface PrepareUserOperationParams {
463
- /** Target address for the transaction */
464
- to: `0x${string}`;
465
- /** Amount in wei to send (as string) */
466
- value: string;
467
- /** Call data for the transaction (optional, defaults to '0x') */
468
- data?: `0x${string}`;
469
- /** Fee tier: 'economy', 'standard' (default), or 'fast' */
470
- feeType?: 'economy' | 'standard' | 'fast';
471
- /** Chain ID (optional - uses activeChainId from store if not provided) */
472
- chainId?: number;
473
- }
474
- /**
475
- * Prepare and sign a UserOperation without sending it to the bundler.
476
- * Returns the signed UserOp and its hash for backend verification and submission.
477
- * Uses object-based parameters with multi-chain support.
478
- *
479
- * @param session - Account session with signing credentials
480
- * @param params - Transaction parameters (to, value, data, feeType, chainId)
481
- * @returns Object with signed UserOperation and its hash
482
- *
483
- * @example
484
- * ```typescript
485
- * const { userOp, userOpHash } = await prepareUserOperation(session, {
486
- * to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
487
- * value: '1000000000000000000',
488
- * data: '0x',
489
- * feeType: 'standard'
490
- * });
491
- * ```
492
- */
493
- declare function prepareUserOperation(session: AccountSession, params: PrepareUserOperationParams): Promise<{
494
- userOp: UserOperationV07;
495
- userOpHash: `0x${string}`;
496
- }>;
497
- /**
498
- * EIP712 Domain descriptor
499
- */
500
- interface TypedDataDomain {
501
- name?: string;
502
- version?: string;
503
- chainId?: number;
504
- verifyingContract?: `0x${string}`;
505
- salt?: `0x${string}`;
506
- }
507
- /**
508
- * EIP712 Type definition
509
- */
510
- interface TypedDataField {
511
- name: string;
512
- type: string;
513
- }
514
- /**
515
- * Parameters for signing typed data (EIP712)
516
- */
517
- /**
518
- * Parameters for sending or preparing a UserOperation (UI-Kit layer)
519
- * Higher-level API compared to core/bundler UserOperationParams
520
- */
521
- interface SendUserOperationParams {
522
- /** Target address for the transaction */
523
- to: `0x${string}`;
524
- /** Amount in wei to send (as string) */
525
- value: string;
526
- /** Call data for the transaction (optional, defaults to '0x') */
527
- data?: `0x${string}`;
528
- /** Fee tier: 'economy', 'standard' (default), or 'fast' */
529
- feeType?: 'economy' | 'standard' | 'fast';
530
- /** Chain ID (optional - uses activeChainId from store if not provided) */
531
- chainId?: number;
532
- }
533
- /**
534
- * Send a user operation with multi-chain support.
535
- * Uses object-based parameters for better developer experience.
536
- *
537
- * @param session - Account session with signing credentials
538
- * @param params - Transaction parameters (to, value, data, feeType, chainId)
539
- * @returns Promise resolving to the user operation hash
540
- *
541
- * @example
542
- * ```typescript
543
- * const hash = await sendUserOperation(session, {
544
- * to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
545
- * value: '1000000000000000000', // 1 ETH in wei
546
- * data: '0x',
547
- * feeType: 'standard'
548
- * });
549
- * ```
550
- */
551
- declare function sendUserOperation(session: AccountSession, params: SendUserOperationParams): Promise<`0x${string}`>;
552
- /**
553
- * Parameters for EIP-712 typed data signing
554
- */
555
- interface SignTypedDataParams {
556
- domain: TypedDataDomain;
557
- types: Record<string, TypedDataField[]>;
558
- primaryType: string;
559
- message: Record<string, any>;
560
- /** Chain ID (optional - overrides domain.chainId if provided) */
561
- chainId?: number;
562
- }
563
- /**
564
- * Sign typed data according to EIP712 standard.
565
- * This method computes the EIP712 hash and signs it using MPC.
566
- *
567
- * @param session - Account session with signing credentials
568
- * @param params - EIP712 typed data parameters (domain, types, primaryType, message)
569
- * @returns Hex-encoded signature
570
- *
571
- * @example
572
- * ```typescript
573
- * const signature = await signTypedData(session, {
574
- * domain: {
575
- * name: 'MyApp',
576
- * version: '1',
577
- * chainId: 994,
578
- * verifyingContract: '0x...'
579
- * },
580
- * types: {
581
- * Order: [
582
- * { name: 'tokenIds', type: 'uint256[]' },
583
- * { name: 'price', type: 'uint256' },
584
- * { name: 'deadline', type: 'uint256' }
585
- * ]
586
- * },
587
- * primaryType: 'Order',
588
- * message: {
589
- * tokenIds: [1n, 2n, 3n],
590
- * price: 1000000000000000000n,
591
- * deadline: 1735689600n
592
- * }
593
- * });
594
- * ```
595
- */
596
- declare function signTypedData(session: AccountSession, params: SignTypedDataParams): Promise<`0x${string}`>;
597
-
598
- /**
599
- * Iframe Manager for Parent SDK
600
- *
601
- * Manages secure communication with the isolated iframe wallet at auth.lumiapassport.com
602
- * Implements postMessage protocol with HMAC authentication and replay protection
603
- */
604
-
605
- interface Transaction$1 {
606
- to: Address$1;
607
- value: string;
608
- data?: Hex;
609
- gasLimit?: string;
610
- }
611
- interface IframeManagerConfig {
612
- iframeUrl: string;
613
- projectId: string;
614
- debug?: boolean;
615
- onWalletReady?: (status: WalletReadyStatus) => void;
616
- }
617
- interface WalletReadyStatus {
618
- ready: boolean;
619
- userId?: string;
620
- address?: `0x${string}`;
621
- hasKeyshare: boolean;
622
- hasSession: boolean;
623
- timestamp: number;
624
- }
625
- declare class IframeManager {
626
- private iframe;
627
- private iframeUrl;
628
- private projectId;
629
- private debug;
630
- private channelToken;
631
- private isReady;
632
- private readyPromise;
633
- private readyResolve;
634
- private initPromise;
635
- private onWalletReadyCallback?;
636
- private pendingRequests;
637
- private usedNonces;
638
- private messageListener;
639
- private hiddenElements;
640
- private pointerGuardCleanup;
641
- private iframeHideTimeout;
642
- private iframeActive;
643
- private providerSessions;
644
- private providerConnections;
645
- private readonly REQUEST_TIMEOUT;
646
- private readonly NONCE_EXPIRY;
647
- private readonly HEARTBEAT_INTERVAL;
648
- private heartbeatInterval?;
649
- private isReconnecting;
650
- private sseListeners;
651
- constructor(config: IframeManagerConfig);
652
- setDebug(debug: boolean): void;
653
- /**
654
- * Initialize iframe and wait for it to be ready
655
- */
656
- initialize(): Promise<void>;
657
- private doInitialize;
658
- /**
659
- * Set the onWalletReady callback
660
- */
661
- setOnWalletReady(callback: (status: WalletReadyStatus) => void): void;
662
- /**
663
- * Authenticate SDK with iframe to establish secure channel
664
- */
665
- private authenticateSDK;
666
- /**
667
- * Start periodic heartbeat to check SDK channel validity
668
- */
669
- private startHeartbeat;
670
- /**
671
- * Stop heartbeat
672
- */
673
- private stopHeartbeat;
674
- /**
675
- * Reconnect SDK channel after it becomes invalid
676
- */
677
- reconnect(): Promise<void>;
678
- /**
679
- * Setup visibility change handler to check channel when tab becomes visible
680
- */
681
- private setupVisibilityHandler;
682
- /**
683
- * Normalize legacy message types from cached iframe versions.
684
- * Old iframe sends LUMIA_PASSPORT_*, new iframe sends IFRAME_MSG_*.
685
- * This ensures both work until all browser caches expire.
686
- */
687
- private normalizeMessageType;
688
- /**
689
- * Handle incoming postMessage events
690
- */
691
- private handleMessage;
692
- /**
693
- * Handle token refresh request from iframe
694
- */
695
- private handleTokenRefreshRequest;
696
- /**
697
- * Send secure message to iframe
698
- */
699
- sendMessage(type: string, data: Record<string, any>): Promise<any>;
700
- onSseEvent(listener: (data: any) => void): () => void;
701
- /**
702
- * Compute HMAC for message authentication using SDK channel token
703
- */
704
- private computeHMAC;
705
- /**
706
- * Generate unique message ID
707
- */
708
- private generateMessageId;
709
- /**
710
- * Generate nonce for replay protection
711
- */
712
- private generateNonce;
713
- /**
714
- * Show iframe (for consent/confirmation UI)
715
- */
716
- showIframe(): void;
717
- /**
718
- * Hide iframe
719
- */
720
- hideIframe(): void;
721
- /**
722
- * Hide all Radix Dialog modals (SendModal, etc.)
723
- */
724
- private hideAllDialogs;
725
- /**
726
- * Restore all previously hidden Radix Dialog modals
727
- */
728
- private restoreAllDialogs;
729
- /**
730
- * Stop Radix dismissable layers from swallowing the first click on the iframe.
731
- * Radix attaches pointer event guards at the document level; we intercept at window
732
- * capture phase so user clicks flow straight into the consent iframe.
733
- */
734
- private enablePointerEventGuards;
735
- /**
736
- * Remove pointer interception once iframe is hidden again.
737
- */
738
- private disablePointerEventGuards;
739
- /**
740
- * Authenticate user with application
741
- */
742
- authenticate(userId: string, avatar?: string | null, displayName?: string | null): Promise<{
743
- userId: string;
744
- address: Address$1 | undefined;
745
- }>;
746
- /**
747
- * Start DKG (Distributed Key Generation)
748
- */
749
- startDKG(userId: string, accessToken?: string): Promise<Address$1>;
750
- /**
751
- * Sign transaction
752
- */
753
- signTransaction(userId: string, transaction: Transaction$1, accessToken?: string, avatar?: string | null, displayName?: string | null): Promise<Hex>;
754
- /**
755
- * Sign EIP712 typed data
756
- */
757
- signTypedData(userId: string, typedData: {
758
- domain: {
759
- name?: string;
760
- version?: string;
761
- chainId?: number;
762
- verifyingContract?: string;
763
- salt?: string;
764
- };
765
- types: Record<string, Array<{
766
- name: string;
767
- type: string;
768
- }>>;
769
- primaryType: string;
770
- message: Record<string, any>;
771
- }, digest32: Hex, accessToken?: string, avatar?: string | null, displayName?: string | null): Promise<Hex>;
772
- /**
773
- * Get user's wallet address
774
- */
775
- getAddress(userId: string): Promise<Address$1 | undefined>;
776
- /**
777
- * Check if user has a keyshare
778
- */
779
- checkKeyshare(userId: string): Promise<{
780
- hasKeyshare: boolean;
781
- address?: Address$1;
782
- }>;
783
- /**
784
- * Open social auth popup (Telegram, Discord, Twitter, etc.)
785
- */
786
- openSocialAuthPopup(provider: string, config?: Record<string, any>): Promise<{
787
- provider: string;
788
- success: boolean;
789
- user?: any;
790
- mode?: 'login' | 'link';
791
- error?: string;
792
- }>;
793
- /**
794
- * Verify current auth session with the backend.
795
- * Can optionally track session state for a specific provider.
796
- * @param options.silent - If true, suppress logging
797
- * @param options.provider - Optional provider key to track session state for (e.g., 'x', 'telegram')
798
- */
799
- private verifyAuthSession;
800
- /**
801
- * Prime provider session/cache state to detect future changes.
802
- */
803
- private primeProviderSessions;
804
- private getKnownSessionId;
805
- private getKnownProviderConnection;
806
- private recordProviderSession;
807
- private recordProviderConnection;
808
- private updateProviderTrackingFromUser;
809
- private extractSessionId;
810
- private getProvidersList;
811
- /**
812
- * Get trusted apps for user
813
- */
814
- getTrustedApps(userId: string): Promise<{
815
- userId: string;
816
- projectId: string;
817
- origin: string;
818
- trustedAt: number;
819
- appName?: string;
820
- appLogo?: string;
821
- }[]>;
822
- /**
823
- * Remove app from trusted list
824
- */
825
- removeTrustedApp(userId: string, projectId: string, origin: string): Promise<boolean>;
826
- /**
827
- * Clear all authorizations for current project (for testing consent flow)
828
- * This will force the consent modal to appear on next authentication
829
- */
830
- clearAuthorizations(): Promise<boolean>;
831
- /**
832
- * Create backup of keyshare
833
- */
834
- createBackup(userId: string, backupRequest: {
835
- method: 'server' | 'cloud' | 'local';
836
- password?: string;
837
- cloudProvider?: string;
838
- }, accessToken?: string): Promise<{
839
- success: boolean;
840
- method: string;
841
- timestamp: number;
842
- error?: string;
843
- }>;
844
- /**
845
- * Restore keyshare from server backup
846
- */
847
- restoreFromServer(userId: string, password?: string, accessToken?: string): Promise<{
848
- success: boolean;
849
- timestamp: number;
850
- error?: string;
851
- data?: any;
852
- }>;
853
- /**
854
- * Encrypt backup data without uploading (for cloud/local backups)
855
- * Returns encrypted data that parent can upload/download
856
- */
857
- encryptBackupData(userId: string, password?: string): Promise<any>;
858
- /**
859
- * Encrypt current keyshare as EnvelopeEncryptedShare (for Guardian backup)
860
- */
861
- encryptEnvelopeData(userId: string, password: string): Promise<string>;
862
- /**
863
- * Decrypt EnvelopeEncryptedShare and restore keyshare (for Guardian restore)
864
- */
865
- decryptAndRestoreEnvelope(userId: string, envelopeJson: string, password: string): Promise<{
866
- success: boolean;
867
- timestamp: number;
868
- error?: string;
869
- }>;
870
- /**
871
- * Restore keyshare from local file backup
872
- */
873
- restoreFromLocalFile(userId: string, fileContent: string, password?: string): Promise<{
874
- success: boolean;
875
- timestamp: number;
876
- error?: string;
877
- data?: any;
878
- }>;
879
- /**
880
- * Get backup status for user
881
- */
882
- getBackupStatus(userId: string): Promise<{
883
- server: {
884
- lastBackup?: number;
885
- error?: string;
886
- };
887
- cloud: {
888
- lastBackup?: number;
889
- error?: string;
890
- };
891
- local: {
892
- lastBackup?: number;
893
- error?: string;
894
- };
895
- }>;
896
- /**
897
- * Get available cloud providers
898
- */
899
- getCloudProviders(): Promise<Array<{
900
- id: string;
901
- name: string;
902
- available: boolean;
903
- }>>;
904
- /**
905
- * Cleanup and destroy iframe
906
- */
907
- destroy(): void;
908
- /**
909
- * Debug logging
910
- */
911
- private log;
912
- }
913
- /**
914
- * Get or create iframe manager singleton
915
- */
916
- declare function getIframeManager(config?: IframeManagerConfig): IframeManager;
917
- /**
918
- * Destroy iframe manager singleton
919
- */
920
- declare function destroyIframeManager(): void;
921
-
922
- interface ChainParams {
923
- activeChainId: number;
924
- publicClient: ReturnType<typeof createPublicClientForChain>;
925
- bundlerClient: ReturnType<typeof createBundlerClientForChain>;
926
- chainConfig: ReturnType<typeof getChainConfig>;
927
- viemChain: ReturnType<typeof getViemChain>;
928
- }
929
- interface SessionState {
930
- session: AccountSession | null;
931
- address: `0x${string}` | null;
932
- status: string;
933
- error: string | null;
934
- recoveryUserId: string | null;
935
- isIframeReady: boolean;
936
- usePaymaster: boolean;
937
- hasServerVault: boolean;
938
- isLoading: boolean;
939
- activeChainId: number | null;
940
- publicClient: PublicClient | null;
941
- bundlerClient: BundlerClient | null;
942
- chainConfig: ChainConfig | null;
943
- viemChain: Chain | null;
944
- /** Tracks if user explicitly selected a chain (vs using dApp config default) */
945
- walletReadyStatus: WalletReadyStatus | null;
946
- /** Whether zustand persist has finished hydrating from localStorage */
947
- hasHydrated: boolean;
948
- setUsePaymaster: (usePaymaster: boolean) => void;
949
- setIsIframeReady: (ready: boolean) => void;
950
- setSession: (s: AccountSession | null) => void;
951
- setAddress: (a: `0x${string}` | null) => void;
952
- setStatus: (s: string) => void;
953
- setError: (e: string | null) => void;
954
- setRecoveryUserId: (userId: string | null) => void;
955
- setHasServerVault: (hasServerVault: boolean) => void;
956
- setIsLoading: (isLoading: boolean) => void;
957
- setWalletReadyStatus: (status: WalletReadyStatus) => void;
958
- setActiveChainId: (activeChainId: number | null) => void;
959
- setActiveChain: (chainParams: ChainParams) => void;
960
- }
961
- /**
962
- * @function useSession is UNLIKELY to use outside EmbarkAI, as it is INTERNAL zustand session store!
963
- * Use it with caution, using zustand callback extraction. EX: const address = useSession((st) => st.address)
964
- * @description refactor your app to NOT use this directly in your application, use set of new dedicated session hooks: useAccountSession, useAddress, etc.
965
- */
966
- declare const useSession: zustand.UseBoundStore<Omit<zustand.StoreApi<SessionState>, "setState" | "persist"> & {
967
- setState(partial: SessionState | Partial<SessionState> | ((state: SessionState) => SessionState | Partial<SessionState>), replace?: false): unknown;
968
- setState(state: SessionState | ((state: SessionState) => SessionState), replace: true): unknown;
969
- persist: {
970
- setOptions: (options: Partial<zustand_middleware.PersistOptions<SessionState, {
971
- activeChainId: number;
972
- }, unknown>>) => void;
973
- clearStorage: () => void;
974
- rehydrate: () => Promise<void> | void;
975
- hasHydrated: () => boolean;
976
- onHydrate: (fn: (state: SessionState) => void) => () => void;
977
- onFinishHydration: (fn: (state: SessionState) => void) => () => void;
978
- getOptions: () => Partial<zustand_middleware.PersistOptions<SessionState, {
979
- activeChainId: number;
980
- }, unknown>>;
981
- };
982
- }>;
983
- /**
984
- * Wait for zustand persist hydration to complete.
985
- * Use in async functions to ensure activeChainId and other persisted state is available.
986
- */
987
- declare function waitForStoreHydration(): Promise<void>;
988
- /**
989
- * Require active chain ID from session store (for non-React usage)
990
- * Throws an error if the chain ID is not yet set (e.g., before store hydration)
991
- *
992
- * @returns Current active chain ID
993
- * @throws Error if activeChainId is null (store not hydrated yet)
994
- *
995
- * @example
996
- * ```typescript
997
- * import { requireActiveChainId } from '@embarkai/ui-kit'
998
- *
999
- * // In non-React code (e.g., sendUserOperation)
1000
- * const chainId = requireActiveChainId()
1001
- * const client = createPublicClientForChain(chainId)
1002
- * ```
1003
- */
1004
- declare const requireActiveChainId: () => number;
1005
-
1006
- declare const useIsMobileView: () => boolean;
1007
- declare const useBalance: () => {
1008
- walletBalance: {
1009
- decimals: number;
1010
- formatted: string;
1011
- symbol: string;
1012
- value: bigint;
1013
- };
1014
- fiatBalance: number;
1015
- cryptoRate: number;
1016
- fiatSymbol: string;
1017
- cryptoSymbol: string;
1018
- };
1019
- declare const useIFrameReady: () => boolean;
1020
- declare const useAccountSession: () => AccountSession;
1021
- declare const useAddress: () => `0x${string}`;
1022
- declare const useError: () => string;
1023
- declare const useLoadingStatus: () => {
1024
- isSessionLoading: boolean;
1025
- sessionStatus: string;
1026
- };
1027
- declare const useRecoveryUserId: () => string;
1028
- declare const useHasServerVault: () => boolean;
1029
- declare const useActiveChainId: () => number;
1030
- declare const useHydrated: () => boolean;
1031
-
1032
- declare enum PageKey {
1033
- AUTH = "auth",
1034
- LANGUAGES = "languages",
1035
- TERMS_OF_SERVICE = "terms-of-service",
1036
- MAIN_MENU = "main-menu",
1037
- SETTINGS = "settings",
1038
- SEND = "send",
1039
- RECEIVE = "receive",
1040
- BUY = "buy",
1041
- KYC = "kyc",
1042
- TRANSACTIONS = "transactions",
1043
- ASSETS = "assets",
1044
- MANAGE_WALLET = "manage-wallet",
1045
- UNLINK_PROVIDER = "unlink-provider",
1046
- SECURITY = "security",
1047
- KEYSARE_BACKUP = "keysare-backup",
1048
- KEYSHARE_RESTORE = "keyshare-restore",
1049
- CHAIN = "chain",
1050
- CHAIN_SWITCH_REQUEST = "chain-switch-request",
1051
- NICKNAME_SETTINGS = "nickname-settings",
1052
- DEVICES = "devices",
1053
- DEVICE_LINK = "device-link",
1054
- DEVICE_MANAGE = "device-manage",
1055
- DEVICE_RESTORE = "device-restore"
1056
- }
1057
- /** WIP: need to develop page options typeset, i.e options: AuthOpenOptions | BuyOpenOption etc */
1058
- interface PageOpenParams {
1059
- key: PageKey;
1060
- [option: string]: unknown;
1061
- }
1062
-
1063
- /**
1064
- * Hook to programmatically open the dialogs
1065
- * @example
1066
- * ```tsx
1067
- * function MyComponent() {
1068
- * const { isOpen, open, close } = useOpenPage();
1069
- *
1070
- * return (
1071
- * <button onClick={() => open(PageKey.BUY, { amount: 10 })}>
1072
- * Buy CRYPTO
1073
- * </button>
1074
- * );
1075
- * }
1076
- * ```
1077
- */
1078
- declare function useOpenPage(): {
1079
- readonly open: (passportPage: PageKey, params?: PageOpenParams) => void;
1080
- readonly close: () => void;
1081
- readonly isOpen: boolean;
1082
- };
1083
-
1084
- type ColorMode = 'light' | 'dark';
1085
-
1086
- declare function useColorMode(): {
1087
- colorMode: ColorMode;
1088
- setColorMode: (mode: ColorMode) => void;
1089
- };
1090
-
1091
- declare const buttonVariants: (props?: {
1092
- variant?: "default" | "outline" | "ghost";
1093
- size?: "small" | "large" | "medium" | "icon";
1094
- } & class_variance_authority_types.ClassProp) => string;
1095
- interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
1096
- asChild?: boolean;
1097
- }
1098
-
1099
- /** EmbarkAI Color Mode Switcher */
1100
- declare function ThemeToggle(props: ButtonProps): react_jsx_runtime.JSX.Element;
1101
-
1102
- /** EmbarkAI Language Switcher */
1103
- declare function LangToggle(props: ButtonProps): react_jsx_runtime.JSX.Element;
1104
-
1105
- type ChainLike$2 = {
1106
- id: number;
1107
- blockExplorers?: {
1108
- default?: {
1109
- url: string;
1110
- };
1111
- };
1112
- };
1113
- type UserOpStatusProps = {
1114
- userOpHash: `0x${string}` | string;
1115
- chain?: ChainLike$2;
1116
- chainId?: number;
1117
- className?: string;
1118
- pollMs?: number;
1119
- maxPollTimeMs?: number;
1120
- externalState?: {
1121
- receipt?: any | null;
1122
- mempool?: any | null;
1123
- error?: string | null;
1124
- isPolling?: boolean;
1125
- };
1126
- };
1127
- declare const UserOpStatus: React$1.FC<UserOpStatusProps>;
1128
-
1129
- type ChainLike$1 = {
1130
- id: number;
1131
- blockExplorers?: {
1132
- default?: {
1133
- url: string;
1134
- };
1135
- };
1136
- };
1137
- type HashProps = {
1138
- hash?: `0x${string}` | string | null;
1139
- chain?: ChainLike$1;
1140
- className?: string;
1141
- truncate?: boolean;
1142
- showCopy?: boolean;
1143
- showExplorer?: boolean;
1144
- kind?: 'tx' | 'address' | 'block';
1145
- label?: string;
1146
- };
1147
- declare const Hash: React$1.FC<HashProps>;
1148
-
1149
- type ChainLike = {
1150
- id: number;
1151
- blockExplorers?: {
1152
- default?: {
1153
- url: string;
1154
- };
1155
- };
1156
- };
1157
- type AddressProps = {
1158
- address?: `0x${string}` | string | null;
1159
- chain?: ChainLike;
1160
- className?: string;
1161
- truncate?: boolean;
1162
- showCopy?: boolean;
1163
- showExplorer?: boolean;
1164
- label?: string;
1165
- };
1166
- declare const Address: React$1.FC<AddressProps>;
1167
-
1168
- interface TransactionsListProps {
1169
- address: string;
1170
- itemsCount?: number;
1171
- }
1172
- declare const TransactionsList: React__default.FC<TransactionsListProps>;
1173
-
1174
- declare function KeyshareBackupMenu(): react_jsx_runtime.JSX.Element;
1175
-
1176
- interface RecoveryStatsDeviceEntry {
1177
- deviceId: string;
1178
- name?: string;
1179
- count: number;
1180
- lastAt: string;
1181
- ip?: string;
1182
- ua?: string;
1183
- secChUa?: string;
1184
- browser?: string;
1185
- }
1186
- interface RecoveryStatsCreatedMeta {
1187
- at: string;
1188
- ip?: string;
1189
- ua?: string;
1190
- secChUa?: string;
1191
- browser?: string;
1192
- deviceId?: string;
1193
- deviceName?: string;
1194
- country?: string;
1195
- encryptionMethod?: 'passkey' | 'password';
1196
- }
1197
- interface RecoveryStats {
1198
- created: RecoveryStatsCreatedMeta;
1199
- devices: RecoveryStatsDeviceEntry[];
1200
- }
1201
- declare function getShareRecoveryStats(): Promise<RecoveryStats | null>;
1202
-
1203
- interface SendTransactionParams$1 {
1204
- to: `0x${string}`;
1205
- value: string;
1206
- data?: `0x${string}`;
1207
- assetType?: AssetType;
1208
- tokenAddress?: `0x${string}`;
1209
- tokenId?: string;
1210
- decimals?: number;
1211
- }
1212
- interface UseSendTransactionReturn {
1213
- sendTransaction: (params: SendTransactionParams$1) => Promise<string | null>;
1214
- isLoading: boolean;
1215
- error: string | null;
1216
- userOpHash: string | null;
1217
- reset: () => void;
1218
- }
1219
- declare function useSendTransaction(): UseSendTransactionReturn;
1220
-
1221
- interface UserOpMempool {
1222
- entryPoint: `0x${string}` | null;
1223
- sender: `0x${string}` | null;
1224
- }
1225
- type UserOpState = 'waiting' | 'pending' | 'included' | 'failed' | 'rejected' | 'timeout';
1226
- interface UseUserOpStatusOptions {
1227
- userOpHash?: `0x${string}` | string | null;
1228
- pollMs?: number;
1229
- maxPollTimeMs?: number;
1230
- enabled?: boolean;
1231
- onStateChange?: (state: UserOpState) => void;
1232
- onReceipt?: (receipt: UserOperationReceipt) => void;
1233
- onTxHash?: (txHash: `0x${string}`) => void;
1234
- }
1235
- interface UseUserOpStatusReturn {
1236
- state: UserOpState;
1237
- receipt: UserOperationReceipt | null;
1238
- mempool: UserOpMempool | null;
1239
- txHash: `0x${string}` | null;
1240
- error: string | null;
1241
- isPolling: boolean;
1242
- refresh: () => Promise<void>;
1243
- }
1244
- declare function useUserOpStatus(options?: UseUserOpStatusOptions): UseUserOpStatusReturn;
1245
-
1246
- interface UseErc3643ComplianceOptions {
1247
- /** Token contract address */
1248
- tokenAddress: Address$1 | undefined;
1249
- /** Recipient address */
1250
- to: Address$1 | undefined;
1251
- /** Amount to transfer (as bigint) */
1252
- amount: bigint | undefined;
1253
- /** Whether to enable the query */
1254
- enabled?: boolean;
1255
- /** Chain ID to use for the query */
1256
- chainId?: number;
1257
- }
1258
- interface UseErc3643ComplianceResult {
1259
- /** Whether the transfer is allowed */
1260
- canTransfer: boolean | undefined;
1261
- /** Whether the query is loading */
1262
- isLoading: boolean;
1263
- /** Error message if compliance check failed */
1264
- error: string | null;
1265
- /** Refetch the compliance status */
1266
- refetch: () => void;
1267
- }
1268
- /**
1269
- * Hook to check ERC3643 (Security Token) transfer compliance.
1270
- *
1271
- * ERC3643 tokens have compliance requirements that must be met before transfers.
1272
- * This hook calls the `canTransfer` function on the token contract to verify
1273
- * if a transfer is allowed.
1274
- *
1275
- * @example
1276
- * ```tsx
1277
- * const { canTransfer, isLoading, error } = useErc3643Compliance({
1278
- * tokenAddress: '0x...',
1279
- * to: recipientAddress,
1280
- * amount: parseUnits('100', 18),
1281
- * enabled: selectedAsset?.type === 'erc3643'
1282
- * });
1283
- *
1284
- * if (!canTransfer) {
1285
- * // Show compliance error
1286
- * }
1287
- * ```
1288
- */
1289
- declare function useErc3643Compliance(options: UseErc3643ComplianceOptions): UseErc3643ComplianceResult;
1290
-
1291
- interface UseWalletModeReturn {
1292
- /** Currently configured mode from provider config */
1293
- configMode: WalletMode;
1294
- /** Currently active mode (relevant when configMode='both') */
1295
- activeMode: WalletMode;
1296
- /** Switch active mode (only works when configMode='both') */
1297
- switchMode: (mode: 'linked' | 'direct') => void;
1298
- /** Whether the current active mode uses direct EOA signing */
1299
- isDirect: boolean;
1300
- }
1301
- declare function useWalletMode(): UseWalletModeReturn;
1302
-
1303
- interface UseDirectWalletReturn {
1304
- /** Connected external wallet address */
1305
- address: `0x${string}` | null;
1306
- /** Chain ID the external wallet is on */
1307
- chainId: number | null;
1308
- /** Whether external wallet is connected */
1309
- isConnected: boolean;
1310
- /** Wallet connector name (e.g. 'MetaMask') */
1311
- connectorName: string | null;
1312
- /** Connect + link: opens RainbowKit modal, signs, calls linkWallet API */
1313
- connect: () => void;
1314
- /** Reconnect only: opens RainbowKit modal to restore wagmi session (no re-linking) */
1315
- reconnect: () => void;
1316
- /** Disconnect the external wallet */
1317
- disconnect: () => void;
1318
- }
1319
- declare function useDirectWallet(): UseDirectWalletReturn;
1320
-
1321
- interface DirectTransactionParams {
1322
- to: `0x${string}`;
1323
- /** Amount in human-readable native currency units (e.g. '1.5' for 1.5 ETH), not wei */
1324
- value: string;
1325
- data?: `0x${string}`;
1326
- chainId?: number;
1327
- }
1328
- interface UseSendDirectTransactionReturn {
1329
- sendTransaction: (params: DirectTransactionParams) => Promise<`0x${string}` | null>;
1330
- isPending: boolean;
1331
- error: string | null;
1332
- txHash: `0x${string}` | null;
1333
- reset: () => void;
1334
- }
1335
- declare function useSendDirectTransaction(): UseSendDirectTransactionReturn;
1336
-
1337
- interface TransferToLinkedParams {
1338
- /** Token contract address, or 'native' for native currency */
1339
- token: `0x${string}` | 'native';
1340
- /** Human-readable amount (e.g. '1.5', '1000') */
1341
- amount: string;
1342
- /** Chain ID — transfer only works within same chain */
1343
- chainId: number;
1344
- /** Token decimals (default: 18). Required for ERC20 tokens */
1345
- decimals?: number;
1346
- /** Target linked wallet address. If omitted, uses first linked wallet */
1347
- toAddress?: `0x${string}`;
1348
- }
1349
- interface UseTransferToLinkedReturn {
1350
- transfer: (params: TransferToLinkedParams) => Promise<string | null>;
1351
- isPending: boolean;
1352
- error: string | null;
1353
- userOpHash: string | null;
1354
- /** List of linked wallet addresses from profile */
1355
- linkedWallets: `0x${string}`[];
1356
- reset: () => void;
1357
- }
1358
- declare function useTransferToLinkedWallet(): UseTransferToLinkedReturn;
1359
-
1360
- interface AuthProviderMeta extends Record<string, unknown> {
1361
- walletName?: string;
1362
- walletType?: string;
1363
- chainId?: number;
1364
- email?: string;
1365
- }
1366
- interface AuthProvider {
1367
- provider: 'passkey' | 'email' | 'telegram' | 'google' | 'discord' | 'twitter' | 'wallet';
1368
- verified: boolean;
1369
- linkedAt: string;
1370
- lastUsedAt?: string;
1371
- externalId: string;
1372
- meta?: AuthProviderMeta;
1373
- }
1374
-
1375
- declare function fetchProjectName(projectId: string): Promise<string>;
1376
-
1377
- declare function useNativeWalletSignature(): {
1378
- signMessage: wagmi.UseSignMessageReturnType<unknown>;
1379
- /** EIP-712 signature */
1380
- signTypedMessage: wagmi.UseSignTypedDataReturnType<unknown>;
1381
- fetchProjectNameById: typeof fetchProjectName;
1382
- };
1383
-
1384
- interface UseLogoutReturn {
1385
- logout: () => Promise<void>;
1386
- }
1387
- /**
1388
- * Hook for logging out and disconnecting from EmbarkAI
1389
- * Clears session, tokens, and notifies callbacks
1390
- *
1391
- * @example
1392
- * ```tsx
1393
- * function MyComponent() {
1394
- * const { logout } = useLogout();
1395
- *
1396
- * return (
1397
- * <button onClick={logout}>
1398
- * Disconnect
1399
- * </button>
1400
- * );
1401
- * }
1402
- * ```
1403
- */
1404
- declare function useLogout(): UseLogoutReturn;
1405
-
1406
- /**
1407
- * Nickname fingerprint verification utilities
1408
- * Implements client-side verification per FRD spec
1409
- *
1410
- * IMPORTANT: Client MUST NOT trust server blindly.
1411
- * Always verify fingerprint locally before displaying to user.
1412
- */
1413
- /**
1414
- * Generate fingerprint from owner address
1415
- * Must match backend algorithm exactly
1416
- *
1417
- * Algorithm:
1418
- * 1. Normalize address to checksum format
1419
- * 2. Compute keccak256 hash
1420
- * 3. Take first 5 bytes (40 bits)
1421
- * 4. Encode using Base32 alphabet
1422
- * 5. Format as XXXX-XXXX
1423
- *
1424
- * @param ownerAddress - The EOA owner address
1425
- * @returns Fingerprint in format "XXXX-XXXX"
1426
- */
1427
- declare function generateFingerprint(ownerAddress: string): string;
1428
- /**
1429
- * Verify that received fingerprint matches computed fingerprint
1430
- *
1431
- * @param ownerAddress - The owner address from API response
1432
- * @param receivedFingerprint - The fingerprint from API response
1433
- * @returns true if fingerprint is valid, false if verification failed
1434
- */
1435
- declare function verifyFingerprint(ownerAddress: string, receivedFingerprint: string): boolean;
1436
- /**
1437
- * Fingerprint verification result
1438
- */
1439
- interface FingerprintVerificationResult {
1440
- isValid: boolean;
1441
- computedFingerprint: string | null;
1442
- receivedFingerprint: string | null;
1443
- error?: string;
1444
- }
1445
- /**
1446
- * Verify fingerprint with detailed result
1447
- * Use this for UI display of verification status
1448
- *
1449
- * @param ownerAddress - The owner address from API response
1450
- * @param receivedFingerprint - The fingerprint from API response
1451
- * @returns Detailed verification result
1452
- */
1453
- declare function verifyFingerprintDetailed(ownerAddress: string | null, receivedFingerprint: string | null): FingerprintVerificationResult;
1454
-
1455
- /**
1456
- * Nickname API types
1457
- * Types for nickname-related API responses and requests
1458
- */
1459
- /**
1460
- * Detailed nickname information
1461
- * Returned by GET /api/auth/nickname
1462
- */
1463
- interface NicknameInfo {
1464
- handle: string;
1465
- displayHandle: string;
1466
- createdAt: string;
1467
- changedAt: string | null;
1468
- changeCount: number;
1469
- canChange: boolean;
1470
- cooldownEndsAt: string | null;
1471
- }
1472
- /**
1473
- * Result of changing nickname
1474
- * Returned by PUT /api/auth/nickname
1475
- */
1476
- interface NicknameChangeResult {
1477
- handle: string;
1478
- displayHandle: string;
1479
- previousHandle: string;
1480
- isFirstChange: boolean;
1481
- }
1482
- /**
1483
- * Nickname availability check result
1484
- * Returned by GET /api/auth/nicknames/{handle}/check
1485
- */
1486
- interface NicknameAvailability {
1487
- handle: string;
1488
- available: boolean;
1489
- reason?: NicknameUnavailableReason;
1490
- }
1491
- type NicknameUnavailableReason = 'TAKEN' | 'RESERVED' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_CHARS' | 'INVALID_UNDERSCORE';
1492
- /**
1493
- * Resolved target for a specific chain
1494
- */
1495
- interface NicknameResolvedTarget {
1496
- chainId: number;
1497
- wallet: `0x${string}`;
1498
- }
1499
- /**
1500
- * Avatar information for nickname resolution
1501
- */
1502
- interface NicknameAvatar {
1503
- type: 'deterministic-circles';
1504
- seed: string;
1505
- }
1506
- /**
1507
- * Nickname to wallet address resolution (v2)
1508
- * Returned by POST /api/auth/nicknames/resolve
1509
- */
1510
- interface NicknameResolution {
1511
- handle: string;
1512
- requestedChainId: number;
1513
- resolvedTarget: NicknameResolvedTarget | null;
1514
- availableTargets: NicknameResolvedTarget[];
1515
- owner: `0x${string}` | null;
1516
- fingerprint: string | null;
1517
- avatar: NicknameAvatar | null;
1518
- avatarSvg: string | null;
1519
- isFrozen: boolean;
1520
- }
1521
- /**
1522
- * Request body for resolving nickname (v2)
1523
- */
1524
- interface NicknameResolveRequest {
1525
- handle: string;
1526
- chainId: number;
1527
- }
1528
- /**
1529
- * Client-side nickname validation result
1530
- */
1531
- interface NicknameValidationResult {
1532
- valid: boolean;
1533
- error?: NicknameValidationError;
1534
- }
1535
- type NicknameValidationError = 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_CHARS' | 'INVALID_UNDERSCORE';
1536
-
1537
- /**
1538
- * useNicknameResolve hook
1539
- * Public hook for resolving nicknames to wallet addresses with verification
1540
- */
1541
-
1542
- interface UseNicknameResolveResult {
1543
- data: NicknameResolution | undefined;
1544
- isLoading: boolean;
1545
- isResolving: boolean;
1546
- isError: boolean;
1547
- isNotFound: boolean;
1548
- isWalletNotSetup: boolean;
1549
- isFrozen: boolean;
1550
- isFingerprintVerified: boolean;
1551
- fingerprintVerification: FingerprintVerificationResult | null;
1552
- error: Error | null;
1553
- resolvedAddress: string | null;
1554
- }
1555
- /**
1556
- * Detect if input looks like a nickname (vs an address)
1557
- * - Starts with @ or contains only lowercase a-z, 0-9, underscore
1558
- * - Does not start with 0x
1559
- */
1560
- declare function looksLikeNickname(input: string): boolean;
1561
- interface UseNicknameResolveOptions {
1562
- enabled?: boolean;
1563
- chainId: number;
1564
- }
1565
- /**
1566
- * Hook to resolve a nickname to a wallet address with verification
1567
- *
1568
- * - Debounces API calls by 300ms
1569
- * - Only resolves when input looks like a nickname
1570
- * - Verifies fingerprint locally before returning data (MANDATORY)
1571
- * - Returns resolved address when found and verified
1572
- *
1573
- * @param input - The recipient input (can be address or nickname)
1574
- * @param options - Resolution options including chainId (required) and enabled flag
1575
- * @returns Resolution data, loading states, error state, verification status, resolved address
1576
- */
1577
- declare function useNicknameResolve(input: string, options: UseNicknameResolveOptions): UseNicknameResolveResult;
1578
-
1579
- /**
1580
- * Get UserOperation data by hash
1581
- */
1582
-
1583
- /**
1584
- * UserOperation data from bundler response
1585
- */
1586
- interface UserOperationByHash {
1587
- /** EntryPoint address */
1588
- entryPoint: `0x${string}`;
1589
- /** User operation details */
1590
- userOperation: {
1591
- sender: `0x${string}`;
1592
- nonce: `0x${string}`;
1593
- callData: `0x${string}`;
1594
- callGasLimit: `0x${string}`;
1595
- verificationGasLimit: `0x${string}`;
1596
- preVerificationGas: `0x${string}`;
1597
- maxPriorityFeePerGas: `0x${string}`;
1598
- maxFeePerGas: `0x${string}`;
1599
- paymaster?: `0x${string}`;
1600
- paymasterVerificationGasLimit?: `0x${string}`;
1601
- paymasterPostOpGasLimit?: `0x${string}`;
1602
- paymasterData?: `0x${string}`;
1603
- signature: `0x${string}`;
1604
- };
1605
- /** Transaction hash (null if not yet included in block) */
1606
- transactionHash: `0x${string}` | null;
1607
- /** Block number (null if not yet included in block) */
1608
- blockNumber: `0x${string}` | null;
1609
- /** Block hash (null if not yet included in block) */
1610
- blockHash: `0x${string}` | null;
1611
- }
1612
- /**
1613
- * Get UserOperation data by hash
1614
- *
1615
- * Automatically uses active chain from UI unless chainId is specified.
1616
- * Returns null if UserOp is not found.
1617
- *
1618
- * @param userOpHash - UserOperation hash returned from sendUserOperation
1619
- * @param chainId - Optional chain ID (defaults to active chain)
1620
- * @returns UserOperation data if found, null if not found
1621
- * @throws {Error} If chain has no bundlerUrl configured
1622
- *
1623
- * @example
1624
- * ```typescript
1625
- * const hash = await sendUserOperation(session, { ... })
1626
- * const userOp = await getUserOperationByHash(hash)
1627
- * ```
1628
- */
1629
- declare function getUserOperationByHash(userOpHash: Hash$1 | string, chainId?: number): Promise<UserOperationByHash | null>;
1630
-
1631
- /**
1632
- * Get UserOperation receipt by hash
1633
- */
1634
-
1635
- /**
1636
- * UserOperation receipt
1637
- *
1638
- * Contains execution details after UserOp is included in a block
1639
- */
1640
- interface UserOperationReceipt {
1641
- /** UserOperation hash */
1642
- userOpHash: Hash$1;
1643
- /** EntryPoint address that processed this UserOp */
1644
- entryPoint: `0x${string}`;
1645
- /** Sender (smart account) address */
1646
- sender: `0x${string}`;
1647
- /** Nonce used for this UserOp */
1648
- nonce: `0x${string}`;
1649
- /** True if UserOp succeeded, false if reverted */
1650
- success: boolean;
1651
- /** Actual gas cost paid */
1652
- actualGasCost: `0x${string}`;
1653
- /** Actual gas used */
1654
- actualGasUsed: `0x${string}`;
1655
- /** Paymaster address (if used) */
1656
- paymaster?: `0x${string}`;
1657
- /** Transaction receipt */
1658
- receipt: {
1659
- transactionHash: Hash$1;
1660
- blockNumber: `0x${string}`;
1661
- blockHash: Hash$1;
1662
- [key: string]: any;
1663
- };
1664
- /** Logs emitted during execution */
1665
- logs?: any[];
1666
- /** Revert reason, if unsuccessful */
1667
- reason?: string;
1668
- }
1669
- /**
1670
- * Get UserOperation receipt by hash
1671
- *
1672
- * Automatically uses active chain from UI unless chainId is specified.
1673
- * Returns null if UserOp is still pending or not found.
1674
- *
1675
- * @param userOpHash - UserOperation hash returned from sendUserOperation
1676
- * @param chainId - Optional chain ID (defaults to active chain)
1677
- * @returns Receipt if found and mined, null if pending or not found
1678
- * @throws {Error} If chain has no bundlerUrl configured
1679
- *
1680
- * @example
1681
- * ```typescript
1682
- * const hash = await sendUserOperation(session, { ... })
1683
- * const receipt = await getUserOperationReceipt(hash)
1684
- * if (receipt?.success) {
1685
- * console.log('Gas used:', receipt.actualGasUsed)
1686
- * }
1687
- * ```
1688
- */
1689
- declare function getUserOperationReceipt(userOpHash: Hash$1 | string, chainId?: number): Promise<UserOperationReceipt | null>;
1690
-
1691
- /**
1692
- * Wait for UserOperation receipt with polling
1693
- */
1694
-
1695
- /**
1696
- * Options for waiting for UserOperation receipt
1697
- */
1698
- interface WaitForReceiptOptions {
1699
- /**
1700
- * Polling interval in milliseconds
1701
- * @default 1000 (1 second)
1702
- */
1703
- pollIntervalMs?: number;
1704
- /**
1705
- * Maximum wait time in milliseconds
1706
- * @default 60000 (60 seconds)
1707
- */
1708
- maxPollTimeMs?: number;
1709
- /**
1710
- * Chain ID (optional)
1711
- * If not provided, uses activeChainId from UI state.
1712
- */
1713
- chainId?: number;
1714
- }
1715
- /**
1716
- * Thrown when waitForUserOperationReceipt exceeds maxPollTimeMs
1717
- */
1718
- declare class UserOperationTimeoutError extends Error {
1719
- userOpHash: Hash$1;
1720
- chainId: number;
1721
- timeoutMs: number;
1722
- constructor(userOpHash: Hash$1, chainId: number, timeoutMs: number);
1723
- }
1724
- /**
1725
- * Wait for UserOperation receipt with automatic polling
1726
- *
1727
- * Polls bundler until receipt is available or timeout is reached.
1728
- * Automatically uses active chain from UI unless chainId is specified in options.
1729
- *
1730
- * @param userOpHash - UserOperation hash returned from sendUserOperation
1731
- * @param options - Polling configuration and optional chainId
1732
- * @returns Receipt once UserOp is mined
1733
- * @throws {UserOperationTimeoutError} If timeout is exceeded before receipt is available
1734
- * @throws {Error} If chain has no bundlerUrl configured
1735
- *
1736
- * @example
1737
- * ```typescript
1738
- * const hash = await sendUserOperation(session, { to, value, data })
1739
- * const receipt = await waitForUserOperationReceipt(hash)
1740
- * if (receipt.success) {
1741
- * console.log('TxHash:', receipt.receipt.transactionHash)
1742
- * }
1743
- * ```
1744
- */
1745
- declare function waitForUserOperationReceipt(userOpHash: Hash$1, options?: WaitForReceiptOptions): Promise<UserOperationReceipt>;
1746
-
1747
- declare global {
1748
- interface Window {
1749
- __EMBARK_CONDITIONAL_UI_ACTIVE__?: boolean;
1750
- }
1751
- }
1752
-
1753
- /**
1754
- * Provider information in user profile
1755
- * Matches the structure returned by backend /api/auth/profile
1756
- */
1757
- interface ProviderDetail {
1758
- id: string;
1759
- provider: string;
1760
- verified: boolean;
1761
- linkedAt: string;
1762
- lastUsedAt: string;
1763
- externalId: string;
1764
- meta?: Record<string, any>;
1765
- }
1766
- /**
1767
- * User profile information
1768
- * Extended to include nickname fields from backend
1769
- */
1770
- interface UserProfile {
1771
- userId: string;
1772
- displayName?: string;
1773
- avatar?: string;
1774
- providers: ProviderDetail[];
1775
- createdAt: string;
1776
- updatedAt: string;
1777
- hasKeyshare: boolean;
1778
- kycDetails: {
1779
- provider: 'sumsub' | 'uaepass' | 'custom';
1780
- kycStatus: string;
1781
- } | null;
1782
- nickname: string | null;
1783
- nicknameDisplay: string | null;
1784
- nicknameCanChange: boolean;
1785
- nicknameCooldownEndsAt: string | null;
1786
- }
1787
- interface UpdateProfileRequest {
1788
- displayName?: string;
1789
- }
1790
- /**
1791
- * Get user profile with detailed provider information
1792
- *
1793
- * Backend /api/auth/profile now returns complete provider details including:
1794
- * - Provider type and identifier
1795
- * - Verification status
1796
- * - Linked and last used timestamps
1797
- * - Provider-specific metadata
1798
- */
1799
- declare function getUserProfile(): Promise<UserProfile>;
1800
- /**
1801
- * Update user profile
1802
- */
1803
- declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
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
-
1823
- interface LinkedProfileDisplay extends AuthProvider {
1824
- displayName: string;
1825
- icon?: React.ComponentType<{
1826
- className?: string;
1827
- }>;
1828
- color?: string;
1829
- }
1830
- declare function useLinkedProfiles(): {
1831
- profiles: LinkedProfileDisplay[];
1832
- avatar: string;
1833
- isLoading: boolean;
1834
- error: Error;
1835
- refresh: () => Promise<void>;
1836
- };
1837
-
1838
- /**
1839
- * Custom error types for EmbarkAI operations
1840
- */
1841
- /**
1842
- * Base error class for all EmbarkAI errors
1843
- * Local copy to avoid @embarkai/core dependency in iframe bundle
1844
- */
1845
- declare class AccountAbstractionError extends Error {
1846
- /** Machine-readable error code for programmatic handling */
1847
- readonly code: string;
1848
- constructor(message: string, code: string);
1849
- }
1850
- /**
1851
- * Error thrown when user rejects a transaction or signature request
1852
- */
1853
- declare class UserRejectedError extends AccountAbstractionError {
1854
- static readonly CODE: "USER_REJECTED";
1855
- constructor(message?: string);
1856
- }
1857
- /**
1858
- * Error codes for EmbarkAI operations
1859
- */
1860
- declare const ErrorCodes: {
1861
- readonly MPC_SIGNING_ERROR: "MPC_SIGNING_ERROR";
1862
- readonly USER_REJECTED: "USER_REJECTED";
1863
- };
1864
- /**
1865
- * Create appropriate error from error code
1866
- * Used to reconstruct errors from iframe postMessage
1867
- */
1868
- declare function createAccountAbstractionError(params: {
1869
- message: string;
1870
- code?: string;
1871
- }): Error;
1872
-
1873
- /**
1874
- * Wagmi config for RainbowKit and wallet connections.
1875
- * Note: Balance fetching uses dynamic publicClient from session store,
1876
- * so chains don't need to be listed here for balance queries.
1877
- */
1878
- declare const wagmiConfig: wagmi.Config<readonly [viem.Chain, viem.Chain], {
1879
- [lumiaTestnetChain.id]: viem.HttpTransport<undefined, false> | viem.FallbackTransport<viem.HttpTransport<undefined, false>[]>;
1880
- [lumiaMainnetChain.id]: viem.HttpTransport<undefined, false> | viem.FallbackTransport<viem.HttpTransport<undefined, false>[]>;
1881
- }, readonly wagmi.CreateConnectorFn[]>;
1882
-
1883
- declare function getExplorerUrl(): string;
1884
-
1885
- /**
1886
- * Hook for fetching all assets from Blockscout API
1887
- */
1888
-
1889
- interface UseBlockscoutAssetsOptions {
1890
- /** Wallet address to query */
1891
- address: Address$1 | undefined;
1892
- /** Whether to enable the query (default: true when address provided) */
1893
- enabled?: boolean;
1894
- /** Whether to detect ERC3643 security tokens (default: true) */
1895
- detectSecurityTokens?: boolean;
1896
- }
1897
- interface UseBlockscoutAssetsResult {
1898
- /** Native token balance (always available via RPC) */
1899
- nativeBalance: {
1900
- value: bigint;
1901
- formatted: string;
1902
- symbol: string;
1903
- } | null;
1904
- /** All discovered assets (native + tokens + NFTs) */
1905
- assets: Asset[];
1906
- /** Whether any data is currently loading */
1907
- isLoading: boolean;
1908
- /** Whether initial load is in progress */
1909
- isInitialLoading: boolean;
1910
- /** Error from Blockscout API (null if native balance available) */
1911
- error: AssetListError | null;
1912
- /** Whether Blockscout API is reachable */
1913
- isBlockscoutAvailable: boolean;
1914
- /** Manually refresh all balances */
1915
- refreshBalances: () => Promise<void>;
1916
- /** Get balance for a specific token by address */
1917
- getTokenBalance: (tokenAddress: Address$1) => Asset | null;
1918
- /** Timestamp of last successful fetch */
1919
- lastUpdated: number | null;
1920
- }
1921
- /**
1922
- * React hook for fetching all assets from Blockscout API
1923
- *
1924
- * @example
1925
- * ```tsx
1926
- * const { assets, isLoading, error, refreshBalances } = useBlockscoutAssets({
1927
- * address: '0x...',
1928
- * });
1929
- * ```
1930
- */
1931
- declare function useBlockscoutAssets(options: UseBlockscoutAssetsOptions): UseBlockscoutAssetsResult;
1932
-
1933
- interface Transaction {
1934
- hash: Hash$1;
1935
- from: string;
1936
- to: string | null;
1937
- value: string;
1938
- gasUsed: string;
1939
- gasPrice: string;
1940
- blockNumber: bigint;
1941
- timestamp: number;
1942
- status: 'success' | 'failed' | 'pending';
1943
- }
1944
- interface SendTransactionParams {
1945
- to: `0x${string}`;
1946
- value: string;
1947
- data?: `0x${string}`;
1948
- }
1949
- interface SendTransactionResult {
1950
- hash: Hash$1;
1951
- wait: () => Promise<TransactionReceipt>;
1952
- }
1953
- declare function useTransactions(): {
1954
- sendTransaction: (params: SendTransactionParams) => Promise<SendTransactionResult>;
1955
- getTransaction: (hash: Hash$1) => Promise<{
1956
- input: viem.Hex;
1957
- s: viem.Hex;
1958
- value: bigint;
1959
- hash: Hash$1;
1960
- v: bigint;
1961
- r: viem.Hex;
1962
- type: "legacy";
1963
- to: viem.Address | null;
1964
- from: viem.Address;
1965
- gas: bigint;
1966
- nonce: number;
1967
- blobVersionedHashes?: undefined;
1968
- gasPrice: bigint;
1969
- maxFeePerBlobGas?: undefined;
1970
- maxFeePerGas?: undefined;
1971
- maxPriorityFeePerGas?: undefined;
1972
- accessList?: undefined;
1973
- authorizationList?: undefined;
1974
- yParity?: undefined;
1975
- typeHex: viem.Hex | null;
1976
- chainId?: number;
1977
- blockNumber: bigint;
1978
- blockHash: `0x${string}`;
1979
- transactionIndex: number;
1980
- } | {
1981
- input: viem.Hex;
1982
- s: viem.Hex;
1983
- value: bigint;
1984
- hash: Hash$1;
1985
- v: bigint;
1986
- r: viem.Hex;
1987
- type: "eip2930";
1988
- to: viem.Address | null;
1989
- from: viem.Address;
1990
- gas: bigint;
1991
- nonce: number;
1992
- blobVersionedHashes?: undefined;
1993
- gasPrice: bigint;
1994
- maxFeePerBlobGas?: undefined;
1995
- maxFeePerGas?: undefined;
1996
- maxPriorityFeePerGas?: undefined;
1997
- accessList: viem.AccessList;
1998
- authorizationList?: undefined;
1999
- yParity: number;
2000
- typeHex: viem.Hex | null;
2001
- chainId: number;
2002
- blockNumber: bigint;
2003
- blockHash: `0x${string}`;
2004
- transactionIndex: number;
2005
- } | {
2006
- input: viem.Hex;
2007
- s: viem.Hex;
2008
- value: bigint;
2009
- hash: Hash$1;
2010
- v: bigint;
2011
- r: viem.Hex;
2012
- type: "eip1559";
2013
- to: viem.Address | null;
2014
- from: viem.Address;
2015
- gas: bigint;
2016
- nonce: number;
2017
- blobVersionedHashes?: undefined;
2018
- gasPrice?: undefined;
2019
- maxFeePerBlobGas?: undefined;
2020
- maxFeePerGas: bigint;
2021
- maxPriorityFeePerGas: bigint;
2022
- accessList: viem.AccessList;
2023
- authorizationList?: undefined;
2024
- yParity: number;
2025
- typeHex: viem.Hex | null;
2026
- chainId: number;
2027
- blockNumber: bigint;
2028
- blockHash: `0x${string}`;
2029
- transactionIndex: number;
2030
- } | {
2031
- input: viem.Hex;
2032
- s: viem.Hex;
2033
- value: bigint;
2034
- hash: Hash$1;
2035
- v: bigint;
2036
- r: viem.Hex;
2037
- type: "eip4844";
2038
- to: viem.Address | null;
2039
- from: viem.Address;
2040
- gas: bigint;
2041
- nonce: number;
2042
- blobVersionedHashes: readonly viem.Hex[];
2043
- gasPrice?: undefined;
2044
- maxFeePerBlobGas: bigint;
2045
- maxFeePerGas: bigint;
2046
- maxPriorityFeePerGas: bigint;
2047
- accessList: viem.AccessList;
2048
- authorizationList?: undefined;
2049
- yParity: number;
2050
- typeHex: viem.Hex | null;
2051
- chainId: number;
2052
- blockNumber: bigint;
2053
- blockHash: `0x${string}`;
2054
- transactionIndex: number;
2055
- } | {
2056
- input: viem.Hex;
2057
- s: viem.Hex;
2058
- value: bigint;
2059
- hash: Hash$1;
2060
- v: bigint;
2061
- r: viem.Hex;
2062
- type: "eip7702";
2063
- to: viem.Address | null;
2064
- from: viem.Address;
2065
- gas: bigint;
2066
- nonce: number;
2067
- blobVersionedHashes?: undefined;
2068
- gasPrice?: undefined;
2069
- maxFeePerBlobGas?: undefined;
2070
- maxFeePerGas: bigint;
2071
- maxPriorityFeePerGas: bigint;
2072
- accessList: viem.AccessList;
2073
- authorizationList: viem.SignedAuthorizationList;
2074
- yParity: number;
2075
- typeHex: viem.Hex | null;
2076
- chainId: number;
2077
- blockNumber: bigint;
2078
- blockHash: `0x${string}`;
2079
- transactionIndex: number;
2080
- }>;
2081
- getTransactionReceipt: (hash: Hash$1) => Promise<TransactionReceipt>;
2082
- getTransactionHistory: (address: `0x${string}`, limit?: number) => Promise<Transaction[]>;
2083
- address: `0x${string}`;
2084
- isConnected: boolean;
2085
- };
2086
-
2087
- interface UserOperation {
2088
- hash: Hash$1;
2089
- sender: `0x${string}`;
2090
- nonce: bigint;
2091
- success: boolean;
2092
- actualGasCost: bigint;
2093
- blockNumber: bigint;
2094
- timestamp: number;
2095
- transactionHash: Hash$1;
2096
- }
2097
- declare function useSmartAccountTransactions(): {
2098
- getUserOperations: (address: `0x${string}`, fromBlock?: bigint | "earliest", toBlock?: bigint | "latest") => Promise<UserOperation[]>;
2099
- getRecentUserOperations: (address: `0x${string}`, limit?: number) => Promise<UserOperation[]>;
2100
- getTransactionDetails: (txHash: Hash$1) => Promise<{
2101
- transaction: {
2102
- input: viem.Hex;
2103
- s: viem.Hex;
2104
- value: bigint;
2105
- hash: Hash$1;
2106
- v: bigint;
2107
- r: viem.Hex;
2108
- type: "legacy";
2109
- to: viem.Address | null;
2110
- from: viem.Address;
2111
- gas: bigint;
2112
- nonce: number;
2113
- blobVersionedHashes?: undefined;
2114
- gasPrice: bigint;
2115
- maxFeePerBlobGas?: undefined;
2116
- maxFeePerGas?: undefined;
2117
- maxPriorityFeePerGas?: undefined;
2118
- accessList?: undefined;
2119
- authorizationList?: undefined;
2120
- yParity?: undefined;
2121
- typeHex: viem.Hex | null;
2122
- chainId?: number;
2123
- blockNumber: bigint;
2124
- blockHash: `0x${string}`;
2125
- transactionIndex: number;
2126
- } | {
2127
- input: viem.Hex;
2128
- s: viem.Hex;
2129
- value: bigint;
2130
- hash: Hash$1;
2131
- v: bigint;
2132
- r: viem.Hex;
2133
- type: "eip2930";
2134
- to: viem.Address | null;
2135
- from: viem.Address;
2136
- gas: bigint;
2137
- nonce: number;
2138
- blobVersionedHashes?: undefined;
2139
- gasPrice: bigint;
2140
- maxFeePerBlobGas?: undefined;
2141
- maxFeePerGas?: undefined;
2142
- maxPriorityFeePerGas?: undefined;
2143
- accessList: viem.AccessList;
2144
- authorizationList?: undefined;
2145
- yParity: number;
2146
- typeHex: viem.Hex | null;
2147
- chainId: number;
2148
- blockNumber: bigint;
2149
- blockHash: `0x${string}`;
2150
- transactionIndex: number;
2151
- } | {
2152
- input: viem.Hex;
2153
- s: viem.Hex;
2154
- value: bigint;
2155
- hash: Hash$1;
2156
- v: bigint;
2157
- r: viem.Hex;
2158
- type: "eip1559";
2159
- to: viem.Address | null;
2160
- from: viem.Address;
2161
- gas: bigint;
2162
- nonce: number;
2163
- blobVersionedHashes?: undefined;
2164
- gasPrice?: undefined;
2165
- maxFeePerBlobGas?: undefined;
2166
- maxFeePerGas: bigint;
2167
- maxPriorityFeePerGas: bigint;
2168
- accessList: viem.AccessList;
2169
- authorizationList?: undefined;
2170
- yParity: number;
2171
- typeHex: viem.Hex | null;
2172
- chainId: number;
2173
- blockNumber: bigint;
2174
- blockHash: `0x${string}`;
2175
- transactionIndex: number;
2176
- } | {
2177
- input: viem.Hex;
2178
- s: viem.Hex;
2179
- value: bigint;
2180
- hash: Hash$1;
2181
- v: bigint;
2182
- r: viem.Hex;
2183
- type: "eip4844";
2184
- to: viem.Address | null;
2185
- from: viem.Address;
2186
- gas: bigint;
2187
- nonce: number;
2188
- blobVersionedHashes: readonly viem.Hex[];
2189
- gasPrice?: undefined;
2190
- maxFeePerBlobGas: bigint;
2191
- maxFeePerGas: bigint;
2192
- maxPriorityFeePerGas: bigint;
2193
- accessList: viem.AccessList;
2194
- authorizationList?: undefined;
2195
- yParity: number;
2196
- typeHex: viem.Hex | null;
2197
- chainId: number;
2198
- blockNumber: bigint;
2199
- blockHash: `0x${string}`;
2200
- transactionIndex: number;
2201
- } | {
2202
- input: viem.Hex;
2203
- s: viem.Hex;
2204
- value: bigint;
2205
- hash: Hash$1;
2206
- v: bigint;
2207
- r: viem.Hex;
2208
- type: "eip7702";
2209
- to: viem.Address | null;
2210
- from: viem.Address;
2211
- gas: bigint;
2212
- nonce: number;
2213
- blobVersionedHashes?: undefined;
2214
- gasPrice?: undefined;
2215
- maxFeePerBlobGas?: undefined;
2216
- maxFeePerGas: bigint;
2217
- maxPriorityFeePerGas: bigint;
2218
- accessList: viem.AccessList;
2219
- authorizationList: viem.SignedAuthorizationList;
2220
- yParity: number;
2221
- typeHex: viem.Hex | null;
2222
- chainId: number;
2223
- blockNumber: bigint;
2224
- blockHash: `0x${string}`;
2225
- transactionIndex: number;
2226
- };
2227
- receipt: viem.TransactionReceipt;
2228
- }>;
2229
- };
2230
-
2231
- /**
2232
- * Passport translations object.
2233
- * Note: For use in combineI18NResources, translations are imported directly
2234
- * in utils.ts to avoid esbuild lazy initialization issues.
2235
- */
2236
- declare const PASSPORT_TRANSLATIONS: {
2237
- en: {
2238
- passport: {
2239
- common: {
2240
- create: string;
2241
- add: string;
2242
- added: string;
2243
- edit: string;
2244
- confirm: string;
2245
- purchase: string;
2246
- buy: string;
2247
- save: string;
2248
- saved: string;
2249
- delete: string;
2250
- download: string;
2251
- cancel: string;
2252
- close: string;
2253
- copy: string;
2254
- back: string;
2255
- language: string;
2256
- account: string;
2257
- asset: string;
2258
- amount: string;
2259
- balance: string;
2260
- continue: string;
2261
- network: string;
2262
- fingerprint: string;
2263
- from: string;
2264
- to: string;
2265
- hide: string;
2266
- show: string;
2267
- received: string;
2268
- sent: string;
2269
- created: string;
2270
- settings: string;
2271
- password: string;
2272
- passkey: string;
2273
- standard: string;
2274
- advanced: string;
2275
- next: string;
2276
- prev: string;
2277
- errors: {
2278
- oops: string;
2279
- };
2280
- };
2281
- auth: {
2282
- signin: string;
2283
- logout: string;
2284
- backToSignIn: string;
2285
- orSeparator: string;
2286
- email: {
2287
- placeholder: string;
2288
- };
2289
- verification: {
2290
- title: string;
2291
- sentTo: string;
2292
- codeExpires: string;
2293
- didntReceive: string;
2294
- resend: string;
2295
- };
2296
- social: {
2297
- comingSoonMessage: string;
2298
- };
2299
- wallet: {
2300
- label: string;
2301
- };
2302
- passkey: {
2303
- label: string;
2304
- title: string;
2305
- signInExisting: string;
2306
- dontHave: string;
2307
- create: string;
2308
- };
2309
- terms: {
2310
- text: string;
2311
- action: string;
2312
- };
2313
- };
2314
- main: {
2315
- send: string;
2316
- receive: string;
2317
- buy: string;
2318
- assets: string;
2319
- };
2320
- sendMenu: {
2321
- title: string;
2322
- selectAsset: string;
2323
- confirmStep: string;
2324
- sendNft: string;
2325
- recipient: string;
2326
- pendingStep: string;
2327
- pendingStepMsg: string;
2328
- };
2329
- receiveMenu: {
2330
- title: string;
2331
- copyAddress: string;
2332
- warning: string;
2333
- share: string;
2334
- };
2335
- buyMenu: {
2336
- title: string;
2337
- provider: string;
2338
- selectProvider: string;
2339
- selectCrypto: string;
2340
- selectFiat: string;
2341
- selectPaymentMode: string;
2342
- enterAmount: string;
2343
- purchaseSummary: string;
2344
- summary: {
2345
- youPay: string;
2346
- youReceive: string;
2347
- exchangeRate: string;
2348
- networkFee: string;
2349
- serviceFee: string;
2350
- paymentMethod: string;
2351
- };
2352
- transactionHistory: {
2353
- details: string;
2354
- };
2355
- noItems: {
2356
- noTransactions: string;
2357
- noPaymentModes: string;
2358
- noCryptoForChain: string;
2359
- };
2360
- inputPlaceholder: {
2361
- selectCurrencies: string;
2362
- providerMin: string;
2363
- };
2364
- };
2365
- portfolioMenu: {
2366
- title: string;
2367
- noAssets: string;
2368
- };
2369
- transactionsMenu: {
2370
- title: string;
2371
- noTransactions: string;
2372
- internalTransactions: string;
2373
- comingSoon: string;
2374
- };
2375
- kycMenu: {
2376
- title: string;
2377
- };
2378
- nicknameMenu: {
2379
- title: string;
2380
- yourNickname: string;
2381
- cooldownMessage: string;
2382
- lastChanged: string;
2383
- timesChanged: string;
2384
- placeholder: string;
2385
- hint: string;
2386
- errors: {
2387
- tooShort: string;
2388
- tooLong: string;
2389
- invalidChars: string;
2390
- invalidUnderscore: string;
2391
- invalidFormat: string;
2392
- nicknameTaken: string;
2393
- nicknameReserved: string;
2394
- cooldownActive: string;
2395
- nicknameNotFound: string;
2396
- unknown: string;
2397
- };
2398
- availability: {
2399
- alreadyYourNickname: string;
2400
- checkingAvailability: string;
2401
- nicknameAvailable: string;
2402
- nicknameNotAvailable: string;
2403
- };
2404
- };
2405
- profilesMenu: {
2406
- title: string;
2407
- email: {
2408
- placeholder: string;
2409
- sentTo: string;
2410
- warningTitle: string;
2411
- warningMsg: string;
2412
- };
2413
- passkey: {
2414
- message: string;
2415
- message2: string;
2416
- linking: string;
2417
- createOnDevice: string;
2418
- createOnSecurityKey: string;
2419
- };
2420
- unlinkTitle: string;
2421
- unlinkConfirm: string;
2422
- unlinkPlaceholder: string;
2423
- };
2424
- securityMenu: {
2425
- title: string;
2426
- connectedApps: {
2427
- connectedApp: string;
2428
- trustedApp: string;
2429
- trustedAt: string;
2430
- connectedAt: string;
2431
- connectedApps: string;
2432
- noConnectedApps: string;
2433
- removalNoteTitle: string;
2434
- removalNoteMsg1: string;
2435
- removalNoteMsg2: string;
2436
- };
2437
- keyshareStatus: {
2438
- title: string;
2439
- serverReady: string;
2440
- serverMissing: string;
2441
- localReady: string;
2442
- localMissing: string;
2443
- valutBackupCreated: string;
2444
- valutBackupMissing: string;
2445
- };
2446
- lastBackup: string;
2447
- lastBackupMeta: string;
2448
- };
2449
- backupMenu: {
2450
- title: string;
2451
- passwordMsg: string;
2452
- passkeyMsg: string;
2453
- passkeyCompleteMsg: string;
2454
- passkeyAccessMsg: string;
2455
- passkeyMemo0: string;
2456
- passkeyMemo1: string;
2457
- passkeyMemo2: string;
2458
- passkeyLearnMore: string;
2459
- vaultRecoveryStatus: string;
2460
- vaultCreate: string;
2461
- vaultRestore: string;
2462
- file: string;
2463
- fileCreate: string;
2464
- fileRestore: string;
2465
- cloud: string;
2466
- };
2467
- restoreMenu: {
2468
- title: string;
2469
- check: string;
2470
- noBackups: string;
2471
- noBackupsMsg1: string;
2472
- noBackupsMsg2: string;
2473
- uploadBackupFile: string;
2474
- restoreWithBackupFile: string;
2475
- tryAnotherAccount: string;
2476
- };
2477
- chainMenu: {
2478
- title: string;
2479
- chainSwitchRequest: {
2480
- title: string;
2481
- description: string;
2482
- confirmButton: string;
2483
- cancelButton: string;
2484
- };
2485
- };
2486
- };
2487
- };
2488
- zh: {
2489
- passport: {
2490
- common: {
2491
- create: string;
2492
- add: string;
2493
- added: string;
2494
- edit: string;
2495
- confirm: string;
2496
- purchase: string;
2497
- buy: string;
2498
- save: string;
2499
- saved: string;
2500
- delete: string;
2501
- download: string;
2502
- cancel: string;
2503
- close: string;
2504
- copy: string;
2505
- back: string;
2506
- language: string;
2507
- account: string;
2508
- asset: string;
2509
- amount: string;
2510
- balance: string;
2511
- continue: string;
2512
- network: string;
2513
- fingerprint: string;
2514
- from: string;
2515
- to: string;
2516
- hide: string;
2517
- show: string;
2518
- received: string;
2519
- sent: string;
2520
- created: string;
2521
- settings: string;
2522
- password: string;
2523
- passkey: string;
2524
- standard: string;
2525
- advanced: string;
2526
- next: string;
2527
- prev: string;
2528
- errors: {
2529
- oops: string;
2530
- };
2531
- };
2532
- auth: {
2533
- signin: string;
2534
- logout: string;
2535
- backToSignIn: string;
2536
- orSeparator: string;
2537
- email: {
2538
- placeholder: string;
2539
- };
2540
- verification: {
2541
- title: string;
2542
- sentTo: string;
2543
- codeExpires: string;
2544
- didntReceive: string;
2545
- resend: string;
2546
- };
2547
- social: {
2548
- comingSoonMessage: string;
2549
- };
2550
- wallet: {
2551
- label: string;
2552
- };
2553
- passkey: {
2554
- label: string;
2555
- title: string;
2556
- signInExisting: string;
2557
- dontHave: string;
2558
- create: string;
2559
- };
2560
- terms: {
2561
- text: string;
2562
- action: string;
2563
- };
2564
- };
2565
- main: {
2566
- send: string;
2567
- receive: string;
2568
- buy: string;
2569
- assets: string;
2570
- };
2571
- sendMenu: {
2572
- title: string;
2573
- selectAsset: string;
2574
- confirmStep: string;
2575
- sendNft: string;
2576
- recipient: string;
2577
- pendingStep: string;
2578
- pendingStepMsg: string;
2579
- };
2580
- receiveMenu: {
2581
- title: string;
2582
- copyAddress: string;
2583
- warning: string;
2584
- share: string;
2585
- };
2586
- buyMenu: {
2587
- title: any;
2588
- provider: any;
2589
- selectProvider: any;
2590
- selectCrypto: any;
2591
- selectFiat: any;
2592
- selectPaymentMode: any;
2593
- enterAmount: any;
2594
- };
2595
- portfolioMenu: {
2596
- title: string;
2597
- noAssets: string;
2598
- };
2599
- transactionsMenu: {
2600
- title: string;
2601
- noTransactions: string;
2602
- internalTransactions: string;
2603
- comingSoon: any;
2604
- };
2605
- kycMenu: {
2606
- title: string;
2607
- };
2608
- nicknameMenu: {
2609
- title: string;
2610
- yourNickname: string;
2611
- cooldownMessage: string;
2612
- lastChanged: string;
2613
- timesChanged: string;
2614
- placeholder: string;
2615
- hint: string;
2616
- errors: {
2617
- tooShort: string;
2618
- tooLong: string;
2619
- invalidChars: string;
2620
- invalidUnderscore: string;
2621
- invalidFormat: string;
2622
- nicknameTaken: string;
2623
- nicknameReserved: string;
2624
- cooldownActive: string;
2625
- nicknameNotFound: string;
2626
- unknown: string;
2627
- };
2628
- availability: {
2629
- alreadyYourNickname: string;
2630
- checkingAvailability: string;
2631
- nicknameAvailable: string;
2632
- nicknameNotAvailable: string;
2633
- };
2634
- };
2635
- profilesMenu: {
2636
- title: string;
2637
- email: {
2638
- placeholder: string;
2639
- sentTo: string;
2640
- warningTitle: string;
2641
- warningMsg: string;
2642
- };
2643
- passkey: {
2644
- message: string;
2645
- message2: string;
2646
- linking: string;
2647
- createOnDevice: string;
2648
- createOnSecurityKey: string;
2649
- };
2650
- unlinkTitle: string;
2651
- unlinkConfirm: string;
2652
- unlinkPlaceholder: string;
2653
- };
2654
- securityMenu: {
2655
- title: string;
2656
- connectedApps: {
2657
- connectedApp: string;
2658
- trustedApp: string;
2659
- trustedAt: string;
2660
- connectedAt: string;
2661
- connectedApps: string;
2662
- noConnectedApps: string;
2663
- removalNoteTitle: string;
2664
- removalNoteMsg1: string;
2665
- removalNoteMsg2: string;
2666
- };
2667
- keyshareStatus: {
2668
- title: string;
2669
- serverReady: string;
2670
- serverMissing: string;
2671
- localReady: string;
2672
- localMissing: string;
2673
- valutBackupCreated: string;
2674
- valutBackupMissing: string;
2675
- };
2676
- lastBackup: string;
2677
- lastBackupMeta: string;
2678
- };
2679
- backupMenu: {
2680
- title: string;
2681
- passwordMsg: string;
2682
- passkeyMsg: string;
2683
- passkeyCompleteMsg: string;
2684
- passkeyAccessMsg: string;
2685
- passkeyMemo0: string;
2686
- passkeyMemo1: string;
2687
- passkeyMemo2: string;
2688
- passkeyLearnMore: string;
2689
- vaultRecoveryStatus: string;
2690
- vaultCreate: string;
2691
- vaultRestore: string;
2692
- file: string;
2693
- fileCreate: string;
2694
- fileRestore: string;
2695
- cloud: string;
2696
- };
2697
- restoreMenu: {
2698
- title: string;
2699
- check: string;
2700
- noBackups: string;
2701
- noBackupsMsg1: string;
2702
- noBackupsMsg2: string;
2703
- uploadBackupFile: string;
2704
- restoreWithBackupFile: string;
2705
- tryAnotherAccount: string;
2706
- };
2707
- chainMenu: {
2708
- title: string;
2709
- chainSwitchRequest: {
2710
- title: any;
2711
- description: any;
2712
- confirmButton: any;
2713
- cancelButton: any;
2714
- };
2715
- };
2716
- };
2717
- };
2718
- ru: {
2719
- passport: {
2720
- common: {
2721
- create: string;
2722
- add: string;
2723
- added: string;
2724
- edit: string;
2725
- confirm: string;
2726
- purchase: string;
2727
- buy: string;
2728
- save: string;
2729
- saved: string;
2730
- delete: string;
2731
- download: string;
2732
- cancel: string;
2733
- close: string;
2734
- copy: string;
2735
- back: string;
2736
- language: string;
2737
- account: string;
2738
- asset: string;
2739
- amount: string;
2740
- balance: string;
2741
- continue: string;
2742
- network: string;
2743
- fingerprint: string;
2744
- from: string;
2745
- to: string;
2746
- hide: string;
2747
- show: string;
2748
- received: string;
2749
- sent: string;
2750
- created: string;
2751
- settings: string;
2752
- password: string;
2753
- passkey: string;
2754
- standard: string;
2755
- advanced: string;
2756
- next: string;
2757
- prev: string;
2758
- errors: {
2759
- oops: string;
2760
- };
2761
- };
2762
- auth: {
2763
- signin: string;
2764
- logout: string;
2765
- backToSignIn: string;
2766
- orSeparator: string;
2767
- email: {
2768
- placeholder: string;
2769
- };
2770
- verification: {
2771
- title: string;
2772
- sentTo: string;
2773
- codeExpires: string;
2774
- didntReceive: string;
2775
- resend: string;
2776
- };
2777
- social: {
2778
- comingSoonMessage: string;
2779
- };
2780
- wallet: {
2781
- label: string;
2782
- };
2783
- passkey: {
2784
- label: string;
2785
- title: string;
2786
- signInExisting: string;
2787
- dontHave: string;
2788
- create: string;
2789
- };
2790
- terms: {
2791
- text: string;
2792
- action: string;
2793
- };
2794
- };
2795
- main: {
2796
- send: string;
2797
- receive: string;
2798
- buy: string;
2799
- assets: string;
2800
- };
2801
- sendMenu: {
2802
- title: string;
2803
- selectAsset: string;
2804
- confirmStep: string;
2805
- sendNft: string;
2806
- recipient: string;
2807
- pendingStep: string;
2808
- pendingStepMsg: string;
2809
- };
2810
- receiveMenu: {
2811
- title: string;
2812
- copyAddress: string;
2813
- warning: string;
2814
- share: string;
2815
- };
2816
- buyMenu: {
2817
- title: string;
2818
- provider: string;
2819
- selectProvider: string;
2820
- selectCrypto: string;
2821
- selectFiat: string;
2822
- selectPaymentMode: string;
2823
- enterAmount: string;
2824
- purchaseSummary: string;
2825
- summary: {
2826
- youPay: string;
2827
- youReceive: string;
2828
- exchangeRate: string;
2829
- networkFee: string;
2830
- serviceFee: string;
2831
- paymentMethod: string;
2832
- };
2833
- transactionHistory: {
2834
- details: string;
2835
- };
2836
- noItems: {
2837
- noTransactions: string;
2838
- noPaymentModes: string;
2839
- noCryptoForChain: string;
2840
- };
2841
- inputPlaceholder: {
2842
- selectCurrencies: string;
2843
- providerMin: string;
2844
- };
2845
- };
2846
- portfolioMenu: {
2847
- title: string;
2848
- noAssets: string;
2849
- };
2850
- transactionsMenu: {
2851
- title: string;
2852
- noTransactions: string;
2853
- internalTransactions: string;
2854
- comingSoon: string;
2855
- };
2856
- kycMenu: {
2857
- title: string;
2858
- };
2859
- nicknameMenu: {
2860
- title: string;
2861
- yourNickname: string;
2862
- cooldownMessage: string;
2863
- lastChanged: string;
2864
- timesChanged: string;
2865
- placeholder: string;
2866
- hint: string;
2867
- errors: {
2868
- tooShort: string;
2869
- tooLong: string;
2870
- invalidChars: string;
2871
- invalidUnderscore: string;
2872
- invalidFormat: string;
2873
- nicknameTaken: string;
2874
- nicknameReserved: string;
2875
- cooldownActive: string;
2876
- nicknameNotFound: string;
2877
- unknown: string;
2878
- };
2879
- availability: {
2880
- alreadyYourNickname: string;
2881
- checkingAvailability: string;
2882
- nicknameAvailable: string;
2883
- nicknameNotAvailable: string;
2884
- };
2885
- };
2886
- profilesMenu: {
2887
- title: string;
2888
- email: {
2889
- placeholder: string;
2890
- sentTo: string;
2891
- warningTitle: string;
2892
- warningMsg: string;
2893
- };
2894
- passkey: {
2895
- message: string;
2896
- message2: string;
2897
- linking: string;
2898
- createOnDevice: string;
2899
- createOnSecurityKey: string;
2900
- };
2901
- unlinkTitle: string;
2902
- unlinkConfirm: string;
2903
- unlinkPlaceholder: string;
2904
- };
2905
- securityMenu: {
2906
- title: string;
2907
- connectedApps: {
2908
- connectedApp: string;
2909
- trustedApp: string;
2910
- trustedAt: string;
2911
- connectedAt: string;
2912
- connectedApps: string;
2913
- noConnectedApps: string;
2914
- removalNoteTitle: string;
2915
- removalNoteMsg1: string;
2916
- removalNoteMsg2: string;
2917
- };
2918
- keyshareStatus: {
2919
- title: string;
2920
- serverReady: string;
2921
- serverMissing: string;
2922
- localReady: string;
2923
- localMissing: string;
2924
- valutBackupCreated: string;
2925
- valutBackupMissing: string;
2926
- };
2927
- lastBackup: string;
2928
- lastBackupMeta: string;
2929
- };
2930
- backupMenu: {
2931
- title: string;
2932
- passwordMsg: string;
2933
- passkeyMsg: string;
2934
- passkeyCompleteMsg: string;
2935
- passkeyAccessMsg: string;
2936
- passkeyMemo0: string;
2937
- passkeyMemo1: string;
2938
- passkeyMemo2: string;
2939
- passkeyLearnMore: string;
2940
- vaultRecoveryStatus: string;
2941
- vaultCreate: string;
2942
- vaultRestore: string;
2943
- file: string;
2944
- fileCreate: string;
2945
- fileRestore: string;
2946
- cloud: string;
2947
- };
2948
- restoreMenu: {
2949
- title: string;
2950
- check: string;
2951
- noBackups: string;
2952
- noBackupsMsg1: string;
2953
- noBackupsMsg2: string;
2954
- uploadBackupFile: string;
2955
- restoreWithBackupFile: string;
2956
- tryAnotherAccount: string;
2957
- };
2958
- chainMenu: {
2959
- title: string;
2960
- chainSwitchRequest: {
2961
- title: string;
2962
- description: string;
2963
- confirmButton: string;
2964
- cancelButton: string;
2965
- };
2966
- };
2967
- };
2968
- };
2969
- };
2970
- declare const LOCAL_STORAGE_I18N_KEY = "passport-language";
2971
-
2972
- type TranslationResources = Record<string, Record<string, unknown>>;
2973
- /**
2974
- * Combines project's translation resources with PASSPORT_TRANSLATIONS for i18n initialization
2975
- * @param resourses - translation resources to merge with PASSPORT_TRANSLATIONS
2976
- *
2977
- * resource object structure (passport namespace is MANDATORY):
2978
- *
2979
- * ```
2980
- * {
2981
- * language1: {
2982
- * passport: {...}
2983
- * projectNamespace: {...}
2984
- * ...
2985
- * },
2986
- * language2: {
2987
- * passport: {...}
2988
- * projectNamespace: {...}
2989
- * ...
2990
- * },
2991
- * }
2992
- * ```
2993
- */
2994
- declare function combineI18NResources(...resourses: TranslationResources[]): TranslationResources;
2995
- /**
2996
- * Get list of available language keys from provided translation resources & LP default langset,
2997
- * returns only languages with 'passport' namespace provided
2998
- * */
2999
- declare function getAvailableLanguages(resourses: TranslationResources): string[];
3000
- declare function getLanguageIcon(languageKey: string): string | null;
3001
-
3002
- declare const USER_PROFILE_QUERY_KEY: string;
3003
-
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 };