@coti-io/coti-wallet-plugin 0.1.0 → 0.2.0
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.mts +34 -19
- package/dist/index.d.ts +34 -19
- package/dist/index.js +150 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -101
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -259,6 +259,12 @@ interface CotiPluginConfig {
|
|
|
259
259
|
* the same wallet can skip Snap re-fetch; use true for stricter shared-browser security.
|
|
260
260
|
*/
|
|
261
261
|
clearSessionKeyOnWagmiDisconnect?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* When true, private token transfers await `refreshPrivateBalances` before
|
|
264
|
+
* returning (confirmation UI stays open until balances decrypt). Default false
|
|
265
|
+
* refreshes in the background so success can show immediately.
|
|
266
|
+
*/
|
|
267
|
+
waitForBalanceRefreshAfterTransfer?: boolean;
|
|
262
268
|
/** Optional onboarding service hooks for grant and encrypted AES backup flows. */
|
|
263
269
|
onboardingServices?: OnboardingServices;
|
|
264
270
|
/**
|
|
@@ -3664,6 +3670,9 @@ interface WalletTypeInfo {
|
|
|
3664
3670
|
*/
|
|
3665
3671
|
declare function useWalletType(): WalletTypeInfo;
|
|
3666
3672
|
|
|
3673
|
+
type OnboardModalPage = 'intro' | 'progress' | 'success' | 'error';
|
|
3674
|
+
type OnboardModalWarnings = Partial<Record<OnboardModalPage, string>>;
|
|
3675
|
+
|
|
3667
3676
|
/**
|
|
3668
3677
|
* Onboarding step identifiers matching the contract onboarding flow (steps 3-9).
|
|
3669
3678
|
*/
|
|
@@ -3714,6 +3723,14 @@ interface AesKeyProviderOptions {
|
|
|
3714
3723
|
prefetchedEncryptedBackup?: EncryptedAesBackup | null;
|
|
3715
3724
|
}
|
|
3716
3725
|
|
|
3726
|
+
/**
|
|
3727
|
+
* Options for {@link PrivacyBridgeUnlockContextValue.refreshPrivateBalances}.
|
|
3728
|
+
* `preserveSessionOnError` skips clearing the AES session / hiding balances when
|
|
3729
|
+
* AES or onboarding errors are thrown (used for best-effort post-transfer refresh).
|
|
3730
|
+
*/
|
|
3731
|
+
type RefreshPrivateBalancesOptions = AesKeyProviderOptions & {
|
|
3732
|
+
preserveSessionOnError?: boolean;
|
|
3733
|
+
};
|
|
3717
3734
|
/** Wallet connection slice — connect/disconnect and address. */
|
|
3718
3735
|
interface PrivacyBridgeWalletContextValue {
|
|
3719
3736
|
isConnected: boolean;
|
|
@@ -3777,11 +3794,11 @@ interface PrivacyBridgeUnlockContextValue {
|
|
|
3777
3794
|
amount: string;
|
|
3778
3795
|
}>;
|
|
3779
3796
|
/** Low-level balance/key refresh primitive. App UI should not orchestrate unlock with this. */
|
|
3780
|
-
refreshPrivateBalances: (options?:
|
|
3797
|
+
refreshPrivateBalances: (options?: RefreshPrivateBalancesOptions) => Promise<boolean>;
|
|
3781
3798
|
/** Last contract-onboarding error produced by the AES provider. */
|
|
3782
3799
|
onboardingError: string | null;
|
|
3783
|
-
/** Last non-blocking onboarding
|
|
3784
|
-
|
|
3800
|
+
/** Last non-blocking onboarding warnings produced by restore/backup flows. */
|
|
3801
|
+
onboardingWarnings: OnboardModalWarnings;
|
|
3785
3802
|
/** Hides private balances and clears plaintext AES session state. */
|
|
3786
3803
|
lockPrivateBalances: () => void;
|
|
3787
3804
|
handleOnboard: () => Promise<string | null>;
|
|
@@ -4027,8 +4044,10 @@ interface OnboardModalProps {
|
|
|
4027
4044
|
onManualAesKeySubmit?: (aesKey: string, options: {
|
|
4028
4045
|
saveBackup: boolean;
|
|
4029
4046
|
}) => void | Promise<void>;
|
|
4030
|
-
/**
|
|
4031
|
-
|
|
4047
|
+
/** App-configured warning copy, one message per onboard screen */
|
|
4048
|
+
warnings?: OnboardModalWarnings;
|
|
4049
|
+
/** Runtime warnings from unlock/onboarding flows, one message per screen */
|
|
4050
|
+
runtimeWarnings?: OnboardModalWarnings;
|
|
4032
4051
|
/** Optional theme overrides for customizing the modal appearance */
|
|
4033
4052
|
theme?: OnboardModalTheme;
|
|
4034
4053
|
}
|
|
@@ -4212,27 +4231,22 @@ declare const defaultStyles: {
|
|
|
4212
4231
|
readonly saveOptionBody: {
|
|
4213
4232
|
readonly flex: 1;
|
|
4214
4233
|
readonly minWidth: 0;
|
|
4234
|
+
readonly display: "flex";
|
|
4235
|
+
readonly alignItems: "center";
|
|
4236
|
+
readonly minHeight: "32px";
|
|
4215
4237
|
};
|
|
4216
4238
|
readonly saveOptionTitleRow: {
|
|
4217
4239
|
readonly display: "flex";
|
|
4218
4240
|
readonly alignItems: "center";
|
|
4219
4241
|
readonly gap: "5px";
|
|
4220
|
-
readonly marginBottom: "2px";
|
|
4221
4242
|
};
|
|
4222
4243
|
readonly saveOptionTitle: {
|
|
4223
4244
|
readonly fontSize: "13px";
|
|
4224
4245
|
readonly fontWeight: 600;
|
|
4225
|
-
readonly lineHeight:
|
|
4246
|
+
readonly lineHeight: "14px";
|
|
4226
4247
|
readonly color: "#ffffff";
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
readonly fontSize: "11px";
|
|
4230
|
-
readonly lineHeight: 1.3;
|
|
4231
|
-
readonly color: "rgba(255, 255, 255, 0.55)";
|
|
4232
|
-
readonly margin: 0;
|
|
4233
|
-
readonly whiteSpace: "nowrap";
|
|
4234
|
-
readonly overflow: "hidden";
|
|
4235
|
-
readonly textOverflow: "ellipsis";
|
|
4248
|
+
readonly display: "inline-flex";
|
|
4249
|
+
readonly alignItems: "center";
|
|
4236
4250
|
};
|
|
4237
4251
|
readonly saveOptionSwitchTrack: {
|
|
4238
4252
|
readonly position: "relative";
|
|
@@ -4274,12 +4288,13 @@ declare const defaultStyles: {
|
|
|
4274
4288
|
readonly tooltipButton: {
|
|
4275
4289
|
readonly width: "14px";
|
|
4276
4290
|
readonly height: "14px";
|
|
4291
|
+
readonly boxSizing: "border-box";
|
|
4277
4292
|
readonly borderRadius: "50%";
|
|
4278
4293
|
readonly border: "1px solid rgba(255, 255, 255, 0.25)";
|
|
4279
4294
|
readonly backgroundColor: "rgba(255, 255, 255, 0.08)";
|
|
4280
4295
|
readonly color: "rgba(255, 255, 255, 0.8)";
|
|
4281
4296
|
readonly fontSize: "9px";
|
|
4282
|
-
readonly lineHeight:
|
|
4297
|
+
readonly lineHeight: "12px";
|
|
4283
4298
|
readonly padding: 0;
|
|
4284
4299
|
readonly cursor: "help";
|
|
4285
4300
|
readonly flexShrink: 0;
|
|
@@ -4603,7 +4618,7 @@ declare const usePrivacyBridgeModals: () => PrivacyBridgeModalsContextValue;
|
|
|
4603
4618
|
|
|
4604
4619
|
interface PrivateUnlockControllerOptions {
|
|
4605
4620
|
theme?: OnboardModalTheme;
|
|
4606
|
-
|
|
4621
|
+
warnings?: OnboardModalWarnings;
|
|
4607
4622
|
/** Called after a successful unlock (restore, onboarding, or manual key). */
|
|
4608
4623
|
onUnlocked?: () => void | Promise<void>;
|
|
4609
4624
|
/** Called when the user cancels backup-restore signing — modal is not opened. */
|
|
@@ -4737,4 +4752,4 @@ declare function muteChainUpdates(): void;
|
|
|
4737
4752
|
declare function unmuteChainUpdates(): void;
|
|
4738
4753
|
declare function isChainUpdatesMuted(): boolean;
|
|
4739
4754
|
|
|
4740
|
-
export { type AesKeyChainId, type AesKeyProviderOptions, BRIDGE_ABI, BRIDGE_ERC20_ABI, type BridgeData, type BridgeFees, type BridgeStatus, CHAIN_CONFIGS, CONTRACT_ADDRESSES, COTI_MAINNET_CHAIN_ID, COTI_MAINNET_RPC, COTI_PRICE_CONSUMER_ABI, COTI_TESTNET_CHAIN_ID$1 as COTI_TESTNET_CHAIN_ID, COTI_TESTNET_POD_INBOX, COTI_TESTNET_RPC, type ChainIndexPageUi, type ConnectorProviderSource, type CotiBridgeFeeQuote, CotiErrorCode, type CotiPluginConfig, CotiPluginError, DEFAULT_CHAIN_ID, DEFAULT_POD_BALANCE_STATE, DEFAULT_POD_EXPLORER_BASE_URL, type EIP1193Provider, ERC20_ABI, ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_RPC, type EncryptedAesBackup, type FeeEstimate, type GrantResult, LIMITS, type Logger, MINIMUM_PORTAL_IN_AMOUNTS, MULTIPLE_WALLETS_ERROR_SUBSTRING, type NetworkEnforcerResult, NetworkGuard, type NetworkGuardProps, ONBOARDING_STEPS, ONBOARD_MODAL_STYLE_KEYS, OnboardModal, type OnboardModalProps, type OnboardModalTheme, type OnboardingProgressCallback, type OnboardingServiceRequest, type OnboardingServices, type OnboardingStep, type OnboardingStepInfo, COTI_TESTNET_CHAIN_ID as POD_COTI_TESTNET_CHAIN_ID, POD_INBOX_ADDRESS, POD_PORTAL_ADMIN_ABI, POD_PRICE_ORACLE_ABI, POD_PTOKEN_ABI, SEPOLIA_CHAIN_ID as POD_SEPOLIA_CHAIN_ID, PRIVACY_PORTAL_ABI, PRIVATE_ERC20_TRANSFER_256_SIG, type PodBalanceState, type PodBalanceTrustState, type PodPortalFeeQuote, type PodPortalRequest, type PodPortalRequestStatus, type PodWithdrawPermit, type ChainConfig as PortalChainConfig, type PortalStrategy, type PrivacyBridgeContextType, type PrivacyBridgeModalsContextValue, type PrivacyBridgeNetworkContextValue, type PrivacyBridgePodContextValue, PrivacyBridgeProvider, type PrivacyBridgeProviderProps, type PrivacyBridgeSwapContextValue, type PrivacyBridgeTokensContextValue, type PrivacyBridgeUnlockContextValue, type PrivacyBridgeWalletContextValue, type PrivateUnlockControllerValue, PrivateUnlockProvider, type PrivateUnlockProviderOptions, type PrivateUnlockProviderProps, type ResolvedIndexPageUi, SEPOLIA_CHAIN_ID$1 as SEPOLIA_CHAIN_ID, SEPOLIA_RPC, SEPOLIA_RPC_FALLBACK, SUPPORTED_TOKENS, type SaveEncryptedAesBackupRequest, type SimulationResult, TOKEN_ABI, type TokenConfig, type UnlockStrategy, WALLET_CONNECT_FAILURE_EVENT, type WagmiConfigOptions, WagmiRainbowKitProvider, type WalletConnectFailureDetail, type WalletNetworkConfig, type WalletType, type WalletTypeInfo, addThousandsSeparators, buildPodExplorerRequestUrl, computeCotiFee, computeErc20Fee, configureCotiPlugin, cotiMainnet, cotiTestnet, estimateBridgeFee, estimateCotiBridgeGasFeeDisplay, estimatePodPortalFees, ethereumMainnet, executePodPortalTransaction, fetchBridgeFees, fetchPodBridgeData, fetchPodOracleTokenUsdPrice, fetchTokenUsdPrice, formatBalanceWithNotation, formatPodFeeDisplay, formatPortalFeeDisplay, formatTokenBalanceDisplay, getChainConfig, getChainIdConstants, getContractAddresses, getEip6963MetaMaskProvider, getEip6963RabbyProvider, getEthereumProvider, getExplorerBaseUrlForChain, getNetworkNameForChain, getPluginConfig, getPodGasPrice, getPodInboxAddress, getPodSdkConfig, getPrivateTokensForChain, getPublicTokensForChain, getRpcUrlForChain, getRpcUrlForChainId, getRpcUrlsForChain, getSepoliaGasPrice, getSnapRequestParams, getTokenSimulationMeta, getTokensForChain, getUnlockStrategyForChain, getWagmiConfig, getWalletNetworkConfigs, getWalletNetworkOptions, hasCotiErrorCode, isChainUpdatesMuted, isCotiPluginError, isMultipleWalletsError, isSnapInstallEnabled, loadPodRequests, logger, mobileZerionWallet, muteChainUpdates, defaultStyles as onboardModalDefaultStyles, podRequestsStorageKey, quoteCotiBridgeFees, quotePodPortalTransactionFees, quotePortalFeeOnly, requireChainConfig, resolveConnectedProvider, resolveIndexPageUi, resolveMetaMaskInjectedTarget, resolvePodRequestStatus, resolvePodTxGasPrice, resolvePrivateTokenContractAddress, resolvePrivateTokenTransferTarget, resolveRabbyInjectedTarget, savePodRequests, sepolia, setDebugLogging, signPodWithdrawPermit, simulateFeeOnChain, simulatePodPortalFee, truncateDecimalValue, unmuteChainUpdates, useBalanceUpdater, useBridgeData, useBridgeStatus, useMetamask, useNetworkEnforcer, usePrivacyBridgeContext, usePrivacyBridgeModals, usePrivacyBridgeNetwork, usePrivacyBridgePod, usePrivacyBridgeSwap, usePrivacyBridgeTokens, usePrivacyBridgeUnlock, usePrivacyBridgeWallet, usePrivateTokenBalance, usePrivateUnlock, useWalletType, wagmiConfig };
|
|
4755
|
+
export { type AesKeyChainId, type AesKeyProviderOptions, BRIDGE_ABI, BRIDGE_ERC20_ABI, type BridgeData, type BridgeFees, type BridgeStatus, CHAIN_CONFIGS, CONTRACT_ADDRESSES, COTI_MAINNET_CHAIN_ID, COTI_MAINNET_RPC, COTI_PRICE_CONSUMER_ABI, COTI_TESTNET_CHAIN_ID$1 as COTI_TESTNET_CHAIN_ID, COTI_TESTNET_POD_INBOX, COTI_TESTNET_RPC, type ChainIndexPageUi, type ConnectorProviderSource, type CotiBridgeFeeQuote, CotiErrorCode, type CotiPluginConfig, CotiPluginError, DEFAULT_CHAIN_ID, DEFAULT_POD_BALANCE_STATE, DEFAULT_POD_EXPLORER_BASE_URL, type EIP1193Provider, ERC20_ABI, ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_RPC, type EncryptedAesBackup, type FeeEstimate, type GrantResult, LIMITS, type Logger, MINIMUM_PORTAL_IN_AMOUNTS, MULTIPLE_WALLETS_ERROR_SUBSTRING, type NetworkEnforcerResult, NetworkGuard, type NetworkGuardProps, ONBOARDING_STEPS, ONBOARD_MODAL_STYLE_KEYS, OnboardModal, type OnboardModalPage, type OnboardModalProps, type OnboardModalTheme, type OnboardModalWarnings, type OnboardingProgressCallback, type OnboardingServiceRequest, type OnboardingServices, type OnboardingStep, type OnboardingStepInfo, COTI_TESTNET_CHAIN_ID as POD_COTI_TESTNET_CHAIN_ID, POD_INBOX_ADDRESS, POD_PORTAL_ADMIN_ABI, POD_PRICE_ORACLE_ABI, POD_PTOKEN_ABI, SEPOLIA_CHAIN_ID as POD_SEPOLIA_CHAIN_ID, PRIVACY_PORTAL_ABI, PRIVATE_ERC20_TRANSFER_256_SIG, type PodBalanceState, type PodBalanceTrustState, type PodPortalFeeQuote, type PodPortalRequest, type PodPortalRequestStatus, type PodWithdrawPermit, type ChainConfig as PortalChainConfig, type PortalStrategy, type PrivacyBridgeContextType, type PrivacyBridgeModalsContextValue, type PrivacyBridgeNetworkContextValue, type PrivacyBridgePodContextValue, PrivacyBridgeProvider, type PrivacyBridgeProviderProps, type PrivacyBridgeSwapContextValue, type PrivacyBridgeTokensContextValue, type PrivacyBridgeUnlockContextValue, type PrivacyBridgeWalletContextValue, type PrivateUnlockControllerValue, PrivateUnlockProvider, type PrivateUnlockProviderOptions, type PrivateUnlockProviderProps, type RefreshPrivateBalancesOptions, type ResolvedIndexPageUi, SEPOLIA_CHAIN_ID$1 as SEPOLIA_CHAIN_ID, SEPOLIA_RPC, SEPOLIA_RPC_FALLBACK, SUPPORTED_TOKENS, type SaveEncryptedAesBackupRequest, type SimulationResult, TOKEN_ABI, type TokenConfig, type UnlockStrategy, WALLET_CONNECT_FAILURE_EVENT, type WagmiConfigOptions, WagmiRainbowKitProvider, type WalletConnectFailureDetail, type WalletNetworkConfig, type WalletType, type WalletTypeInfo, addThousandsSeparators, buildPodExplorerRequestUrl, computeCotiFee, computeErc20Fee, configureCotiPlugin, cotiMainnet, cotiTestnet, estimateBridgeFee, estimateCotiBridgeGasFeeDisplay, estimatePodPortalFees, ethereumMainnet, executePodPortalTransaction, fetchBridgeFees, fetchPodBridgeData, fetchPodOracleTokenUsdPrice, fetchTokenUsdPrice, formatBalanceWithNotation, formatPodFeeDisplay, formatPortalFeeDisplay, formatTokenBalanceDisplay, getChainConfig, getChainIdConstants, getContractAddresses, getEip6963MetaMaskProvider, getEip6963RabbyProvider, getEthereumProvider, getExplorerBaseUrlForChain, getNetworkNameForChain, getPluginConfig, getPodGasPrice, getPodInboxAddress, getPodSdkConfig, getPrivateTokensForChain, getPublicTokensForChain, getRpcUrlForChain, getRpcUrlForChainId, getRpcUrlsForChain, getSepoliaGasPrice, getSnapRequestParams, getTokenSimulationMeta, getTokensForChain, getUnlockStrategyForChain, getWagmiConfig, getWalletNetworkConfigs, getWalletNetworkOptions, hasCotiErrorCode, isChainUpdatesMuted, isCotiPluginError, isMultipleWalletsError, isSnapInstallEnabled, loadPodRequests, logger, mobileZerionWallet, muteChainUpdates, defaultStyles as onboardModalDefaultStyles, podRequestsStorageKey, quoteCotiBridgeFees, quotePodPortalTransactionFees, quotePortalFeeOnly, requireChainConfig, resolveConnectedProvider, resolveIndexPageUi, resolveMetaMaskInjectedTarget, resolvePodRequestStatus, resolvePodTxGasPrice, resolvePrivateTokenContractAddress, resolvePrivateTokenTransferTarget, resolveRabbyInjectedTarget, savePodRequests, sepolia, setDebugLogging, signPodWithdrawPermit, simulateFeeOnChain, simulatePodPortalFee, truncateDecimalValue, unmuteChainUpdates, useBalanceUpdater, useBridgeData, useBridgeStatus, useMetamask, useNetworkEnforcer, usePrivacyBridgeContext, usePrivacyBridgeModals, usePrivacyBridgeNetwork, usePrivacyBridgePod, usePrivacyBridgeSwap, usePrivacyBridgeTokens, usePrivacyBridgeUnlock, usePrivacyBridgeWallet, usePrivateTokenBalance, usePrivateUnlock, useWalletType, wagmiConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -259,6 +259,12 @@ interface CotiPluginConfig {
|
|
|
259
259
|
* the same wallet can skip Snap re-fetch; use true for stricter shared-browser security.
|
|
260
260
|
*/
|
|
261
261
|
clearSessionKeyOnWagmiDisconnect?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* When true, private token transfers await `refreshPrivateBalances` before
|
|
264
|
+
* returning (confirmation UI stays open until balances decrypt). Default false
|
|
265
|
+
* refreshes in the background so success can show immediately.
|
|
266
|
+
*/
|
|
267
|
+
waitForBalanceRefreshAfterTransfer?: boolean;
|
|
262
268
|
/** Optional onboarding service hooks for grant and encrypted AES backup flows. */
|
|
263
269
|
onboardingServices?: OnboardingServices;
|
|
264
270
|
/**
|
|
@@ -3664,6 +3670,9 @@ interface WalletTypeInfo {
|
|
|
3664
3670
|
*/
|
|
3665
3671
|
declare function useWalletType(): WalletTypeInfo;
|
|
3666
3672
|
|
|
3673
|
+
type OnboardModalPage = 'intro' | 'progress' | 'success' | 'error';
|
|
3674
|
+
type OnboardModalWarnings = Partial<Record<OnboardModalPage, string>>;
|
|
3675
|
+
|
|
3667
3676
|
/**
|
|
3668
3677
|
* Onboarding step identifiers matching the contract onboarding flow (steps 3-9).
|
|
3669
3678
|
*/
|
|
@@ -3714,6 +3723,14 @@ interface AesKeyProviderOptions {
|
|
|
3714
3723
|
prefetchedEncryptedBackup?: EncryptedAesBackup | null;
|
|
3715
3724
|
}
|
|
3716
3725
|
|
|
3726
|
+
/**
|
|
3727
|
+
* Options for {@link PrivacyBridgeUnlockContextValue.refreshPrivateBalances}.
|
|
3728
|
+
* `preserveSessionOnError` skips clearing the AES session / hiding balances when
|
|
3729
|
+
* AES or onboarding errors are thrown (used for best-effort post-transfer refresh).
|
|
3730
|
+
*/
|
|
3731
|
+
type RefreshPrivateBalancesOptions = AesKeyProviderOptions & {
|
|
3732
|
+
preserveSessionOnError?: boolean;
|
|
3733
|
+
};
|
|
3717
3734
|
/** Wallet connection slice — connect/disconnect and address. */
|
|
3718
3735
|
interface PrivacyBridgeWalletContextValue {
|
|
3719
3736
|
isConnected: boolean;
|
|
@@ -3777,11 +3794,11 @@ interface PrivacyBridgeUnlockContextValue {
|
|
|
3777
3794
|
amount: string;
|
|
3778
3795
|
}>;
|
|
3779
3796
|
/** Low-level balance/key refresh primitive. App UI should not orchestrate unlock with this. */
|
|
3780
|
-
refreshPrivateBalances: (options?:
|
|
3797
|
+
refreshPrivateBalances: (options?: RefreshPrivateBalancesOptions) => Promise<boolean>;
|
|
3781
3798
|
/** Last contract-onboarding error produced by the AES provider. */
|
|
3782
3799
|
onboardingError: string | null;
|
|
3783
|
-
/** Last non-blocking onboarding
|
|
3784
|
-
|
|
3800
|
+
/** Last non-blocking onboarding warnings produced by restore/backup flows. */
|
|
3801
|
+
onboardingWarnings: OnboardModalWarnings;
|
|
3785
3802
|
/** Hides private balances and clears plaintext AES session state. */
|
|
3786
3803
|
lockPrivateBalances: () => void;
|
|
3787
3804
|
handleOnboard: () => Promise<string | null>;
|
|
@@ -4027,8 +4044,10 @@ interface OnboardModalProps {
|
|
|
4027
4044
|
onManualAesKeySubmit?: (aesKey: string, options: {
|
|
4028
4045
|
saveBackup: boolean;
|
|
4029
4046
|
}) => void | Promise<void>;
|
|
4030
|
-
/**
|
|
4031
|
-
|
|
4047
|
+
/** App-configured warning copy, one message per onboard screen */
|
|
4048
|
+
warnings?: OnboardModalWarnings;
|
|
4049
|
+
/** Runtime warnings from unlock/onboarding flows, one message per screen */
|
|
4050
|
+
runtimeWarnings?: OnboardModalWarnings;
|
|
4032
4051
|
/** Optional theme overrides for customizing the modal appearance */
|
|
4033
4052
|
theme?: OnboardModalTheme;
|
|
4034
4053
|
}
|
|
@@ -4212,27 +4231,22 @@ declare const defaultStyles: {
|
|
|
4212
4231
|
readonly saveOptionBody: {
|
|
4213
4232
|
readonly flex: 1;
|
|
4214
4233
|
readonly minWidth: 0;
|
|
4234
|
+
readonly display: "flex";
|
|
4235
|
+
readonly alignItems: "center";
|
|
4236
|
+
readonly minHeight: "32px";
|
|
4215
4237
|
};
|
|
4216
4238
|
readonly saveOptionTitleRow: {
|
|
4217
4239
|
readonly display: "flex";
|
|
4218
4240
|
readonly alignItems: "center";
|
|
4219
4241
|
readonly gap: "5px";
|
|
4220
|
-
readonly marginBottom: "2px";
|
|
4221
4242
|
};
|
|
4222
4243
|
readonly saveOptionTitle: {
|
|
4223
4244
|
readonly fontSize: "13px";
|
|
4224
4245
|
readonly fontWeight: 600;
|
|
4225
|
-
readonly lineHeight:
|
|
4246
|
+
readonly lineHeight: "14px";
|
|
4226
4247
|
readonly color: "#ffffff";
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
readonly fontSize: "11px";
|
|
4230
|
-
readonly lineHeight: 1.3;
|
|
4231
|
-
readonly color: "rgba(255, 255, 255, 0.55)";
|
|
4232
|
-
readonly margin: 0;
|
|
4233
|
-
readonly whiteSpace: "nowrap";
|
|
4234
|
-
readonly overflow: "hidden";
|
|
4235
|
-
readonly textOverflow: "ellipsis";
|
|
4248
|
+
readonly display: "inline-flex";
|
|
4249
|
+
readonly alignItems: "center";
|
|
4236
4250
|
};
|
|
4237
4251
|
readonly saveOptionSwitchTrack: {
|
|
4238
4252
|
readonly position: "relative";
|
|
@@ -4274,12 +4288,13 @@ declare const defaultStyles: {
|
|
|
4274
4288
|
readonly tooltipButton: {
|
|
4275
4289
|
readonly width: "14px";
|
|
4276
4290
|
readonly height: "14px";
|
|
4291
|
+
readonly boxSizing: "border-box";
|
|
4277
4292
|
readonly borderRadius: "50%";
|
|
4278
4293
|
readonly border: "1px solid rgba(255, 255, 255, 0.25)";
|
|
4279
4294
|
readonly backgroundColor: "rgba(255, 255, 255, 0.08)";
|
|
4280
4295
|
readonly color: "rgba(255, 255, 255, 0.8)";
|
|
4281
4296
|
readonly fontSize: "9px";
|
|
4282
|
-
readonly lineHeight:
|
|
4297
|
+
readonly lineHeight: "12px";
|
|
4283
4298
|
readonly padding: 0;
|
|
4284
4299
|
readonly cursor: "help";
|
|
4285
4300
|
readonly flexShrink: 0;
|
|
@@ -4603,7 +4618,7 @@ declare const usePrivacyBridgeModals: () => PrivacyBridgeModalsContextValue;
|
|
|
4603
4618
|
|
|
4604
4619
|
interface PrivateUnlockControllerOptions {
|
|
4605
4620
|
theme?: OnboardModalTheme;
|
|
4606
|
-
|
|
4621
|
+
warnings?: OnboardModalWarnings;
|
|
4607
4622
|
/** Called after a successful unlock (restore, onboarding, or manual key). */
|
|
4608
4623
|
onUnlocked?: () => void | Promise<void>;
|
|
4609
4624
|
/** Called when the user cancels backup-restore signing — modal is not opened. */
|
|
@@ -4737,4 +4752,4 @@ declare function muteChainUpdates(): void;
|
|
|
4737
4752
|
declare function unmuteChainUpdates(): void;
|
|
4738
4753
|
declare function isChainUpdatesMuted(): boolean;
|
|
4739
4754
|
|
|
4740
|
-
export { type AesKeyChainId, type AesKeyProviderOptions, BRIDGE_ABI, BRIDGE_ERC20_ABI, type BridgeData, type BridgeFees, type BridgeStatus, CHAIN_CONFIGS, CONTRACT_ADDRESSES, COTI_MAINNET_CHAIN_ID, COTI_MAINNET_RPC, COTI_PRICE_CONSUMER_ABI, COTI_TESTNET_CHAIN_ID$1 as COTI_TESTNET_CHAIN_ID, COTI_TESTNET_POD_INBOX, COTI_TESTNET_RPC, type ChainIndexPageUi, type ConnectorProviderSource, type CotiBridgeFeeQuote, CotiErrorCode, type CotiPluginConfig, CotiPluginError, DEFAULT_CHAIN_ID, DEFAULT_POD_BALANCE_STATE, DEFAULT_POD_EXPLORER_BASE_URL, type EIP1193Provider, ERC20_ABI, ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_RPC, type EncryptedAesBackup, type FeeEstimate, type GrantResult, LIMITS, type Logger, MINIMUM_PORTAL_IN_AMOUNTS, MULTIPLE_WALLETS_ERROR_SUBSTRING, type NetworkEnforcerResult, NetworkGuard, type NetworkGuardProps, ONBOARDING_STEPS, ONBOARD_MODAL_STYLE_KEYS, OnboardModal, type OnboardModalProps, type OnboardModalTheme, type OnboardingProgressCallback, type OnboardingServiceRequest, type OnboardingServices, type OnboardingStep, type OnboardingStepInfo, COTI_TESTNET_CHAIN_ID as POD_COTI_TESTNET_CHAIN_ID, POD_INBOX_ADDRESS, POD_PORTAL_ADMIN_ABI, POD_PRICE_ORACLE_ABI, POD_PTOKEN_ABI, SEPOLIA_CHAIN_ID as POD_SEPOLIA_CHAIN_ID, PRIVACY_PORTAL_ABI, PRIVATE_ERC20_TRANSFER_256_SIG, type PodBalanceState, type PodBalanceTrustState, type PodPortalFeeQuote, type PodPortalRequest, type PodPortalRequestStatus, type PodWithdrawPermit, type ChainConfig as PortalChainConfig, type PortalStrategy, type PrivacyBridgeContextType, type PrivacyBridgeModalsContextValue, type PrivacyBridgeNetworkContextValue, type PrivacyBridgePodContextValue, PrivacyBridgeProvider, type PrivacyBridgeProviderProps, type PrivacyBridgeSwapContextValue, type PrivacyBridgeTokensContextValue, type PrivacyBridgeUnlockContextValue, type PrivacyBridgeWalletContextValue, type PrivateUnlockControllerValue, PrivateUnlockProvider, type PrivateUnlockProviderOptions, type PrivateUnlockProviderProps, type ResolvedIndexPageUi, SEPOLIA_CHAIN_ID$1 as SEPOLIA_CHAIN_ID, SEPOLIA_RPC, SEPOLIA_RPC_FALLBACK, SUPPORTED_TOKENS, type SaveEncryptedAesBackupRequest, type SimulationResult, TOKEN_ABI, type TokenConfig, type UnlockStrategy, WALLET_CONNECT_FAILURE_EVENT, type WagmiConfigOptions, WagmiRainbowKitProvider, type WalletConnectFailureDetail, type WalletNetworkConfig, type WalletType, type WalletTypeInfo, addThousandsSeparators, buildPodExplorerRequestUrl, computeCotiFee, computeErc20Fee, configureCotiPlugin, cotiMainnet, cotiTestnet, estimateBridgeFee, estimateCotiBridgeGasFeeDisplay, estimatePodPortalFees, ethereumMainnet, executePodPortalTransaction, fetchBridgeFees, fetchPodBridgeData, fetchPodOracleTokenUsdPrice, fetchTokenUsdPrice, formatBalanceWithNotation, formatPodFeeDisplay, formatPortalFeeDisplay, formatTokenBalanceDisplay, getChainConfig, getChainIdConstants, getContractAddresses, getEip6963MetaMaskProvider, getEip6963RabbyProvider, getEthereumProvider, getExplorerBaseUrlForChain, getNetworkNameForChain, getPluginConfig, getPodGasPrice, getPodInboxAddress, getPodSdkConfig, getPrivateTokensForChain, getPublicTokensForChain, getRpcUrlForChain, getRpcUrlForChainId, getRpcUrlsForChain, getSepoliaGasPrice, getSnapRequestParams, getTokenSimulationMeta, getTokensForChain, getUnlockStrategyForChain, getWagmiConfig, getWalletNetworkConfigs, getWalletNetworkOptions, hasCotiErrorCode, isChainUpdatesMuted, isCotiPluginError, isMultipleWalletsError, isSnapInstallEnabled, loadPodRequests, logger, mobileZerionWallet, muteChainUpdates, defaultStyles as onboardModalDefaultStyles, podRequestsStorageKey, quoteCotiBridgeFees, quotePodPortalTransactionFees, quotePortalFeeOnly, requireChainConfig, resolveConnectedProvider, resolveIndexPageUi, resolveMetaMaskInjectedTarget, resolvePodRequestStatus, resolvePodTxGasPrice, resolvePrivateTokenContractAddress, resolvePrivateTokenTransferTarget, resolveRabbyInjectedTarget, savePodRequests, sepolia, setDebugLogging, signPodWithdrawPermit, simulateFeeOnChain, simulatePodPortalFee, truncateDecimalValue, unmuteChainUpdates, useBalanceUpdater, useBridgeData, useBridgeStatus, useMetamask, useNetworkEnforcer, usePrivacyBridgeContext, usePrivacyBridgeModals, usePrivacyBridgeNetwork, usePrivacyBridgePod, usePrivacyBridgeSwap, usePrivacyBridgeTokens, usePrivacyBridgeUnlock, usePrivacyBridgeWallet, usePrivateTokenBalance, usePrivateUnlock, useWalletType, wagmiConfig };
|
|
4755
|
+
export { type AesKeyChainId, type AesKeyProviderOptions, BRIDGE_ABI, BRIDGE_ERC20_ABI, type BridgeData, type BridgeFees, type BridgeStatus, CHAIN_CONFIGS, CONTRACT_ADDRESSES, COTI_MAINNET_CHAIN_ID, COTI_MAINNET_RPC, COTI_PRICE_CONSUMER_ABI, COTI_TESTNET_CHAIN_ID$1 as COTI_TESTNET_CHAIN_ID, COTI_TESTNET_POD_INBOX, COTI_TESTNET_RPC, type ChainIndexPageUi, type ConnectorProviderSource, type CotiBridgeFeeQuote, CotiErrorCode, type CotiPluginConfig, CotiPluginError, DEFAULT_CHAIN_ID, DEFAULT_POD_BALANCE_STATE, DEFAULT_POD_EXPLORER_BASE_URL, type EIP1193Provider, ERC20_ABI, ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_RPC, type EncryptedAesBackup, type FeeEstimate, type GrantResult, LIMITS, type Logger, MINIMUM_PORTAL_IN_AMOUNTS, MULTIPLE_WALLETS_ERROR_SUBSTRING, type NetworkEnforcerResult, NetworkGuard, type NetworkGuardProps, ONBOARDING_STEPS, ONBOARD_MODAL_STYLE_KEYS, OnboardModal, type OnboardModalPage, type OnboardModalProps, type OnboardModalTheme, type OnboardModalWarnings, type OnboardingProgressCallback, type OnboardingServiceRequest, type OnboardingServices, type OnboardingStep, type OnboardingStepInfo, COTI_TESTNET_CHAIN_ID as POD_COTI_TESTNET_CHAIN_ID, POD_INBOX_ADDRESS, POD_PORTAL_ADMIN_ABI, POD_PRICE_ORACLE_ABI, POD_PTOKEN_ABI, SEPOLIA_CHAIN_ID as POD_SEPOLIA_CHAIN_ID, PRIVACY_PORTAL_ABI, PRIVATE_ERC20_TRANSFER_256_SIG, type PodBalanceState, type PodBalanceTrustState, type PodPortalFeeQuote, type PodPortalRequest, type PodPortalRequestStatus, type PodWithdrawPermit, type ChainConfig as PortalChainConfig, type PortalStrategy, type PrivacyBridgeContextType, type PrivacyBridgeModalsContextValue, type PrivacyBridgeNetworkContextValue, type PrivacyBridgePodContextValue, PrivacyBridgeProvider, type PrivacyBridgeProviderProps, type PrivacyBridgeSwapContextValue, type PrivacyBridgeTokensContextValue, type PrivacyBridgeUnlockContextValue, type PrivacyBridgeWalletContextValue, type PrivateUnlockControllerValue, PrivateUnlockProvider, type PrivateUnlockProviderOptions, type PrivateUnlockProviderProps, type RefreshPrivateBalancesOptions, type ResolvedIndexPageUi, SEPOLIA_CHAIN_ID$1 as SEPOLIA_CHAIN_ID, SEPOLIA_RPC, SEPOLIA_RPC_FALLBACK, SUPPORTED_TOKENS, type SaveEncryptedAesBackupRequest, type SimulationResult, TOKEN_ABI, type TokenConfig, type UnlockStrategy, WALLET_CONNECT_FAILURE_EVENT, type WagmiConfigOptions, WagmiRainbowKitProvider, type WalletConnectFailureDetail, type WalletNetworkConfig, type WalletType, type WalletTypeInfo, addThousandsSeparators, buildPodExplorerRequestUrl, computeCotiFee, computeErc20Fee, configureCotiPlugin, cotiMainnet, cotiTestnet, estimateBridgeFee, estimateCotiBridgeGasFeeDisplay, estimatePodPortalFees, ethereumMainnet, executePodPortalTransaction, fetchBridgeFees, fetchPodBridgeData, fetchPodOracleTokenUsdPrice, fetchTokenUsdPrice, formatBalanceWithNotation, formatPodFeeDisplay, formatPortalFeeDisplay, formatTokenBalanceDisplay, getChainConfig, getChainIdConstants, getContractAddresses, getEip6963MetaMaskProvider, getEip6963RabbyProvider, getEthereumProvider, getExplorerBaseUrlForChain, getNetworkNameForChain, getPluginConfig, getPodGasPrice, getPodInboxAddress, getPodSdkConfig, getPrivateTokensForChain, getPublicTokensForChain, getRpcUrlForChain, getRpcUrlForChainId, getRpcUrlsForChain, getSepoliaGasPrice, getSnapRequestParams, getTokenSimulationMeta, getTokensForChain, getUnlockStrategyForChain, getWagmiConfig, getWalletNetworkConfigs, getWalletNetworkOptions, hasCotiErrorCode, isChainUpdatesMuted, isCotiPluginError, isMultipleWalletsError, isSnapInstallEnabled, loadPodRequests, logger, mobileZerionWallet, muteChainUpdates, defaultStyles as onboardModalDefaultStyles, podRequestsStorageKey, quoteCotiBridgeFees, quotePodPortalTransactionFees, quotePortalFeeOnly, requireChainConfig, resolveConnectedProvider, resolveIndexPageUi, resolveMetaMaskInjectedTarget, resolvePodRequestStatus, resolvePodTxGasPrice, resolvePrivateTokenContractAddress, resolvePrivateTokenTransferTarget, resolveRabbyInjectedTarget, savePodRequests, sepolia, setDebugLogging, signPodWithdrawPermit, simulateFeeOnChain, simulatePodPortalFee, truncateDecimalValue, unmuteChainUpdates, useBalanceUpdater, useBridgeData, useBridgeStatus, useMetamask, useNetworkEnforcer, usePrivacyBridgeContext, usePrivacyBridgeModals, usePrivacyBridgeNetwork, usePrivacyBridgePod, usePrivacyBridgeSwap, usePrivacyBridgeTokens, usePrivacyBridgeUnlock, usePrivacyBridgeWallet, usePrivateTokenBalance, usePrivateUnlock, useWalletType, wagmiConfig };
|