@embarkai/ui-kit 0.4.96 → 0.4.97
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 +3497 -3573
- package/dist/index.cjs +6405 -5235
- package/dist/index.d.cts +171 -4
- package/dist/index.d.ts +171 -4
- package/dist/index.js +5836 -4675
- package/dist/styles.css +1 -1
- package/package.json +5 -4
package/dist/index.d.cts
CHANGED
|
@@ -150,9 +150,10 @@ declare global {
|
|
|
150
150
|
__EMBARK_SERVICES__?: Partial<{
|
|
151
151
|
assetApiUrl: string;
|
|
152
152
|
tssUrl: string;
|
|
153
|
+
dwhUrl: string;
|
|
153
154
|
iframeUrl: string;
|
|
154
155
|
shareVaultUrl: string;
|
|
155
|
-
|
|
156
|
+
dashboardUrl: string;
|
|
156
157
|
tssRequireWasm: boolean;
|
|
157
158
|
tssWasmDebug: boolean;
|
|
158
159
|
}>;
|
|
@@ -302,8 +303,9 @@ interface ProviderConfig {
|
|
|
302
303
|
services: {
|
|
303
304
|
assetApiUrl?: string;
|
|
304
305
|
tssUrl: string;
|
|
306
|
+
dwhUrl: string;
|
|
305
307
|
shareVaultUrl: string;
|
|
306
|
-
|
|
308
|
+
dashboardUrl?: string;
|
|
307
309
|
iframeUrl?: string;
|
|
308
310
|
tssRequireWasm?: boolean;
|
|
309
311
|
tssWasmDebug?: boolean;
|
|
@@ -314,6 +316,7 @@ interface ProviderConfig {
|
|
|
314
316
|
requestDeduplication: boolean;
|
|
315
317
|
kycNeeded?: boolean;
|
|
316
318
|
displayNameNeeded?: boolean;
|
|
319
|
+
allowUserWalletPolicy?: boolean;
|
|
317
320
|
/**
|
|
318
321
|
* Display header balance asset as USD(T) representation via current asset rate from Binance.
|
|
319
322
|
* - Asset can be set by "showBalanceAs" prop & has to be supported by Binance if "showActiveBalanceAsFiat" true.
|
|
@@ -1082,8 +1085,8 @@ declare const useHydrated: () => boolean;
|
|
|
1082
1085
|
declare enum PageKey {
|
|
1083
1086
|
AUTH = "auth",
|
|
1084
1087
|
LANGUAGES = "languages",
|
|
1085
|
-
TERMS_OF_SERVICE = "terms-of-service",
|
|
1086
1088
|
MAIN_MENU = "main-menu",
|
|
1089
|
+
ACTIVITY_LOG = "activity-log",
|
|
1087
1090
|
SETTINGS = "settings",
|
|
1088
1091
|
SEND = "send",
|
|
1089
1092
|
RECEIVE = "receive",
|
|
@@ -1902,6 +1905,51 @@ declare function getUserProfile(): Promise<UserProfile>;
|
|
|
1902
1905
|
*/
|
|
1903
1906
|
declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
|
|
1904
1907
|
|
|
1908
|
+
interface PolicyRules {
|
|
1909
|
+
destinations?: {
|
|
1910
|
+
allow?: string[];
|
|
1911
|
+
deny?: string[];
|
|
1912
|
+
};
|
|
1913
|
+
limits?: {
|
|
1914
|
+
perTx?: string;
|
|
1915
|
+
perDay?: string;
|
|
1916
|
+
perMonth?: string;
|
|
1917
|
+
txPerDay?: number;
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
type PendingChange<S> = {
|
|
1921
|
+
op: 'update';
|
|
1922
|
+
state: S;
|
|
1923
|
+
activatesAt: string;
|
|
1924
|
+
} | {
|
|
1925
|
+
op: 'delete';
|
|
1926
|
+
activatesAt: string;
|
|
1927
|
+
};
|
|
1928
|
+
interface UserPolicy {
|
|
1929
|
+
id: string;
|
|
1930
|
+
version: number;
|
|
1931
|
+
chainId: number;
|
|
1932
|
+
active: PolicyRules;
|
|
1933
|
+
pending: PendingChange<PolicyRules> | null;
|
|
1934
|
+
updatedAt: string;
|
|
1935
|
+
}
|
|
1936
|
+
interface UserPolicyView {
|
|
1937
|
+
policy: UserPolicy | null;
|
|
1938
|
+
overriddenBy: {
|
|
1939
|
+
projectId: string;
|
|
1940
|
+
field: string;
|
|
1941
|
+
}[];
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
type SecuritySubmenu = 'connected-apps' | 'user-assets-policies';
|
|
1945
|
+
interface SecurityMenuParams extends PageOpenParams {
|
|
1946
|
+
submenu: SecuritySubmenu;
|
|
1947
|
+
/** open the policy editor pre-populated with these rules (e.g. the caller's own last-fetched policy) */
|
|
1948
|
+
policyRules?: PolicyRules;
|
|
1949
|
+
/** open the policy editor with empty/default rules */
|
|
1950
|
+
openPolicyEditor?: boolean;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1905
1953
|
interface ConnectedApp {
|
|
1906
1954
|
projectId: string;
|
|
1907
1955
|
name: string;
|
|
@@ -1927,6 +1975,22 @@ declare function useKeyshareRecoveryStats(): _tanstack_react_query.UseQueryResul
|
|
|
1927
1975
|
shareRecoveryStats: RecoveryStats;
|
|
1928
1976
|
}>, Error>;
|
|
1929
1977
|
|
|
1978
|
+
/** The user's own policy for the active chain (one policy per wallet per chain) */
|
|
1979
|
+
declare function useUserAssetsPolicies(activeChainId: number): _tanstack_react_query.UseQueryResult<NoInfer<UserPolicyView>, Error>;
|
|
1980
|
+
|
|
1981
|
+
declare function getUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
|
|
1982
|
+
declare function putUserPolicy(userId: string, chainId: number, rules: PolicyRules): Promise<UserPolicyView>;
|
|
1983
|
+
declare function cancelPendingPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
|
|
1984
|
+
declare function deleteUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
|
|
1985
|
+
declare const USER_ASSETS_POLICIES_API: {
|
|
1986
|
+
getUserPolicy: typeof getUserPolicy;
|
|
1987
|
+
putUserPolicy: typeof putUserPolicy;
|
|
1988
|
+
cancelPendingPolicy: typeof cancelPendingPolicy;
|
|
1989
|
+
deleteUserPolicy: typeof deleteUserPolicy;
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1992
|
+
declare const DEFAULT_POLICY_RULES: PolicyRules;
|
|
1993
|
+
|
|
1930
1994
|
declare function checkWrapedTokenSymbol(symbol: string): string;
|
|
1931
1995
|
/**
|
|
1932
1996
|
* get asset rate for a specific symbol against a USDT by default
|
|
@@ -2632,14 +2696,20 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2632
2696
|
};
|
|
2633
2697
|
main: {
|
|
2634
2698
|
send: string;
|
|
2699
|
+
bridge: string;
|
|
2635
2700
|
receive: string;
|
|
2636
2701
|
buy: string;
|
|
2637
2702
|
assets: string;
|
|
2703
|
+
activity: string;
|
|
2638
2704
|
onboarding: {
|
|
2639
2705
|
sendButton: {
|
|
2640
2706
|
title: string;
|
|
2641
2707
|
description: string;
|
|
2642
2708
|
};
|
|
2709
|
+
bridgeButton: {
|
|
2710
|
+
title: string;
|
|
2711
|
+
description: string;
|
|
2712
|
+
};
|
|
2643
2713
|
receiveButton: {
|
|
2644
2714
|
title: string;
|
|
2645
2715
|
description: string;
|
|
@@ -2648,12 +2718,19 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2648
2718
|
title: string;
|
|
2649
2719
|
description: string;
|
|
2650
2720
|
};
|
|
2721
|
+
portfolioSection: {
|
|
2722
|
+
title: string;
|
|
2723
|
+
description: string;
|
|
2724
|
+
};
|
|
2651
2725
|
portfolioButton: {
|
|
2652
2726
|
title: string;
|
|
2653
2727
|
description: string;
|
|
2654
2728
|
};
|
|
2655
2729
|
};
|
|
2656
2730
|
};
|
|
2731
|
+
activityLogMenu: {
|
|
2732
|
+
title: string;
|
|
2733
|
+
};
|
|
2657
2734
|
connectMenu: {
|
|
2658
2735
|
connectWallet: string;
|
|
2659
2736
|
noWallets: string;
|
|
@@ -2949,6 +3026,36 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2949
3026
|
removalNoteMsg1: string;
|
|
2950
3027
|
removalNoteMsg2: string;
|
|
2951
3028
|
};
|
|
3029
|
+
assetsPolicies: {
|
|
3030
|
+
assetsPolicies: string;
|
|
3031
|
+
noLimits: string;
|
|
3032
|
+
disabled: string;
|
|
3033
|
+
editPolicy: string;
|
|
3034
|
+
deletePolicy: string;
|
|
3035
|
+
deletePolicyConfirm: string;
|
|
3036
|
+
overriddenBy: string;
|
|
3037
|
+
pendingUpdateMessage: string;
|
|
3038
|
+
pendingDeleteMessage: string;
|
|
3039
|
+
cancelPending: string;
|
|
3040
|
+
form: {
|
|
3041
|
+
destinations: {
|
|
3042
|
+
title: string;
|
|
3043
|
+
allow: string;
|
|
3044
|
+
deny: string;
|
|
3045
|
+
};
|
|
3046
|
+
limits: {
|
|
3047
|
+
title: string;
|
|
3048
|
+
perTx: string;
|
|
3049
|
+
perDay: string;
|
|
3050
|
+
perMonth: string;
|
|
3051
|
+
txPerDay: string;
|
|
3052
|
+
};
|
|
3053
|
+
actions: {
|
|
3054
|
+
submit: string;
|
|
3055
|
+
saving: string;
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
};
|
|
2952
3059
|
keyshareStatus: {
|
|
2953
3060
|
title: string;
|
|
2954
3061
|
serverReady: string;
|
|
@@ -3506,6 +3613,36 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3506
3613
|
removalNoteMsg1: string;
|
|
3507
3614
|
removalNoteMsg2: string;
|
|
3508
3615
|
};
|
|
3616
|
+
assetsPolicies: {
|
|
3617
|
+
assetsPolicies: string;
|
|
3618
|
+
noLimits: string;
|
|
3619
|
+
disabled: string;
|
|
3620
|
+
editPolicy: string;
|
|
3621
|
+
deletePolicy: string;
|
|
3622
|
+
deletePolicyConfirm: string;
|
|
3623
|
+
overriddenBy: string;
|
|
3624
|
+
pendingUpdateMessage: string;
|
|
3625
|
+
pendingDeleteMessage: string;
|
|
3626
|
+
cancelPending: string;
|
|
3627
|
+
form: {
|
|
3628
|
+
destinations: {
|
|
3629
|
+
title: string;
|
|
3630
|
+
allow: string;
|
|
3631
|
+
deny: string;
|
|
3632
|
+
};
|
|
3633
|
+
limits: {
|
|
3634
|
+
title: string;
|
|
3635
|
+
perTx: string;
|
|
3636
|
+
perDay: string;
|
|
3637
|
+
perMonth: string;
|
|
3638
|
+
txPerDay: string;
|
|
3639
|
+
};
|
|
3640
|
+
actions: {
|
|
3641
|
+
submit: string;
|
|
3642
|
+
saving: string;
|
|
3643
|
+
};
|
|
3644
|
+
};
|
|
3645
|
+
};
|
|
3509
3646
|
keyshareStatus: {
|
|
3510
3647
|
title: string;
|
|
3511
3648
|
serverReady: string;
|
|
@@ -4063,6 +4200,36 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
4063
4200
|
removalNoteMsg1: string;
|
|
4064
4201
|
removalNoteMsg2: string;
|
|
4065
4202
|
};
|
|
4203
|
+
assetsPolicies: {
|
|
4204
|
+
assetsPolicies: string;
|
|
4205
|
+
noLimits: string;
|
|
4206
|
+
disabled: string;
|
|
4207
|
+
editPolicy: string;
|
|
4208
|
+
deletePolicy: string;
|
|
4209
|
+
deletePolicyConfirm: string;
|
|
4210
|
+
overriddenBy: string;
|
|
4211
|
+
pendingUpdateMessage: string;
|
|
4212
|
+
pendingDeleteMessage: string;
|
|
4213
|
+
cancelPending: string;
|
|
4214
|
+
form: {
|
|
4215
|
+
destinations: {
|
|
4216
|
+
title: string;
|
|
4217
|
+
allow: string;
|
|
4218
|
+
deny: string;
|
|
4219
|
+
};
|
|
4220
|
+
limits: {
|
|
4221
|
+
title: string;
|
|
4222
|
+
perTx: string;
|
|
4223
|
+
perDay: string;
|
|
4224
|
+
perMonth: string;
|
|
4225
|
+
txPerDay: string;
|
|
4226
|
+
};
|
|
4227
|
+
actions: {
|
|
4228
|
+
submit: string;
|
|
4229
|
+
saving: string;
|
|
4230
|
+
};
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4066
4233
|
keyshareStatus: {
|
|
4067
4234
|
title: string;
|
|
4068
4235
|
serverReady: string;
|
|
@@ -4221,4 +4388,4 @@ declare function getLanguageIcon(languageKey: string): string | null;
|
|
|
4221
4388
|
|
|
4222
4389
|
declare const USER_PROFILE_QUERY_KEY: string;
|
|
4223
4390
|
|
|
4224
|
-
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
|
|
4391
|
+
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, DEFAULT_POLICY_RULES, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PolicyRules, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SecurityMenuParams, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_ASSETS_POLICIES_API, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserPolicy, type UserPolicyView, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserAssetsPolicies, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
|
package/dist/index.d.ts
CHANGED
|
@@ -150,9 +150,10 @@ declare global {
|
|
|
150
150
|
__EMBARK_SERVICES__?: Partial<{
|
|
151
151
|
assetApiUrl: string;
|
|
152
152
|
tssUrl: string;
|
|
153
|
+
dwhUrl: string;
|
|
153
154
|
iframeUrl: string;
|
|
154
155
|
shareVaultUrl: string;
|
|
155
|
-
|
|
156
|
+
dashboardUrl: string;
|
|
156
157
|
tssRequireWasm: boolean;
|
|
157
158
|
tssWasmDebug: boolean;
|
|
158
159
|
}>;
|
|
@@ -302,8 +303,9 @@ interface ProviderConfig {
|
|
|
302
303
|
services: {
|
|
303
304
|
assetApiUrl?: string;
|
|
304
305
|
tssUrl: string;
|
|
306
|
+
dwhUrl: string;
|
|
305
307
|
shareVaultUrl: string;
|
|
306
|
-
|
|
308
|
+
dashboardUrl?: string;
|
|
307
309
|
iframeUrl?: string;
|
|
308
310
|
tssRequireWasm?: boolean;
|
|
309
311
|
tssWasmDebug?: boolean;
|
|
@@ -314,6 +316,7 @@ interface ProviderConfig {
|
|
|
314
316
|
requestDeduplication: boolean;
|
|
315
317
|
kycNeeded?: boolean;
|
|
316
318
|
displayNameNeeded?: boolean;
|
|
319
|
+
allowUserWalletPolicy?: boolean;
|
|
317
320
|
/**
|
|
318
321
|
* Display header balance asset as USD(T) representation via current asset rate from Binance.
|
|
319
322
|
* - Asset can be set by "showBalanceAs" prop & has to be supported by Binance if "showActiveBalanceAsFiat" true.
|
|
@@ -1082,8 +1085,8 @@ declare const useHydrated: () => boolean;
|
|
|
1082
1085
|
declare enum PageKey {
|
|
1083
1086
|
AUTH = "auth",
|
|
1084
1087
|
LANGUAGES = "languages",
|
|
1085
|
-
TERMS_OF_SERVICE = "terms-of-service",
|
|
1086
1088
|
MAIN_MENU = "main-menu",
|
|
1089
|
+
ACTIVITY_LOG = "activity-log",
|
|
1087
1090
|
SETTINGS = "settings",
|
|
1088
1091
|
SEND = "send",
|
|
1089
1092
|
RECEIVE = "receive",
|
|
@@ -1902,6 +1905,51 @@ declare function getUserProfile(): Promise<UserProfile>;
|
|
|
1902
1905
|
*/
|
|
1903
1906
|
declare function updateUserProfile(updates: UpdateProfileRequest): Promise<UserProfile>;
|
|
1904
1907
|
|
|
1908
|
+
interface PolicyRules {
|
|
1909
|
+
destinations?: {
|
|
1910
|
+
allow?: string[];
|
|
1911
|
+
deny?: string[];
|
|
1912
|
+
};
|
|
1913
|
+
limits?: {
|
|
1914
|
+
perTx?: string;
|
|
1915
|
+
perDay?: string;
|
|
1916
|
+
perMonth?: string;
|
|
1917
|
+
txPerDay?: number;
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
type PendingChange<S> = {
|
|
1921
|
+
op: 'update';
|
|
1922
|
+
state: S;
|
|
1923
|
+
activatesAt: string;
|
|
1924
|
+
} | {
|
|
1925
|
+
op: 'delete';
|
|
1926
|
+
activatesAt: string;
|
|
1927
|
+
};
|
|
1928
|
+
interface UserPolicy {
|
|
1929
|
+
id: string;
|
|
1930
|
+
version: number;
|
|
1931
|
+
chainId: number;
|
|
1932
|
+
active: PolicyRules;
|
|
1933
|
+
pending: PendingChange<PolicyRules> | null;
|
|
1934
|
+
updatedAt: string;
|
|
1935
|
+
}
|
|
1936
|
+
interface UserPolicyView {
|
|
1937
|
+
policy: UserPolicy | null;
|
|
1938
|
+
overriddenBy: {
|
|
1939
|
+
projectId: string;
|
|
1940
|
+
field: string;
|
|
1941
|
+
}[];
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
type SecuritySubmenu = 'connected-apps' | 'user-assets-policies';
|
|
1945
|
+
interface SecurityMenuParams extends PageOpenParams {
|
|
1946
|
+
submenu: SecuritySubmenu;
|
|
1947
|
+
/** open the policy editor pre-populated with these rules (e.g. the caller's own last-fetched policy) */
|
|
1948
|
+
policyRules?: PolicyRules;
|
|
1949
|
+
/** open the policy editor with empty/default rules */
|
|
1950
|
+
openPolicyEditor?: boolean;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1905
1953
|
interface ConnectedApp {
|
|
1906
1954
|
projectId: string;
|
|
1907
1955
|
name: string;
|
|
@@ -1927,6 +1975,22 @@ declare function useKeyshareRecoveryStats(): _tanstack_react_query.UseQueryResul
|
|
|
1927
1975
|
shareRecoveryStats: RecoveryStats;
|
|
1928
1976
|
}>, Error>;
|
|
1929
1977
|
|
|
1978
|
+
/** The user's own policy for the active chain (one policy per wallet per chain) */
|
|
1979
|
+
declare function useUserAssetsPolicies(activeChainId: number): _tanstack_react_query.UseQueryResult<NoInfer<UserPolicyView>, Error>;
|
|
1980
|
+
|
|
1981
|
+
declare function getUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
|
|
1982
|
+
declare function putUserPolicy(userId: string, chainId: number, rules: PolicyRules): Promise<UserPolicyView>;
|
|
1983
|
+
declare function cancelPendingPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
|
|
1984
|
+
declare function deleteUserPolicy(userId: string, chainId: number): Promise<UserPolicyView>;
|
|
1985
|
+
declare const USER_ASSETS_POLICIES_API: {
|
|
1986
|
+
getUserPolicy: typeof getUserPolicy;
|
|
1987
|
+
putUserPolicy: typeof putUserPolicy;
|
|
1988
|
+
cancelPendingPolicy: typeof cancelPendingPolicy;
|
|
1989
|
+
deleteUserPolicy: typeof deleteUserPolicy;
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1992
|
+
declare const DEFAULT_POLICY_RULES: PolicyRules;
|
|
1993
|
+
|
|
1930
1994
|
declare function checkWrapedTokenSymbol(symbol: string): string;
|
|
1931
1995
|
/**
|
|
1932
1996
|
* get asset rate for a specific symbol against a USDT by default
|
|
@@ -2632,14 +2696,20 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2632
2696
|
};
|
|
2633
2697
|
main: {
|
|
2634
2698
|
send: string;
|
|
2699
|
+
bridge: string;
|
|
2635
2700
|
receive: string;
|
|
2636
2701
|
buy: string;
|
|
2637
2702
|
assets: string;
|
|
2703
|
+
activity: string;
|
|
2638
2704
|
onboarding: {
|
|
2639
2705
|
sendButton: {
|
|
2640
2706
|
title: string;
|
|
2641
2707
|
description: string;
|
|
2642
2708
|
};
|
|
2709
|
+
bridgeButton: {
|
|
2710
|
+
title: string;
|
|
2711
|
+
description: string;
|
|
2712
|
+
};
|
|
2643
2713
|
receiveButton: {
|
|
2644
2714
|
title: string;
|
|
2645
2715
|
description: string;
|
|
@@ -2648,12 +2718,19 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2648
2718
|
title: string;
|
|
2649
2719
|
description: string;
|
|
2650
2720
|
};
|
|
2721
|
+
portfolioSection: {
|
|
2722
|
+
title: string;
|
|
2723
|
+
description: string;
|
|
2724
|
+
};
|
|
2651
2725
|
portfolioButton: {
|
|
2652
2726
|
title: string;
|
|
2653
2727
|
description: string;
|
|
2654
2728
|
};
|
|
2655
2729
|
};
|
|
2656
2730
|
};
|
|
2731
|
+
activityLogMenu: {
|
|
2732
|
+
title: string;
|
|
2733
|
+
};
|
|
2657
2734
|
connectMenu: {
|
|
2658
2735
|
connectWallet: string;
|
|
2659
2736
|
noWallets: string;
|
|
@@ -2949,6 +3026,36 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2949
3026
|
removalNoteMsg1: string;
|
|
2950
3027
|
removalNoteMsg2: string;
|
|
2951
3028
|
};
|
|
3029
|
+
assetsPolicies: {
|
|
3030
|
+
assetsPolicies: string;
|
|
3031
|
+
noLimits: string;
|
|
3032
|
+
disabled: string;
|
|
3033
|
+
editPolicy: string;
|
|
3034
|
+
deletePolicy: string;
|
|
3035
|
+
deletePolicyConfirm: string;
|
|
3036
|
+
overriddenBy: string;
|
|
3037
|
+
pendingUpdateMessage: string;
|
|
3038
|
+
pendingDeleteMessage: string;
|
|
3039
|
+
cancelPending: string;
|
|
3040
|
+
form: {
|
|
3041
|
+
destinations: {
|
|
3042
|
+
title: string;
|
|
3043
|
+
allow: string;
|
|
3044
|
+
deny: string;
|
|
3045
|
+
};
|
|
3046
|
+
limits: {
|
|
3047
|
+
title: string;
|
|
3048
|
+
perTx: string;
|
|
3049
|
+
perDay: string;
|
|
3050
|
+
perMonth: string;
|
|
3051
|
+
txPerDay: string;
|
|
3052
|
+
};
|
|
3053
|
+
actions: {
|
|
3054
|
+
submit: string;
|
|
3055
|
+
saving: string;
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
};
|
|
2952
3059
|
keyshareStatus: {
|
|
2953
3060
|
title: string;
|
|
2954
3061
|
serverReady: string;
|
|
@@ -3506,6 +3613,36 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3506
3613
|
removalNoteMsg1: string;
|
|
3507
3614
|
removalNoteMsg2: string;
|
|
3508
3615
|
};
|
|
3616
|
+
assetsPolicies: {
|
|
3617
|
+
assetsPolicies: string;
|
|
3618
|
+
noLimits: string;
|
|
3619
|
+
disabled: string;
|
|
3620
|
+
editPolicy: string;
|
|
3621
|
+
deletePolicy: string;
|
|
3622
|
+
deletePolicyConfirm: string;
|
|
3623
|
+
overriddenBy: string;
|
|
3624
|
+
pendingUpdateMessage: string;
|
|
3625
|
+
pendingDeleteMessage: string;
|
|
3626
|
+
cancelPending: string;
|
|
3627
|
+
form: {
|
|
3628
|
+
destinations: {
|
|
3629
|
+
title: string;
|
|
3630
|
+
allow: string;
|
|
3631
|
+
deny: string;
|
|
3632
|
+
};
|
|
3633
|
+
limits: {
|
|
3634
|
+
title: string;
|
|
3635
|
+
perTx: string;
|
|
3636
|
+
perDay: string;
|
|
3637
|
+
perMonth: string;
|
|
3638
|
+
txPerDay: string;
|
|
3639
|
+
};
|
|
3640
|
+
actions: {
|
|
3641
|
+
submit: string;
|
|
3642
|
+
saving: string;
|
|
3643
|
+
};
|
|
3644
|
+
};
|
|
3645
|
+
};
|
|
3509
3646
|
keyshareStatus: {
|
|
3510
3647
|
title: string;
|
|
3511
3648
|
serverReady: string;
|
|
@@ -4063,6 +4200,36 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
4063
4200
|
removalNoteMsg1: string;
|
|
4064
4201
|
removalNoteMsg2: string;
|
|
4065
4202
|
};
|
|
4203
|
+
assetsPolicies: {
|
|
4204
|
+
assetsPolicies: string;
|
|
4205
|
+
noLimits: string;
|
|
4206
|
+
disabled: string;
|
|
4207
|
+
editPolicy: string;
|
|
4208
|
+
deletePolicy: string;
|
|
4209
|
+
deletePolicyConfirm: string;
|
|
4210
|
+
overriddenBy: string;
|
|
4211
|
+
pendingUpdateMessage: string;
|
|
4212
|
+
pendingDeleteMessage: string;
|
|
4213
|
+
cancelPending: string;
|
|
4214
|
+
form: {
|
|
4215
|
+
destinations: {
|
|
4216
|
+
title: string;
|
|
4217
|
+
allow: string;
|
|
4218
|
+
deny: string;
|
|
4219
|
+
};
|
|
4220
|
+
limits: {
|
|
4221
|
+
title: string;
|
|
4222
|
+
perTx: string;
|
|
4223
|
+
perDay: string;
|
|
4224
|
+
perMonth: string;
|
|
4225
|
+
txPerDay: string;
|
|
4226
|
+
};
|
|
4227
|
+
actions: {
|
|
4228
|
+
submit: string;
|
|
4229
|
+
saving: string;
|
|
4230
|
+
};
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4066
4233
|
keyshareStatus: {
|
|
4067
4234
|
title: string;
|
|
4068
4235
|
serverReady: string;
|
|
@@ -4221,4 +4388,4 @@ declare function getLanguageIcon(languageKey: string): string | null;
|
|
|
4221
4388
|
|
|
4222
4389
|
declare const USER_PROFILE_QUERY_KEY: string;
|
|
4223
4390
|
|
|
4224
|
-
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
|
|
4391
|
+
export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type BatchOperation, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, DEFAULT_POLICY_RULES, type DirectTransactionParams, ErrorBoundary, type ErrorBoundaryProps, ErrorCodes, Expandable, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, NETWORKS_ICONS, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, ONBOARDING_TOURS, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, type PolicyRules, type PrepareBatchUserOperationParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SecurityMenuParams, type SendBatchUserOperationParams, type SendTransactionParams, type SendTransactionResult, SessionExpiredError, type SignTypedDataParams, type SmartAccountEntry, TOKENS_ICONS, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TransferToLinkedParams, type TypedDataDomain, type TypedDataField, USER_ASSETS_POLICIES_API, USER_PROFILE_QUERY_KEY, type UpdateProfileRequest, type UseDirectWalletReturn, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendDirectTransactionReturn, type UseSendTransactionReturn, type UseTransferToLinkedReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UseWalletModeReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserPolicy, type UserPolicyView, type UserProfile, UserRejectedError, WALLET_ICONS, type WaitForReceiptOptions, type WalletMode, type WalletReadyStatus, type WatchToken, checkWrapedTokenSymbol, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAssetRate, getAvailableLanguages, getExplorerUrl, getIframeManager, getInProgressOnrampTransactionsList, getLanguageIcon, getShareRecoveryStats, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, isSessionExpiredError, looksLikeNickname, onboarder, prepareBatchUserOperation, prepareUserOperation, requireActiveChainId, sendBatchUserOperation, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssetUsdtRate, useAssets, useBalance, useBlockscoutAssets, useColorMode, useConnectedApps, useDirectWallet, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useKeyshareRecoveryStats, useLinkedProfiles, useLoadingStatus, useLogout, useNativeWalletSignature, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendDirectTransaction, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useTransferToLinkedWallet, useUserAssetsPolicies, useUserOpStatus, useWalletMode, verifyFingerprint, verifyFingerprintDetailed, waitForStoreHydration, waitForUserOperationReceipt };
|