@embarkai/ui-kit 0.4.1 → 0.4.3
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1936 -190
- package/dist/index.cjs +9306 -8701
- package/dist/index.d.cts +157 -4
- package/dist/index.d.ts +157 -4
- package/dist/index.js +7352 -6748
- package/dist/styles.css +1 -1
- package/package.json +3 -2
- package/dist/iframe/main.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -60,6 +60,17 @@ interface ComplianceStatus {
|
|
|
60
60
|
/** Transfer restrictions message */
|
|
61
61
|
transferRestrictions?: string;
|
|
62
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
|
+
}
|
|
63
74
|
/**
|
|
64
75
|
* Represents a token or NFT asset
|
|
65
76
|
*/
|
|
@@ -636,6 +647,7 @@ declare class IframeManager {
|
|
|
636
647
|
private readonly HEARTBEAT_INTERVAL;
|
|
637
648
|
private heartbeatInterval?;
|
|
638
649
|
private isReconnecting;
|
|
650
|
+
private sseListeners;
|
|
639
651
|
constructor(config: IframeManagerConfig);
|
|
640
652
|
setDebug(debug: boolean): void;
|
|
641
653
|
/**
|
|
@@ -685,6 +697,7 @@ declare class IframeManager {
|
|
|
685
697
|
* Send secure message to iframe
|
|
686
698
|
*/
|
|
687
699
|
sendMessage(type: string, data: Record<string, any>): Promise<any>;
|
|
700
|
+
onSseEvent(listener: (data: any) => void): () => void;
|
|
688
701
|
/**
|
|
689
702
|
* Compute HMAC for message authentication using SDK channel token
|
|
690
703
|
*/
|
|
@@ -1160,6 +1173,33 @@ declare const TransactionsList: React__default.FC<TransactionsListProps>;
|
|
|
1160
1173
|
|
|
1161
1174
|
declare function KeyshareBackupMenu(): react_jsx_runtime.JSX.Element;
|
|
1162
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
|
+
|
|
1163
1203
|
interface SendTransactionParams$1 {
|
|
1164
1204
|
to: `0x${string}`;
|
|
1165
1205
|
value: string;
|
|
@@ -1813,6 +1853,56 @@ declare const wagmiConfig: wagmi.Config<readonly [viem.Chain, viem.Chain], {
|
|
|
1813
1853
|
[lumiaMainnetChain.id]: viem.HttpTransport<undefined, false> | viem.FallbackTransport<viem.HttpTransport<undefined, false>[]>;
|
|
1814
1854
|
}, readonly wagmi.CreateConnectorFn[]>;
|
|
1815
1855
|
|
|
1856
|
+
declare function getExplorerUrl(): string;
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Hook for fetching all assets from Blockscout API
|
|
1860
|
+
*/
|
|
1861
|
+
|
|
1862
|
+
interface UseBlockscoutAssetsOptions {
|
|
1863
|
+
/** Wallet address to query */
|
|
1864
|
+
address: Address$1 | undefined;
|
|
1865
|
+
/** Whether to enable the query (default: true when address provided) */
|
|
1866
|
+
enabled?: boolean;
|
|
1867
|
+
/** Whether to detect ERC3643 security tokens (default: true) */
|
|
1868
|
+
detectSecurityTokens?: boolean;
|
|
1869
|
+
}
|
|
1870
|
+
interface UseBlockscoutAssetsResult {
|
|
1871
|
+
/** Native token balance (always available via RPC) */
|
|
1872
|
+
nativeBalance: {
|
|
1873
|
+
value: bigint;
|
|
1874
|
+
formatted: string;
|
|
1875
|
+
symbol: string;
|
|
1876
|
+
} | null;
|
|
1877
|
+
/** All discovered assets (native + tokens + NFTs) */
|
|
1878
|
+
assets: Asset[];
|
|
1879
|
+
/** Whether any data is currently loading */
|
|
1880
|
+
isLoading: boolean;
|
|
1881
|
+
/** Whether initial load is in progress */
|
|
1882
|
+
isInitialLoading: boolean;
|
|
1883
|
+
/** Error from Blockscout API (null if native balance available) */
|
|
1884
|
+
error: AssetListError | null;
|
|
1885
|
+
/** Whether Blockscout API is reachable */
|
|
1886
|
+
isBlockscoutAvailable: boolean;
|
|
1887
|
+
/** Manually refresh all balances */
|
|
1888
|
+
refreshBalances: () => Promise<void>;
|
|
1889
|
+
/** Get balance for a specific token by address */
|
|
1890
|
+
getTokenBalance: (tokenAddress: Address$1) => Asset | null;
|
|
1891
|
+
/** Timestamp of last successful fetch */
|
|
1892
|
+
lastUpdated: number | null;
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* React hook for fetching all assets from Blockscout API
|
|
1896
|
+
*
|
|
1897
|
+
* @example
|
|
1898
|
+
* ```tsx
|
|
1899
|
+
* const { assets, isLoading, error, refreshBalances } = useBlockscoutAssets({
|
|
1900
|
+
* address: '0x...',
|
|
1901
|
+
* });
|
|
1902
|
+
* ```
|
|
1903
|
+
*/
|
|
1904
|
+
declare function useBlockscoutAssets(options: UseBlockscoutAssetsOptions): UseBlockscoutAssetsResult;
|
|
1905
|
+
|
|
1816
1906
|
interface Transaction {
|
|
1817
1907
|
hash: Hash$1;
|
|
1818
1908
|
from: string;
|
|
@@ -2125,6 +2215,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2125
2215
|
added: string;
|
|
2126
2216
|
edit: string;
|
|
2127
2217
|
confirm: string;
|
|
2218
|
+
purchase: string;
|
|
2219
|
+
buy: string;
|
|
2128
2220
|
save: string;
|
|
2129
2221
|
saved: string;
|
|
2130
2222
|
delete: string;
|
|
@@ -2153,6 +2245,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2153
2245
|
passkey: string;
|
|
2154
2246
|
standard: string;
|
|
2155
2247
|
advanced: string;
|
|
2248
|
+
next: string;
|
|
2249
|
+
prev: string;
|
|
2250
|
+
errors: {
|
|
2251
|
+
oops: string;
|
|
2252
|
+
};
|
|
2156
2253
|
};
|
|
2157
2254
|
auth: {
|
|
2158
2255
|
signin: string;
|
|
@@ -2216,6 +2313,27 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2216
2313
|
selectFiat: string;
|
|
2217
2314
|
selectPaymentMode: string;
|
|
2218
2315
|
enterAmount: string;
|
|
2316
|
+
purchaseSummary: string;
|
|
2317
|
+
summary: {
|
|
2318
|
+
youPay: string;
|
|
2319
|
+
youReceive: string;
|
|
2320
|
+
exchangeRate: string;
|
|
2321
|
+
networkFee: string;
|
|
2322
|
+
serviceFee: string;
|
|
2323
|
+
paymentMethod: string;
|
|
2324
|
+
};
|
|
2325
|
+
transactionHistory: {
|
|
2326
|
+
details: string;
|
|
2327
|
+
};
|
|
2328
|
+
noItems: {
|
|
2329
|
+
noTransactions: string;
|
|
2330
|
+
noPaymentModes: string;
|
|
2331
|
+
noCryptoForChain: string;
|
|
2332
|
+
};
|
|
2333
|
+
inputPlaceholder: {
|
|
2334
|
+
selectCurrencies: string;
|
|
2335
|
+
providerMin: string;
|
|
2336
|
+
};
|
|
2219
2337
|
};
|
|
2220
2338
|
portfolioMenu: {
|
|
2221
2339
|
title: string;
|
|
@@ -2344,9 +2462,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2344
2462
|
add: string;
|
|
2345
2463
|
added: string;
|
|
2346
2464
|
edit: string;
|
|
2347
|
-
confirm:
|
|
2348
|
-
|
|
2349
|
-
|
|
2465
|
+
confirm: string;
|
|
2466
|
+
purchase: string;
|
|
2467
|
+
buy: string;
|
|
2468
|
+
save: string;
|
|
2469
|
+
saved: string;
|
|
2350
2470
|
delete: string;
|
|
2351
2471
|
download: string;
|
|
2352
2472
|
cancel: string;
|
|
@@ -2373,6 +2493,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2373
2493
|
passkey: string;
|
|
2374
2494
|
standard: string;
|
|
2375
2495
|
advanced: string;
|
|
2496
|
+
next: string;
|
|
2497
|
+
prev: string;
|
|
2498
|
+
errors: {
|
|
2499
|
+
oops: string;
|
|
2500
|
+
};
|
|
2376
2501
|
};
|
|
2377
2502
|
auth: {
|
|
2378
2503
|
signin: string;
|
|
@@ -2565,6 +2690,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2565
2690
|
added: string;
|
|
2566
2691
|
edit: string;
|
|
2567
2692
|
confirm: string;
|
|
2693
|
+
purchase: string;
|
|
2694
|
+
buy: string;
|
|
2568
2695
|
save: string;
|
|
2569
2696
|
saved: string;
|
|
2570
2697
|
delete: string;
|
|
@@ -2593,6 +2720,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2593
2720
|
passkey: string;
|
|
2594
2721
|
standard: string;
|
|
2595
2722
|
advanced: string;
|
|
2723
|
+
next: string;
|
|
2724
|
+
prev: string;
|
|
2725
|
+
errors: {
|
|
2726
|
+
oops: string;
|
|
2727
|
+
};
|
|
2596
2728
|
};
|
|
2597
2729
|
auth: {
|
|
2598
2730
|
signin: string;
|
|
@@ -2656,6 +2788,27 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2656
2788
|
selectFiat: string;
|
|
2657
2789
|
selectPaymentMode: string;
|
|
2658
2790
|
enterAmount: string;
|
|
2791
|
+
purchaseSummary: string;
|
|
2792
|
+
summary: {
|
|
2793
|
+
youPay: string;
|
|
2794
|
+
youReceive: string;
|
|
2795
|
+
exchangeRate: string;
|
|
2796
|
+
networkFee: string;
|
|
2797
|
+
serviceFee: string;
|
|
2798
|
+
paymentMethod: string;
|
|
2799
|
+
};
|
|
2800
|
+
transactionHistory: {
|
|
2801
|
+
details: string;
|
|
2802
|
+
};
|
|
2803
|
+
noItems: {
|
|
2804
|
+
noTransactions: string;
|
|
2805
|
+
noPaymentModes: string;
|
|
2806
|
+
noCryptoForChain: string;
|
|
2807
|
+
};
|
|
2808
|
+
inputPlaceholder: {
|
|
2809
|
+
selectCurrencies: string;
|
|
2810
|
+
providerMin: string;
|
|
2811
|
+
};
|
|
2659
2812
|
};
|
|
2660
2813
|
portfolioMenu: {
|
|
2661
2814
|
title: string;
|
|
@@ -2810,4 +2963,4 @@ declare function combineI18NResources(...resourses: TranslationResources[]): Tra
|
|
|
2810
2963
|
declare function getAvailableLanguages(resourses: TranslationResources): string[];
|
|
2811
2964
|
declare function getLanguageIcon(languageKey: string): string | null;
|
|
2812
2965
|
|
|
2813
|
-
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, 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, getIframeManager, getLanguageIcon, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useColorMode, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
|
|
2966
|
+
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, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getExplorerUrl, getIframeManager, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useBlockscoutAssets, useColorMode, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
|
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,17 @@ interface ComplianceStatus {
|
|
|
60
60
|
/** Transfer restrictions message */
|
|
61
61
|
transferRestrictions?: string;
|
|
62
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
|
+
}
|
|
63
74
|
/**
|
|
64
75
|
* Represents a token or NFT asset
|
|
65
76
|
*/
|
|
@@ -636,6 +647,7 @@ declare class IframeManager {
|
|
|
636
647
|
private readonly HEARTBEAT_INTERVAL;
|
|
637
648
|
private heartbeatInterval?;
|
|
638
649
|
private isReconnecting;
|
|
650
|
+
private sseListeners;
|
|
639
651
|
constructor(config: IframeManagerConfig);
|
|
640
652
|
setDebug(debug: boolean): void;
|
|
641
653
|
/**
|
|
@@ -685,6 +697,7 @@ declare class IframeManager {
|
|
|
685
697
|
* Send secure message to iframe
|
|
686
698
|
*/
|
|
687
699
|
sendMessage(type: string, data: Record<string, any>): Promise<any>;
|
|
700
|
+
onSseEvent(listener: (data: any) => void): () => void;
|
|
688
701
|
/**
|
|
689
702
|
* Compute HMAC for message authentication using SDK channel token
|
|
690
703
|
*/
|
|
@@ -1160,6 +1173,33 @@ declare const TransactionsList: React__default.FC<TransactionsListProps>;
|
|
|
1160
1173
|
|
|
1161
1174
|
declare function KeyshareBackupMenu(): react_jsx_runtime.JSX.Element;
|
|
1162
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
|
+
|
|
1163
1203
|
interface SendTransactionParams$1 {
|
|
1164
1204
|
to: `0x${string}`;
|
|
1165
1205
|
value: string;
|
|
@@ -1813,6 +1853,56 @@ declare const wagmiConfig: wagmi.Config<readonly [viem.Chain, viem.Chain], {
|
|
|
1813
1853
|
[lumiaMainnetChain.id]: viem.HttpTransport<undefined, false> | viem.FallbackTransport<viem.HttpTransport<undefined, false>[]>;
|
|
1814
1854
|
}, readonly wagmi.CreateConnectorFn[]>;
|
|
1815
1855
|
|
|
1856
|
+
declare function getExplorerUrl(): string;
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Hook for fetching all assets from Blockscout API
|
|
1860
|
+
*/
|
|
1861
|
+
|
|
1862
|
+
interface UseBlockscoutAssetsOptions {
|
|
1863
|
+
/** Wallet address to query */
|
|
1864
|
+
address: Address$1 | undefined;
|
|
1865
|
+
/** Whether to enable the query (default: true when address provided) */
|
|
1866
|
+
enabled?: boolean;
|
|
1867
|
+
/** Whether to detect ERC3643 security tokens (default: true) */
|
|
1868
|
+
detectSecurityTokens?: boolean;
|
|
1869
|
+
}
|
|
1870
|
+
interface UseBlockscoutAssetsResult {
|
|
1871
|
+
/** Native token balance (always available via RPC) */
|
|
1872
|
+
nativeBalance: {
|
|
1873
|
+
value: bigint;
|
|
1874
|
+
formatted: string;
|
|
1875
|
+
symbol: string;
|
|
1876
|
+
} | null;
|
|
1877
|
+
/** All discovered assets (native + tokens + NFTs) */
|
|
1878
|
+
assets: Asset[];
|
|
1879
|
+
/** Whether any data is currently loading */
|
|
1880
|
+
isLoading: boolean;
|
|
1881
|
+
/** Whether initial load is in progress */
|
|
1882
|
+
isInitialLoading: boolean;
|
|
1883
|
+
/** Error from Blockscout API (null if native balance available) */
|
|
1884
|
+
error: AssetListError | null;
|
|
1885
|
+
/** Whether Blockscout API is reachable */
|
|
1886
|
+
isBlockscoutAvailable: boolean;
|
|
1887
|
+
/** Manually refresh all balances */
|
|
1888
|
+
refreshBalances: () => Promise<void>;
|
|
1889
|
+
/** Get balance for a specific token by address */
|
|
1890
|
+
getTokenBalance: (tokenAddress: Address$1) => Asset | null;
|
|
1891
|
+
/** Timestamp of last successful fetch */
|
|
1892
|
+
lastUpdated: number | null;
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* React hook for fetching all assets from Blockscout API
|
|
1896
|
+
*
|
|
1897
|
+
* @example
|
|
1898
|
+
* ```tsx
|
|
1899
|
+
* const { assets, isLoading, error, refreshBalances } = useBlockscoutAssets({
|
|
1900
|
+
* address: '0x...',
|
|
1901
|
+
* });
|
|
1902
|
+
* ```
|
|
1903
|
+
*/
|
|
1904
|
+
declare function useBlockscoutAssets(options: UseBlockscoutAssetsOptions): UseBlockscoutAssetsResult;
|
|
1905
|
+
|
|
1816
1906
|
interface Transaction {
|
|
1817
1907
|
hash: Hash$1;
|
|
1818
1908
|
from: string;
|
|
@@ -2125,6 +2215,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2125
2215
|
added: string;
|
|
2126
2216
|
edit: string;
|
|
2127
2217
|
confirm: string;
|
|
2218
|
+
purchase: string;
|
|
2219
|
+
buy: string;
|
|
2128
2220
|
save: string;
|
|
2129
2221
|
saved: string;
|
|
2130
2222
|
delete: string;
|
|
@@ -2153,6 +2245,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2153
2245
|
passkey: string;
|
|
2154
2246
|
standard: string;
|
|
2155
2247
|
advanced: string;
|
|
2248
|
+
next: string;
|
|
2249
|
+
prev: string;
|
|
2250
|
+
errors: {
|
|
2251
|
+
oops: string;
|
|
2252
|
+
};
|
|
2156
2253
|
};
|
|
2157
2254
|
auth: {
|
|
2158
2255
|
signin: string;
|
|
@@ -2216,6 +2313,27 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2216
2313
|
selectFiat: string;
|
|
2217
2314
|
selectPaymentMode: string;
|
|
2218
2315
|
enterAmount: string;
|
|
2316
|
+
purchaseSummary: string;
|
|
2317
|
+
summary: {
|
|
2318
|
+
youPay: string;
|
|
2319
|
+
youReceive: string;
|
|
2320
|
+
exchangeRate: string;
|
|
2321
|
+
networkFee: string;
|
|
2322
|
+
serviceFee: string;
|
|
2323
|
+
paymentMethod: string;
|
|
2324
|
+
};
|
|
2325
|
+
transactionHistory: {
|
|
2326
|
+
details: string;
|
|
2327
|
+
};
|
|
2328
|
+
noItems: {
|
|
2329
|
+
noTransactions: string;
|
|
2330
|
+
noPaymentModes: string;
|
|
2331
|
+
noCryptoForChain: string;
|
|
2332
|
+
};
|
|
2333
|
+
inputPlaceholder: {
|
|
2334
|
+
selectCurrencies: string;
|
|
2335
|
+
providerMin: string;
|
|
2336
|
+
};
|
|
2219
2337
|
};
|
|
2220
2338
|
portfolioMenu: {
|
|
2221
2339
|
title: string;
|
|
@@ -2344,9 +2462,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2344
2462
|
add: string;
|
|
2345
2463
|
added: string;
|
|
2346
2464
|
edit: string;
|
|
2347
|
-
confirm:
|
|
2348
|
-
|
|
2349
|
-
|
|
2465
|
+
confirm: string;
|
|
2466
|
+
purchase: string;
|
|
2467
|
+
buy: string;
|
|
2468
|
+
save: string;
|
|
2469
|
+
saved: string;
|
|
2350
2470
|
delete: string;
|
|
2351
2471
|
download: string;
|
|
2352
2472
|
cancel: string;
|
|
@@ -2373,6 +2493,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2373
2493
|
passkey: string;
|
|
2374
2494
|
standard: string;
|
|
2375
2495
|
advanced: string;
|
|
2496
|
+
next: string;
|
|
2497
|
+
prev: string;
|
|
2498
|
+
errors: {
|
|
2499
|
+
oops: string;
|
|
2500
|
+
};
|
|
2376
2501
|
};
|
|
2377
2502
|
auth: {
|
|
2378
2503
|
signin: string;
|
|
@@ -2565,6 +2690,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2565
2690
|
added: string;
|
|
2566
2691
|
edit: string;
|
|
2567
2692
|
confirm: string;
|
|
2693
|
+
purchase: string;
|
|
2694
|
+
buy: string;
|
|
2568
2695
|
save: string;
|
|
2569
2696
|
saved: string;
|
|
2570
2697
|
delete: string;
|
|
@@ -2593,6 +2720,11 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2593
2720
|
passkey: string;
|
|
2594
2721
|
standard: string;
|
|
2595
2722
|
advanced: string;
|
|
2723
|
+
next: string;
|
|
2724
|
+
prev: string;
|
|
2725
|
+
errors: {
|
|
2726
|
+
oops: string;
|
|
2727
|
+
};
|
|
2596
2728
|
};
|
|
2597
2729
|
auth: {
|
|
2598
2730
|
signin: string;
|
|
@@ -2656,6 +2788,27 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2656
2788
|
selectFiat: string;
|
|
2657
2789
|
selectPaymentMode: string;
|
|
2658
2790
|
enterAmount: string;
|
|
2791
|
+
purchaseSummary: string;
|
|
2792
|
+
summary: {
|
|
2793
|
+
youPay: string;
|
|
2794
|
+
youReceive: string;
|
|
2795
|
+
exchangeRate: string;
|
|
2796
|
+
networkFee: string;
|
|
2797
|
+
serviceFee: string;
|
|
2798
|
+
paymentMethod: string;
|
|
2799
|
+
};
|
|
2800
|
+
transactionHistory: {
|
|
2801
|
+
details: string;
|
|
2802
|
+
};
|
|
2803
|
+
noItems: {
|
|
2804
|
+
noTransactions: string;
|
|
2805
|
+
noPaymentModes: string;
|
|
2806
|
+
noCryptoForChain: string;
|
|
2807
|
+
};
|
|
2808
|
+
inputPlaceholder: {
|
|
2809
|
+
selectCurrencies: string;
|
|
2810
|
+
providerMin: string;
|
|
2811
|
+
};
|
|
2659
2812
|
};
|
|
2660
2813
|
portfolioMenu: {
|
|
2661
2814
|
title: string;
|
|
@@ -2810,4 +2963,4 @@ declare function combineI18NResources(...resourses: TranslationResources[]): Tra
|
|
|
2810
2963
|
declare function getAvailableLanguages(resourses: TranslationResources): string[];
|
|
2811
2964
|
declare function getLanguageIcon(languageKey: string): string | null;
|
|
2812
2965
|
|
|
2813
|
-
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, 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, getIframeManager, getLanguageIcon, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useColorMode, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
|
|
2966
|
+
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, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getExplorerUrl, getIframeManager, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useBlockscoutAssets, useColorMode, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };
|