0xtrails 0.16.1 → 0.17.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/README.md +488 -3
- package/dist/BluvoExchangeSelection.lazy-D6ynQVSb.js +1 -0
- package/dist/BluvoOnrampFlow.lazy-BcDqhGLi.js +143 -0
- package/dist/ConnectWalletCard-BkbHCcWi.js +26 -0
- package/dist/actionBuilder-CAS2u5wu.js +2 -0
- package/dist/actions/index.d.ts +7 -23
- package/dist/actions/index.js +1 -37
- package/dist/contractConstants-CvJrYK9v.js +1 -0
- package/dist/defineProperty-BbfpZ9Tg.js +1 -0
- package/dist/edge-DmNcuJar.d.ts +121 -0
- package/dist/edge-L_Lk1K6j.js +1 -0
- package/dist/hooks/index.d.ts +6 -38
- package/dist/hooks/index.js +1 -67
- package/dist/hydrate/index.d.ts +196 -8
- package/dist/hydrate/index.js +1 -19
- package/dist/hydrate-QyWqQfec.js +1 -0
- package/dist/iife/trails.min.js +7324 -0
- package/dist/index-CMdwQmYL.d.ts +1044 -0
- package/dist/index.d.ts +1023 -114
- package/dist/index.js +1 -317
- package/dist/multicall-BCUHt_9t.d.ts +148 -0
- package/dist/offlineRecovery-BfgccnFf.d.ts +1232 -0
- package/dist/plugins/edge.d.ts +4 -0
- package/dist/plugins/edge.js +1 -0
- package/dist/quoteError-CmTH5Qm2.d.ts +24 -0
- package/dist/src-Cy3oxYgV.js +94 -0
- package/dist/sushiswapV3-D3h41LNZ.d.ts +723 -0
- package/dist/tokenTypes-D812t5L9.d.ts +31 -0
- package/dist/types-BK0WkVnx.d.ts +2161 -0
- package/dist/useViewManager-BeUH_k1s.d.ts +1224 -0
- package/dist/{actions/utils.d.ts → utils-KPnWBA9x.d.ts} +77 -52
- package/dist/widget/connect-showcase.d.ts +8 -0
- package/dist/widget/connect-showcase.js +1 -0
- package/dist/widget/index.d.ts +5 -21
- package/dist/widget/index.js +1 -33
- package/package.json +42 -42
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/defineProperty.js +0 -12
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/toPrimitive.js +0 -14
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/toPropertyKey.js +0 -9
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/typeof.js +0 -11
- package/dist/abi.d.ts +0 -37
- package/dist/abi.d.ts.map +0 -1
- package/dist/abis/erc20.d.ts +0 -19
- package/dist/abis/erc20.d.ts.map +0 -1
- package/dist/abis/requireUtils.d.ts +0 -134
- package/dist/abis/requireUtils.d.ts.map +0 -1
- package/dist/abis/requireUtils.js +0 -168
- package/dist/abis/trailsHydrate.d.ts +0 -7
- package/dist/abis/trailsHydrate.d.ts.map +0 -1
- package/dist/abis/trailsRouter.d.ts +0 -30
- package/dist/abis/trailsRouter.d.ts.map +0 -1
- package/dist/abis/trailsRouter.js +0 -66
- package/dist/abis/trailsSweep.d.ts +0 -7
- package/dist/abis/trailsSweep.d.ts.map +0 -1
- package/dist/abortController.d.ts +0 -8
- package/dist/abortController.d.ts.map +0 -1
- package/dist/abortController.js +0 -23
- package/dist/actions/actionBuilder.d.ts +0 -424
- package/dist/actions/actionBuilder.d.ts.map +0 -1
- package/dist/actions/actionBuilder.js +0 -173
- package/dist/actions/constants.d.ts +0 -1809
- package/dist/actions/constants.d.ts.map +0 -1
- package/dist/actions/constants.js +0 -37
- package/dist/actions/custom-integrations/sushiswapV3/addresses.d.ts +0 -4
- package/dist/actions/custom-integrations/sushiswapV3/addresses.d.ts.map +0 -1
- package/dist/actions/custom-integrations/sushiswapV3/addresses.js +0 -33
- package/dist/actions/custom-integrations/sushiswapV3/calldata.d.ts +0 -4
- package/dist/actions/custom-integrations/sushiswapV3/calldata.d.ts.map +0 -1
- package/dist/actions/custom-integrations/sushiswapV3/calldata.js +0 -124
- package/dist/actions/custom-integrations/sushiswapV3/calls.d.ts +0 -28
- package/dist/actions/custom-integrations/sushiswapV3/calls.d.ts.map +0 -1
- package/dist/actions/custom-integrations/sushiswapV3/calls.js +0 -27
- package/dist/actions/custom-integrations/sushiswapV3/helpers.d.ts +0 -15
- package/dist/actions/custom-integrations/sushiswapV3/helpers.d.ts.map +0 -1
- package/dist/actions/custom-integrations/sushiswapV3/helpers.js +0 -27
- package/dist/actions/custom-integrations/sushiswapV3/sushiswapV3.d.ts +0 -9
- package/dist/actions/custom-integrations/sushiswapV3/sushiswapV3.d.ts.map +0 -1
- package/dist/actions/custom-integrations/sushiswapV3/sushiswapV3.js +0 -246
- package/dist/actions/custom-integrations/sushiswapV3/types.d.ts +0 -95
- package/dist/actions/custom-integrations/sushiswapV3/types.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/addresses.d.ts +0 -4
- package/dist/actions/custom-integrations/uniswapV3/addresses.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/addresses.js +0 -33
- package/dist/actions/custom-integrations/uniswapV3/calldata.d.ts +0 -4
- package/dist/actions/custom-integrations/uniswapV3/calldata.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/calldata.js +0 -190
- package/dist/actions/custom-integrations/uniswapV3/calls.d.ts +0 -50
- package/dist/actions/custom-integrations/uniswapV3/calls.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/calls.js +0 -27
- package/dist/actions/custom-integrations/uniswapV3/helpers.d.ts +0 -23
- package/dist/actions/custom-integrations/uniswapV3/helpers.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/helpers.js +0 -27
- package/dist/actions/custom-integrations/uniswapV3/types.d.ts +0 -90
- package/dist/actions/custom-integrations/uniswapV3/types.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/uniswapV3.d.ts +0 -9
- package/dist/actions/custom-integrations/uniswapV3/uniswapV3.d.ts.map +0 -1
- package/dist/actions/custom-integrations/uniswapV3/uniswapV3.js +0 -244
- package/dist/actions/destinationCalls.d.ts +0 -17
- package/dist/actions/destinationCalls.d.ts.map +0 -1
- package/dist/actions/destinationCalls.js +0 -43
- package/dist/actions/dynamic.d.ts +0 -97
- package/dist/actions/dynamic.d.ts.map +0 -1
- package/dist/actions/dynamic.js +0 -27
- package/dist/actions/hooks/useEarnBalances.d.ts +0 -53
- package/dist/actions/hooks/useEarnBalances.d.ts.map +0 -1
- package/dist/actions/hooks/useEarnBalances.js +0 -37
- package/dist/actions/hooks/useEarnMarkets.d.ts +0 -29
- package/dist/actions/hooks/useEarnMarkets.d.ts.map +0 -1
- package/dist/actions/hooks/useEarnMarkets.js +0 -30
- package/dist/actions/hooks/useEarnProviders.d.ts +0 -18
- package/dist/actions/hooks/useEarnProviders.d.ts.map +0 -1
- package/dist/actions/hooks/useEarnProviders.js +0 -25
- package/dist/actions/hooks/useResolveActions.d.ts +0 -19
- package/dist/actions/hooks/useResolveActions.d.ts.map +0 -1
- package/dist/actions/hooks/useResolveActions.js +0 -56
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/resolveActions.d.ts +0 -13
- package/dist/actions/resolveActions.d.ts.map +0 -1
- package/dist/actions/resolveActions.js +0 -267
- package/dist/actions/resolvers.d.ts +0 -29
- package/dist/actions/resolvers.d.ts.map +0 -1
- package/dist/actions/resolvers.js +0 -161
- package/dist/actions/types/earn.d.ts +0 -51
- package/dist/actions/types/earn.d.ts.map +0 -1
- package/dist/actions/types.d.ts +0 -319
- package/dist/actions/types.d.ts.map +0 -1
- package/dist/actions/types.js +0 -24
- package/dist/actions/utils.d.ts.map +0 -1
- package/dist/actions/utils.js +0 -203
- package/dist/adapters/evmAdapter.d.ts +0 -10
- package/dist/adapters/evmAdapter.d.ts.map +0 -1
- package/dist/adapters/evmAdapter.js +0 -28
- package/dist/analytics/hooks/useWidgetAnalytics.d.ts +0 -8
- package/dist/analytics/hooks/useWidgetAnalytics.d.ts.map +0 -1
- package/dist/analytics/hooks/useWidgetAnalytics.js +0 -41
- package/dist/analytics.d.ts +0 -715
- package/dist/analytics.d.ts.map +0 -1
- package/dist/analytics.js +0 -881
- package/dist/chainRegistry.d.ts +0 -6
- package/dist/chainRegistry.d.ts.map +0 -1
- package/dist/chainRegistry.js +0 -47
- package/dist/chainResolution.d.ts +0 -6
- package/dist/chainResolution.d.ts.map +0 -1
- package/dist/chainResolution.js +0 -53
- package/dist/chainRpcClient.d.ts +0 -8
- package/dist/chainRpcClient.d.ts.map +0 -1
- package/dist/chainRpcClient.js +0 -67
- package/dist/chainSwitch.d.ts +0 -7
- package/dist/chainSwitch.d.ts.map +0 -1
- package/dist/chainSwitch.js +0 -66
- package/dist/chains.d.ts +0 -59
- package/dist/chains.d.ts.map +0 -1
- package/dist/chains.js +0 -152
- package/dist/committedIntentStore.d.ts +0 -5
- package/dist/committedIntentStore.d.ts.map +0 -1
- package/dist/committedIntentStore.js +0 -52
- package/dist/config.d.ts +0 -2
- package/dist/config.d.ts.map +0 -1
- package/dist/configDefaults.d.ts +0 -7
- package/dist/configDefaults.d.ts.map +0 -1
- package/dist/configDefaults.js +0 -9
- package/dist/configStore.d.ts +0 -31
- package/dist/configStore.d.ts.map +0 -1
- package/dist/configStore.js +0 -53
- package/dist/constants.d.ts +0 -176
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -184
- package/dist/contractConstants.d.ts +0 -8
- package/dist/contractConstants.d.ts.map +0 -1
- package/dist/contractConstants.js +0 -9
- package/dist/contractUtils.d.ts +0 -6
- package/dist/contractUtils.d.ts.map +0 -1
- package/dist/contractUtils.js +0 -19
- package/dist/cssUtils.d.ts +0 -2
- package/dist/cssUtils.d.ts.map +0 -1
- package/dist/cssUtils.js +0 -7
- package/dist/customChains.d.ts +0 -24
- package/dist/customChains.d.ts.map +0 -1
- package/dist/customChains.js +0 -20
- package/dist/customTokens.d.ts +0 -12
- package/dist/customTokens.d.ts.map +0 -1
- package/dist/customTokens.js +0 -64
- package/dist/decoders.d.ts +0 -69
- package/dist/decoders.d.ts.map +0 -1
- package/dist/decoders.js +0 -181
- package/dist/ens.d.ts +0 -20
- package/dist/ens.d.ts.map +0 -1
- package/dist/ens.js +0 -92
- package/dist/error.d.ts +0 -97
- package/dist/error.d.ts.map +0 -1
- package/dist/error.js +0 -298
- package/dist/estimate.d.ts +0 -78
- package/dist/estimate.d.ts.map +0 -1
- package/dist/estimate.js +0 -147
- package/dist/explorer.d.ts +0 -12
- package/dist/explorer.d.ts.map +0 -1
- package/dist/explorer.js +0 -15
- package/dist/fees.d.ts +0 -65
- package/dist/fees.d.ts.map +0 -1
- package/dist/fees.js +0 -165
- package/dist/gasless.d.ts +0 -123
- package/dist/gasless.d.ts.map +0 -1
- package/dist/gasless.js +0 -314
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/persistedToken.d.ts +0 -22
- package/dist/hooks/persistedToken.d.ts.map +0 -1
- package/dist/hooks/persistedToken.js +0 -65
- package/dist/hooks/prepareTrailsSendTransactionDestination.d.ts +0 -26
- package/dist/hooks/prepareTrailsSendTransactionDestination.d.ts.map +0 -1
- package/dist/hooks/prepareTrailsSendTransactionDestination.js +0 -33
- package/dist/hooks/useAmountUsd.d.ts +0 -12
- package/dist/hooks/useAmountUsd.d.ts.map +0 -1
- package/dist/hooks/useAmountUsd.js +0 -21
- package/dist/hooks/useBalanceVisible.d.ts +0 -15
- package/dist/hooks/useBalanceVisible.d.ts.map +0 -1
- package/dist/hooks/useBalanceVisible.js +0 -46
- package/dist/hooks/useBluvoTokenList.d.ts +0 -13
- package/dist/hooks/useBluvoTokenList.d.ts.map +0 -1
- package/dist/hooks/useBluvoTokenList.js +0 -57
- package/dist/hooks/useChainFilter.d.ts +0 -14
- package/dist/hooks/useChainFilter.d.ts.map +0 -1
- package/dist/hooks/useChainFilter.js +0 -24
- package/dist/hooks/useCheckout.d.ts +0 -80
- package/dist/hooks/useCheckout.d.ts.map +0 -1
- package/dist/hooks/useCheckout.js +0 -118
- package/dist/hooks/useClickTracking.d.ts +0 -12
- package/dist/hooks/useClickTracking.d.ts.map +0 -1
- package/dist/hooks/useClickTracking.js +0 -37
- package/dist/hooks/useCombinedHistory.d.ts +0 -50
- package/dist/hooks/useCombinedHistory.d.ts.map +0 -1
- package/dist/hooks/useCombinedHistory.js +0 -168
- package/dist/hooks/useCustomTokenSearch.d.ts +0 -28
- package/dist/hooks/useCustomTokenSearch.d.ts.map +0 -1
- package/dist/hooks/useCustomTokenSearch.js +0 -165
- package/dist/hooks/useDebounce.d.ts +0 -10
- package/dist/hooks/useDebounce.d.ts.map +0 -1
- package/dist/hooks/useDebounce.js +0 -15
- package/dist/hooks/useDebugScreens.d.ts +0 -17
- package/dist/hooks/useDebugScreens.d.ts.map +0 -1
- package/dist/hooks/useDebugScreens.js +0 -412
- package/dist/hooks/useDefaultDestinationToken.d.ts +0 -20
- package/dist/hooks/useDefaultDestinationToken.d.ts.map +0 -1
- package/dist/hooks/useDefaultDestinationToken.js +0 -60
- package/dist/hooks/useDefaultOriginToken.d.ts +0 -26
- package/dist/hooks/useDefaultOriginToken.d.ts.map +0 -1
- package/dist/hooks/useDefaultOriginToken.js +0 -120
- package/dist/hooks/useDepositMonitor.d.ts +0 -20
- package/dist/hooks/useDepositMonitor.d.ts.map +0 -1
- package/dist/hooks/useDepositMonitor.js +0 -54
- package/dist/hooks/useDestinationSelectedToken.d.ts +0 -38
- package/dist/hooks/useDestinationSelectedToken.d.ts.map +0 -1
- package/dist/hooks/useDestinationSelectedToken.js +0 -178
- package/dist/hooks/useDisplayCurrencyPreference.d.ts +0 -15
- package/dist/hooks/useDisplayCurrencyPreference.d.ts.map +0 -1
- package/dist/hooks/useDisplayCurrencyPreference.js +0 -57
- package/dist/hooks/useEarnPool.d.ts +0 -12
- package/dist/hooks/useEarnPool.d.ts.map +0 -1
- package/dist/hooks/useEarnPool.js +0 -21
- package/dist/hooks/useEffectiveFundBalance.d.ts +0 -28
- package/dist/hooks/useEffectiveFundBalance.d.ts.map +0 -1
- package/dist/hooks/useEffectiveFundBalance.js +0 -24
- package/dist/hooks/useExchangeFundingSelection.d.ts +0 -17
- package/dist/hooks/useExchangeFundingSelection.d.ts.map +0 -1
- package/dist/hooks/useExchangeFundingSelection.js +0 -25
- package/dist/hooks/useExecutingIntentsCount.d.ts +0 -15
- package/dist/hooks/useExecutingIntentsCount.d.ts.map +0 -1
- package/dist/hooks/useExternalFundingReceiptSync.d.ts +0 -11
- package/dist/hooks/useExternalFundingReceiptSync.d.ts.map +0 -1
- package/dist/hooks/useExternalFundingReceiptSync.js +0 -32
- package/dist/hooks/useFiatOnRampCurrencies.d.ts +0 -15
- package/dist/hooks/useFiatOnRampCurrencies.d.ts.map +0 -1
- package/dist/hooks/useFiatOnRampCurrencies.js +0 -14
- package/dist/hooks/useFiatSelectedCurrency.d.ts +0 -19
- package/dist/hooks/useFiatSelectedCurrency.d.ts.map +0 -1
- package/dist/hooks/useFiatSelectedCurrency.js +0 -55
- package/dist/hooks/useGetIntent.d.ts +0 -19
- package/dist/hooks/useGetIntent.d.ts.map +0 -1
- package/dist/hooks/useGetIntent.js +0 -26
- package/dist/hooks/useIntentReceiptBalances.d.ts +0 -16
- package/dist/hooks/useIntentReceiptBalances.d.ts.map +0 -1
- package/dist/hooks/useIntentReceiptBalances.js +0 -77
- package/dist/hooks/useIntentTransactionHistory.d.ts +0 -25
- package/dist/hooks/useIntentTransactionHistory.d.ts.map +0 -1
- package/dist/hooks/useIntentTransactionHistory.js +0 -357
- package/dist/hooks/useIsMobile.d.ts +0 -5
- package/dist/hooks/useIsMobile.d.ts.map +0 -1
- package/dist/hooks/useIsMobile.js +0 -21
- package/dist/hooks/useLocalePreference.d.ts +0 -21
- package/dist/hooks/useLocalePreference.d.ts.map +0 -1
- package/dist/hooks/useLocalePreference.js +0 -193
- package/dist/hooks/useMeldTransactionHistory.d.ts +0 -49
- package/dist/hooks/useMeldTransactionHistory.d.ts.map +0 -1
- package/dist/hooks/useMeldTransactionHistory.js +0 -71
- package/dist/hooks/useMeldTransactionStatus.d.ts +0 -61
- package/dist/hooks/useMeldTransactionStatus.d.ts.map +0 -1
- package/dist/hooks/useMeldTransactionStatus.js +0 -284
- package/dist/hooks/useOnRampCountryDefaults.d.ts +0 -18
- package/dist/hooks/useOnRampCountryDefaults.d.ts.map +0 -1
- package/dist/hooks/useOnRampCountryDefaults.js +0 -20
- package/dist/hooks/useOnRampPaymentMethods.d.ts +0 -15
- package/dist/hooks/useOnRampPaymentMethods.d.ts.map +0 -1
- package/dist/hooks/useOnRampPaymentMethods.js +0 -27
- package/dist/hooks/useOnRampProviderWidget.d.ts +0 -40
- package/dist/hooks/useOnRampProviderWidget.d.ts.map +0 -1
- package/dist/hooks/useOnRampProviderWidget.js +0 -70
- package/dist/hooks/useOnRampQuote.d.ts +0 -38
- package/dist/hooks/useOnRampQuote.d.ts.map +0 -1
- package/dist/hooks/useOnRampQuote.js +0 -159
- package/dist/hooks/useOnRampTransactionStatus.d.ts +0 -73
- package/dist/hooks/useOnRampTransactionStatus.d.ts.map +0 -1
- package/dist/hooks/useOriginSelectedToken.d.ts +0 -22
- package/dist/hooks/useOriginSelectedToken.d.ts.map +0 -1
- package/dist/hooks/useOriginSelectedToken.js +0 -127
- package/dist/hooks/usePayMessage.d.ts +0 -35
- package/dist/hooks/usePayMessage.d.ts.map +0 -1
- package/dist/hooks/usePayMessage.js +0 -333
- package/dist/hooks/usePriceImpactWarning.d.ts +0 -8
- package/dist/hooks/usePriceImpactWarning.d.ts.map +0 -1
- package/dist/hooks/usePriceImpactWarning.js +0 -9
- package/dist/hooks/useQuote.d.ts +0 -611
- package/dist/hooks/useQuote.d.ts.map +0 -1
- package/dist/hooks/useQuote.js +0 -590
- package/dist/hooks/useRecentChains.d.ts +0 -7
- package/dist/hooks/useRecentChains.d.ts.map +0 -1
- package/dist/hooks/useRecentChains.js +0 -52
- package/dist/hooks/useRecentTokens.d.ts +0 -7
- package/dist/hooks/useRecentTokens.d.ts.map +0 -1
- package/dist/hooks/useRecentTokens.js +0 -82
- package/dist/hooks/useRecipients.d.ts +0 -17
- package/dist/hooks/useRecipients.d.ts.map +0 -1
- package/dist/hooks/useRecipients.js +0 -75
- package/dist/hooks/useSelectedFeeOption.d.ts +0 -31
- package/dist/hooks/useSelectedFeeOption.d.ts.map +0 -1
- package/dist/hooks/useSelectedFeeOption.js +0 -113
- package/dist/hooks/useSelectedFundMethod.d.ts +0 -73
- package/dist/hooks/useSelectedFundMethod.d.ts.map +0 -1
- package/dist/hooks/useSelectedFundMethod.js +0 -51
- package/dist/hooks/useSelectedRecipient.d.ts +0 -12
- package/dist/hooks/useSelectedRecipient.d.ts.map +0 -1
- package/dist/hooks/useSelectedRecipient.js +0 -39
- package/dist/hooks/useSendForm.d.ts +0 -141
- package/dist/hooks/useSendForm.d.ts.map +0 -1
- package/dist/hooks/useSendForm.js +0 -595
- package/dist/hooks/useSwapAmount.d.ts +0 -13
- package/dist/hooks/useSwapAmount.d.ts.map +0 -1
- package/dist/hooks/useSwapAmount.js +0 -24
- package/dist/hooks/useSwapState.d.ts +0 -21
- package/dist/hooks/useSwapState.d.ts.map +0 -1
- package/dist/hooks/useSwapState.js +0 -44
- package/dist/hooks/useTargetAmount.d.ts +0 -6
- package/dist/hooks/useTargetAmount.d.ts.map +0 -1
- package/dist/hooks/useTargetAmount.js +0 -17
- package/dist/hooks/useTheme.d.ts +0 -14
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTheme.js +0 -47
- package/dist/hooks/useTokenList.d.ts +0 -43
- package/dist/hooks/useTokenList.d.ts.map +0 -1
- package/dist/hooks/useTokenList.js +0 -456
- package/dist/hooks/useTrailsSendTransaction.d.ts +0 -139
- package/dist/hooks/useTrailsSendTransaction.d.ts.map +0 -1
- package/dist/hooks/useTrailsSendTransaction.js +0 -418
- package/dist/hooks/useViewManager.d.ts +0 -89
- package/dist/hooks/useViewManager.d.ts.map +0 -1
- package/dist/hooks/useViewManager.js +0 -274
- package/dist/hooks/useWalletConnectionContext.d.ts +0 -26
- package/dist/hooks/useWalletConnectionContext.d.ts.map +0 -1
- package/dist/hooks/useWalletConnectionContext.js +0 -53
- package/dist/hooks/useWidgetProps.d.ts +0 -13
- package/dist/hooks/useWidgetProps.d.ts.map +0 -1
- package/dist/hooks/useWidgetProps.js +0 -18
- package/dist/hydrate/builder.d.ts +0 -131
- package/dist/hydrate/builder.d.ts.map +0 -1
- package/dist/hydrate/builder.js +0 -210
- package/dist/hydrate/constants.d.ts +0 -13
- package/dist/hydrate/constants.d.ts.map +0 -1
- package/dist/hydrate/constants.js +0 -5
- package/dist/hydrate/encodeExecute.d.ts +0 -73
- package/dist/hydrate/encodeExecute.d.ts.map +0 -1
- package/dist/hydrate/encodeExecute.js +0 -60
- package/dist/hydrate/index.d.ts.map +0 -1
- package/dist/hydrate/multicall.d.ts +0 -69
- package/dist/hydrate/multicall.d.ts.map +0 -1
- package/dist/hydrate/multicall.js +0 -167
- package/dist/hydrate/payload.d.ts +0 -38
- package/dist/hydrate/payload.d.ts.map +0 -1
- package/dist/hydrate/payload.js +0 -26
- package/dist/hydrate/selectors.d.ts +0 -28
- package/dist/hydrate/selectors.d.ts.map +0 -1
- package/dist/hydrate/selectors.js +0 -326
- package/dist/hydrate/source.d.ts +0 -11
- package/dist/hydrate/source.d.ts.map +0 -1
- package/dist/hydrate/source.js +0 -19
- package/dist/hydrate/types.d.ts +0 -21
- package/dist/hydrate/types.d.ts.map +0 -1
- package/dist/hydrate/utils.d.ts +0 -8
- package/dist/hydrate/utils.d.ts.map +0 -1
- package/dist/hydrate/utils.js +0 -23
- package/dist/index.d.ts.map +0 -1
- package/dist/indexerClient.d.ts +0 -23
- package/dist/indexerClient.d.ts.map +0 -1
- package/dist/indexerClient.js +0 -40
- package/dist/intentConfigStore.d.ts +0 -8
- package/dist/intentConfigStore.d.ts.map +0 -1
- package/dist/intentConfigStore.js +0 -40
- package/dist/intentProtocolApi.d.ts +0 -11
- package/dist/intentProtocolApi.d.ts.map +0 -1
- package/dist/intentProtocolApi.js +0 -11
- package/dist/intentProtocolEncoding.d.ts +0 -30
- package/dist/intentProtocolEncoding.d.ts.map +0 -1
- package/dist/intentProtocolEncoding.js +0 -114
- package/dist/intentProtocolResolver.d.ts +0 -28
- package/dist/intentProtocolResolver.d.ts.map +0 -1
- package/dist/intentProtocolResolver.js +0 -34
- package/dist/intentReceiptMonitor.d.ts +0 -24
- package/dist/intentReceiptMonitor.d.ts.map +0 -1
- package/dist/intentReceiptMonitor.js +0 -30
- package/dist/intentReceiptPoller.d.ts +0 -69
- package/dist/intentReceiptPoller.d.ts.map +0 -1
- package/dist/intentReceiptPoller.js +0 -162
- package/dist/intentValidation.d.ts +0 -5
- package/dist/intentValidation.d.ts.map +0 -1
- package/dist/intentValidation.js +0 -19
- package/dist/intents.d.ts +0 -148
- package/dist/intents.d.ts.map +0 -1
- package/dist/intents.js +0 -391
- package/dist/keyMachineClient.d.ts +0 -9
- package/dist/keyMachineClient.d.ts.map +0 -1
- package/dist/keyMachineClient.js +0 -13
- package/dist/keymachine/index.d.ts +0 -34
- package/dist/keymachine/index.d.ts.map +0 -1
- package/dist/keymachine/index.js +0 -92
- package/dist/keymachine/key-machine.gen.d.ts +0 -461
- package/dist/keymachine/key-machine.gen.d.ts.map +0 -1
- package/dist/keymachine/key-machine.gen.js +0 -164
- package/dist/localeUtils.d.ts +0 -46
- package/dist/localeUtils.d.ts.map +0 -1
- package/dist/localeUtils.js +0 -60
- package/dist/logger/index.d.ts +0 -16
- package/dist/logger/index.d.ts.map +0 -1
- package/dist/logger/index.js +0 -57
- package/dist/logger/useSyncLoggerDebug.d.ts +0 -2
- package/dist/logger/useSyncLoggerDebug.d.ts.map +0 -1
- package/dist/logger/useSyncLoggerDebug.js +0 -9
- package/dist/logger.d.ts +0 -2
- package/dist/logger.d.ts.map +0 -1
- package/dist/meld/components/MeldCountriesList.d.ts +0 -9
- package/dist/meld/components/MeldCountriesList.d.ts.map +0 -1
- package/dist/meld/components/MeldCountriesList.js +0 -167
- package/dist/meld/components/MeldFundMethods.d.ts +0 -14
- package/dist/meld/components/MeldFundMethods.d.ts.map +0 -1
- package/dist/meld/components/MeldFundMethods.js +0 -163
- package/dist/meld/components/MeldProvidersList.d.ts +0 -11
- package/dist/meld/components/MeldProvidersList.d.ts.map +0 -1
- package/dist/meld/components/MeldProvidersList.js +0 -145
- package/dist/meld/components/MeldTokensList.d.ts +0 -12
- package/dist/meld/components/MeldTokensList.d.ts.map +0 -1
- package/dist/meld/components/MeldTokensList.js +0 -215
- package/dist/meld/components/SimpleHeader.d.ts +0 -8
- package/dist/meld/components/SimpleHeader.d.ts.map +0 -1
- package/dist/meld/components/SimpleHeader.js +0 -18
- package/dist/meld/utils/meld.d.ts +0 -41
- package/dist/meld/utils/meld.d.ts.map +0 -1
- package/dist/meld/utils/meld.js +0 -24
- package/dist/mutations.d.ts +0 -19
- package/dist/mutations.d.ts.map +0 -1
- package/dist/mutations.js +0 -91
- package/dist/offlineRecovery.d.ts +0 -24
- package/dist/offlineRecovery.d.ts.map +0 -1
- package/dist/offlineRecovery.js +0 -219
- package/dist/onramp/MeshConnectFlow.d.ts +0 -27
- package/dist/onramp/MeshConnectFlow.d.ts.map +0 -1
- package/dist/onramp/MeshConnectFlow.js +0 -41
- package/dist/onramp/MeshConnectIframe.d.ts +0 -22
- package/dist/onramp/MeshConnectIframe.d.ts.map +0 -1
- package/dist/onramp/MeshConnectIframe.js +0 -434
- package/dist/onramp/SendFromExchangeButton.d.ts +0 -16
- package/dist/onramp/SendFromExchangeButton.d.ts.map +0 -1
- package/dist/onramp/SendFromExchangeButton.js +0 -36
- package/dist/onramp/TrailsOnRampProvider.d.ts +0 -38
- package/dist/onramp/TrailsOnRampProvider.d.ts.map +0 -1
- package/dist/onramp/TrailsOnRampProvider.js +0 -25
- package/dist/onramp/bluvo/hooks/useBluvoFundingSelection.d.ts +0 -12
- package/dist/onramp/bluvo/hooks/useBluvoFundingSelection.d.ts.map +0 -1
- package/dist/onramp/bluvo/hooks/useBluvoFundingSelection.js +0 -18
- package/dist/onramp/index.d.ts +0 -13
- package/dist/onramp/index.d.ts.map +0 -1
- package/dist/onramp/mesh/components/MeshExchangeConfirmation.d.ts +0 -10
- package/dist/onramp/mesh/components/MeshExchangeConfirmation.d.ts.map +0 -1
- package/dist/onramp/mesh/components/MeshExchangeConfirmation.js +0 -62
- package/dist/onramp/mesh/components/MeshExchangeIcon.d.ts +0 -13
- package/dist/onramp/mesh/components/MeshExchangeIcon.d.ts.map +0 -1
- package/dist/onramp/mesh/components/MeshExchangeIcon.js +0 -54
- package/dist/onramp/mesh/components/MeshExchangeSelection.d.ts +0 -12
- package/dist/onramp/mesh/components/MeshExchangeSelection.d.ts.map +0 -1
- package/dist/onramp/mesh/components/MeshExchangeSelection.js +0 -135
- package/dist/onramp/mesh/components/MeshSessionOptions.d.ts +0 -15
- package/dist/onramp/mesh/components/MeshSessionOptions.d.ts.map +0 -1
- package/dist/onramp/mesh/components/MeshSessionOptions.js +0 -68
- package/dist/onramp/mesh/hooks/useMeshAccessTokens.d.ts +0 -9
- package/dist/onramp/mesh/hooks/useMeshAccessTokens.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshAccessTokens.js +0 -38
- package/dist/onramp/mesh/hooks/useMeshFundingSelection.d.ts +0 -11
- package/dist/onramp/mesh/hooks/useMeshFundingSelection.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshFundingSelection.js +0 -21
- package/dist/onramp/mesh/hooks/useMeshOnrampFlow.d.ts +0 -71
- package/dist/onramp/mesh/hooks/useMeshOnrampFlow.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshOnrampFlow.js +0 -168
- package/dist/onramp/mesh/hooks/useMeshOnrampSessionState.d.ts +0 -32
- package/dist/onramp/mesh/hooks/useMeshOnrampSessionState.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshOnrampSessionState.js +0 -28
- package/dist/onramp/mesh/hooks/useMeshSelectedTokenBalance.d.ts +0 -19
- package/dist/onramp/mesh/hooks/useMeshSelectedTokenBalance.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshSelectedTokenBalance.js +0 -57
- package/dist/onramp/mesh/hooks/useMeshSessionAccountBalance.d.ts +0 -15
- package/dist/onramp/mesh/hooks/useMeshSessionAccountBalance.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshSessionAccountBalance.js +0 -45
- package/dist/onramp/mesh/hooks/useMeshSessionStorage.d.ts +0 -7
- package/dist/onramp/mesh/hooks/useMeshSessionStorage.d.ts.map +0 -1
- package/dist/onramp/mesh/hooks/useMeshSessionStorage.js +0 -20
- package/dist/onramp/meshSessionStorage.d.ts +0 -13
- package/dist/onramp/meshSessionStorage.d.ts.map +0 -1
- package/dist/onramp/meshSessionStorage.js +0 -165
- package/dist/onramp/meshconnect.d.ts +0 -32
- package/dist/onramp/meshconnect.d.ts.map +0 -1
- package/dist/onramp/meshconnect.js +0 -124
- package/dist/onramp/trailsOnramp.d.ts +0 -32
- package/dist/onramp/trailsOnramp.d.ts.map +0 -1
- package/dist/onramp/trailsOnramp.js +0 -64
- package/dist/onramp-client/index.d.ts +0 -13
- package/dist/onramp-client/index.d.ts.map +0 -1
- package/dist/onramp-client/index.js +0 -19
- package/dist/onrampClient.d.ts +0 -10
- package/dist/onrampClient.d.ts.map +0 -1
- package/dist/onrampClient.js +0 -31
- package/dist/package.js +0 -123
- package/dist/placeholder.d.ts +0 -142
- package/dist/placeholder.d.ts.map +0 -1
- package/dist/placeholder.js +0 -95
- package/dist/poolUtils.d.ts +0 -16
- package/dist/poolUtils.d.ts.map +0 -1
- package/dist/poolUtils.js +0 -87
- package/dist/pools.d.ts +0 -33
- package/dist/pools.d.ts.map +0 -1
- package/dist/pools.js +0 -77
- package/dist/prepareSend.d.ts +0 -12
- package/dist/prepareSend.d.ts.map +0 -1
- package/dist/prepareSend.js +0 -207
- package/dist/query/QueryProvider.d.ts +0 -9
- package/dist/query/QueryProvider.d.ts.map +0 -1
- package/dist/query/QueryProvider.js +0 -13
- package/dist/query/balance.fetchers.d.ts +0 -116
- package/dist/query/balance.fetchers.d.ts.map +0 -1
- package/dist/query/balance.fetchers.js +0 -289
- package/dist/query/balance.hooks.d.ts +0 -80
- package/dist/query/balance.hooks.d.ts.map +0 -1
- package/dist/query/balance.hooks.js +0 -123
- package/dist/query/balance.queries.d.ts +0 -93
- package/dist/query/balance.queries.d.ts.map +0 -1
- package/dist/query/balance.queries.js +0 -142
- package/dist/query/chains.hooks.d.ts +0 -5
- package/dist/query/chains.hooks.d.ts.map +0 -1
- package/dist/query/chains.hooks.js +0 -40
- package/dist/query/chains.queries.d.ts +0 -16
- package/dist/query/chains.queries.d.ts.map +0 -1
- package/dist/query/chains.queries.js +0 -17
- package/dist/query/client.d.ts +0 -16
- package/dist/query/client.d.ts.map +0 -1
- package/dist/query/client.js +0 -15
- package/dist/query/fiat.fetchers.d.ts +0 -11
- package/dist/query/fiat.fetchers.d.ts.map +0 -1
- package/dist/query/fiat.fetchers.js +0 -10
- package/dist/query/fiat.hooks.d.ts +0 -18
- package/dist/query/fiat.hooks.d.ts.map +0 -1
- package/dist/query/fiat.hooks.js +0 -20
- package/dist/query/fiat.queries.d.ts +0 -24
- package/dist/query/fiat.queries.d.ts.map +0 -1
- package/dist/query/fiat.queries.js +0 -39
- package/dist/query/geo.fetchers.d.ts +0 -5
- package/dist/query/geo.fetchers.d.ts.map +0 -1
- package/dist/query/geo.fetchers.js +0 -61
- package/dist/query/geo.hooks.d.ts +0 -5
- package/dist/query/geo.hooks.d.ts.map +0 -1
- package/dist/query/geo.hooks.js +0 -17
- package/dist/query/geo.queries.d.ts +0 -22
- package/dist/query/geo.queries.d.ts.map +0 -1
- package/dist/query/geo.queries.js +0 -33
- package/dist/query/helpers.d.ts +0 -18
- package/dist/query/helpers.d.ts.map +0 -1
- package/dist/query/helpers.js +0 -31
- package/dist/query/intentProtocol.queries.d.ts +0 -32
- package/dist/query/intentProtocol.queries.d.ts.map +0 -1
- package/dist/query/intentProtocol.queries.js +0 -41
- package/dist/query/meld.fetchers.d.ts +0 -19
- package/dist/query/meld.fetchers.d.ts.map +0 -1
- package/dist/query/meld.fetchers.js +0 -41
- package/dist/query/meld.hooks.d.ts +0 -4
- package/dist/query/meld.hooks.d.ts.map +0 -1
- package/dist/query/meld.hooks.js +0 -15
- package/dist/query/meld.queries.d.ts +0 -61
- package/dist/query/meld.queries.d.ts.map +0 -1
- package/dist/query/meld.queries.js +0 -97
- package/dist/query/persister.d.ts +0 -9
- package/dist/query/persister.d.ts.map +0 -1
- package/dist/query/persister.js +0 -13
- package/dist/query/price.fetchers.d.ts +0 -15
- package/dist/query/price.fetchers.d.ts.map +0 -1
- package/dist/query/price.fetchers.js +0 -26
- package/dist/query/price.hooks.d.ts +0 -352
- package/dist/query/price.hooks.d.ts.map +0 -1
- package/dist/query/price.hooks.js +0 -35
- package/dist/query/price.queries.d.ts +0 -34
- package/dist/query/price.queries.d.ts.map +0 -1
- package/dist/query/price.queries.js +0 -139
- package/dist/query/serialization.d.ts +0 -3
- package/dist/query/serialization.d.ts.map +0 -1
- package/dist/query/serialization.js +0 -17
- package/dist/query/token.fetchers.d.ts +0 -13
- package/dist/query/token.fetchers.d.ts.map +0 -1
- package/dist/query/token.fetchers.js +0 -6
- package/dist/query/token.hooks.d.ts +0 -41
- package/dist/query/token.hooks.d.ts.map +0 -1
- package/dist/query/token.hooks.js +0 -68
- package/dist/query/token.queries.d.ts +0 -67
- package/dist/query/token.queries.d.ts.map +0 -1
- package/dist/query/token.queries.js +0 -144
- package/dist/queryParams.d.ts +0 -9
- package/dist/queryParams.d.ts.map +0 -1
- package/dist/queryParamsCore.d.ts +0 -2
- package/dist/queryParamsCore.d.ts.map +0 -1
- package/dist/queryParamsCore.js +0 -10
- package/dist/quoteError.d.ts +0 -22
- package/dist/quoteError.d.ts.map +0 -1
- package/dist/quoteError.js +0 -9
- package/dist/recover.d.ts +0 -304
- package/dist/recover.d.ts.map +0 -1
- package/dist/recover.js +0 -703
- package/dist/smartContractWallet.d.ts +0 -8
- package/dist/smartContractWallet.d.ts.map +0 -1
- package/dist/smartContractWallet.js +0 -11
- package/dist/theme.d.ts +0 -3
- package/dist/theme.d.ts.map +0 -1
- package/dist/toast.d.ts +0 -9
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -31
- package/dist/tokenRegistry.d.ts +0 -50
- package/dist/tokenRegistry.d.ts.map +0 -1
- package/dist/tokenRegistry.js +0 -589
- package/dist/tokenTypes.d.ts +0 -29
- package/dist/tokenTypes.d.ts.map +0 -1
- package/dist/tokens.d.ts +0 -62
- package/dist/tokens.d.ts.map +0 -1
- package/dist/tokens.js +0 -370
- package/dist/trailsClient.d.ts +0 -11
- package/dist/trailsClient.d.ts.map +0 -1
- package/dist/trailsClient.js +0 -29
- package/dist/transactionIntent/constants.d.ts +0 -8
- package/dist/transactionIntent/constants.d.ts.map +0 -1
- package/dist/transactionIntent/constants.js +0 -11
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts +0 -55
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts.map +0 -1
- package/dist/transactionIntent/deposits/depositOrchestrator.js +0 -88
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts +0 -31
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts.map +0 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.js +0 -218
- package/dist/transactionIntent/deposits/index.d.ts +0 -4
- package/dist/transactionIntent/deposits/index.d.ts.map +0 -1
- package/dist/transactionIntent/deposits/standardDeposit.d.ts +0 -50
- package/dist/transactionIntent/deposits/standardDeposit.d.ts.map +0 -1
- package/dist/transactionIntent/deposits/standardDeposit.js +0 -131
- package/dist/transactionIntent/execution/index.d.ts +0 -2
- package/dist/transactionIntent/execution/index.d.ts.map +0 -1
- package/dist/transactionIntent/execution/transactionState.d.ts +0 -5
- package/dist/transactionIntent/execution/transactionState.d.ts.map +0 -1
- package/dist/transactionIntent/execution/transactionState.js +0 -21
- package/dist/transactionIntent/handlers/index.d.ts +0 -2
- package/dist/transactionIntent/handlers/index.d.ts.map +0 -1
- package/dist/transactionIntent/handlers/intentHandler.d.ts +0 -71
- package/dist/transactionIntent/handlers/intentHandler.d.ts.map +0 -1
- package/dist/transactionIntent/handlers/intentHandler.js +0 -533
- package/dist/transactionIntent/helpers/index.d.ts +0 -2
- package/dist/transactionIntent/helpers/index.d.ts.map +0 -1
- package/dist/transactionIntent/helpers/transactionStateHelpers.d.ts +0 -68
- package/dist/transactionIntent/helpers/transactionStateHelpers.d.ts.map +0 -1
- package/dist/transactionIntent/helpers/transactionStateHelpers.js +0 -124
- package/dist/transactionIntent/index.d.ts +0 -10
- package/dist/transactionIntent/index.d.ts.map +0 -1
- package/dist/transactionIntent/quote/feeExtractors.d.ts +0 -13
- package/dist/transactionIntent/quote/feeExtractors.d.ts.map +0 -1
- package/dist/transactionIntent/quote/feeExtractors.js +0 -52
- package/dist/transactionIntent/quote/index.d.ts +0 -4
- package/dist/transactionIntent/quote/index.d.ts.map +0 -1
- package/dist/transactionIntent/quote/normalizeQuote.d.ts +0 -44
- package/dist/transactionIntent/quote/normalizeQuote.d.ts.map +0 -1
- package/dist/transactionIntent/quote/normalizeQuote.js +0 -214
- package/dist/transactionIntent/quote/quoteHelpers.d.ts +0 -6
- package/dist/transactionIntent/quote/quoteHelpers.d.ts.map +0 -1
- package/dist/transactionIntent/quote/quoteHelpers.js +0 -47
- package/dist/transactionIntent/types.d.ts +0 -181
- package/dist/transactionIntent/types.d.ts.map +0 -1
- package/dist/transactionIntent/types.js +0 -38
- package/dist/transactionIntent/utils/balanceChecker.d.ts +0 -20
- package/dist/transactionIntent/utils/balanceChecker.d.ts.map +0 -1
- package/dist/transactionIntent/utils/balanceChecker.js +0 -55
- package/dist/transactionIntent/utils/index.d.ts +0 -3
- package/dist/transactionIntent/utils/index.d.ts.map +0 -1
- package/dist/transactionIntent/utils/resilientDepositTracker.d.ts +0 -25
- package/dist/transactionIntent/utils/resilientDepositTracker.d.ts.map +0 -1
- package/dist/transactionIntent/utils/resilientDepositTracker.js +0 -62
- package/dist/transactionIntent/utils/testnetHelpers.d.ts +0 -2
- package/dist/transactionIntent/utils/testnetHelpers.d.ts.map +0 -1
- package/dist/transactionIntent/validators.d.ts +0 -4
- package/dist/transactionIntent/validators.d.ts.map +0 -1
- package/dist/transactionIntent/validators.js +0 -11
- package/dist/transactions.d.ts +0 -176
- package/dist/transactions.d.ts.map +0 -1
- package/dist/transactions.js +0 -115
- package/dist/umd/trails.min.js +0 -1251
- package/dist/utils/address.d.ts +0 -28
- package/dist/utils/address.d.ts.map +0 -1
- package/dist/utils/address.js +0 -30
- package/dist/utils/fiat.d.ts +0 -8
- package/dist/utils/fiat.d.ts.map +0 -1
- package/dist/utils/fiat.js +0 -30
- package/dist/utils/format.d.ts +0 -74
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/format.js +0 -274
- package/dist/utils/localStorageGc.d.ts +0 -22
- package/dist/utils/localStorageGc.d.ts.map +0 -1
- package/dist/utils/localStorageGc.js +0 -53
- package/dist/utils/passthrough.d.ts +0 -46
- package/dist/utils/passthrough.d.ts.map +0 -1
- package/dist/utils/passthrough.js +0 -20
- package/dist/utils/time.d.ts +0 -27
- package/dist/utils/time.d.ts.map +0 -1
- package/dist/utils/time.js +0 -68
- package/dist/utils/tokenResolution.d.ts +0 -19
- package/dist/utils/tokenResolution.d.ts.map +0 -1
- package/dist/utils/tokenResolution.js +0 -53
- package/dist/utils/validation.d.ts +0 -53
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -80
- package/dist/utils.d.ts +0 -34
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -58
- package/dist/version.d.ts +0 -3
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -9
- package/dist/widget/assets/components/Aave.d.ts +0 -8
- package/dist/widget/assets/components/Aave.d.ts.map +0 -1
- package/dist/widget/assets/components/Aave.js +0 -29
- package/dist/widget/assets/components/ExchangeIconBlack.d.ts +0 -8
- package/dist/widget/assets/components/ExchangeIconBlack.d.ts.map +0 -1
- package/dist/widget/assets/components/FundMethodCardBrands.d.ts +0 -8
- package/dist/widget/assets/components/FundMethodCardBrands.d.ts.map +0 -1
- package/dist/widget/assets/components/FundMethodCardBrands.js +0 -49
- package/dist/widget/assets/components/FundMethodExchangeBrands.d.ts +0 -8
- package/dist/widget/assets/components/FundMethodExchangeBrands.d.ts.map +0 -1
- package/dist/widget/assets/components/FundMethodExchangeBrands.js +0 -37
- package/dist/widget/assets/components/MetaMaskIconFox.d.ts +0 -8
- package/dist/widget/assets/components/MetaMaskIconFox.d.ts.map +0 -1
- package/dist/widget/assets/components/MetaMaskIconFoxWithMargins.d.ts +0 -8
- package/dist/widget/assets/components/MetaMaskIconFoxWithMargins.d.ts.map +0 -1
- package/dist/widget/assets/components/MetaMaskLogoBlack.d.ts +0 -8
- package/dist/widget/assets/components/MetaMaskLogoBlack.d.ts.map +0 -1
- package/dist/widget/assets/components/MetaMaskLogoWhite.d.ts +0 -8
- package/dist/widget/assets/components/MetaMaskLogoWhite.d.ts.map +0 -1
- package/dist/widget/assets/components/Morpho.d.ts +0 -8
- package/dist/widget/assets/components/Morpho.d.ts.map +0 -1
- package/dist/widget/assets/components/Morpho.js +0 -51
- package/dist/widget/assets/components/TrailsBlack.d.ts +0 -8
- package/dist/widget/assets/components/TrailsBlack.d.ts.map +0 -1
- package/dist/widget/assets/components/TrailsBlack.js +0 -25
- package/dist/widget/assets/components/TrailsWhite.d.ts +0 -8
- package/dist/widget/assets/components/TrailsWhite.d.ts.map +0 -1
- package/dist/widget/assets/components/TrailsWhite.js +0 -25
- package/dist/widget/assets/components/WalletChangeBlack.d.ts +0 -8
- package/dist/widget/assets/components/WalletChangeBlack.d.ts.map +0 -1
- package/dist/widget/assets/components/WalletConnectLogo.d.ts +0 -8
- package/dist/widget/assets/components/WalletConnectLogo.d.ts.map +0 -1
- package/dist/widget/assets/components/WalletConnectLogoBlack.d.ts +0 -8
- package/dist/widget/assets/components/WalletConnectLogoBlack.d.ts.map +0 -1
- package/dist/widget/assets/components/WalletConnectLogoBlue.d.ts +0 -8
- package/dist/widget/assets/components/WalletConnectLogoBlue.d.ts.map +0 -1
- package/dist/widget/assets/components/WalletConnectLogoWhite.d.ts +0 -8
- package/dist/widget/assets/components/WalletConnectLogoWhite.d.ts.map +0 -1
- package/dist/widget/assets/components/index.d.ts +0 -17
- package/dist/widget/assets/components/index.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/BluvoCache.d.ts +0 -54
- package/dist/widget/bluvo/bluvo-lib/BluvoCache.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/BluvoCache.js +0 -68
- package/dist/widget/bluvo/bluvo-lib/BluvoFlowClient.d.ts +0 -386
- package/dist/widget/bluvo/bluvo-lib/BluvoFlowClient.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/BluvoFlowClient.js +0 -872
- package/dist/widget/bluvo/bluvo-lib/BluvoWebClient.d.ts +0 -192
- package/dist/widget/bluvo/bluvo-lib/BluvoWebClient.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/BluvoWebClient.js +0 -294
- package/dist/widget/bluvo/bluvo-lib/WebSocketClient.d.ts +0 -51
- package/dist/widget/bluvo/bluvo-lib/WebSocketClient.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/WebSocketClient.js +0 -72
- package/dist/widget/bluvo/bluvo-lib/WebsocketListener.d.ts +0 -19
- package/dist/widget/bluvo/bluvo-lib/WebsocketListener.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/WebsocketListener.js +0 -62
- package/dist/widget/bluvo/bluvo-lib/WorkflowTypes.d.ts +0 -44
- package/dist/widget/bluvo/bluvo-lib/WorkflowTypes.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/WorkflowTypes.js +0 -6
- package/dist/widget/bluvo/bluvo-lib/api.types.d.ts +0 -49
- package/dist/widget/bluvo/bluvo-lib/api.types.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/balanceTransform.d.ts +0 -84
- package/dist/widget/bluvo/bluvo-lib/balanceTransform.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/balanceTransform.js +0 -26
- package/dist/widget/bluvo/bluvo-lib/createMachine.d.ts +0 -3
- package/dist/widget/bluvo/bluvo-lib/createMachine.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/createMachine.js +0 -38
- package/dist/widget/bluvo/bluvo-lib/error-codes.d.ts +0 -156
- package/dist/widget/bluvo/bluvo-lib/error-codes.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/error-codes.js +0 -115
- package/dist/widget/bluvo/bluvo-lib/flow.types.d.ts +0 -356
- package/dist/widget/bluvo/bluvo-lib/flow.types.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/flowMachine.d.ts +0 -4
- package/dist/widget/bluvo/bluvo-lib/flowMachine.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/flowMachine.js +0 -45
- package/dist/widget/bluvo/bluvo-lib/flowMachine.types.d.ts +0 -20
- package/dist/widget/bluvo/bluvo-lib/flowMachine.types.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/flowStateHandlers.d.ts +0 -39
- package/dist/widget/bluvo/bluvo-lib/flowStateHandlers.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/flowStateHandlers.js +0 -395
- package/dist/widget/bluvo/bluvo-lib/index.d.ts +0 -5
- package/dist/widget/bluvo/bluvo-lib/index.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/machine.types.d.ts +0 -15
- package/dist/widget/bluvo/bluvo-lib/machine.types.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/stateHelpers.d.ts +0 -23
- package/dist/widget/bluvo/bluvo-lib/stateHelpers.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/stateHelpers.js +0 -24
- package/dist/widget/bluvo/bluvo-lib/useBluvoFlow.d.ts +0 -325
- package/dist/widget/bluvo/bluvo-lib/useBluvoFlow.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/useBluvoFlow.js +0 -152
- package/dist/widget/bluvo/bluvo-lib/useFlowMachine.d.ts +0 -11
- package/dist/widget/bluvo/bluvo-lib/useFlowMachine.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/useFlowMachine.js +0 -25
- package/dist/widget/bluvo/bluvo-lib/useWithdrawMachine.d.ts +0 -17
- package/dist/widget/bluvo/bluvo-lib/useWithdrawMachine.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/withdrawal.types.d.ts +0 -46
- package/dist/widget/bluvo/bluvo-lib/withdrawal.types.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/withdrawalErrorHandler.d.ts +0 -29
- package/dist/widget/bluvo/bluvo-lib/withdrawalErrorHandler.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/withdrawalErrorHandler.js +0 -95
- package/dist/widget/bluvo/bluvo-lib/withdrawalMachine.d.ts +0 -3
- package/dist/widget/bluvo/bluvo-lib/withdrawalMachine.d.ts.map +0 -1
- package/dist/widget/bluvo/bluvo-lib/withdrawalMachine.js +0 -137
- package/dist/widget/bluvo/index.d.ts +0 -2
- package/dist/widget/bluvo/index.d.ts.map +0 -1
- package/dist/widget/components/AccountActionsDropdown.d.ts +0 -4
- package/dist/widget/components/AccountActionsDropdown.d.ts.map +0 -1
- package/dist/widget/components/AccountActionsDropdown.js +0 -23
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts +0 -9
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +0 -1
- package/dist/widget/components/AccountIntentTransactionHistory.js +0 -426
- package/dist/widget/components/AccountIntentTransactionHistoryButton.d.ts +0 -4
- package/dist/widget/components/AccountIntentTransactionHistoryButton.d.ts.map +0 -1
- package/dist/widget/components/AccountIntentTransactionHistoryButton.js +0 -23
- package/dist/widget/components/AccountSettings.d.ts +0 -7
- package/dist/widget/components/AccountSettings.d.ts.map +0 -1
- package/dist/widget/components/AccountSettings.js +0 -106
- package/dist/widget/components/AddressOrEnsName.d.ts +0 -13
- package/dist/widget/components/AddressOrEnsName.d.ts.map +0 -1
- package/dist/widget/components/AddressOrEnsName.js +0 -13
- package/dist/widget/components/AddressWalletIcon.d.ts +0 -8
- package/dist/widget/components/AddressWalletIcon.d.ts.map +0 -1
- package/dist/widget/components/AddressWalletIcon.js +0 -32
- package/dist/widget/components/AllChainsIcon.d.ts +0 -9
- package/dist/widget/components/AllChainsIcon.d.ts.map +0 -1
- package/dist/widget/components/AllChainsIcon.js +0 -98
- package/dist/widget/components/BluvoExchangeSelection.d.ts +0 -12
- package/dist/widget/components/BluvoExchangeSelection.d.ts.map +0 -1
- package/dist/widget/components/BluvoExchangeSelection.js +0 -131
- package/dist/widget/components/BluvoExchangeSelection.lazy.d.ts +0 -2
- package/dist/widget/components/BluvoExchangeSelection.lazy.d.ts.map +0 -1
- package/dist/widget/components/BluvoExchangeSelection.lazy.js +0 -4
- package/dist/widget/components/BluvoOnrampFlow.d.ts +0 -20
- package/dist/widget/components/BluvoOnrampFlow.d.ts.map +0 -1
- package/dist/widget/components/BluvoOnrampFlow.js +0 -1472
- package/dist/widget/components/BluvoOnrampFlow.lazy.d.ts +0 -2
- package/dist/widget/components/BluvoOnrampFlow.lazy.d.ts.map +0 -1
- package/dist/widget/components/BluvoOnrampFlow.lazy.js +0 -4
- package/dist/widget/components/ChainFilterDropdown.d.ts +0 -17
- package/dist/widget/components/ChainFilterDropdown.d.ts.map +0 -1
- package/dist/widget/components/ChainFilterDropdown.js +0 -124
- package/dist/widget/components/ChainImage.d.ts +0 -8
- package/dist/widget/components/ChainImage.d.ts.map +0 -1
- package/dist/widget/components/ChainImage.js +0 -24
- package/dist/widget/components/ChainList.d.ts +0 -9
- package/dist/widget/components/ChainList.d.ts.map +0 -1
- package/dist/widget/components/ChainList.js +0 -177
- package/dist/widget/components/ClassicSwap.d.ts +0 -10
- package/dist/widget/components/ClassicSwap.d.ts.map +0 -1
- package/dist/widget/components/ClassicSwap.js +0 -786
- package/dist/widget/components/ConfigDisplay.d.ts +0 -7
- package/dist/widget/components/ConfigDisplay.d.ts.map +0 -1
- package/dist/widget/components/ConfigDisplay.js +0 -122
- package/dist/widget/components/ConnectWallet.d.ts +0 -12
- package/dist/widget/components/ConnectWallet.d.ts.map +0 -1
- package/dist/widget/components/ConnectWallet.js +0 -215
- package/dist/widget/components/ConnectedWallets.d.ts +0 -19
- package/dist/widget/components/ConnectedWallets.d.ts.map +0 -1
- package/dist/widget/components/ConnectedWallets.js +0 -149
- package/dist/widget/components/CopyButton.d.ts +0 -18
- package/dist/widget/components/CopyButton.d.ts.map +0 -1
- package/dist/widget/components/CopyButton.js +0 -51
- package/dist/widget/components/CountryFilterDropdown.d.ts +0 -15
- package/dist/widget/components/CountryFilterDropdown.d.ts.map +0 -1
- package/dist/widget/components/CountryFilterDropdown.js +0 -93
- package/dist/widget/components/DebugMenu.d.ts +0 -7
- package/dist/widget/components/DebugMenu.d.ts.map +0 -1
- package/dist/widget/components/DebugMenu.js +0 -33
- package/dist/widget/components/DebugScreensList.d.ts +0 -7
- package/dist/widget/components/DebugScreensList.d.ts.map +0 -1
- package/dist/widget/components/DebugScreensList.js +0 -56
- package/dist/widget/components/DebugToast.d.ts +0 -3
- package/dist/widget/components/DebugToast.d.ts.map +0 -1
- package/dist/widget/components/DebugToast.js +0 -46
- package/dist/widget/components/DepositTracker.d.ts +0 -13
- package/dist/widget/components/DepositTracker.d.ts.map +0 -1
- package/dist/widget/components/DepositTracker.js +0 -194
- package/dist/widget/components/DirectTransfer.d.ts +0 -15
- package/dist/widget/components/DirectTransfer.d.ts.map +0 -1
- package/dist/widget/components/DirectTransfer.js +0 -218
- package/dist/widget/components/Disconnect.d.ts +0 -8
- package/dist/widget/components/Disconnect.d.ts.map +0 -1
- package/dist/widget/components/Disconnect.js +0 -37
- package/dist/widget/components/DynamicInputStyles.d.ts +0 -22
- package/dist/widget/components/DynamicInputStyles.d.ts.map +0 -1
- package/dist/widget/components/DynamicInputStyles.js +0 -27
- package/dist/widget/components/DynamicSizeInputField.d.ts +0 -17
- package/dist/widget/components/DynamicSizeInputField.d.ts.map +0 -1
- package/dist/widget/components/DynamicSizeInputField.js +0 -125
- package/dist/widget/components/ENSAvatar.d.ts +0 -12
- package/dist/widget/components/ENSAvatar.d.ts.map +0 -1
- package/dist/widget/components/ENSAvatar.js +0 -22
- package/dist/widget/components/Earn.d.ts +0 -33
- package/dist/widget/components/Earn.d.ts.map +0 -1
- package/dist/widget/components/Earn.js +0 -79
- package/dist/widget/components/EarnMarkets.d.ts +0 -9
- package/dist/widget/components/EarnMarkets.d.ts.map +0 -1
- package/dist/widget/components/EarnMarkets.js +0 -313
- package/dist/widget/components/EarnPools.d.ts +0 -8
- package/dist/widget/components/EarnPools.d.ts.map +0 -1
- package/dist/widget/components/EarnPools.js +0 -256
- package/dist/widget/components/EarnPoolsFilters.d.ts +0 -18
- package/dist/widget/components/EarnPoolsFilters.d.ts.map +0 -1
- package/dist/widget/components/EarnPoolsFilters.js +0 -106
- package/dist/widget/components/EarnWithdraw.d.ts +0 -21
- package/dist/widget/components/EarnWithdraw.d.ts.map +0 -1
- package/dist/widget/components/EarnWithdraw.js +0 -477
- package/dist/widget/components/ErrorAnimationIcon.d.ts +0 -2
- package/dist/widget/components/ErrorAnimationIcon.d.ts.map +0 -1
- package/dist/widget/components/ErrorAnimationIcon.js +0 -148
- package/dist/widget/components/ErrorDisplay.d.ts +0 -9
- package/dist/widget/components/ErrorDisplay.d.ts.map +0 -1
- package/dist/widget/components/ErrorDisplay.js +0 -104
- package/dist/widget/components/ExecutingIntentsBadge.d.ts +0 -12
- package/dist/widget/components/ExecutingIntentsBadge.d.ts.map +0 -1
- package/dist/widget/components/ExecutionStatusBadge.d.ts +0 -5
- package/dist/widget/components/ExecutionStatusBadge.d.ts.map +0 -1
- package/dist/widget/components/ExecutionStatusBadge.js +0 -45
- package/dist/widget/components/FeeOption.d.ts +0 -20
- package/dist/widget/components/FeeOption.d.ts.map +0 -1
- package/dist/widget/components/FeeOption.js +0 -71
- package/dist/widget/components/FeeOptions.d.ts +0 -20
- package/dist/widget/components/FeeOptions.d.ts.map +0 -1
- package/dist/widget/components/FeeOptions.js +0 -99
- package/dist/widget/components/FiatSelector.d.ts +0 -18
- package/dist/widget/components/FiatSelector.d.ts.map +0 -1
- package/dist/widget/components/FiatSelector.js +0 -171
- package/dist/widget/components/FiatSelectorButton.d.ts +0 -11
- package/dist/widget/components/FiatSelectorButton.d.ts.map +0 -1
- package/dist/widget/components/FiatSelectorButton.js +0 -41
- package/dist/widget/components/Footer.d.ts +0 -7
- package/dist/widget/components/Footer.d.ts.map +0 -1
- package/dist/widget/components/Footer.js +0 -71
- package/dist/widget/components/Fund.d.ts +0 -19
- package/dist/widget/components/Fund.d.ts.map +0 -1
- package/dist/widget/components/Fund.js +0 -16
- package/dist/widget/components/Fund.types.d.ts +0 -22
- package/dist/widget/components/Fund.types.d.ts.map +0 -1
- package/dist/widget/components/FundExactInput.d.ts +0 -5
- package/dist/widget/components/FundExactInput.d.ts.map +0 -1
- package/dist/widget/components/FundExactInput.js +0 -1116
- package/dist/widget/components/FundExactOutput.d.ts +0 -5
- package/dist/widget/components/FundExactOutput.d.ts.map +0 -1
- package/dist/widget/components/FundExactOutput.js +0 -498
- package/dist/widget/components/FundMethods.d.ts +0 -15
- package/dist/widget/components/FundMethods.d.ts.map +0 -1
- package/dist/widget/components/FundMethods.js +0 -219
- package/dist/widget/components/FundWalletSelection.d.ts +0 -3
- package/dist/widget/components/FundWalletSelection.d.ts.map +0 -1
- package/dist/widget/components/FundWalletSelection.js +0 -38
- package/dist/widget/components/FundingMethodSelectorButton.d.ts +0 -11
- package/dist/widget/components/FundingMethodSelectorButton.d.ts.map +0 -1
- package/dist/widget/components/FundingMethodSelectorButton.js +0 -57
- package/dist/widget/components/GreenCheckAnimation.d.ts +0 -2
- package/dist/widget/components/GreenCheckAnimation.d.ts.map +0 -1
- package/dist/widget/components/GreenCheckAnimation.js +0 -135
- package/dist/widget/components/HighPriceImpactBlock.d.ts +0 -7
- package/dist/widget/components/HighPriceImpactBlock.d.ts.map +0 -1
- package/dist/widget/components/HighPriceImpactBlock.js +0 -33
- package/dist/widget/components/HookModalContent.d.ts +0 -8
- package/dist/widget/components/HookModalContent.d.ts.map +0 -1
- package/dist/widget/components/HookModalContent.js +0 -237
- package/dist/widget/components/Identicon.d.ts +0 -9
- package/dist/widget/components/Identicon.d.ts.map +0 -1
- package/dist/widget/components/Identicon.js +0 -176
- package/dist/widget/components/LoadingSpinner.d.ts +0 -5
- package/dist/widget/components/LoadingSpinner.d.ts.map +0 -1
- package/dist/widget/components/LoadingSpinner.js +0 -5
- package/dist/widget/components/MeldForm.d.ts +0 -24
- package/dist/widget/components/MeldForm.d.ts.map +0 -1
- package/dist/widget/components/MeldForm.js +0 -447
- package/dist/widget/components/MeldHistory.d.ts +0 -13
- package/dist/widget/components/MeldHistory.d.ts.map +0 -1
- package/dist/widget/components/MeldHistory.js +0 -307
- package/dist/widget/components/MeldStepsFlow.d.ts +0 -6
- package/dist/widget/components/MeldStepsFlow.d.ts.map +0 -1
- package/dist/widget/components/MeldStepsFlow.js +0 -785
- package/dist/widget/components/MeldTransactionStatus.d.ts +0 -20
- package/dist/widget/components/MeldTransactionStatus.d.ts.map +0 -1
- package/dist/widget/components/MeldTransactionStatus.js +0 -157
- package/dist/widget/components/MeshExchangeAccountHeader.d.ts +0 -9
- package/dist/widget/components/MeshExchangeAccountHeader.d.ts.map +0 -1
- package/dist/widget/components/MeshExchangeAccountHeader.js +0 -30
- package/dist/widget/components/Modal.d.ts +0 -9
- package/dist/widget/components/Modal.d.ts.map +0 -1
- package/dist/widget/components/Modal.js +0 -65
- package/dist/widget/components/OFTProgressBar.d.ts +0 -16
- package/dist/widget/components/OFTProgressBar.d.ts.map +0 -1
- package/dist/widget/components/OFTProgressBar.js +0 -49
- package/dist/widget/components/OnRampProviderSelector.d.ts +0 -13
- package/dist/widget/components/OnRampProviderSelector.d.ts.map +0 -1
- package/dist/widget/components/OnRampProviderSelector.js +0 -144
- package/dist/widget/components/OnrampErrorScreen.d.ts +0 -15
- package/dist/widget/components/OnrampErrorScreen.d.ts.map +0 -1
- package/dist/widget/components/OnrampErrorScreen.js +0 -102
- package/dist/widget/components/OnrampHistoryRow.d.ts +0 -13
- package/dist/widget/components/OnrampHistoryRow.d.ts.map +0 -1
- package/dist/widget/components/OnrampHistoryRow.js +0 -249
- package/dist/widget/components/OnrampPaymentMethods.d.ts +0 -7
- package/dist/widget/components/OnrampPaymentMethods.d.ts.map +0 -1
- package/dist/widget/components/OnrampPaymentMethods.js +0 -54
- package/dist/widget/components/OnrampProviderConfirmation.d.ts +0 -30
- package/dist/widget/components/OnrampProviderConfirmation.d.ts.map +0 -1
- package/dist/widget/components/OnrampProviderConfirmation.js +0 -705
- package/dist/widget/components/OriginSelectionAmount.d.ts +0 -12
- package/dist/widget/components/OriginSelectionAmount.d.ts.map +0 -1
- package/dist/widget/components/OriginSelectionAmount.js +0 -104
- package/dist/widget/components/OriginTransferInformation.d.ts +0 -10
- package/dist/widget/components/OriginTransferInformation.d.ts.map +0 -1
- package/dist/widget/components/OriginTransferInformation.js +0 -56
- package/dist/widget/components/Pay.d.ts +0 -7
- package/dist/widget/components/Pay.d.ts.map +0 -1
- package/dist/widget/components/Pay.js +0 -649
- package/dist/widget/components/PaymentMethods.d.ts +0 -10
- package/dist/widget/components/PaymentMethods.d.ts.map +0 -1
- package/dist/widget/components/PaymentMethods.js +0 -118
- package/dist/widget/components/PercentageMaxButtons.d.ts +0 -14
- package/dist/widget/components/PercentageMaxButtons.d.ts.map +0 -1
- package/dist/widget/components/PercentageMaxButtons.js +0 -62
- package/dist/widget/components/PoolDeposit.d.ts +0 -32
- package/dist/widget/components/PoolDeposit.d.ts.map +0 -1
- package/dist/widget/components/PoolDeposit.js +0 -426
- package/dist/widget/components/PriceImpactWarning.d.ts +0 -11
- package/dist/widget/components/PriceImpactWarning.d.ts.map +0 -1
- package/dist/widget/components/PriceImpactWarning.js +0 -58
- package/dist/widget/components/PulsatingButton.d.ts +0 -9
- package/dist/widget/components/PulsatingButton.d.ts.map +0 -1
- package/dist/widget/components/PulsatingButton.js +0 -48
- package/dist/widget/components/QRCodeOptions.d.ts +0 -9
- package/dist/widget/components/QRCodeOptions.d.ts.map +0 -1
- package/dist/widget/components/QRCodeOptions.js +0 -57
- package/dist/widget/components/QRCodeWalletSelect.d.ts +0 -13
- package/dist/widget/components/QRCodeWalletSelect.d.ts.map +0 -1
- package/dist/widget/components/QRCodeWalletSelect.js +0 -45
- package/dist/widget/components/QrCode.d.ts +0 -10
- package/dist/widget/components/QrCode.d.ts.map +0 -1
- package/dist/widget/components/QrCode.js +0 -69
- package/dist/widget/components/QuoteDetails.d.ts +0 -25
- package/dist/widget/components/QuoteDetails.d.ts.map +0 -1
- package/dist/widget/components/QuoteDetails.js +0 -728
- package/dist/widget/components/QuoteInputErrorBlock.d.ts +0 -7
- package/dist/widget/components/QuoteInputErrorBlock.d.ts.map +0 -1
- package/dist/widget/components/QuoteInputErrorBlock.js +0 -22
- package/dist/widget/components/Receipt.d.ts +0 -18
- package/dist/widget/components/Receipt.d.ts.map +0 -1
- package/dist/widget/components/Receipt.js +0 -443
- package/dist/widget/components/ReceiptRecoverableFunds.d.ts +0 -25
- package/dist/widget/components/ReceiptRecoverableFunds.d.ts.map +0 -1
- package/dist/widget/components/ReceiptRecoverableFunds.js +0 -75
- package/dist/widget/components/RecentChains.d.ts +0 -9
- package/dist/widget/components/RecentChains.d.ts.map +0 -1
- package/dist/widget/components/RecentChains.js +0 -28
- package/dist/widget/components/RecentTokens.d.ts +0 -10
- package/dist/widget/components/RecentTokens.d.ts.map +0 -1
- package/dist/widget/components/RecentTokens.js +0 -37
- package/dist/widget/components/RecipientSelectorButton.d.ts +0 -6
- package/dist/widget/components/RecipientSelectorButton.d.ts.map +0 -1
- package/dist/widget/components/RecipientSelectorButton.js +0 -36
- package/dist/widget/components/Recipients.d.ts +0 -9
- package/dist/widget/components/Recipients.d.ts.map +0 -1
- package/dist/widget/components/Recipients.js +0 -208
- package/dist/widget/components/RefundWarning.d.ts +0 -11
- package/dist/widget/components/RefundWarning.d.ts.map +0 -1
- package/dist/widget/components/RefundWarning.js +0 -33
- package/dist/widget/components/RequiredPropsError.d.ts +0 -8
- package/dist/widget/components/RequiredPropsError.d.ts.map +0 -1
- package/dist/widget/components/RequiredPropsError.js +0 -14
- package/dist/widget/components/ScreenHeader.d.ts +0 -13
- package/dist/widget/components/ScreenHeader.d.ts.map +0 -1
- package/dist/widget/components/ScreenHeader.js +0 -64
- package/dist/widget/components/SearchInputField.d.ts +0 -14
- package/dist/widget/components/SearchInputField.d.ts.map +0 -1
- package/dist/widget/components/SearchInputField.js +0 -51
- package/dist/widget/components/SessionTimeoutScreen.d.ts +0 -12
- package/dist/widget/components/SessionTimeoutScreen.d.ts.map +0 -1
- package/dist/widget/components/SessionTimeoutScreen.js +0 -64
- package/dist/widget/components/ShadowPortal.d.ts +0 -6
- package/dist/widget/components/ShadowPortal.d.ts.map +0 -1
- package/dist/widget/components/ShadowPortal.js +0 -52
- package/dist/widget/components/ShadowRootContext.d.ts +0 -8
- package/dist/widget/components/ShadowRootContext.d.ts.map +0 -1
- package/dist/widget/components/ShadowRootContext.js +0 -12
- package/dist/widget/components/SimpleRecipientInputScreen.d.ts +0 -13
- package/dist/widget/components/SimpleRecipientInputScreen.d.ts.map +0 -1
- package/dist/widget/components/SimpleRecipientInputScreen.js +0 -48
- package/dist/widget/components/SlippageToleranceSettings.d.ts +0 -9
- package/dist/widget/components/SlippageToleranceSettings.d.ts.map +0 -1
- package/dist/widget/components/SlippageToleranceSettings.js +0 -159
- package/dist/widget/components/Swap.d.ts +0 -43
- package/dist/widget/components/Swap.d.ts.map +0 -1
- package/dist/widget/components/Swap.js +0 -6
- package/dist/widget/components/SwapDisplay.d.ts +0 -9
- package/dist/widget/components/SwapDisplay.d.ts.map +0 -1
- package/dist/widget/components/SwapDisplay.js +0 -72
- package/dist/widget/components/ThemeProvider.d.ts +0 -16
- package/dist/widget/components/ThemeProvider.d.ts.map +0 -1
- package/dist/widget/components/ThemeProvider.js +0 -52
- package/dist/widget/components/ThemeSyncer.d.ts +0 -6
- package/dist/widget/components/ThemeSyncer.d.ts.map +0 -1
- package/dist/widget/components/ThemeSyncer.js +0 -25
- package/dist/widget/components/Toast.d.ts +0 -24
- package/dist/widget/components/Toast.d.ts.map +0 -1
- package/dist/widget/components/Toast.js +0 -206
- package/dist/widget/components/TokenDisplayNonSelectable.d.ts +0 -11
- package/dist/widget/components/TokenDisplayNonSelectable.d.ts.map +0 -1
- package/dist/widget/components/TokenDisplayNonSelectable.js +0 -30
- package/dist/widget/components/TokenImage.d.ts +0 -11
- package/dist/widget/components/TokenImage.d.ts.map +0 -1
- package/dist/widget/components/TokenImage.js +0 -96
- package/dist/widget/components/TokenList.d.ts +0 -20
- package/dist/widget/components/TokenList.d.ts.map +0 -1
- package/dist/widget/components/TokenList.js +0 -45
- package/dist/widget/components/TokenSelector.d.ts +0 -32
- package/dist/widget/components/TokenSelector.d.ts.map +0 -1
- package/dist/widget/components/TokenSelector.js +0 -479
- package/dist/widget/components/TokenSelectorButton.d.ts +0 -17
- package/dist/widget/components/TokenSelectorButton.d.ts.map +0 -1
- package/dist/widget/components/TokenSelectorButton.js +0 -64
- package/dist/widget/components/TokenSkeleton.d.ts +0 -12
- package/dist/widget/components/TokenSkeleton.d.ts.map +0 -1
- package/dist/widget/components/TokenSkeleton.js +0 -36
- package/dist/widget/components/Tooltip.d.ts +0 -14
- package/dist/widget/components/Tooltip.d.ts.map +0 -1
- package/dist/widget/components/Tooltip.js +0 -38
- package/dist/widget/components/TrailsHookModal.d.ts +0 -10
- package/dist/widget/components/TrailsHookModal.d.ts.map +0 -1
- package/dist/widget/components/TrailsHookModal.js +0 -55
- package/dist/widget/components/TransactionDetails.d.ts +0 -10
- package/dist/widget/components/TransactionDetails.d.ts.map +0 -1
- package/dist/widget/components/TransactionDetails.js +0 -492
- package/dist/widget/components/TransactionHistoryItem.d.ts +0 -23
- package/dist/widget/components/TransactionHistoryItem.d.ts.map +0 -1
- package/dist/widget/components/TransactionHistoryItem.js +0 -547
- package/dist/widget/components/TransferPendingVertical.d.ts +0 -16
- package/dist/widget/components/TransferPendingVertical.d.ts.map +0 -1
- package/dist/widget/components/TransferPendingVertical.js +0 -356
- package/dist/widget/components/TruncatedTransactionHash.d.ts +0 -12
- package/dist/widget/components/TruncatedTransactionHash.d.ts.map +0 -1
- package/dist/widget/components/TruncatedTransactionHash.js +0 -36
- package/dist/widget/components/UserPreferences.d.ts +0 -7
- package/dist/widget/components/UserPreferences.d.ts.map +0 -1
- package/dist/widget/components/UserPreferences.js +0 -282
- package/dist/widget/components/WaasFeeOptions.d.ts +0 -12
- package/dist/widget/components/WaasFeeOptions.d.ts.map +0 -1
- package/dist/widget/components/WaasFeeOptions.js +0 -349
- package/dist/widget/components/WalletAccountHeader.d.ts +0 -8
- package/dist/widget/components/WalletAccountHeader.d.ts.map +0 -1
- package/dist/widget/components/WalletAccountHeader.js +0 -45
- package/dist/widget/components/WalletConfirmation.d.ts +0 -15
- package/dist/widget/components/WalletConfirmation.d.ts.map +0 -1
- package/dist/widget/components/WalletConfirmation.js +0 -145
- package/dist/widget/components/WalletConnect.d.ts +0 -11
- package/dist/widget/components/WalletConnect.d.ts.map +0 -1
- package/dist/widget/components/WalletConnect.js +0 -164
- package/dist/widget/components/WalletConnectionPending.d.ts +0 -12
- package/dist/widget/components/WalletConnectionPending.d.ts.map +0 -1
- package/dist/widget/components/WalletConnectionPending.js +0 -124
- package/dist/widget/components/WalletList.d.ts +0 -16
- package/dist/widget/components/WalletList.d.ts.map +0 -1
- package/dist/widget/components/WalletList.js +0 -88
- package/dist/widget/components/WidgetProviders.d.ts +0 -16
- package/dist/widget/components/WidgetProviders.d.ts.map +0 -1
- package/dist/widget/components/WidgetProviders.js +0 -43
- package/dist/widget/components/Withdraw.d.ts +0 -12
- package/dist/widget/components/Withdraw.d.ts.map +0 -1
- package/dist/widget/components/Withdraw.js +0 -551
- package/dist/widget/components/YellowWarningAnimation.d.ts +0 -2
- package/dist/widget/components/YellowWarningAnimation.d.ts.map +0 -1
- package/dist/widget/components/YellowWarningAnimation.js +0 -167
- package/dist/widget/components/earnMarketUtils.d.ts +0 -11
- package/dist/widget/components/earnMarketUtils.d.ts.map +0 -1
- package/dist/widget/components/earnMarketUtils.js +0 -48
- package/dist/widget/components/earnNetworks.d.ts +0 -6
- package/dist/widget/components/earnNetworks.d.ts.map +0 -1
- package/dist/widget/components/earnNetworks.js +0 -33
- package/dist/widget/index.d.ts.map +0 -1
- package/dist/widget/modes/EarnWidget.d.ts +0 -90
- package/dist/widget/modes/EarnWidget.d.ts.map +0 -1
- package/dist/widget/modes/EarnWidget.js +0 -41
- package/dist/widget/modes/FundWidget.d.ts +0 -110
- package/dist/widget/modes/FundWidget.d.ts.map +0 -1
- package/dist/widget/modes/FundWidget.js +0 -48
- package/dist/widget/modes/PayWidget.d.ts +0 -80
- package/dist/widget/modes/PayWidget.d.ts.map +0 -1
- package/dist/widget/modes/PayWidget.js +0 -40
- package/dist/widget/modes/SwapWidget.d.ts +0 -76
- package/dist/widget/modes/SwapWidget.d.ts.map +0 -1
- package/dist/widget/modes/SwapWidget.js +0 -41
- package/dist/widget/modes/WithdrawWidget.d.ts +0 -87
- package/dist/widget/modes/WithdrawWidget.d.ts.map +0 -1
- package/dist/widget/modes/WithdrawWidget.js +0 -38
- package/dist/widget/props.d.ts +0 -255
- package/dist/widget/props.d.ts.map +0 -1
- package/dist/widget/props.js +0 -14
- package/dist/widget/providers/TrailsModalProvider.d.ts +0 -78
- package/dist/widget/providers/TrailsModalProvider.d.ts.map +0 -1
- package/dist/widget/providers/TrailsModalProvider.js +0 -57
- package/dist/widget/providers/TrailsProvider.d.ts +0 -100
- package/dist/widget/providers/TrailsProvider.d.ts.map +0 -1
- package/dist/widget/providers/TrailsProvider.js +0 -101
- package/dist/widget/providers/UserActivityProvider.d.ts +0 -18
- package/dist/widget/providers/UserActivityProvider.d.ts.map +0 -1
- package/dist/widget/providers/UserActivityProvider.js +0 -38
- package/dist/widget/providers/WalletContext.d.ts +0 -10
- package/dist/widget/providers/WalletContext.d.ts.map +0 -1
- package/dist/widget/providers/WalletContext.js +0 -23
- package/dist/widget/providers/WidgetProviderTree.d.ts +0 -24
- package/dist/widget/providers/WidgetProviderTree.d.ts.map +0 -1
- package/dist/widget/providers/WidgetProviderTree.js +0 -35
- package/dist/widget/providers/adapterConfig.d.ts +0 -13
- package/dist/widget/providers/adapterConfig.d.ts.map +0 -1
- package/dist/widget/providers/adapterConfig.js +0 -97
- package/dist/widget/providers/sequenceSupport.d.ts +0 -42
- package/dist/widget/providers/sequenceSupport.d.ts.map +0 -1
- package/dist/widget/providers/walletRuntimeResolution.d.ts +0 -10
- package/dist/widget/providers/walletRuntimeResolution.d.ts.map +0 -1
- package/dist/widget/providers/walletRuntimeResolution.js +0 -14
- package/dist/widget/shared/destinationDefaultToken.d.ts +0 -15
- package/dist/widget/shared/destinationDefaultToken.d.ts.map +0 -1
- package/dist/widget/shared/destinationDefaultToken.js +0 -18
- package/dist/widget/shared/destinationSupport.d.ts +0 -40
- package/dist/widget/shared/destinationSupport.d.ts.map +0 -1
- package/dist/widget/shared/destinationSupport.js +0 -215
- package/dist/widget/shared/mapSharedProps.d.ts +0 -9
- package/dist/widget/shared/mapSharedProps.d.ts.map +0 -1
- package/dist/widget/shared/mapSharedProps.js +0 -22
- package/dist/widget/shared/methodMap.d.ts +0 -18
- package/dist/widget/shared/methodMap.d.ts.map +0 -1
- package/dist/widget/shared/methodMap.js +0 -25
- package/dist/widget/shared/resolution.d.ts +0 -8
- package/dist/widget/shared/resolution.d.ts.map +0 -1
- package/dist/widget/shared/resolution.js +0 -63
- package/dist/widget/shared/resolvePaymentSource.d.ts +0 -37
- package/dist/widget/shared/resolvePaymentSource.d.ts.map +0 -1
- package/dist/widget/shared/resolvePaymentSource.js +0 -19
- package/dist/widget/shared/types.d.ts +0 -142
- package/dist/widget/shared/types.d.ts.map +0 -1
- package/dist/widget/styles.gen.d.ts +0 -2
- package/dist/widget/styles.gen.d.ts.map +0 -1
- package/dist/widget/styles.gen.js +0 -29
- package/dist/widget/types/analytics.d.ts +0 -22
- package/dist/widget/types/analytics.d.ts.map +0 -1
- package/dist/widget/types/commonProps.d.ts +0 -48
- package/dist/widget/types/commonProps.d.ts.map +0 -1
- package/dist/widget/utils/countryUtils.d.ts +0 -37
- package/dist/widget/utils/countryUtils.d.ts.map +0 -1
- package/dist/widget/utils/countryUtils.js +0 -14
- package/dist/widget/utils/forexRateStore.d.ts +0 -25
- package/dist/widget/utils/forexRateStore.d.ts.map +0 -1
- package/dist/widget/utils/forexRateStore.js +0 -59
- package/dist/widget/utils/fundMethodSwitchState.d.ts +0 -14
- package/dist/widget/utils/fundMethodSwitchState.d.ts.map +0 -1
- package/dist/widget/utils/fundMethodSwitchState.js +0 -6
- package/dist/widget/utils/historyFilters.d.ts +0 -13
- package/dist/widget/utils/historyFilters.d.ts.map +0 -1
- package/dist/widget/utils/historyFilters.js +0 -108
- package/dist/widget/utils/localeStore.d.ts +0 -19
- package/dist/widget/utils/localeStore.d.ts.map +0 -1
- package/dist/widget/utils/localeStore.js +0 -39
- package/dist/widget/utils/meldProviderUtils.d.ts +0 -6
- package/dist/widget/utils/meldProviderUtils.d.ts.map +0 -1
- package/dist/widget/utils/meldProviderUtils.js +0 -9
- package/dist/widget/utils/meshSupportedTokens.d.ts +0 -4
- package/dist/widget/utils/meshSupportedTokens.d.ts.map +0 -1
- package/dist/widget/utils/meshSupportedTokens.js +0 -12
- package/dist/widget/utils/onrampConfig.d.ts +0 -11
- package/dist/widget/utils/onrampConfig.d.ts.map +0 -1
- package/dist/widget/utils/onrampConfig.js +0 -6
- package/dist/widget/utils/statusLabel.d.ts +0 -2
- package/dist/widget/utils/statusLabel.d.ts.map +0 -1
- package/dist/widget/utils/statusLabel.js +0 -6
- package/dist/widget/utils/tokens.d.ts +0 -60
- package/dist/widget/utils/tokens.d.ts.map +0 -1
- package/dist/widget/utils/tokens.js +0 -16
- package/dist/widget/utils/trailsOnrampConfig.d.ts +0 -23
- package/dist/widget/utils/trailsOnrampConfig.d.ts.map +0 -1
- package/dist/widget/utils/trailsOnrampConfig.js +0 -7
- package/dist/widget/utils/transactionFailure.d.ts +0 -20
- package/dist/widget/utils/transactionFailure.d.ts.map +0 -1
- package/dist/widget/utils/transactionFailure.js +0 -12
- package/dist/widget/utils/viewManagerGuards.d.ts +0 -5
- package/dist/widget/utils/viewManagerGuards.d.ts.map +0 -1
- package/dist/widget/utils/viewManagerGuards.js +0 -24
- package/dist/widget/utils/walletConnectRedirect.d.ts +0 -19
- package/dist/widget/utils/walletConnectRedirect.d.ts.map +0 -1
- package/dist/widget/utils/walletConnectRedirect.js +0 -21
- package/dist/widget/utils/windowUtils.d.ts +0 -13
- package/dist/widget/utils/windowUtils.d.ts.map +0 -1
- package/dist/widget/utils/windowUtils.js +0 -84
- package/dist/widget/widget.d.ts +0 -16
- package/dist/widget/widget.d.ts.map +0 -1
- package/dist/widget/widget.js +0 -1541
- package/dist/widgetFlowHooks.d.ts +0 -12
- package/dist/widgetFlowHooks.d.ts.map +0 -1
- package/dist/widgetFlowHooks.js +0 -18
package/dist/widget/widget.js
DELETED
|
@@ -1,1541 +0,0 @@
|
|
|
1
|
-
import { getErrorCode as cr, getFullErrorMessage as dr, getIsApiError as ur, getIsBalanceTooLowError as mr, getIsRateLimitedError as fr, getIsUserRejectionError as pr, getPrettifiedErrorMessage as gr } from "../error.js";
|
|
2
|
-
import { logger as n } from "../logger/index.js";
|
|
3
|
-
import { elapsed as hr, toSeconds as Cr } from "../utils/time.js";
|
|
4
|
-
import { getChainInfo as vr } from "../chains.js";
|
|
5
|
-
import { abortControllerRegistry as kr } from "../abortController.js";
|
|
6
|
-
import { addressEqual as He, isNativeToken as wr, normalizeAddress as Sr } from "../utils/address.js";
|
|
7
|
-
import { useResolvedWidgetWalletRuntimeMode as yr } from "./providers/walletRuntimeResolution.js";
|
|
8
|
-
import { ShadowPortal as Tr } from "./components/ShadowPortal.js";
|
|
9
|
-
import { ThemeProvider as br } from "./components/ThemeProvider.js";
|
|
10
|
-
import { useWidgetProps as At } from "../hooks/useWidgetProps.js";
|
|
11
|
-
import { useSupportsWidgetWalletSelection as xr, useWidgetWalletRuntimeMode as Ar } from "./providers/WalletContext.js";
|
|
12
|
-
import { useWalletConnectionContext as Wr } from "../hooks/useWalletConnectionContext.js";
|
|
13
|
-
import { getWethAddress as Ir } from "../tokenRegistry.js";
|
|
14
|
-
import { useOriginSelectedToken as Er } from "../hooks/useOriginSelectedToken.js";
|
|
15
|
-
import { useDestinationSelectedToken as Mr } from "../hooks/useDestinationSelectedToken.js";
|
|
16
|
-
import { isValidInteger as Rr, isValidNumeric as Or } from "../utils/validation.js";
|
|
17
|
-
import { useSelectedFeeOption as Pr } from "../hooks/useSelectedFeeOption.js";
|
|
18
|
-
import { useSelectedRecipient as Nr } from "../hooks/useSelectedRecipient.js";
|
|
19
|
-
import { useEarnPool as Br } from "../hooks/useEarnPool.js";
|
|
20
|
-
import { getSessionId as Wt } from "../analytics.js";
|
|
21
|
-
import { isExternalFundingMethod as Fr } from "../transactionIntent/types.js";
|
|
22
|
-
import { invalidateTokenBalancesCache as It } from "../query/balance.queries.js";
|
|
23
|
-
import { useSwapState as Ur } from "../hooks/useSwapState.js";
|
|
24
|
-
import { getInitialScreen as qr, useNavigationEffect as Hr, useScreenGuard as Un, useViewManager as jr } from "../hooks/useViewManager.js";
|
|
25
|
-
import { WidgetProviders as Dr } from "./components/WidgetProviders.js";
|
|
26
|
-
import Lr from "./components/Modal.js";
|
|
27
|
-
import { useOnrampClient as Qr } from "../onrampClient.js";
|
|
28
|
-
import { trailsOnramp as Kr } from "../onramp/trailsOnramp.js";
|
|
29
|
-
import { getWidgetOnrampConfig as $r } from "./utils/trailsOnrampConfig.js";
|
|
30
|
-
import { ChainList as Vr } from "./components/ChainList.js";
|
|
31
|
-
import Et from "./components/TokenList.js";
|
|
32
|
-
import Gr from "./components/OriginSelectionAmount.js";
|
|
33
|
-
import { PriceImpactWarningProvider as zr } from "../hooks/usePriceImpactWarning.js";
|
|
34
|
-
import { hasAnyFailedOrAbortedTransactions as _r } from "./utils/transactionFailure.js";
|
|
35
|
-
import Jr from "./components/QuoteDetails.js";
|
|
36
|
-
import Xr from "./components/WalletConfirmation.js";
|
|
37
|
-
import Yr from "./components/TransferPendingVertical.js";
|
|
38
|
-
import Zr from "./components/Receipt.js";
|
|
39
|
-
import { useRecentTokens as ea } from "../hooks/useRecentTokens.js";
|
|
40
|
-
import { useTrailsModal as na } from "./providers/TrailsModalProvider.js";
|
|
41
|
-
import { resolveTrailsAdapterConfig as ta } from "./providers/adapterConfig.js";
|
|
42
|
-
import { TrailsContext as oa, useTrails as ra } from "./providers/TrailsProvider.js";
|
|
43
|
-
import { DefaultProviders as aa } from "./providers/WidgetProviderTree.js";
|
|
44
|
-
import { useWidgetAnalytics as sa } from "../analytics/hooks/useWidgetAnalytics.js";
|
|
45
|
-
import { cssObjectToString as ia } from "../cssUtils.js";
|
|
46
|
-
import la from "../pools.js";
|
|
47
|
-
import { generateAaveDepositCalldata as ca, generateMorphoDepositCalldata as da } from "../poolUtils.js";
|
|
48
|
-
import { ErrorDisplay as ua } from "./components/ErrorDisplay.js";
|
|
49
|
-
import { AccountIntentTransactionHistory as ma } from "./components/AccountIntentTransactionHistory.js";
|
|
50
|
-
import fa from "./components/AccountSettings.js";
|
|
51
|
-
import Mt from "./components/ConnectWallet.js";
|
|
52
|
-
import Rt from "./components/LoadingSpinner.js";
|
|
53
|
-
import { MeldStepsFlow as pa } from "./components/MeldStepsFlow.js";
|
|
54
|
-
import ga from "./components/MeldHistory.js";
|
|
55
|
-
import ha from "./components/Disconnect.js";
|
|
56
|
-
import { useTargetAmount as Ca } from "../hooks/useTargetAmount.js";
|
|
57
|
-
import { Earn as va } from "./components/Earn.js";
|
|
58
|
-
import ka from "./components/EarnPools.js";
|
|
59
|
-
import wa from "./components/Footer.js";
|
|
60
|
-
import { useOnRampProviderWidget as Sa } from "../hooks/useOnRampProviderWidget.js";
|
|
61
|
-
import { useExchangeFundingSelection as ya } from "../hooks/useExchangeFundingSelection.js";
|
|
62
|
-
import { Fund as Ta } from "./components/Fund.js";
|
|
63
|
-
import { Withdraw as ba } from "./components/Withdraw.js";
|
|
64
|
-
import xa from "./components/FundMethods.js";
|
|
65
|
-
import { MeshExchangeSelection as Aa } from "../onramp/mesh/components/MeshExchangeSelection.js";
|
|
66
|
-
import { MeshExchangeConfirmation as Wa } from "../onramp/mesh/components/MeshExchangeConfirmation.js";
|
|
67
|
-
import { MeshSessionOptions as Ia } from "../onramp/mesh/components/MeshSessionOptions.js";
|
|
68
|
-
import Ea from "./components/OnrampPaymentMethods.js";
|
|
69
|
-
import Ma from "./components/Pay.js";
|
|
70
|
-
import Ra from "./components/DirectTransfer.js";
|
|
71
|
-
import Oa from "./components/OnrampProviderConfirmation.js";
|
|
72
|
-
import Pa from "./components/QRCodeOptions.js";
|
|
73
|
-
import Na from "./components/QRCodeWalletSelect.js";
|
|
74
|
-
import Ba from "./components/Recipients.js";
|
|
75
|
-
import Fa from "./components/Swap.js";
|
|
76
|
-
import { ThemeSyncer as Ua } from "./components/ThemeSyncer.js";
|
|
77
|
-
import qa from "./components/UserPreferences.js";
|
|
78
|
-
import Ha from "./components/WalletConnect.js";
|
|
79
|
-
import ja from "./components/WalletConnectionPending.js";
|
|
80
|
-
import { FundWalletSelection as Da } from "./components/FundWalletSelection.js";
|
|
81
|
-
import La from "./components/WalletList.js";
|
|
82
|
-
import { useCheckout as Qa } from "../hooks/useCheckout.js";
|
|
83
|
-
import { useDebugScreens as Ka } from "../hooks/useDebugScreens.js";
|
|
84
|
-
import { useExternalFundingReceiptSync as $a } from "../hooks/useExternalFundingReceiptSync.js";
|
|
85
|
-
import { clearFundStateForMethodSwitch as Va } from "./utils/fundMethodSwitchState.js";
|
|
86
|
-
import { WidgetFundMethod as Y, isValidDestinationTokenProp as Ga } from "./props.js";
|
|
87
|
-
import za from "./components/PaymentMethods.js";
|
|
88
|
-
import { shouldClearTransferFlowOnNavigate as _a, shouldRedirectToConnect as Ja } from "./utils/viewManagerGuards.js";
|
|
89
|
-
import { resolveTokenListFundMethod as Xa, resolveWalletConnectRedirect as Ya, shouldReturnFundTokenListBackHome as Za } from "./utils/walletConnectRedirect.js";
|
|
90
|
-
import { useMeshOnrampSessionState as es } from "../onramp/mesh/hooks/useMeshOnrampSessionState.js";
|
|
91
|
-
import { useMeshOnrampFlow as ns } from "../onramp/mesh/hooks/useMeshOnrampFlow.js";
|
|
92
|
-
import { isAddress as ts, zeroAddress as qn } from "viem";
|
|
93
|
-
import Hn, { StrictMode as Ot, Suspense as Pt, forwardRef as jn, lazy as Bt, useCallback as ie, useEffect as v, useImperativeHandle as os, useMemo as je, useRef as L, useState as d } from "react";
|
|
94
|
-
import { AnimatePresence as Nt, m as ln } from "motion/react";
|
|
95
|
-
import { useActiveWalletRuntimeConnection as rs, useHasWalletContext as as, useIsSequenceWallet as ss, useWalletAccountEffect as is, useWalletActions as ls, useWalletClient as cs, useWalletConnectOptions as ds, useWalletSession as us } from "@0xtrails/wallet";
|
|
96
|
-
import { jsx as r, jsxs as q } from "react/jsx-runtime";
|
|
97
|
-
import { getQRCodeWallets as ms } from "@0xtrails/wallet/registry";
|
|
98
|
-
import { getRememberedNativeWalletIds as fs, usePersistedNativeWalletState as ps } from "@0xtrails/wallet/runtime";
|
|
99
|
-
function gs(s) {
|
|
100
|
-
return s.activeAccount?.address ?? s.accounts[0]?.address ?? null;
|
|
101
|
-
}
|
|
102
|
-
var hs = Bt(() => import("./components/BluvoExchangeSelection.lazy.js")), Cs = Bt(() => import("./components/BluvoOnrampFlow.lazy.js")), vs = (s, j, g) => {
|
|
103
|
-
const [c, k] = d(""), [w, Z] = d(null), [H, U] = d(""), [W, Q] = d(null), [O, B] = d([]), [K, I] = d(!1), [De, Le] = d(!1);
|
|
104
|
-
return v(() => {
|
|
105
|
-
if (s && c && w && !K) {
|
|
106
|
-
try {
|
|
107
|
-
s({
|
|
108
|
-
txHash: c,
|
|
109
|
-
chainId: w,
|
|
110
|
-
sessionId: Wt()
|
|
111
|
-
});
|
|
112
|
-
} catch (P) {
|
|
113
|
-
n.console.error("[trails-sdk] Error calling onOriginConfirmation:", P);
|
|
114
|
-
}
|
|
115
|
-
I(!0);
|
|
116
|
-
}
|
|
117
|
-
}, [
|
|
118
|
-
c,
|
|
119
|
-
w,
|
|
120
|
-
K,
|
|
121
|
-
s
|
|
122
|
-
]), v(() => {
|
|
123
|
-
if (j && H && W && !De) {
|
|
124
|
-
try {
|
|
125
|
-
j({
|
|
126
|
-
txHash: H,
|
|
127
|
-
chainId: W,
|
|
128
|
-
sessionId: Wt()
|
|
129
|
-
});
|
|
130
|
-
} catch (P) {
|
|
131
|
-
n.console.error("[trails-sdk] Error calling onDestinationConfirmation:", P);
|
|
132
|
-
}
|
|
133
|
-
Le(!0);
|
|
134
|
-
}
|
|
135
|
-
}, [
|
|
136
|
-
H,
|
|
137
|
-
W,
|
|
138
|
-
De,
|
|
139
|
-
j
|
|
140
|
-
]), v(() => {
|
|
141
|
-
!O || O.length === 0 || O.every((P) => P.state === "confirmed") && g && (n.console.log("[trails-sdk] All transactions confirmed, triggering completion"), g({ transactionStates: O }));
|
|
142
|
-
}, [O, g]), {
|
|
143
|
-
originTxHash: c,
|
|
144
|
-
setOriginTxHash: ie((P) => {
|
|
145
|
-
k(P), P === "" && I(!1);
|
|
146
|
-
}, []),
|
|
147
|
-
originChainId: w,
|
|
148
|
-
setOriginChainId: Z,
|
|
149
|
-
destinationTxHash: H,
|
|
150
|
-
setDestinationTxHash: ie((P) => {
|
|
151
|
-
U(P), P === "" && Le(!1);
|
|
152
|
-
}, []),
|
|
153
|
-
destinationChainId: W,
|
|
154
|
-
setDestinationChainId: Q,
|
|
155
|
-
transactionStates: O,
|
|
156
|
-
setTransactionStates: B
|
|
157
|
-
};
|
|
158
|
-
}, ks = jn((s, j) => {
|
|
159
|
-
const { toAddress: g, toAmount: c, toChainId: k, toToken: w, defaultToChainId: Z, defaultToToken: H, toCalldata: U, fromToken: W, fromChainId: Q, fromAmount: O, fromAccount: B, children: K, renderInline: I = !1, onOriginConfirmation: De, onDestinationConfirmation: Le, onStart: P, onQuote: Ft, onSignRequest: Ut, onSign: qt, onSignReject: Ht, onApproveRequest: jt, onApprove: Dt, onApproveReject: Lt, onSuccess: Qt, onError: Kt, onStatus: $t, onOpen: Dn, onClose: Ln, buttonText: Vt, swapProvider: ye, bridgeProvider: Te, swapProviderFallback: be, bridgeProviderFallback: xe, priceImpactWarningThresholdBps: Gt, priceImpactWarningMessage: zt, priceImpactFallbackBridgeUrl: _t, defaultInputMode: Qn, fundMethod: E, fundTradeType: Jt, exchangeProvider: Xt, fundOptions: Kn } = At(), $ = us(), f = je(() => {
|
|
160
|
-
const e = $.connections.filter((C) => C.namespace === "eip155"), t = $.wallets.filter((C) => C.namespace === "eip155"), a = $.activeConnection?.namespace === "eip155" ? $.activeConnection : e[0], l = a?.activeAccount?.namespace === "eip155" ? a.activeAccount : a?.accounts.find((C) => C.namespace === "eip155");
|
|
161
|
-
return {
|
|
162
|
-
...$,
|
|
163
|
-
namespace: "eip155",
|
|
164
|
-
namespaces: $.namespaces.includes("eip155") ? ["eip155"] : $.namespaces.length > 0 ? [] : ["eip155"],
|
|
165
|
-
wallets: t,
|
|
166
|
-
connections: e,
|
|
167
|
-
activeConnection: a,
|
|
168
|
-
activeAccount: l
|
|
169
|
-
};
|
|
170
|
-
}, [$]), Yt = rs()?.connector, S = f.activeAccount?.address, Zt = f.activeAccount?.chainId, { trailsApiKey: cn, trailsApiUrl: dn } = ra(), Qe = xr(), un = Ar(), $n = ps(), eo = Qr(), no = je(() => ms(), []), Ke = ss(), Vn = ds(), Ae = je(() => Vn.filter((e) => e.namespace === "eip155"), [Vn]), { connect: mn, disconnect: to, switchAccount: We } = ls(), V = f.connections.length > 0, oo = Ae.some((e) => e.connected || e.placement === "hidden" ? !1 : e.id !== "injected"), Gn = (un === "adapter" || un === "parent") && !V && !oo;
|
|
171
|
-
v(() => {
|
|
172
|
-
Gn && n.console.warn("[trails-sdk] No widget-selectable wallet options are available while disconnected. The widget will stay mounted and the wallet list will show setup guidance. Common fix: add WalletConnect or explicit wallet descriptors instead of exposing only a generic injected connector.");
|
|
173
|
-
}, [Gn]);
|
|
174
|
-
const { recentTokens: ee, addRecentToken: ro } = ea(S), { selectedToken: F, setSelectedToken: zn, clearSelectedToken: le, availableOriginTokensError: ao } = Er(), { availableDestinationTokensError: so } = Mr(), { onramp: fn } = At(), $e = $r(fn), Ve = typeof fn == "function" ? fn : $e ? Kr({ config: $e }) : void 0, _n = $e?.mesh?.environment ?? "production", Jn = $e?.bluvo?.environment ?? "production", { isModalOpen: b, openModal: ce, closeModal: Xn, setHandleCloseModal: pn, pendingSelection: x, setPendingSelection: ne, hostTransactionState: te, setHostTransactionState: Yn, hostTransactionQuote: io, hostTransactionStates: Ge, hostTransactionTimestamp: ze, resetHostTransactionState: _e, receiptActionButtonText: lo, onReceiptAction: co, retryTransactionRef: Zn } = na(), { createWidgetSession: uo } = Sa();
|
|
175
|
-
sa({
|
|
176
|
-
address: S,
|
|
177
|
-
chainId: Zt,
|
|
178
|
-
connectorName: Yt?.name,
|
|
179
|
-
isConnected: V
|
|
180
|
-
}), is({
|
|
181
|
-
onDisconnect() {
|
|
182
|
-
n.console.log("[trails-sdk] [TrailsWidget] account disconnected via useAccountEffect"), n.console.log("[trails-sdk] [TrailsWidget] window.ethereum exists:", !!window.ethereum);
|
|
183
|
-
},
|
|
184
|
-
onConnect(e) {
|
|
185
|
-
n.console.log("[trails-sdk] [TrailsWidget] account connected via useAccountEffect", e);
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
const gn = L(!1);
|
|
189
|
-
v(() => {
|
|
190
|
-
if (gn.current || !B || !f.connections.length) return;
|
|
191
|
-
if (S && He(S, B)) {
|
|
192
|
-
gn.current = !0;
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
const e = f.connections.find((t) => t.accounts.some((a) => He(a.address, B)));
|
|
196
|
-
e ? (n.console.log("[trails-sdk] [TrailsWidget] Switching to fromAccount:", B, "via connection:", e.walletName), We(e.id, B), gn.current = !0) : n.console.log("[trails-sdk] [TrailsWidget] fromAccount not found in connected wallets:", B);
|
|
197
|
-
}, [
|
|
198
|
-
B,
|
|
199
|
-
f.connections,
|
|
200
|
-
S,
|
|
201
|
-
We
|
|
202
|
-
]), v(() => {
|
|
203
|
-
n.console.log("[trails-sdk] [TrailsWidget] isModalOpen changed:", b);
|
|
204
|
-
}, [b]);
|
|
205
|
-
const { mode: i, configuredMode: mo, resetMode: fo, screen: u, navigate: o, goBack: et, goHome: y, canGoBack: nt, backScreen: hn, state: tt } = jr(), { setSellAmount: de, setBuyAmount: Je } = Ur();
|
|
206
|
-
Hr(({ from: e, to: t }) => {
|
|
207
|
-
_a(e, t) && (kr.abortAll(), D(null)), t === "fund-methods" && (vn.current = A);
|
|
208
|
-
});
|
|
209
|
-
const { connectionContext: Xe, clearConnectionContext: Ie, isRecipientSelection: ot, isFundMethodSelection: rt } = Wr(), { setSelectedRecipient: at } = Nr(), m = () => {
|
|
210
|
-
p(null), z(!1), nt ? et() : y();
|
|
211
|
-
}, [Ye, po] = d(S), { selectedFundMethod: A, selectedMeshExchange: Ee, selectedMeshAccessTokens: st, selectedBluvoExchange: it, clearSelectedBluvoFunding: Me, replaceSelectedMeshAccessTokens: go, clearSelectedMeshAccessTokens: Cn, setSelectedFundMethod: h, setSelectedMeshExchange: ue, setSelectedBluvoExchange: Re } = ya(), vn = L(A), me = ie((e) => {
|
|
212
|
-
const t = vn.current;
|
|
213
|
-
Va(t, e, {
|
|
214
|
-
clearSelectedToken: le,
|
|
215
|
-
setSellAmount: de,
|
|
216
|
-
setBuyAmount: Je,
|
|
217
|
-
setPrepareSendQuote: D,
|
|
218
|
-
setSelectedMeshExchange: ue,
|
|
219
|
-
setSelectedBluvoExchange: Re,
|
|
220
|
-
setSelectedMeshAccessTokens: () => Cn(),
|
|
221
|
-
clearSelectedBluvoFunding: Me
|
|
222
|
-
}) && (vn.current = e);
|
|
223
|
-
}, [
|
|
224
|
-
le,
|
|
225
|
-
de,
|
|
226
|
-
Je,
|
|
227
|
-
ue,
|
|
228
|
-
Re,
|
|
229
|
-
Cn,
|
|
230
|
-
Me
|
|
231
|
-
]), { selectedPool: T, setSelectedPool: Ze } = Br(), kn = (un === "builtin-evm" ? fs($n) : [])[0] ?? $n.activeWalletId ?? null, [fe, Oe] = d(kn);
|
|
232
|
-
v(() => {
|
|
233
|
-
const e = f.activeConnection?.walletId ?? kn;
|
|
234
|
-
e && Oe((t) => t ?? e);
|
|
235
|
-
}, [kn, f.activeConnection?.walletId]);
|
|
236
|
-
const [ho, pe] = d(!1), [Co, wn] = d(!1), [Sn, en] = d(void 0), [vo, p] = d(null), [yn, D] = d(null), [nn, ko] = d(null), [wo, So] = d(null), [Tn, lt] = d(null), [yo, To] = d(null);
|
|
237
|
-
v(() => {
|
|
238
|
-
n.console.log("[widget] externalSessionId state changed to:", Tn);
|
|
239
|
-
}, [Tn]);
|
|
240
|
-
const [ct, bo] = d(null), [G, bn] = d(null), [xo, oe] = d(!1), [Ao, z] = d(!1), [dt, Pe] = d(null), [Wo, ut] = d(null), ge = Xt ?? "mesh", Ne = L(null);
|
|
241
|
-
v(() => {
|
|
242
|
-
I || b || (Ne.current = null);
|
|
243
|
-
}, [I, b]), v(() => {
|
|
244
|
-
if (!(I || b) || i === "swap") return;
|
|
245
|
-
let e = null;
|
|
246
|
-
E === Y.Wallet ? e = "wallet" : E === Y.CryptoTransfer ? e = "direct-transfer" : E === Y.Onramp && i !== "pay" && i !== "earn" ? e = "onramp-meld" : E === Y.OnrampExchange && i !== "pay" && (e = ge === "bluvo" ? "onramp-bluvo" : "onramp-mesh"), e && A !== e && h(e);
|
|
247
|
-
}, [
|
|
248
|
-
E,
|
|
249
|
-
A,
|
|
250
|
-
h,
|
|
251
|
-
I,
|
|
252
|
-
b,
|
|
253
|
-
i,
|
|
254
|
-
ge
|
|
255
|
-
]), v(() => {
|
|
256
|
-
const e = I || b;
|
|
257
|
-
if (!e || !V || i !== "fund") return;
|
|
258
|
-
if (!E) {
|
|
259
|
-
if (W) {
|
|
260
|
-
const a = `implicit-wallet:${i}:${e}`;
|
|
261
|
-
if (Ne.current === a) return;
|
|
262
|
-
Ne.current = a, h("wallet"), o("fund-form");
|
|
263
|
-
}
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const t = `${E}:${i}:${e}`;
|
|
267
|
-
if (Ne.current !== t) {
|
|
268
|
-
if (Ne.current = t, E === Y.Onramp)
|
|
269
|
-
h("onramp-meld"), o("fund-form");
|
|
270
|
-
else if (E === Y.Wallet)
|
|
271
|
-
h("wallet"), o(W ? "fund-form" : "tokens");
|
|
272
|
-
else if (E === Y.CryptoTransfer)
|
|
273
|
-
h("direct-transfer"), o("fund-form");
|
|
274
|
-
else if (E === Y.OnrampExchange) if (ge === "bluvo")
|
|
275
|
-
h("onramp-bluvo"), o("onramp-bluvo");
|
|
276
|
-
else {
|
|
277
|
-
h("onramp-mesh");
|
|
278
|
-
const a = Kn?.meshExchangeKey;
|
|
279
|
-
a ? (ue({
|
|
280
|
-
integrationId: a,
|
|
281
|
-
exchangeKey: a,
|
|
282
|
-
exchangeName: a,
|
|
283
|
-
imageUrl: void 0
|
|
284
|
-
}), o("fund-form")) : o("mesh-exchanges");
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}, [
|
|
288
|
-
i,
|
|
289
|
-
V,
|
|
290
|
-
E,
|
|
291
|
-
W,
|
|
292
|
-
Kn?.meshExchangeKey,
|
|
293
|
-
I,
|
|
294
|
-
b,
|
|
295
|
-
o,
|
|
296
|
-
ge,
|
|
297
|
-
h,
|
|
298
|
-
ue
|
|
299
|
-
]), v(() => {
|
|
300
|
-
!V || u !== "connect" || i === "fund" && E || y();
|
|
301
|
-
}, [
|
|
302
|
-
V,
|
|
303
|
-
u,
|
|
304
|
-
i,
|
|
305
|
-
E,
|
|
306
|
-
y
|
|
307
|
-
]);
|
|
308
|
-
const mt = L(!1);
|
|
309
|
-
v(() => {
|
|
310
|
-
mt.current || O && (mt.current = !0, de(String(O)));
|
|
311
|
-
}, [O, de]), Un(Ja(V, u), "connect");
|
|
312
|
-
const Io = {
|
|
313
|
-
fund: "Fund",
|
|
314
|
-
swap: "Swap",
|
|
315
|
-
earn: "Earn",
|
|
316
|
-
pay: "Pay",
|
|
317
|
-
withdraw: "Withdraw"
|
|
318
|
-
}[i] ?? "Pay", tn = je(() => {
|
|
319
|
-
const e = Or(c), t = Rr(k), a = Ga(w), l = g ? ts(g) : !0;
|
|
320
|
-
if (!e)
|
|
321
|
-
return n.console.error("[trails-sdk] Invalid toAmount prop: must be numeric. Received:", c), "Invalid toAmount: must be a numeric value";
|
|
322
|
-
if (!t)
|
|
323
|
-
return n.console.error("[trails-sdk] Invalid toChainId prop: must be numeric. Received:", k), "Invalid toChainId: must be a numeric value";
|
|
324
|
-
if (!a)
|
|
325
|
-
return n.console.error("[trails-sdk] Invalid toToken prop: must be a valid token symbol or a valid hex address. Received:", w), "Invalid toToken: must be a valid token symbol or a valid hex address";
|
|
326
|
-
if (!l)
|
|
327
|
-
return n.console.error("[trails-sdk] Invalid toAddress prop: must be a valid hex address. Received:", g), "Invalid toAddress: must be a valid hex address";
|
|
328
|
-
if (i === "pay") {
|
|
329
|
-
if (H || Z) return "defaultToToken and defaultToChainId are not supported in pay mode";
|
|
330
|
-
if (!w) return "toToken is required in pay mode";
|
|
331
|
-
}
|
|
332
|
-
return i === "fund" && c ? "toAmount is not allowed in fund mode" : null;
|
|
333
|
-
}, [
|
|
334
|
-
c,
|
|
335
|
-
k,
|
|
336
|
-
w,
|
|
337
|
-
H,
|
|
338
|
-
i,
|
|
339
|
-
g,
|
|
340
|
-
Z
|
|
341
|
-
]) || ao || so || vo, { data: N } = cs(), he = (e) => {
|
|
342
|
-
Oe(e);
|
|
343
|
-
}, { onrampProps: _, setOnrampProps: ft, resolveAccessTokens: Eo, setAccessTokensForIntegration: Mo, clearAccessTokensForIntegration: Ro, meshSessionAccountBalanceUsd: Oo, meshSessionAccountBalanceUsdDisplay: Po, isLoadingMeshSessionAccountBalanceUsd: No, getStoredMeshAccessTokensForIntegration: Bo, clearStoredMeshAccessTokensForIntegration: Fo, clearStoredMeshUserIdForIntegration: Uo } = es({
|
|
344
|
-
selectedMeshExchange: Ee,
|
|
345
|
-
selectedMeshAccessTokens: st,
|
|
346
|
-
meshEnvironment: _n,
|
|
347
|
-
screen: u,
|
|
348
|
-
trailsApiUrl: dn,
|
|
349
|
-
trailsApiKey: cn
|
|
350
|
-
}), [xn, qo] = d(null), [pt, gt] = d(!1), [Ss, ys] = d(null), { handleMeshExchangeSelect: Ho, handleMeshExchangeContinue: jo, sessionViewModel: on, handleMeshSessionContinue: Do, handleMeshSessionLogout: Lo, onrampSelection: ht, handleMeshOnrampComplete: Qo, handleMeshOnrampError: Ko } = ns({
|
|
351
|
-
meshEnvironment: _n,
|
|
352
|
-
trailsApiKey: cn,
|
|
353
|
-
trailsApiUrl: dn,
|
|
354
|
-
selectedToken: F,
|
|
355
|
-
selectedMeshExchange: Ee,
|
|
356
|
-
selectedMeshAccessTokens: st,
|
|
357
|
-
onrampProps: _,
|
|
358
|
-
onrampClient: eo,
|
|
359
|
-
navigate: o,
|
|
360
|
-
address: S,
|
|
361
|
-
setError: p,
|
|
362
|
-
setOnrampProps: ft,
|
|
363
|
-
setSelectedFundMethod: h,
|
|
364
|
-
setSelectedMeshExchange: ue,
|
|
365
|
-
clearSelectedMeshAccessTokens: Cn,
|
|
366
|
-
replaceSelectedMeshAccessTokens: go,
|
|
367
|
-
resolveAccessTokens: Eo,
|
|
368
|
-
setAccessTokensForIntegration: Mo,
|
|
369
|
-
clearAccessTokensForIntegration: Ro,
|
|
370
|
-
getStoredMeshAccessTokensForIntegration: Bo,
|
|
371
|
-
clearStoredMeshAccessTokensForIntegration: Fo,
|
|
372
|
-
clearStoredMeshUserIdForIntegration: Uo,
|
|
373
|
-
clearSelectedToken: le,
|
|
374
|
-
setSellAmount: de,
|
|
375
|
-
setBuyAmount: Je,
|
|
376
|
-
setPrepareSendQuote: D,
|
|
377
|
-
onCompleteNonAuthOnramp: (e) => {
|
|
378
|
-
nr(e);
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
((e, t, a, l) => {
|
|
382
|
-
const { data: C, loading: ae } = la({ enabled: e === "earn" });
|
|
383
|
-
return v(() => {
|
|
384
|
-
if (e === "earn" && t && a && l && C && C.length > 0 && (!T || T.chainId !== a || !He(T.token.address, l) && T.token.symbol.toLowerCase() !== l.toLowerCase())) {
|
|
385
|
-
const se = typeof a == "string" ? parseInt(a, 10) : a, qe = C.find((R) => {
|
|
386
|
-
let Bn = He(R.depositAddress, t);
|
|
387
|
-
const lr = R.chainId === se;
|
|
388
|
-
let Fn = l.startsWith("0x") ? He(R.token.address, l) : R.token.symbol.toLowerCase() === l.toLowerCase();
|
|
389
|
-
return !Fn && R.protocol.toLowerCase() === "aave" && (wr(l) || l === "ETH") && (Fn = R.token.symbol === "WETH" || R.token.address.toLowerCase() === Ir(se)?.toLowerCase(), Bn || (Bn = R.wrappedTokenGatewayAddress?.toLowerCase() === Sr(t))), Bn && lr && Fn;
|
|
390
|
-
});
|
|
391
|
-
qe ? (n.console.log(`[trails-sdk] Auto-selected pool for ${e} mode toAddress:`, t, "toChainId:", se, "toToken:", l, qe), Ze(qe)) : n._enabled && n.console.log(`[trails-sdk] No matching pool found for ${e} mode toAddress:`, t, "toChainId:", se, "toToken:", l, "available pools:", C.map((R) => ({
|
|
392
|
-
depositAddress: R.depositAddress,
|
|
393
|
-
tokenAddress: R.token.address,
|
|
394
|
-
tokenSymbol: R.token.symbol,
|
|
395
|
-
chainId: R.chainId,
|
|
396
|
-
protocol: R.protocol
|
|
397
|
-
})));
|
|
398
|
-
}
|
|
399
|
-
}, [
|
|
400
|
-
e,
|
|
401
|
-
t,
|
|
402
|
-
a,
|
|
403
|
-
l,
|
|
404
|
-
C
|
|
405
|
-
]), { poolsLoading: ae };
|
|
406
|
-
})(i, g, k, w);
|
|
407
|
-
const { setOriginTxHash: An, setDestinationTxHash: Wn, setDestinationChainId: In, setOriginChainId: En, transactionStates: $o, setTransactionStates: Ce } = vs(De, Le, Se), M = io ?? yn, Mn = Ge.length > 0 ? Ge : $o, Vo = je(() => te.status !== "success" || !ze ? null : Math.max(0, Cr(hr(ze))), [te.status, ze]) ?? Wo, Go = _r(Mn);
|
|
408
|
-
Un(u === "pending" && Go, "receipt");
|
|
409
|
-
const { checkoutOnHandlers: ve } = Qa({
|
|
410
|
-
onStart: P,
|
|
411
|
-
onQuote: Ft,
|
|
412
|
-
onSignatureRequest: Ut,
|
|
413
|
-
onSignatureConfirmed: qt,
|
|
414
|
-
onSignatureRejected: Ht,
|
|
415
|
-
onApprovalRequest: jt,
|
|
416
|
-
onApprovalConfirmed: Dt,
|
|
417
|
-
onApprovalRejected: Lt,
|
|
418
|
-
onComplete: Qt,
|
|
419
|
-
onError: Kt,
|
|
420
|
-
onStatusUpdate: $t
|
|
421
|
-
}), { clearSelectedFeeOption: Ct } = Pr();
|
|
422
|
-
$a({
|
|
423
|
-
enabled: Fr(A) && !!M?.intentId && (u === "direct-transfer-screen" || u === "onramp-confirmation" || u === "pending"),
|
|
424
|
-
intentId: M?.intentId ?? void 0,
|
|
425
|
-
fallbackTransactionStates: M?.transactionStates,
|
|
426
|
-
setTransactionStates: Ce,
|
|
427
|
-
onStatusUpdate: ve?.triggerCheckoutStatusUpdate,
|
|
428
|
-
onFundingObserved: () => {
|
|
429
|
-
(u === "direct-transfer-screen" || u === "onramp-confirmation") && o("pending");
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
const { handleDebugScreenSelect: zo } = Ka({
|
|
433
|
-
setSelectedToken: zn,
|
|
434
|
-
setTransactionStates: Ce,
|
|
435
|
-
setPrepareSendQuote: D,
|
|
436
|
-
setShowWalletConfirmRetry: oe,
|
|
437
|
-
setSelectedWalletId: Oe,
|
|
438
|
-
setShowWalletConnectionRetry: wn,
|
|
439
|
-
setError: p,
|
|
440
|
-
isConnected: V
|
|
441
|
-
}), vt = i === "fund" ? "fund-form" : "send-form";
|
|
442
|
-
Un(!!T && (u === "send-form" || u === "fund-form") && u !== vt, vt), v(() => {
|
|
443
|
-
const e = te.status;
|
|
444
|
-
if (e !== "idle")
|
|
445
|
-
switch (b || ce(), e) {
|
|
446
|
-
case "awaiting-origin":
|
|
447
|
-
o("select-origin-token");
|
|
448
|
-
break;
|
|
449
|
-
case "awaiting-amount":
|
|
450
|
-
o("select-origin-amount");
|
|
451
|
-
break;
|
|
452
|
-
case "confirmation":
|
|
453
|
-
o("wallet-confirmation");
|
|
454
|
-
break;
|
|
455
|
-
case "pending":
|
|
456
|
-
o("pending");
|
|
457
|
-
break;
|
|
458
|
-
case "success":
|
|
459
|
-
case "error":
|
|
460
|
-
Ge.length > 0 ? o("receipt") : o("pending");
|
|
461
|
-
break;
|
|
462
|
-
default:
|
|
463
|
-
o("pending");
|
|
464
|
-
break;
|
|
465
|
-
}
|
|
466
|
-
}, [
|
|
467
|
-
te.status,
|
|
468
|
-
Ge.length,
|
|
469
|
-
b,
|
|
470
|
-
ce,
|
|
471
|
-
o
|
|
472
|
-
]), v(() => {
|
|
473
|
-
if (Ye && S && Ye !== S) {
|
|
474
|
-
n.console.log("[trails-sdk] Account changed from", Ye, "to", S);
|
|
475
|
-
try {
|
|
476
|
-
localStorage.removeItem("trails-fee-option-preference");
|
|
477
|
-
} catch {
|
|
478
|
-
}
|
|
479
|
-
[
|
|
480
|
-
"send-form",
|
|
481
|
-
"fund-form",
|
|
482
|
-
"swap",
|
|
483
|
-
"withdraw",
|
|
484
|
-
"wallet-confirmation",
|
|
485
|
-
"earn"
|
|
486
|
-
].includes(u) && (n.console.log("[trails-sdk] Resetting to tokens screen due to account change", u), tt.stack.some((e) => e.screen === "select-funding-wallet") || (o(qr(i)), le()), p(null), D(null), oe(!1), z(!1));
|
|
487
|
-
}
|
|
488
|
-
po(S);
|
|
489
|
-
}, [
|
|
490
|
-
S,
|
|
491
|
-
Ye,
|
|
492
|
-
u,
|
|
493
|
-
i,
|
|
494
|
-
le,
|
|
495
|
-
o,
|
|
496
|
-
tt.stack
|
|
497
|
-
]), v(() => {
|
|
498
|
-
T && i === "earn" && Sn && n.console.log("Earn mode: Pool selected, calldata ready for amount updates");
|
|
499
|
-
}, [
|
|
500
|
-
T,
|
|
501
|
-
i,
|
|
502
|
-
Sn
|
|
503
|
-
]);
|
|
504
|
-
const rn = async (e) => {
|
|
505
|
-
try {
|
|
506
|
-
p(null), pe(!0);
|
|
507
|
-
const t = Ae.find((l) => l.id === e);
|
|
508
|
-
if (!t) {
|
|
509
|
-
p(`No wallet option available for wallet: ${e}`), pe(!1);
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
const a = t.name;
|
|
513
|
-
if (n.console.log("[trails-sdk] Initiating connection to wallet", e, t.flow), t.flow !== "walletconnect") {
|
|
514
|
-
const l = f.activeConnection;
|
|
515
|
-
n.console.log("[trails-sdk] Initiating connection to walletId", e);
|
|
516
|
-
const C = await mn(e);
|
|
517
|
-
if (n.console.log(`[trails-sdk] Successfully connected to ${a}`, C), he(e), ot) {
|
|
518
|
-
const ae = gs(C);
|
|
519
|
-
if (n.console.log("[trails-sdk] Connected wallet for recipient selection, setting as recipient:", ae), ae && at(ae), l?.id) try {
|
|
520
|
-
n.console.log("[trails-sdk] Switching back to original active wallet:", l.activeAccount?.address), We(l.id, l.activeAccount?.address);
|
|
521
|
-
} catch (qe) {
|
|
522
|
-
n.console.error("[trails-sdk] Failed to switch back to original wallet:", qe);
|
|
523
|
-
}
|
|
524
|
-
Ie();
|
|
525
|
-
const se = Xe.originScreen;
|
|
526
|
-
o(se || "recipients");
|
|
527
|
-
} else rt ? (n.console.log("[trails-sdk] Wallet connected from funding flow, selecting as fund method"), h("wallet"), Ie(), i === "fund" ? o("tokens") : y()) : (n.console.log("[trails-sdk] Normal wallet connection, switching active wallet"), Ie(), n.console.log("[trails-sdk] Wallet connected, going home"), y());
|
|
528
|
-
} else {
|
|
529
|
-
f.activeConnection && f.activeConnection.walletId !== "walletconnect" && bn({
|
|
530
|
-
address: f.activeConnection.activeAccount?.address,
|
|
531
|
-
connectionId: f.activeConnection.id,
|
|
532
|
-
walletId: f.activeConnection.walletId
|
|
533
|
-
}), o("wallet-connect"), pe(!1);
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
pe(!1);
|
|
537
|
-
} catch (t) {
|
|
538
|
-
n.console.error("[trails-sdk] Failed to connect:", t), p(t instanceof Error ? t.message : "Failed to connect wallet"), pe(!1);
|
|
539
|
-
}
|
|
540
|
-
}, Rn = async () => {
|
|
541
|
-
p(null);
|
|
542
|
-
try {
|
|
543
|
-
n.console.log("[trails-sdk] Disconnecting all connected wallets:", f.connections.length), await to();
|
|
544
|
-
} catch (e) {
|
|
545
|
-
n.console.error("[trails-sdk] Failed to disconnect:", e);
|
|
546
|
-
}
|
|
547
|
-
o("connect");
|
|
548
|
-
}, On = async () => {
|
|
549
|
-
if (ot) {
|
|
550
|
-
n.console.log("[trails-sdk] WalletConnect completed for recipient selection, setting as recipient:", S), S && at(S);
|
|
551
|
-
const e = Xe.originalActiveConnectionId, t = Xe.originalActiveWalletAddress;
|
|
552
|
-
if (e && t) try {
|
|
553
|
-
n.console.log("[trails-sdk] Switching back to original active wallet after WalletConnect:", t), We(e, t);
|
|
554
|
-
} catch (l) {
|
|
555
|
-
n.console.error("[trails-sdk] Failed to switch back to original wallet after WalletConnect:", l);
|
|
556
|
-
}
|
|
557
|
-
Ie();
|
|
558
|
-
const a = Xe.originScreen;
|
|
559
|
-
o(a || "recipients");
|
|
560
|
-
} else if (rt)
|
|
561
|
-
n.console.log("[trails-sdk] WalletConnect completed from funding flow, selecting as fund method"), h("wallet"), Ie(), i === "fund" ? o("tokens") : y();
|
|
562
|
-
else {
|
|
563
|
-
const e = Ya({
|
|
564
|
-
currentMode: i,
|
|
565
|
-
hasFromToken: !!W,
|
|
566
|
-
selectedFundMethod: A
|
|
567
|
-
});
|
|
568
|
-
o(e.screen, e.options);
|
|
569
|
-
}
|
|
570
|
-
}, Pn = (e) => {
|
|
571
|
-
try {
|
|
572
|
-
if (p(null), zn(e), x) {
|
|
573
|
-
if (x.requireAmountInput) {
|
|
574
|
-
Yn((l) => ({
|
|
575
|
-
...l,
|
|
576
|
-
status: "awaiting-amount"
|
|
577
|
-
})), J(e);
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
const t = e.contractAddress || qn, a = e.chainId ?? 0;
|
|
581
|
-
try {
|
|
582
|
-
x.resolve({
|
|
583
|
-
fromTokenAddress: t,
|
|
584
|
-
fromChainId: a
|
|
585
|
-
});
|
|
586
|
-
} catch (l) {
|
|
587
|
-
n.console.error("[trails-sdk] Error resolving pending selection:", l), x.reject(l);
|
|
588
|
-
} finally {
|
|
589
|
-
ne(void 0);
|
|
590
|
-
}
|
|
591
|
-
J(e);
|
|
592
|
-
return;
|
|
593
|
-
}
|
|
594
|
-
o(i === "earn" ? g && k || T ? "send-form" : "earn-pools" : i === "swap" ? "swap" : i === "fund" ? "fund-form" : "send-form"), J(e);
|
|
595
|
-
} catch (t) {
|
|
596
|
-
p(t instanceof Error ? t.message : "An unknown error occurred");
|
|
597
|
-
}
|
|
598
|
-
}, ke = (e) => {
|
|
599
|
-
Pn(e);
|
|
600
|
-
}, J = (e) => {
|
|
601
|
-
const t = vr(e.chainId);
|
|
602
|
-
ro({
|
|
603
|
-
symbol: e.symbol,
|
|
604
|
-
name: e.name,
|
|
605
|
-
decimals: e.decimals || 18,
|
|
606
|
-
contractAddress: e.contractAddress,
|
|
607
|
-
tokenId: `${e.symbol}-${t?.name || e.chainId}`,
|
|
608
|
-
chainId: e.chainId,
|
|
609
|
-
chainName: t?.name || `Chain ${e.chainId}`,
|
|
610
|
-
imageUrl: e.imageUrl
|
|
611
|
-
});
|
|
612
|
-
}, _o = (e) => {
|
|
613
|
-
if (x && F) try {
|
|
614
|
-
x.resolve({
|
|
615
|
-
fromTokenAddress: F.contractAddress || qn,
|
|
616
|
-
fromChainId: F.chainId ?? 0,
|
|
617
|
-
fromAmount: e
|
|
618
|
-
}), ne(void 0);
|
|
619
|
-
} catch (t) {
|
|
620
|
-
n.console.error("[trails-sdk] Error resolving pending selection amount:", t), x.reject(t), ne(void 0);
|
|
621
|
-
}
|
|
622
|
-
}, Be = async (e, t) => {
|
|
623
|
-
if (n.console.log("[trails-sdk] handleOnSend", e, t), x && F) try {
|
|
624
|
-
x.resolve({
|
|
625
|
-
fromTokenAddress: F.contractAddress || qn,
|
|
626
|
-
fromChainId: F.chainId ?? 0,
|
|
627
|
-
fromAmount: e
|
|
628
|
-
}), ne(void 0);
|
|
629
|
-
return;
|
|
630
|
-
} catch (a) {
|
|
631
|
-
n.console.error("[trails-sdk] Error resolving pending selection:", a), x && (x.reject(a), ne(void 0));
|
|
632
|
-
return;
|
|
633
|
-
}
|
|
634
|
-
return Promise.resolve();
|
|
635
|
-
}, Jo = () => {
|
|
636
|
-
It(), Nn();
|
|
637
|
-
}, Nn = ie(() => {
|
|
638
|
-
p(null), h("wallet"), Ze(null), Oe(null), pe(!1), wn(!1), en(void 0), An(""), En(null), Wn(""), In(null), Ce([]), D(null), ut(null), Ct(), _e(), y();
|
|
639
|
-
}, [
|
|
640
|
-
h,
|
|
641
|
-
Wn,
|
|
642
|
-
In,
|
|
643
|
-
Ce,
|
|
644
|
-
An,
|
|
645
|
-
En,
|
|
646
|
-
Ze,
|
|
647
|
-
y,
|
|
648
|
-
Ct,
|
|
649
|
-
_e
|
|
650
|
-
]);
|
|
651
|
-
v(() => {
|
|
652
|
-
x && (b || ce(), u !== "select-origin-token" && o("select-origin-token"));
|
|
653
|
-
}, [
|
|
654
|
-
x,
|
|
655
|
-
b,
|
|
656
|
-
u,
|
|
657
|
-
o,
|
|
658
|
-
ce
|
|
659
|
-
]);
|
|
660
|
-
const kt = L(Dn);
|
|
661
|
-
kt.current = Dn;
|
|
662
|
-
const wt = L(Ln);
|
|
663
|
-
wt.current = Ln;
|
|
664
|
-
const St = L(x);
|
|
665
|
-
St.current = x;
|
|
666
|
-
const Xo = L(yn);
|
|
667
|
-
Xo.current = yn;
|
|
668
|
-
const Yo = L(u);
|
|
669
|
-
Yo.current = u;
|
|
670
|
-
const an = ie(() => {
|
|
671
|
-
ce(), kt.current?.();
|
|
672
|
-
}, [ce]), re = ie(() => {
|
|
673
|
-
const e = St.current;
|
|
674
|
-
e ? (n.console.log("[trails-sdk] handleCloseModal called, rejecting pending selection"), e.reject(/* @__PURE__ */ new Error("Modal closed by user")), ne(void 0)) : n.console.log("[trails-sdk] handleCloseModal called, no pending selection"), n.console.log("[trails-sdk] handleCloseModal called, closing modal"), Xn(), Nn(), _e(), wt.current?.();
|
|
675
|
-
}, [
|
|
676
|
-
Xn,
|
|
677
|
-
Nn,
|
|
678
|
-
_e,
|
|
679
|
-
ne
|
|
680
|
-
]);
|
|
681
|
-
v(() => (pn(re), () => {
|
|
682
|
-
pn(null);
|
|
683
|
-
}), [re, pn]), os(j, () => ({
|
|
684
|
-
openModal: an,
|
|
685
|
-
closeModal: re,
|
|
686
|
-
isModalOpen: b
|
|
687
|
-
}), [
|
|
688
|
-
b,
|
|
689
|
-
an,
|
|
690
|
-
re
|
|
691
|
-
]);
|
|
692
|
-
const we = ie(() => {
|
|
693
|
-
p(null), o("pending");
|
|
694
|
-
}, [o]);
|
|
695
|
-
function Zo() {
|
|
696
|
-
we();
|
|
697
|
-
}
|
|
698
|
-
function er(e = 0) {
|
|
699
|
-
ut(e);
|
|
700
|
-
}
|
|
701
|
-
function Se({ transactionStates: e }) {
|
|
702
|
-
n.console.log("[trails-sdk] handleTransferComplete called", e), p(null);
|
|
703
|
-
const t = e[0], a = e[e.length - 1];
|
|
704
|
-
t?.transactionHash && t?.chainId && (An(t.transactionHash), En(t.chainId)), (a?.transactionHash || a?.txnHash && a?.chainId) && (Wn(a?.transactionHash || a?.txnHash || ""), In(a?.chainId)), o("receipt");
|
|
705
|
-
}
|
|
706
|
-
async function nr(e) {
|
|
707
|
-
if (n.console.log("[trails-sdk] Onramp transfer completed:", e), n.console.log("[trails-sdk] Using real transaction states from prepareSendQuote"), n.console.log("[trails-sdk] handleOnrampComplete state:", {
|
|
708
|
-
hasOnrampContinueSend: !!xn,
|
|
709
|
-
hasPrepareSendQuote: !!M,
|
|
710
|
-
screen: u,
|
|
711
|
-
onrampContinueSendInProgress: pt
|
|
712
|
-
}), n.console.log("[CACHE-FLOW] Onramp completed, invalidating token balances cache"), It(), pt) {
|
|
713
|
-
n.console.warn("[trails-sdk] onrampContinueSend already in progress, ignoring duplicate call");
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
|
-
if (n.console.log("[trails-sdk] Navigating away from onramp screen"), o("pending"), xn) {
|
|
717
|
-
n.console.log("[trails-sdk] Continuing send flow after onramp completion"), gt(!0);
|
|
718
|
-
try {
|
|
719
|
-
await xn(), n.console.log("[trails-sdk] onrampContinueSend completed successfully");
|
|
720
|
-
} catch (t) {
|
|
721
|
-
n.console.error("[trails-sdk] Error continuing send after onramp:", t), X(t);
|
|
722
|
-
} finally {
|
|
723
|
-
qo(null), gt(!1);
|
|
724
|
-
}
|
|
725
|
-
} else
|
|
726
|
-
n.console.log("[trails-sdk] No onrampContinueSend callback, showing pending screen"), M && (n.console.log("[trails-sdk] Setting transaction states from prepareSendQuote"), Ce(M.transactionStates));
|
|
727
|
-
}
|
|
728
|
-
function Fe(e) {
|
|
729
|
-
n.console.log("[trails-sdk] transactionStates from widget", e), Ce([...e]);
|
|
730
|
-
}
|
|
731
|
-
const sn = () => {
|
|
732
|
-
Qe && (f.activeConnection && f.activeConnection.walletId !== "walletconnect" && bn({
|
|
733
|
-
address: f.activeConnection.activeAccount?.address,
|
|
734
|
-
connectionId: f.activeConnection.id,
|
|
735
|
-
walletId: f.activeConnection.walletId
|
|
736
|
-
}), Oe(null), o("wallet-connect"));
|
|
737
|
-
}, tr = async () => {
|
|
738
|
-
if (G) try {
|
|
739
|
-
n.console.log("[trails-sdk] Reconnecting to previous wallet:", G.walletId);
|
|
740
|
-
try {
|
|
741
|
-
G.connectionId ? f.connections.find((e) => e.id === G.connectionId) ? We(G.connectionId, G.address) : await mn(G.walletId) : await mn(G.walletId);
|
|
742
|
-
} catch (e) {
|
|
743
|
-
n.console.error("[trails-sdk] Failed to reconnect to previous wallet:", e);
|
|
744
|
-
}
|
|
745
|
-
bn(null);
|
|
746
|
-
} catch (e) {
|
|
747
|
-
n.console.error("[trails-sdk] Failed to reconnect to previous wallet:", e), o("fund-methods");
|
|
748
|
-
}
|
|
749
|
-
else o("fund-methods");
|
|
750
|
-
}, or = (e, t) => {
|
|
751
|
-
try {
|
|
752
|
-
if (n.console.log(`Generating deposit calldata for ${e.protocol} pool:`, e.name), !N) throw new Error("Wallet client not found");
|
|
753
|
-
switch (e.protocol.toLowerCase()) {
|
|
754
|
-
case "aave":
|
|
755
|
-
return ca(N, e, t);
|
|
756
|
-
case "morpho":
|
|
757
|
-
return da(N, t);
|
|
758
|
-
default:
|
|
759
|
-
n.console.warn(`Unsupported protocol: ${e.protocol}`);
|
|
760
|
-
return;
|
|
761
|
-
}
|
|
762
|
-
} catch (a) {
|
|
763
|
-
n.console.error("Error generating deposit calldata:", a);
|
|
764
|
-
return;
|
|
765
|
-
}
|
|
766
|
-
}, X = (e) => {
|
|
767
|
-
e && n.console.error("[trails-sdk] Error sending transaction", e);
|
|
768
|
-
const t = cr(e), a = dr(e), l = pr(e), C = mr(e), ae = ur(e);
|
|
769
|
-
fr(e) || (t === "quote-expired" ? (p(null), oe(!1), z(!0)) : l ? (z(!1), oe(!0)) : C || ae ? (z(!1), oe(!0), p(a)) : (z(!1), p(a)));
|
|
770
|
-
}, yt = (e) => {
|
|
771
|
-
e && n.console.error("[trails-sdk] Error connecting wallet", e), p(e instanceof Error ? e.message : e);
|
|
772
|
-
}, Tt = (e) => {
|
|
773
|
-
e && n.console.error("[trails-sdk] Error selecting token", e), p(e instanceof Error ? e.message : e);
|
|
774
|
-
}, Ue = (e, t) => {
|
|
775
|
-
if (oe(!1), z(!1), D(e ?? null), A === "direct-transfer") {
|
|
776
|
-
if (!t) {
|
|
777
|
-
X("Unable to continue: direct-transfer send function is missing.");
|
|
778
|
-
return;
|
|
779
|
-
}
|
|
780
|
-
p(null), (async () => {
|
|
781
|
-
try {
|
|
782
|
-
await t(), o("direct-transfer-screen", { backTarget: u });
|
|
783
|
-
} catch (a) {
|
|
784
|
-
X(a);
|
|
785
|
-
}
|
|
786
|
-
})();
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
A === "onramp-mesh" || A === "onramp-bluvo" || o("wallet-confirmation");
|
|
790
|
-
}, bt = (e, t, a, l, C) => {
|
|
791
|
-
n.console.log("[trails-sdk] handleWaitingOnrampConfirm called with sessionId:", l), D(e ?? null), ko(t ?? null), To(C ?? null), a && So(a), l ? (n.console.log("[trails-sdk] Using provided sessionId:", l), lt(l)) : (n.console.error("[trails-sdk] No sessionId provided - this should never happen for onramp flows"), lt(null)), o("onramp-confirmation");
|
|
792
|
-
};
|
|
793
|
-
async function rr() {
|
|
794
|
-
if (dt)
|
|
795
|
-
try {
|
|
796
|
-
p(null), oe(!1), z(!1), await dt();
|
|
797
|
-
} catch (e) {
|
|
798
|
-
n.console.error("[trails-sdk] Error retrying wallet confirmation", e);
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
const { targetAmountUsd: ar, targetAmountUsdFormatted: sr } = Ca(), ir = () => {
|
|
802
|
-
switch (u) {
|
|
803
|
-
case "connect":
|
|
804
|
-
return /* @__PURE__ */ r(Mt, {
|
|
805
|
-
onConnect: (e) => {
|
|
806
|
-
const t = Ae.find((a) => a.id === e);
|
|
807
|
-
if (Qe && t?.flow === "walletconnect")
|
|
808
|
-
he(e), o("wallet-connect");
|
|
809
|
-
else {
|
|
810
|
-
he(e);
|
|
811
|
-
const a = hn;
|
|
812
|
-
o("wallet-connection-pending", { backTarget: (a === "wallet-confirmation" ? void 0 : a) || void 0 }), setTimeout(() => {
|
|
813
|
-
rn(e);
|
|
814
|
-
}, 100);
|
|
815
|
-
}
|
|
816
|
-
},
|
|
817
|
-
onDisconnect: Rn,
|
|
818
|
-
onContinue: On,
|
|
819
|
-
onError: yt,
|
|
820
|
-
lastClickedWallet: fe
|
|
821
|
-
});
|
|
822
|
-
case "fund-methods":
|
|
823
|
-
return /* @__PURE__ */ r(xa, {
|
|
824
|
-
headerContent: i === "pay" || i === "earn" ? "Choose a payment method" : "Choose a funding method",
|
|
825
|
-
onBack: () => {
|
|
826
|
-
if (i !== mo) {
|
|
827
|
-
fo();
|
|
828
|
-
return;
|
|
829
|
-
}
|
|
830
|
-
if (nt) {
|
|
831
|
-
et();
|
|
832
|
-
return;
|
|
833
|
-
}
|
|
834
|
-
y();
|
|
835
|
-
},
|
|
836
|
-
onramp: Ve,
|
|
837
|
-
onSelectWalletConnect: sn,
|
|
838
|
-
onSelectConnectedAccount: () => {
|
|
839
|
-
me("wallet"), h("wallet"), i === "fund" ? W ? o("fund-form", { backTarget: "fund-methods" }) : o("tokens") : y();
|
|
840
|
-
},
|
|
841
|
-
onSelectTransferCrypto: () => {
|
|
842
|
-
me("direct-transfer"), h("direct-transfer"), sn();
|
|
843
|
-
},
|
|
844
|
-
onSelectOnrampMeld: () => {
|
|
845
|
-
me("onramp-meld"), i === "fund" ? o("fund-form") : y();
|
|
846
|
-
},
|
|
847
|
-
onSelectOnrampExchange: () => {
|
|
848
|
-
le(), de(""), Je(""), D(null), ue(null), Re(null), Me();
|
|
849
|
-
const e = ge === "bluvo" ? "onramp-bluvo" : "onramp-mesh";
|
|
850
|
-
me(e), h(e), i === "fund" ? o(ge === "bluvo" ? "onramp-bluvo" : "mesh-exchanges") : y();
|
|
851
|
-
}
|
|
852
|
-
});
|
|
853
|
-
case "mesh-exchanges":
|
|
854
|
-
return /* @__PURE__ */ r(Aa, {
|
|
855
|
-
onBack: () => o("fund-methods"),
|
|
856
|
-
onSelectExchange: Ho
|
|
857
|
-
});
|
|
858
|
-
case "mesh-exchange-confirmation":
|
|
859
|
-
return /* @__PURE__ */ r(Wa, {
|
|
860
|
-
exchangeName: Ee?.exchangeName,
|
|
861
|
-
exchangeKey: Ee?.exchangeKey,
|
|
862
|
-
exchangeImageUrl: Ee?.imageUrl,
|
|
863
|
-
onBack: m,
|
|
864
|
-
onContinue: () => {
|
|
865
|
-
jo();
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
case "mesh-session-options":
|
|
869
|
-
return /* @__PURE__ */ r(Ia, {
|
|
870
|
-
connectedBrokerName: on.connectedBrokerName,
|
|
871
|
-
connectedBrokerImageUrl: on.connectedBrokerImageUrl,
|
|
872
|
-
connectedBrokerExchangeKey: on.connectedBrokerExchangeKey,
|
|
873
|
-
connectedAccountLabel: on.connectedAccountLabel,
|
|
874
|
-
isLoadingBalance: No,
|
|
875
|
-
balanceUsd: Oo,
|
|
876
|
-
balanceUsdDisplay: Po,
|
|
877
|
-
onBack: m,
|
|
878
|
-
onContinue: Do,
|
|
879
|
-
onLogout: Lo
|
|
880
|
-
});
|
|
881
|
-
case "payment-methods":
|
|
882
|
-
return /* @__PURE__ */ r(za, {
|
|
883
|
-
onBack: () => y(),
|
|
884
|
-
onSelectWalletConnect: sn,
|
|
885
|
-
onSelectConnectedAccount: () => {
|
|
886
|
-
me("wallet"), h("wallet"), y();
|
|
887
|
-
},
|
|
888
|
-
onSelectQrCode: () => {
|
|
889
|
-
o("qrcode-options", { backTarget: "payment-methods" });
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
|
-
case "select-funding-wallet":
|
|
893
|
-
return /* @__PURE__ */ r(Da, {});
|
|
894
|
-
case "onramp-payment-methods":
|
|
895
|
-
return /* @__PURE__ */ r(Ea, { onBack: () => o("fund-methods") });
|
|
896
|
-
case "qrcode-options":
|
|
897
|
-
return /* @__PURE__ */ r(Pa, {
|
|
898
|
-
onBack: m,
|
|
899
|
-
onSelectWalletConnect: sn,
|
|
900
|
-
onSelectQRCode: () => {
|
|
901
|
-
me("direct-transfer"), h("direct-transfer"), i === "fund" ? o("fund-form") : y();
|
|
902
|
-
}
|
|
903
|
-
});
|
|
904
|
-
case "tokens":
|
|
905
|
-
return /* @__PURE__ */ r(Et, {
|
|
906
|
-
onContinue: Pn,
|
|
907
|
-
onBack: Za(i) ? y : m,
|
|
908
|
-
targetAmountUsd: ar,
|
|
909
|
-
targetAmountUsdFormatted: sr,
|
|
910
|
-
onError: Tt,
|
|
911
|
-
recentTokens: ee,
|
|
912
|
-
onRecentTokenSelect: ke,
|
|
913
|
-
fundMethod: Xa(A),
|
|
914
|
-
renderInline: I,
|
|
915
|
-
onNavigateToFundMethods: () => o("fund-methods"),
|
|
916
|
-
onNavigateToSwitchWallet: () => o("select-funding-wallet", { backTarget: "tokens" })
|
|
917
|
-
});
|
|
918
|
-
case "select-origin-token":
|
|
919
|
-
return /* @__PURE__ */ r(Et, {
|
|
920
|
-
onContinue: Pn,
|
|
921
|
-
onBack: m,
|
|
922
|
-
targetAmountUsd: null,
|
|
923
|
-
targetAmountUsdFormatted: null,
|
|
924
|
-
onError: Tt,
|
|
925
|
-
recentTokens: ee,
|
|
926
|
-
onRecentTokenSelect: ke,
|
|
927
|
-
fundMethod: null,
|
|
928
|
-
renderInline: !1
|
|
929
|
-
});
|
|
930
|
-
case "select-origin-amount":
|
|
931
|
-
return /* @__PURE__ */ r(Gr, {
|
|
932
|
-
token: F,
|
|
933
|
-
onBack: () => o("select-origin-token"),
|
|
934
|
-
onCancel: re,
|
|
935
|
-
onSubmit: _o
|
|
936
|
-
});
|
|
937
|
-
case "send-form":
|
|
938
|
-
return /* @__PURE__ */ r(Ma, {
|
|
939
|
-
onBack: void 0,
|
|
940
|
-
selectedToken: F,
|
|
941
|
-
onSend: Be,
|
|
942
|
-
onWaitingForWalletConfirm: Ue,
|
|
943
|
-
onConfirm: we,
|
|
944
|
-
onComplete: Se,
|
|
945
|
-
account: N?.account,
|
|
946
|
-
toRecipient: T ? T.depositAddress : g || void 0,
|
|
947
|
-
toAmount: c || void 0,
|
|
948
|
-
toChainId: T ? T.chainId : k ? Number(k) : void 0,
|
|
949
|
-
toToken: T ? T.token.address : w || void 0,
|
|
950
|
-
toCalldata: T ? Sn : U || void 0,
|
|
951
|
-
walletClient: N ?? void 0,
|
|
952
|
-
isSequenceWallet: Ke,
|
|
953
|
-
onTransactionStateChange: Fe,
|
|
954
|
-
onError: X,
|
|
955
|
-
setWalletConfirmRetryHandler: Pe,
|
|
956
|
-
swapProvider: ye,
|
|
957
|
-
bridgeProvider: Te,
|
|
958
|
-
swapProviderFallback: be,
|
|
959
|
-
bridgeProviderFallback: xe,
|
|
960
|
-
fundMethod: A,
|
|
961
|
-
onAmountUpdate: (e) => {
|
|
962
|
-
if (T && i === "earn" && e && e !== "") try {
|
|
963
|
-
const t = or(T, e);
|
|
964
|
-
n.console.log("Updated calldata:", t, e), en(t);
|
|
965
|
-
} catch (t) {
|
|
966
|
-
n.console.error("Error updating calldata:", t), en(void 0);
|
|
967
|
-
}
|
|
968
|
-
else en(void 0);
|
|
969
|
-
},
|
|
970
|
-
checkoutOnHandlers: ve,
|
|
971
|
-
recentTokens: ee,
|
|
972
|
-
onRecentTokenSelect: ke,
|
|
973
|
-
onTrackToken: J
|
|
974
|
-
});
|
|
975
|
-
case "fund-form":
|
|
976
|
-
return /* @__PURE__ */ r(Ta, {
|
|
977
|
-
selectedToken: F,
|
|
978
|
-
onSend: Be,
|
|
979
|
-
onWaitingForWalletConfirm: Ue,
|
|
980
|
-
onrampPropsCallback: ft,
|
|
981
|
-
screenNavigationCallback: o,
|
|
982
|
-
onWaitingForOnrampConfirm: bt,
|
|
983
|
-
onConfirm: we,
|
|
984
|
-
onComplete: Se,
|
|
985
|
-
account: N?.account,
|
|
986
|
-
toAmount: c || void 0,
|
|
987
|
-
toRecipient: g || void 0,
|
|
988
|
-
toChainId: k ? Number(k) : void 0,
|
|
989
|
-
toToken: w || void 0,
|
|
990
|
-
toCalldata: U || void 0,
|
|
991
|
-
walletClient: N ?? void 0,
|
|
992
|
-
isSequenceWallet: Ke,
|
|
993
|
-
onTransactionStateChange: Fe,
|
|
994
|
-
onError: X,
|
|
995
|
-
setWalletConfirmRetryHandler: Pe,
|
|
996
|
-
swapProvider: ye,
|
|
997
|
-
bridgeProvider: Te,
|
|
998
|
-
swapProviderFallback: be,
|
|
999
|
-
bridgeProviderFallback: xe,
|
|
1000
|
-
fundMethod: A,
|
|
1001
|
-
checkoutOnHandlers: ve,
|
|
1002
|
-
recentTokens: ee,
|
|
1003
|
-
onRecentTokenSelect: ke,
|
|
1004
|
-
onTrackToken: J,
|
|
1005
|
-
tradeType: Jt,
|
|
1006
|
-
defaultInputMode: Qn
|
|
1007
|
-
});
|
|
1008
|
-
case "onramp-confirmation":
|
|
1009
|
-
return /* @__PURE__ */ r(Oa, {
|
|
1010
|
-
onBack: m,
|
|
1011
|
-
onRetry: () => {
|
|
1012
|
-
o("fund-form");
|
|
1013
|
-
},
|
|
1014
|
-
onIntentExecuted: () => {
|
|
1015
|
-
o("pending");
|
|
1016
|
-
},
|
|
1017
|
-
quote: M,
|
|
1018
|
-
onRampQuote: nn,
|
|
1019
|
-
widgetCreationParams: wo,
|
|
1020
|
-
onCreateWidgetSession: uo,
|
|
1021
|
-
externalSessionId: Tn,
|
|
1022
|
-
popupWindowRef: yo
|
|
1023
|
-
});
|
|
1024
|
-
case "wallet-confirmation": {
|
|
1025
|
-
const e = te.status !== "idle", t = e ? te.retryEnabled ?? !1 : xo;
|
|
1026
|
-
return /* @__PURE__ */ r(Xr, {
|
|
1027
|
-
onBack: m,
|
|
1028
|
-
onComplete: Zo,
|
|
1029
|
-
retryEnabled: t,
|
|
1030
|
-
expiredQuoteEnabled: !e && Ao,
|
|
1031
|
-
onRetry: e ? () => {
|
|
1032
|
-
Zn.current && (Yn((C) => ({
|
|
1033
|
-
...C,
|
|
1034
|
-
retryEnabled: !1
|
|
1035
|
-
})), Zn.current());
|
|
1036
|
-
} : rr,
|
|
1037
|
-
quote: M,
|
|
1038
|
-
onRampQuote: nn
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
case "qr-code-wallet-select":
|
|
1042
|
-
return /* @__PURE__ */ r(Na, {
|
|
1043
|
-
onBack: m,
|
|
1044
|
-
onSelect: (e) => {
|
|
1045
|
-
bo(e), o("direct-transfer-screen");
|
|
1046
|
-
},
|
|
1047
|
-
selectedWalletId: ct
|
|
1048
|
-
});
|
|
1049
|
-
case "direct-transfer-screen":
|
|
1050
|
-
return /* @__PURE__ */ r(Ra, {
|
|
1051
|
-
onBack: () => {
|
|
1052
|
-
i === "fund" ? o("fund-form") : y();
|
|
1053
|
-
},
|
|
1054
|
-
onChangeWallet: () => o("qr-code-wallet-select"),
|
|
1055
|
-
quote: M,
|
|
1056
|
-
selectedWalletId: ct,
|
|
1057
|
-
walletOptions: no,
|
|
1058
|
-
onIntentExecuted: () => o("pending")
|
|
1059
|
-
});
|
|
1060
|
-
case "pending":
|
|
1061
|
-
return /* @__PURE__ */ r(Yr, {
|
|
1062
|
-
onElapsedTime: er,
|
|
1063
|
-
transactionStates: Mn,
|
|
1064
|
-
quote: M,
|
|
1065
|
-
onRampQuote: nn,
|
|
1066
|
-
fundMethod: A,
|
|
1067
|
-
timestamp: ze ?? void 0,
|
|
1068
|
-
onContinue: () => {
|
|
1069
|
-
n.console.log("[trails-sdk] onContinue called"), o("receipt");
|
|
1070
|
-
}
|
|
1071
|
-
});
|
|
1072
|
-
case "receipt": {
|
|
1073
|
-
const e = te.status !== "idle";
|
|
1074
|
-
return /* @__PURE__ */ r(Zr, {
|
|
1075
|
-
onSendAnother: e ? co ?? void 0 : Jo,
|
|
1076
|
-
onClose: re,
|
|
1077
|
-
renderInline: I,
|
|
1078
|
-
transactionStates: Mn,
|
|
1079
|
-
totalCompletionSeconds: Vo ?? void 0,
|
|
1080
|
-
quote: M,
|
|
1081
|
-
showCloseButton: !1,
|
|
1082
|
-
actionButtonText: e ? lo ?? void 0 : void 0,
|
|
1083
|
-
onRampQuote: nn
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
case "onramp-mesh":
|
|
1087
|
-
if (n.console.log("[trails-sdk] Rendering onramp screen", {
|
|
1088
|
-
onrampFactory: !!Ve,
|
|
1089
|
-
onrampProps: _
|
|
1090
|
-
}), !Ve) return /* @__PURE__ */ q("div", {
|
|
1091
|
-
className: "flex flex-col h-full p-4",
|
|
1092
|
-
children: [/* @__PURE__ */ q("div", {
|
|
1093
|
-
className: "flex items-center mb-4",
|
|
1094
|
-
children: [/* @__PURE__ */ r("button", {
|
|
1095
|
-
type: "button",
|
|
1096
|
-
onClick: m,
|
|
1097
|
-
className: "flex h-8 w-8 justify-center items-center rounded-full bg-gray-50 dark:bg-gray-700 cursor-pointer transition-colors text-gray-900 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 mr-2",
|
|
1098
|
-
title: "Back",
|
|
1099
|
-
children: "←"
|
|
1100
|
-
}), /* @__PURE__ */ r("h2", {
|
|
1101
|
-
className: "text-lg font-semibold text-gray-900 dark:text-white",
|
|
1102
|
-
children: "Exchange Funding"
|
|
1103
|
-
})]
|
|
1104
|
-
}), /* @__PURE__ */ r("div", {
|
|
1105
|
-
className: "flex-1 flex items-center justify-center",
|
|
1106
|
-
children: /* @__PURE__ */ q("div", {
|
|
1107
|
-
className: "text-center p-4 border border-solid border-gray-200 dark:border-gray-700 rounded-lg",
|
|
1108
|
-
children: [/* @__PURE__ */ r("p", {
|
|
1109
|
-
className: "text-gray-600 dark:text-gray-400 mb-2",
|
|
1110
|
-
children: "Exchange funding is not available."
|
|
1111
|
-
}), /* @__PURE__ */ r("p", {
|
|
1112
|
-
className: "text-sm text-gray-500 dark:text-gray-500",
|
|
1113
|
-
children: "Please provide an onramp factory function to enable this feature."
|
|
1114
|
-
})]
|
|
1115
|
-
})
|
|
1116
|
-
})]
|
|
1117
|
-
});
|
|
1118
|
-
try {
|
|
1119
|
-
return /* @__PURE__ */ q("div", {
|
|
1120
|
-
className: "flex flex-col h-full",
|
|
1121
|
-
children: [/* @__PURE__ */ r("div", {
|
|
1122
|
-
className: "flex-1 min-h-0",
|
|
1123
|
-
children: Ve({
|
|
1124
|
-
setCurrentScreen: (e) => {
|
|
1125
|
-
o(e);
|
|
1126
|
-
},
|
|
1127
|
-
onComplete: Qo,
|
|
1128
|
-
onError: Ko,
|
|
1129
|
-
onBack: m,
|
|
1130
|
-
authOnly: _?.authOnly,
|
|
1131
|
-
accessTokens: ht.resolvedAccessTokens,
|
|
1132
|
-
toTokenSymbol: _?.toTokenSymbol,
|
|
1133
|
-
toTokenAmount: _?.toTokenAmount,
|
|
1134
|
-
toChainId: _?.toChainId,
|
|
1135
|
-
toRecipientAddress: _?.toRecipientAddress,
|
|
1136
|
-
toAmountUsd: _?.toAmountUsd,
|
|
1137
|
-
selectedExchange: ht.resolvedSelectedExchange,
|
|
1138
|
-
apiKey: cn,
|
|
1139
|
-
hostname: dn
|
|
1140
|
-
})
|
|
1141
|
-
}), M && /* @__PURE__ */ r("div", {
|
|
1142
|
-
className: "mt-4",
|
|
1143
|
-
children: /* @__PURE__ */ r(Jr, {
|
|
1144
|
-
quote: M,
|
|
1145
|
-
showContent: !0,
|
|
1146
|
-
compact: !0
|
|
1147
|
-
})
|
|
1148
|
-
})]
|
|
1149
|
-
});
|
|
1150
|
-
} catch (e) {
|
|
1151
|
-
return n.console.error("[trails-sdk] Error rendering onramp:", e), /* @__PURE__ */ q("div", {
|
|
1152
|
-
className: "flex flex-col h-full p-4",
|
|
1153
|
-
children: [/* @__PURE__ */ q("div", {
|
|
1154
|
-
className: "flex items-center mb-4",
|
|
1155
|
-
children: [/* @__PURE__ */ r("button", {
|
|
1156
|
-
type: "button",
|
|
1157
|
-
onClick: m,
|
|
1158
|
-
className: "flex h-8 w-8 justify-center items-center rounded-full bg-gray-50 dark:bg-gray-700 cursor-pointer transition-colors text-gray-900 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 mr-2",
|
|
1159
|
-
title: "Back",
|
|
1160
|
-
children: "←"
|
|
1161
|
-
}), /* @__PURE__ */ r("h2", {
|
|
1162
|
-
className: "text-lg font-semibold text-gray-900 dark:text-white",
|
|
1163
|
-
children: "Exchange Funding"
|
|
1164
|
-
})]
|
|
1165
|
-
}), /* @__PURE__ */ r("div", {
|
|
1166
|
-
className: "flex-1 flex items-center justify-center",
|
|
1167
|
-
children: /* @__PURE__ */ q("div", {
|
|
1168
|
-
className: "text-center p-4 border border-solid border-red-200 dark:border-red-700 rounded-lg",
|
|
1169
|
-
children: [/* @__PURE__ */ r("p", {
|
|
1170
|
-
className: "text-red-600 dark:text-red-400 mb-2",
|
|
1171
|
-
children: "Error loading exchange funding."
|
|
1172
|
-
}), /* @__PURE__ */ r("p", {
|
|
1173
|
-
className: "text-sm text-red-500 dark:text-red-500",
|
|
1174
|
-
children: e instanceof Error ? e.message : "Unknown error"
|
|
1175
|
-
})]
|
|
1176
|
-
})
|
|
1177
|
-
})]
|
|
1178
|
-
});
|
|
1179
|
-
}
|
|
1180
|
-
case "onramp-bluvo":
|
|
1181
|
-
return it ? /* @__PURE__ */ r(Pt, {
|
|
1182
|
-
fallback: /* @__PURE__ */ r("div", {
|
|
1183
|
-
className: "flex h-full min-h-[320px] items-center justify-center",
|
|
1184
|
-
children: /* @__PURE__ */ r(Rt, { className: "h-8 w-8" })
|
|
1185
|
-
}),
|
|
1186
|
-
children: /* @__PURE__ */ r(Cs, {
|
|
1187
|
-
address: S,
|
|
1188
|
-
environment: Jn,
|
|
1189
|
-
exchange: it,
|
|
1190
|
-
quote: M,
|
|
1191
|
-
onBack: () => {
|
|
1192
|
-
Me(), Re(null), o("onramp-bluvo");
|
|
1193
|
-
},
|
|
1194
|
-
onContinue: () => o("fund-form", { backTarget: "onramp-bluvo" }),
|
|
1195
|
-
onSubmitted: () => {
|
|
1196
|
-
p(null), o("pending");
|
|
1197
|
-
}
|
|
1198
|
-
})
|
|
1199
|
-
}) : /* @__PURE__ */ r(Pt, {
|
|
1200
|
-
fallback: /* @__PURE__ */ r("div", {
|
|
1201
|
-
className: "flex h-full min-h-[320px] items-center justify-center",
|
|
1202
|
-
children: /* @__PURE__ */ r(Rt, { className: "h-8 w-8" })
|
|
1203
|
-
}),
|
|
1204
|
-
children: /* @__PURE__ */ r(hs, {
|
|
1205
|
-
environment: Jn,
|
|
1206
|
-
onBack: () => o("fund-methods"),
|
|
1207
|
-
onSelectExchange: (e) => {
|
|
1208
|
-
h("onramp-bluvo"), Me(), Re({
|
|
1209
|
-
id: e.id,
|
|
1210
|
-
name: e.name,
|
|
1211
|
-
logoUrl: e.logoUrl
|
|
1212
|
-
}), o("onramp-bluvo");
|
|
1213
|
-
}
|
|
1214
|
-
})
|
|
1215
|
-
});
|
|
1216
|
-
case "onramp-meld":
|
|
1217
|
-
return /* @__PURE__ */ r(pa, { onBack: m });
|
|
1218
|
-
case "wallet-connect":
|
|
1219
|
-
return Qe ? /* @__PURE__ */ r(Ha, {
|
|
1220
|
-
onBack: m,
|
|
1221
|
-
onContinue: On,
|
|
1222
|
-
onReconnectPreviousWallet: tr,
|
|
1223
|
-
selectedWalletId: fe || void 0
|
|
1224
|
-
}) : /* @__PURE__ */ r(Mt, {
|
|
1225
|
-
onConnect: (e) => {
|
|
1226
|
-
he(e);
|
|
1227
|
-
const t = hn;
|
|
1228
|
-
o("wallet-connection-pending", { backTarget: (t === "wallet-confirmation" ? void 0 : t) || void 0 }), setTimeout(() => {
|
|
1229
|
-
rn(e);
|
|
1230
|
-
}, 100);
|
|
1231
|
-
},
|
|
1232
|
-
onDisconnect: Rn,
|
|
1233
|
-
onContinue: On,
|
|
1234
|
-
onError: yt,
|
|
1235
|
-
lastClickedWallet: fe
|
|
1236
|
-
});
|
|
1237
|
-
case "wallet-list":
|
|
1238
|
-
return /* @__PURE__ */ r(La, {
|
|
1239
|
-
onBack: m,
|
|
1240
|
-
onWalletSelect: (e) => {
|
|
1241
|
-
n.console.log("[trails-sdk] Wallet selected from wallet-list:", e);
|
|
1242
|
-
const t = Ae.find((a) => a.id === e);
|
|
1243
|
-
Qe && t?.flow === "walletconnect" ? (he(e), n.console.log("[trails-sdk] WalletConnect selected, going to wallet-connect screen"), o("wallet-connect")) : (he(e), n.console.log("[trails-sdk] Regular wallet selected, going to wallet-connection-pending"), setTimeout(() => {
|
|
1244
|
-
const a = hn;
|
|
1245
|
-
o("wallet-connection-pending", { backTarget: (a === "wallet-confirmation" ? void 0 : a) || void 0 });
|
|
1246
|
-
}, 100), setTimeout(() => {
|
|
1247
|
-
rn(e);
|
|
1248
|
-
}, 100));
|
|
1249
|
-
},
|
|
1250
|
-
walletOptions: Ae.map((e) => ({
|
|
1251
|
-
id: e.id,
|
|
1252
|
-
namespace: e.namespace,
|
|
1253
|
-
name: e.name,
|
|
1254
|
-
icon: e.icon
|
|
1255
|
-
}))
|
|
1256
|
-
});
|
|
1257
|
-
case "earn":
|
|
1258
|
-
return /* @__PURE__ */ r(va, {
|
|
1259
|
-
onContinue: () => o("send-form"),
|
|
1260
|
-
account: N?.account,
|
|
1261
|
-
walletClient: N ?? void 0,
|
|
1262
|
-
onTransactionStateChange: Fe,
|
|
1263
|
-
onError: X,
|
|
1264
|
-
onWaitingForWalletConfirm: Ue,
|
|
1265
|
-
onConfirm: we,
|
|
1266
|
-
onComplete: Se,
|
|
1267
|
-
onSend: Be,
|
|
1268
|
-
setWalletConfirmRetryHandler: Pe,
|
|
1269
|
-
swapProvider: ye,
|
|
1270
|
-
bridgeProvider: Te,
|
|
1271
|
-
swapProviderFallback: be,
|
|
1272
|
-
bridgeProviderFallback: xe,
|
|
1273
|
-
fundMethod: A,
|
|
1274
|
-
checkoutOnHandlers: ve,
|
|
1275
|
-
recentTokens: ee,
|
|
1276
|
-
onRecentTokenSelect: ke,
|
|
1277
|
-
onTrackToken: J
|
|
1278
|
-
});
|
|
1279
|
-
case "earn-pools":
|
|
1280
|
-
return /* @__PURE__ */ r(ka, {
|
|
1281
|
-
onBack: m,
|
|
1282
|
-
onPoolSelect: (e) => {
|
|
1283
|
-
n.console.log("Selected pool:", e), Ze(e), o("send-form");
|
|
1284
|
-
}
|
|
1285
|
-
});
|
|
1286
|
-
case "swap":
|
|
1287
|
-
return /* @__PURE__ */ r(Fa, {
|
|
1288
|
-
onSend: Be,
|
|
1289
|
-
onWaitingForWalletConfirm: Ue,
|
|
1290
|
-
onWaitingForOnrampConfirm: bt,
|
|
1291
|
-
onConfirm: we,
|
|
1292
|
-
onComplete: Se,
|
|
1293
|
-
selectedToken: F,
|
|
1294
|
-
account: N?.account,
|
|
1295
|
-
toRecipient: g || void 0,
|
|
1296
|
-
toAmount: c || void 0,
|
|
1297
|
-
toChainId: k ? Number(k) : void 0,
|
|
1298
|
-
toToken: w || void 0,
|
|
1299
|
-
toCalldata: U || void 0,
|
|
1300
|
-
walletClient: N ?? void 0,
|
|
1301
|
-
isSequenceWallet: Ke,
|
|
1302
|
-
onTransactionStateChange: Fe,
|
|
1303
|
-
onError: X,
|
|
1304
|
-
setWalletConfirmRetryHandler: Pe,
|
|
1305
|
-
swapProvider: ye,
|
|
1306
|
-
bridgeProvider: Te,
|
|
1307
|
-
swapProviderFallback: be,
|
|
1308
|
-
bridgeProviderFallback: xe,
|
|
1309
|
-
fundMethod: A,
|
|
1310
|
-
onAmountUpdate: void 0,
|
|
1311
|
-
checkoutOnHandlers: ve,
|
|
1312
|
-
recentTokens: ee,
|
|
1313
|
-
onRecentTokenSelect: ke,
|
|
1314
|
-
onTrackToken: J
|
|
1315
|
-
});
|
|
1316
|
-
case "withdraw":
|
|
1317
|
-
return /* @__PURE__ */ r(ba, {
|
|
1318
|
-
onSend: Be,
|
|
1319
|
-
onWaitingForWalletConfirm: Ue,
|
|
1320
|
-
onConfirm: we,
|
|
1321
|
-
onComplete: Se,
|
|
1322
|
-
selectedToken: F,
|
|
1323
|
-
account: N?.account,
|
|
1324
|
-
toRecipient: g || void 0,
|
|
1325
|
-
toAmount: c || void 0,
|
|
1326
|
-
toChainId: k ? Number(k) : void 0,
|
|
1327
|
-
toToken: w || void 0,
|
|
1328
|
-
toCalldata: U || void 0,
|
|
1329
|
-
fromToken: W || void 0,
|
|
1330
|
-
fromChainId: Q ? Number(Q) : void 0,
|
|
1331
|
-
walletClient: N ?? void 0,
|
|
1332
|
-
isSequenceWallet: Ke,
|
|
1333
|
-
onTransactionStateChange: Fe,
|
|
1334
|
-
onError: X,
|
|
1335
|
-
setWalletConfirmRetryHandler: Pe,
|
|
1336
|
-
swapProvider: ye,
|
|
1337
|
-
bridgeProvider: Te,
|
|
1338
|
-
swapProviderFallback: be,
|
|
1339
|
-
bridgeProviderFallback: xe,
|
|
1340
|
-
checkoutOnHandlers: ve,
|
|
1341
|
-
recentTokens: ee,
|
|
1342
|
-
onTrackToken: J,
|
|
1343
|
-
defaultInputMode: Qn
|
|
1344
|
-
});
|
|
1345
|
-
case "wallet-connection-pending":
|
|
1346
|
-
return /* @__PURE__ */ r(ja, {
|
|
1347
|
-
onBack: m,
|
|
1348
|
-
onRetry: () => {
|
|
1349
|
-
fe && (wn(!1), rn(fe));
|
|
1350
|
-
},
|
|
1351
|
-
selectedWalletId: fe || "",
|
|
1352
|
-
isConnecting: ho,
|
|
1353
|
-
error: tn,
|
|
1354
|
-
showRetry: Co
|
|
1355
|
-
});
|
|
1356
|
-
case "account-history":
|
|
1357
|
-
return /* @__PURE__ */ r(ma, {
|
|
1358
|
-
accountAddress: S,
|
|
1359
|
-
onBack: m
|
|
1360
|
-
});
|
|
1361
|
-
case "meld-history":
|
|
1362
|
-
return /* @__PURE__ */ r(ga, {
|
|
1363
|
-
limit: 20,
|
|
1364
|
-
autoRefetch: !1,
|
|
1365
|
-
onBack: m
|
|
1366
|
-
});
|
|
1367
|
-
case "account-settings":
|
|
1368
|
-
return /* @__PURE__ */ r(fa, { onBack: m });
|
|
1369
|
-
case "user-preferences":
|
|
1370
|
-
return /* @__PURE__ */ r(qa, { onBack: m });
|
|
1371
|
-
case "chain-list":
|
|
1372
|
-
return /* @__PURE__ */ r(Vr, { onBack: () => o("tokens") });
|
|
1373
|
-
case "recipients":
|
|
1374
|
-
return /* @__PURE__ */ r(Ba, { onBack: m });
|
|
1375
|
-
case "disconnect":
|
|
1376
|
-
return /* @__PURE__ */ r(ha, {
|
|
1377
|
-
onBack: m,
|
|
1378
|
-
disconnectHandler: Rn
|
|
1379
|
-
});
|
|
1380
|
-
}
|
|
1381
|
-
throw new Error(`[trails-sdk] Unhandled screen state: ${u}`);
|
|
1382
|
-
}, xt = () => /* @__PURE__ */ r(zr, {
|
|
1383
|
-
value: {
|
|
1384
|
-
thresholdBps: Gt,
|
|
1385
|
-
warningMessage: zt,
|
|
1386
|
-
fallbackBridgeUrl: _t
|
|
1387
|
-
},
|
|
1388
|
-
children: /* @__PURE__ */ q(ln.div, {
|
|
1389
|
-
initial: {
|
|
1390
|
-
opacity: 0,
|
|
1391
|
-
scale: 0.95
|
|
1392
|
-
},
|
|
1393
|
-
animate: {
|
|
1394
|
-
opacity: 1,
|
|
1395
|
-
scale: 1
|
|
1396
|
-
},
|
|
1397
|
-
exit: {
|
|
1398
|
-
opacity: 0,
|
|
1399
|
-
scale: 0.95
|
|
1400
|
-
},
|
|
1401
|
-
transition: {
|
|
1402
|
-
type: "spring",
|
|
1403
|
-
stiffness: 200,
|
|
1404
|
-
damping: 30,
|
|
1405
|
-
mass: 1
|
|
1406
|
-
},
|
|
1407
|
-
className: "flex flex-col min-h-[400px] shadow-xl p-4 sm:p-6 relative w-full max-w-[400px] min-w-0 sm:w-[400px] mx-auto custom-scrollbar trails-bg-primary trails-text-primary trails-font trails-border-radius-widget trails-widget-border",
|
|
1408
|
-
layout: !0,
|
|
1409
|
-
layoutId: "modal-container",
|
|
1410
|
-
onClick: (e) => e.stopPropagation(),
|
|
1411
|
-
children: [/* @__PURE__ */ r(Nt, {
|
|
1412
|
-
mode: "wait",
|
|
1413
|
-
children: /* @__PURE__ */ q(ln.div, {
|
|
1414
|
-
initial: {
|
|
1415
|
-
opacity: 0,
|
|
1416
|
-
x: 20
|
|
1417
|
-
},
|
|
1418
|
-
animate: {
|
|
1419
|
-
opacity: 1,
|
|
1420
|
-
x: 0
|
|
1421
|
-
},
|
|
1422
|
-
exit: {
|
|
1423
|
-
opacity: 0,
|
|
1424
|
-
x: -20
|
|
1425
|
-
},
|
|
1426
|
-
transition: {
|
|
1427
|
-
type: "spring",
|
|
1428
|
-
stiffness: 500,
|
|
1429
|
-
damping: 30,
|
|
1430
|
-
mass: 0.6
|
|
1431
|
-
},
|
|
1432
|
-
className: "flex-1 flex flex-col w-full min-w-0",
|
|
1433
|
-
layout: !0,
|
|
1434
|
-
children: [ir(), tn && /* @__PURE__ */ r("div", {
|
|
1435
|
-
className: "mt-2",
|
|
1436
|
-
children: /* @__PURE__ */ r(ua, {
|
|
1437
|
-
errorPrettified: gr(tn, "An error occurred"),
|
|
1438
|
-
error: tn,
|
|
1439
|
-
severity: "error"
|
|
1440
|
-
})
|
|
1441
|
-
})]
|
|
1442
|
-
}, u)
|
|
1443
|
-
}), /* @__PURE__ */ r(wa, { onDebugScreenSelect: zo })]
|
|
1444
|
-
})
|
|
1445
|
-
});
|
|
1446
|
-
return I ? xt() : /* @__PURE__ */ q("div", {
|
|
1447
|
-
className: "flex flex-col items-center justify-center space-y-8 py-12",
|
|
1448
|
-
children: [K ? /* @__PURE__ */ r(ln.div, {
|
|
1449
|
-
whileHover: { scale: 1.02 },
|
|
1450
|
-
whileTap: { scale: 0.98 },
|
|
1451
|
-
className: "flex flex-col items-center justify-center",
|
|
1452
|
-
onClick: an,
|
|
1453
|
-
children: K
|
|
1454
|
-
}) : /* @__PURE__ */ r(ln.button, {
|
|
1455
|
-
whileHover: { scale: 1.02 },
|
|
1456
|
-
whileTap: { scale: 0.98 },
|
|
1457
|
-
onClick: an,
|
|
1458
|
-
className: "trails-modal-button cursor-pointer font-semibold py-3 px-6 trails-font",
|
|
1459
|
-
children: Vt || Io
|
|
1460
|
-
}), /* @__PURE__ */ r(Nt, { children: b && /* @__PURE__ */ r(Lr, {
|
|
1461
|
-
isOpen: b,
|
|
1462
|
-
onClose: re,
|
|
1463
|
-
children: xt()
|
|
1464
|
-
}) })]
|
|
1465
|
-
});
|
|
1466
|
-
}), ws = jn(({ resolvedWalletRuntimeMode: s, ...j }, g) => /* @__PURE__ */ q(Dr, {
|
|
1467
|
-
props: j,
|
|
1468
|
-
walletRuntimeMode: s,
|
|
1469
|
-
children: [/* @__PURE__ */ r(Ua, {}), /* @__PURE__ */ r(ks, { ref: g })]
|
|
1470
|
-
})), pl = jn((s, j) => {
|
|
1471
|
-
const g = Hn.useContext(oa), c = g?.config ?? null, k = c !== null, w = as(), Z = c?.hasAdapters ?? !1, H = s.walletConnectProjectId ?? (g?.hasExplicitWalletConnectProjectId ? g.config.walletConnectProjectId : void 0), U = Hn.useMemo(() => ta({
|
|
1472
|
-
adapters: s.adapters,
|
|
1473
|
-
owner: "TrailsWidget adapters",
|
|
1474
|
-
walletConnectProjectId: H
|
|
1475
|
-
}), [s.adapters, H]), W = !!U?.Provider;
|
|
1476
|
-
if (!s.apiKey && !c) throw new Error("apiKey is required when TrailsWidget is mounted without a parent TrailsProvider");
|
|
1477
|
-
if (Z && s.adapters) throw new Error("[trails-sdk] Provide adapters either via the parent TrailsProvider or the TrailsWidget instance, not both.");
|
|
1478
|
-
if (w && s.adapters) throw new Error("[trails-sdk] TrailsWidget adapters cannot be used inside an existing parent wallet context.");
|
|
1479
|
-
const Q = yr({
|
|
1480
|
-
hasWalletContext: w,
|
|
1481
|
-
hasWidgetAdapterProvider: W
|
|
1482
|
-
}), O = k && !!s.adapters, B = Hn.useMemo(() => ({
|
|
1483
|
-
trailsApiKey: s.apiKey ?? c?.trailsApiKey ?? "",
|
|
1484
|
-
trailsApiUrl: s.trailsApiUrl ?? c?.trailsApiUrl,
|
|
1485
|
-
trailsAppUrl: s.trailsAppUrl ?? c?.trailsAppUrl,
|
|
1486
|
-
sequenceApiUrl: s.sequenceApiUrl ?? c?.sequenceApiUrl,
|
|
1487
|
-
sequenceIndexerUrl: s.sequenceIndexerUrl ?? c?.sequenceIndexerUrl,
|
|
1488
|
-
sequenceNodeGatewayUrl: s.sequenceNodeGatewayUrl ?? c?.sequenceNodeGatewayUrl,
|
|
1489
|
-
sequenceMetadataUrl: s.sequenceMetadataUrl ?? c?.sequenceMetadataUrl,
|
|
1490
|
-
walletConnectProjectId: s.walletConnectProjectId ?? c?.walletConnectProjectId,
|
|
1491
|
-
slippageTolerance: s.slippageTolerance ? String(s.slippageTolerance) : c?.slippageTolerance,
|
|
1492
|
-
debug: s.debug ?? c?.debug,
|
|
1493
|
-
adapters: U ? [U] : void 0
|
|
1494
|
-
}), [
|
|
1495
|
-
s.apiKey,
|
|
1496
|
-
s.trailsApiUrl,
|
|
1497
|
-
s.trailsAppUrl,
|
|
1498
|
-
s.sequenceApiUrl,
|
|
1499
|
-
s.sequenceIndexerUrl,
|
|
1500
|
-
s.sequenceNodeGatewayUrl,
|
|
1501
|
-
s.sequenceMetadataUrl,
|
|
1502
|
-
s.walletConnectProjectId,
|
|
1503
|
-
s.slippageTolerance,
|
|
1504
|
-
s.debug,
|
|
1505
|
-
c,
|
|
1506
|
-
U
|
|
1507
|
-
]);
|
|
1508
|
-
n.console.log("trailsConfig", B), n.console.log("[trails-sdk] [TrailsWidget] wallet runtime mode", {
|
|
1509
|
-
walletRuntimeMode: Q,
|
|
1510
|
-
hasTrailsContext: k,
|
|
1511
|
-
hasWalletContext: w,
|
|
1512
|
-
hasWidgetAdapterProvider: W,
|
|
1513
|
-
parentHasAdapters: Z,
|
|
1514
|
-
shouldNestTrailsProvider: O
|
|
1515
|
-
});
|
|
1516
|
-
const K = /* @__PURE__ */ r(aa, {
|
|
1517
|
-
widgetContent: /* @__PURE__ */ r(br, {
|
|
1518
|
-
initialTheme: s.theme,
|
|
1519
|
-
children: /* @__PURE__ */ r(ws, {
|
|
1520
|
-
...s,
|
|
1521
|
-
resolvedWalletRuntimeMode: Q,
|
|
1522
|
-
ref: j
|
|
1523
|
-
})
|
|
1524
|
-
}),
|
|
1525
|
-
trailsConfig: B,
|
|
1526
|
-
walletRuntimeMode: Q,
|
|
1527
|
-
shouldNestTrailsProvider: O
|
|
1528
|
-
}), I = s.customCss instanceof Object ? ia(s.customCss) : s.customCss;
|
|
1529
|
-
return s.disableCss ? /* @__PURE__ */ r(Ot, { children: K }) : /* @__PURE__ */ r(Tr, {
|
|
1530
|
-
customCss: I,
|
|
1531
|
-
children: /* @__PURE__ */ r(Ot, { children: K })
|
|
1532
|
-
});
|
|
1533
|
-
}), gl = (s) => ({
|
|
1534
|
-
openModal: () => s.current?.openModal?.(),
|
|
1535
|
-
closeModal: () => s.current?.closeModal?.(),
|
|
1536
|
-
isModalOpen: s.current?.isModalOpen ?? !1
|
|
1537
|
-
});
|
|
1538
|
-
export {
|
|
1539
|
-
gl as createModalController,
|
|
1540
|
-
pl as default
|
|
1541
|
-
};
|