0xtrails 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abis/trailsHydrate.d.ts +5 -42
- package/dist/abis/trailsHydrate.d.ts.map +1 -1
- package/dist/abis/trailsRouter.d.ts +1 -1
- package/dist/abis/trailsRouter.d.ts.map +1 -1
- package/dist/{widget/analytics → analytics/hooks}/useWidgetAnalytics.d.ts +2 -4
- package/dist/analytics/hooks/useWidgetAnalytics.d.ts.map +1 -0
- package/dist/analytics.d.ts.map +1 -1
- package/dist/chainSwitch.d.ts.map +1 -1
- package/dist/chains-C1NhDLF_.js +4 -0
- package/dist/chains-CcoarGia.js +658 -0
- package/dist/chains.d.ts +0 -1
- package/dist/chains.d.ts.map +1 -1
- package/dist/committedIntentStore.d.ts +5 -0
- package/dist/committedIntentStore.d.ts.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/error.d.ts +73 -4
- package/dist/error.d.ts.map +1 -1
- package/dist/hooks/useAddressWalletIcon.d.ts.map +1 -0
- package/dist/hooks/useAmountUsd.d.ts.map +1 -0
- package/dist/hooks/useBalanceVisible.d.ts.map +1 -0
- package/dist/hooks/useChainFilter.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useCheckout.d.ts +15 -15
- package/dist/hooks/useCheckout.d.ts.map +1 -0
- package/dist/hooks/useClickTracking.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useCombinedHistory.d.ts +3 -2
- package/dist/hooks/useCombinedHistory.d.ts.map +1 -0
- package/dist/hooks/useConnector.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useCustomTokenSearch.d.ts +1 -1
- package/dist/hooks/useCustomTokenSearch.d.ts.map +1 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useDebugScreens.d.ts +2 -2
- package/dist/hooks/useDebugScreens.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useDefaultDestinationToken.d.ts +1 -1
- package/dist/hooks/useDefaultDestinationToken.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useDefaultOriginToken.d.ts +1 -1
- package/dist/hooks/useDefaultOriginToken.d.ts.map +1 -0
- package/dist/hooks/useDepositMonitor.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useDestinationSelectedToken.d.ts +2 -2
- package/dist/hooks/useDestinationSelectedToken.d.ts.map +1 -0
- package/dist/hooks/useDisplayCurrencyPreference.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useEarnPool.d.ts +1 -1
- package/dist/hooks/useEarnPool.d.ts.map +1 -0
- package/dist/hooks/useEffectiveFundBalance.d.ts +28 -0
- package/dist/hooks/useEffectiveFundBalance.d.ts.map +1 -0
- package/dist/hooks/useExecutingIntentsCount.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useExternalFundingReceiptSync.d.ts +1 -1
- package/dist/hooks/useExternalFundingReceiptSync.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useFiatOnRampCurrencies.d.ts +1 -1
- package/dist/hooks/useFiatOnRampCurrencies.d.ts.map +1 -0
- package/dist/hooks/useFiatSelectedCurrency.d.ts.map +1 -0
- package/dist/hooks/useGetIntent.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useIntentReceiptBalances.d.ts +1 -1
- package/dist/hooks/useIntentReceiptBalances.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useIntentTransactionHistory.d.ts +2 -1
- package/dist/hooks/useIntentTransactionHistory.d.ts.map +1 -0
- package/dist/hooks/useIsMobile.d.ts.map +1 -0
- package/dist/hooks/useIsSequenceWallet.d.ts.map +1 -0
- package/dist/hooks/useLocalePreference.d.ts.map +1 -0
- package/dist/hooks/useMeldTransactionHistory.d.ts.map +1 -0
- package/dist/hooks/useMeldTransactionStatus.d.ts.map +1 -0
- package/dist/hooks/useOnRampCountryDefaults.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useOnRampPaymentMethods.d.ts +2 -2
- package/dist/hooks/useOnRampPaymentMethods.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useOnRampProviderWidget.d.ts +1 -1
- package/dist/hooks/useOnRampProviderWidget.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useOnRampQuote.d.ts +3 -3
- package/dist/hooks/useOnRampQuote.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useOnRampTransactionStatus.d.ts +1 -1
- package/dist/hooks/useOnRampTransactionStatus.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useOriginSelectedToken.d.ts +1 -1
- package/dist/hooks/useOriginSelectedToken.d.ts.map +1 -0
- package/dist/hooks/usePayMessage.d.ts.map +1 -0
- package/dist/hooks/usePriceImpactWarning.d.ts.map +1 -0
- package/dist/hooks/useQuote.d.ts +439 -0
- package/dist/hooks/useQuote.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useRecentTokens.d.ts +1 -1
- package/dist/hooks/useRecentTokens.d.ts.map +1 -0
- package/dist/hooks/useRecipients.d.ts.map +1 -0
- package/dist/hooks/useSelectedFeeOption.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useSelectedFundMethod.d.ts +11 -1
- package/dist/hooks/useSelectedFundMethod.d.ts.map +1 -0
- package/dist/hooks/useSelectedRecipient.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useSendForm.d.ts +6 -11
- package/dist/hooks/useSendForm.d.ts.map +1 -0
- package/dist/hooks/useSwapAmount.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useSwapState.d.ts +1 -1
- package/dist/hooks/useSwapState.d.ts.map +1 -0
- package/dist/hooks/useTargetAmount.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useTokenList.d.ts +2 -2
- package/dist/hooks/useTokenList.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useTrailsSendTransaction.d.ts +1 -1
- package/dist/hooks/useTrailsSendTransaction.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useViewManager.d.ts +1 -1
- package/dist/hooks/useViewManager.d.ts.map +1 -0
- package/dist/hooks/useWalletConnectUri.d.ts +19 -0
- package/dist/hooks/useWalletConnectUri.d.ts.map +1 -0
- package/dist/hooks/useWalletConnectionContext.d.ts.map +1 -0
- package/dist/{widget/hooks → hooks}/useWidgetProps.d.ts +1 -1
- package/dist/hooks/useWidgetProps.d.ts.map +1 -0
- package/dist/hydrate/builder.d.ts +131 -0
- package/dist/hydrate/builder.d.ts.map +1 -0
- package/dist/hydrate/constants.d.ts +13 -0
- package/dist/hydrate/constants.d.ts.map +1 -0
- package/dist/hydrate/encodeExecute.d.ts +73 -0
- package/dist/hydrate/encodeExecute.d.ts.map +1 -0
- package/dist/hydrate/index.d.ts +6 -0
- package/dist/hydrate/index.d.ts.map +1 -0
- package/dist/hydrate/index.js +11 -0
- package/dist/hydrate/payload.d.ts +38 -0
- package/dist/hydrate/payload.d.ts.map +1 -0
- package/dist/hydrate/selectors.d.ts +28 -0
- package/dist/hydrate/selectors.d.ts.map +1 -0
- package/dist/hydrate/types.d.ts +19 -0
- package/dist/hydrate/types.d.ts.map +1 -0
- package/dist/hydrate/utils.d.ts +8 -0
- package/dist/hydrate/utils.d.ts.map +1 -0
- package/dist/hydrate-Cr9eaeDK.js +654 -0
- package/dist/index.d.ts +19 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +157 -662
- package/dist/intentConfigStore.d.ts +8 -0
- package/dist/intentConfigStore.d.ts.map +1 -0
- package/dist/intentProtocolApi.d.ts +11 -0
- package/dist/intentProtocolApi.d.ts.map +1 -0
- package/dist/intentProtocolEncoding.d.ts +25 -0
- package/dist/intentProtocolEncoding.d.ts.map +1 -0
- package/dist/intentProtocolResolver.d.ts +28 -0
- package/dist/intentProtocolResolver.d.ts.map +1 -0
- package/dist/intentReceiptPoller.d.ts.map +1 -1
- package/dist/intentValidation.d.ts +5 -0
- package/dist/intentValidation.d.ts.map +1 -0
- package/dist/intents.d.ts.map +1 -1
- package/dist/keymachine/index.d.ts +20 -0
- package/dist/keymachine/index.d.ts.map +1 -1
- package/dist/mutations.d.ts.map +1 -1
- package/dist/offlineRecovery.d.ts +24 -0
- package/dist/offlineRecovery.d.ts.map +1 -0
- package/dist/onramp/MeshConnectFlow.d.ts +9 -0
- package/dist/onramp/MeshConnectFlow.d.ts.map +1 -1
- package/dist/onramp/MeshConnectIframe.d.ts +9 -0
- package/dist/onramp/MeshConnectIframe.d.ts.map +1 -1
- package/dist/onramp/TrailsOnRampProvider.d.ts.map +1 -1
- package/dist/onramp/mesh/components/MeshExchangeConfirmation.d.ts +10 -0
- package/dist/onramp/mesh/components/MeshExchangeConfirmation.d.ts.map +1 -0
- package/dist/onramp/mesh/components/MeshExchangeIcon.d.ts +13 -0
- package/dist/onramp/mesh/components/MeshExchangeIcon.d.ts.map +1 -0
- package/dist/{widget → onramp/mesh}/components/MeshExchangeSelection.d.ts +1 -0
- package/dist/onramp/mesh/components/MeshExchangeSelection.d.ts.map +1 -0
- package/dist/onramp/mesh/components/MeshSessionOptions.d.ts +15 -0
- package/dist/onramp/mesh/components/MeshSessionOptions.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshAccessTokens.d.ts +9 -0
- package/dist/onramp/mesh/hooks/useMeshAccessTokens.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshFundingSelection.d.ts +11 -0
- package/dist/onramp/mesh/hooks/useMeshFundingSelection.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshOnrampFlow.d.ts +71 -0
- package/dist/onramp/mesh/hooks/useMeshOnrampFlow.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshOnrampSessionState.d.ts +32 -0
- package/dist/onramp/mesh/hooks/useMeshOnrampSessionState.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshSelectedTokenBalance.d.ts +19 -0
- package/dist/onramp/mesh/hooks/useMeshSelectedTokenBalance.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshSessionAccountBalance.d.ts +15 -0
- package/dist/onramp/mesh/hooks/useMeshSessionAccountBalance.d.ts.map +1 -0
- package/dist/onramp/mesh/hooks/useMeshSessionStorage.d.ts +7 -0
- package/dist/onramp/mesh/hooks/useMeshSessionStorage.d.ts.map +1 -0
- package/dist/onramp/meshSessionStorage.d.ts +13 -0
- package/dist/onramp/meshSessionStorage.d.ts.map +1 -0
- package/dist/onramp/meshconnect.d.ts +6 -4
- package/dist/onramp/meshconnect.d.ts.map +1 -1
- package/dist/onramp/trailsOnramp.d.ts +8 -0
- package/dist/onramp/trailsOnramp.d.ts.map +1 -1
- package/dist/onrampClient.d.ts.map +1 -1
- package/dist/prepareSend.d.ts +3 -2
- package/dist/prepareSend.d.ts.map +1 -1
- package/dist/query/intentProtocol.queries.d.ts +32 -0
- package/dist/query/intentProtocol.queries.d.ts.map +1 -0
- package/dist/recover.d.ts +70 -24
- package/dist/recover.d.ts.map +1 -1
- package/dist/src-4HYDQv2T.js +48798 -0
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts +2 -3
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts +2 -3
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/standardDeposit.d.ts +2 -5
- package/dist/transactionIntent/deposits/standardDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/intentHandler.d.ts +4 -4
- package/dist/transactionIntent/handlers/intentHandler.d.ts.map +1 -1
- package/dist/transactionIntent/quote/quoteHelpers.d.ts +2 -2
- package/dist/transactionIntent/quote/quoteHelpers.d.ts.map +1 -1
- package/dist/transactionIntent/types.d.ts +3 -3
- package/dist/transactionIntent/types.d.ts.map +1 -1
- package/dist/transactions.d.ts +1 -0
- package/dist/transactions.d.ts.map +1 -1
- package/dist/umd/trails.min.js +1370 -410
- package/dist/utils/localStorageGc.d.ts +22 -0
- package/dist/utils/localStorageGc.d.ts.map +1 -0
- package/dist/walletUtils.d.ts.map +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/components/ClassicSwap.d.ts.map +1 -1
- package/dist/widget/components/ConnectedWallets.d.ts +1 -1
- package/dist/widget/components/ConnectedWallets.d.ts.map +1 -1
- package/dist/widget/components/Earn.d.ts +2 -6
- package/dist/widget/components/Earn.d.ts.map +1 -1
- package/dist/widget/components/FeeOption.d.ts +1 -1
- package/dist/widget/components/FeeOption.d.ts.map +1 -1
- package/dist/widget/components/FeeOptions.d.ts +1 -1
- package/dist/widget/components/FeeOptions.d.ts.map +1 -1
- package/dist/widget/components/FiatSelector.d.ts +1 -1
- package/dist/widget/components/FiatSelector.d.ts.map +1 -1
- package/dist/widget/components/FiatSelectorButton.d.ts +1 -1
- package/dist/widget/components/FiatSelectorButton.d.ts.map +1 -1
- package/dist/widget/components/Fund.d.ts +1 -1
- package/dist/widget/components/Fund.d.ts.map +1 -1
- package/dist/widget/components/FundMethods.d.ts.map +1 -1
- package/dist/widget/components/FundingMethodSelectorButton.d.ts +1 -1
- package/dist/widget/components/FundingMethodSelectorButton.d.ts.map +1 -1
- package/dist/widget/components/MeldHistory.d.ts +1 -1
- package/dist/widget/components/MeldHistory.d.ts.map +1 -1
- package/dist/widget/components/MeldTransactionStatus.d.ts +1 -1
- package/dist/widget/components/MeldTransactionStatus.d.ts.map +1 -1
- package/dist/widget/components/MeshExchangeAccountHeader.d.ts +9 -0
- package/dist/widget/components/MeshExchangeAccountHeader.d.ts.map +1 -0
- package/dist/widget/components/OnrampHistoryRow.d.ts +1 -1
- package/dist/widget/components/OnrampHistoryRow.d.ts.map +1 -1
- package/dist/widget/components/OnrampProviderConfirmation.d.ts +1 -1
- package/dist/widget/components/OnrampProviderConfirmation.d.ts.map +1 -1
- package/dist/widget/components/Pay.d.ts.map +1 -1
- package/dist/widget/components/PoolDeposit.d.ts +2 -6
- package/dist/widget/components/PoolDeposit.d.ts.map +1 -1
- package/dist/widget/components/PoolWithdraw.d.ts +2 -2
- package/dist/widget/components/PoolWithdraw.d.ts.map +1 -1
- package/dist/widget/components/PulsatingButton.d.ts +9 -0
- package/dist/widget/components/PulsatingButton.d.ts.map +1 -0
- package/dist/widget/components/Receipt.d.ts +1 -1
- package/dist/widget/components/Receipt.d.ts.map +1 -1
- package/dist/widget/components/RecipientSelectorButton.d.ts.map +1 -1
- package/dist/widget/components/Recipients.d.ts.map +1 -1
- package/dist/widget/components/Swap.d.ts +2 -6
- package/dist/widget/components/Swap.d.ts.map +1 -1
- package/dist/widget/components/TokenList.d.ts +1 -0
- package/dist/widget/components/TokenList.d.ts.map +1 -1
- package/dist/widget/components/TokenSelector.d.ts +1 -2
- package/dist/widget/components/TokenSelector.d.ts.map +1 -1
- package/dist/widget/components/TransactionDetails.d.ts +1 -0
- package/dist/widget/components/TransactionDetails.d.ts.map +1 -1
- package/dist/widget/components/TransactionHistoryItem.d.ts +1 -0
- package/dist/widget/components/TransactionHistoryItem.d.ts.map +1 -1
- package/dist/widget/components/TransferPendingVertical.d.ts +1 -1
- package/dist/widget/components/TransferPendingVertical.d.ts.map +1 -1
- package/dist/widget/components/WalletAccountHeader.d.ts +7 -0
- package/dist/widget/components/WalletAccountHeader.d.ts.map +1 -0
- package/dist/widget/components/WalletConfirmation.d.ts +2 -1
- package/dist/widget/components/WalletConfirmation.d.ts.map +1 -1
- package/dist/widget/components/WalletConnect.d.ts.map +1 -1
- package/dist/widget/components/WidgetProviders.d.ts.map +1 -1
- package/dist/widget/components/Withdraw.d.ts.map +1 -1
- package/dist/widget/index.d.ts +13 -0
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +16 -8
- package/dist/widget/modes/EarnWidget.d.ts +83 -0
- package/dist/widget/modes/EarnWidget.d.ts.map +1 -0
- package/dist/widget/modes/FundWidget.d.ts +103 -0
- package/dist/widget/modes/FundWidget.d.ts.map +1 -0
- package/dist/widget/modes/PayWidget.d.ts +86 -0
- package/dist/widget/modes/PayWidget.d.ts.map +1 -0
- package/dist/widget/modes/SwapWidget.d.ts +82 -0
- package/dist/widget/modes/SwapWidget.d.ts.map +1 -0
- package/dist/widget/modes/WithdrawWidget.d.ts +71 -0
- package/dist/widget/modes/WithdrawWidget.d.ts.map +1 -0
- package/dist/widget/providers/TrailsProvider.d.ts +3 -0
- package/dist/widget/providers/TrailsProvider.d.ts.map +1 -1
- package/dist/widget/shared/mapSharedProps.d.ts +9 -0
- package/dist/widget/shared/mapSharedProps.d.ts.map +1 -0
- package/dist/widget/shared/methodMap.d.ts +18 -0
- package/dist/widget/shared/methodMap.d.ts.map +1 -0
- package/dist/widget/shared/resolution.d.ts +22 -0
- package/dist/widget/shared/resolution.d.ts.map +1 -0
- package/dist/widget/shared/resolvePaymentSource.d.ts +34 -0
- package/dist/widget/shared/resolvePaymentSource.d.ts.map +1 -0
- package/dist/widget/shared/types.d.ts +94 -0
- package/dist/widget/shared/types.d.ts.map +1 -0
- package/dist/widget/types/commonProps.d.ts +3 -7
- package/dist/widget/types/commonProps.d.ts.map +1 -1
- package/dist/widget/utils/fundMethodSwitchState.d.ts +1 -0
- package/dist/widget/utils/fundMethodSwitchState.d.ts.map +1 -1
- package/dist/widget/utils/viewManagerGuards.d.ts +1 -1
- package/dist/widget/utils/viewManagerGuards.d.ts.map +1 -1
- package/dist/widget/widget.d.ts +21 -16
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +17 -23
- package/dist/buffer.d.ts +0 -3
- package/dist/buffer.d.ts.map +0 -1
- package/dist/ccip-CT_An6eM.js +0 -230
- package/dist/index-RfqL5Foz.js +0 -114567
- package/dist/paymasterSend.d.ts +0 -90
- package/dist/paymasterSend.d.ts.map +0 -1
- package/dist/sendUserOp.d.ts +0 -122
- package/dist/sendUserOp.d.ts.map +0 -1
- package/dist/toSimpleSmartAccount.d.ts +0 -95
- package/dist/toSimpleSmartAccount.d.ts.map +0 -1
- package/dist/transactionIntent/utils/erc20Approval.d.ts +0 -34
- package/dist/transactionIntent/utils/erc20Approval.d.ts.map +0 -1
- package/dist/utils/allowance.d.ts +0 -19
- package/dist/utils/allowance.d.ts.map +0 -1
- package/dist/widget/analytics/useWidgetAnalytics.d.ts.map +0 -1
- package/dist/widget/components/FeeBreakdown.d.ts +0 -9
- package/dist/widget/components/FeeBreakdown.d.ts.map +0 -1
- package/dist/widget/components/HideBalances.d.ts +0 -4
- package/dist/widget/components/HideBalances.d.ts.map +0 -1
- package/dist/widget/components/MeshExchangeSelection.d.ts.map +0 -1
- package/dist/widget/components/OnrampDeposit.d.ts +0 -10
- package/dist/widget/components/OnrampDeposit.d.ts.map +0 -1
- package/dist/widget/components/SwapSettings.d.ts +0 -4
- package/dist/widget/components/SwapSettings.d.ts.map +0 -1
- package/dist/widget/components/TruncatedAddress.d.ts +0 -12
- package/dist/widget/components/TruncatedAddress.d.ts.map +0 -1
- package/dist/widget/components/WalletImage.d.ts +0 -8
- package/dist/widget/components/WalletImage.d.ts.map +0 -1
- package/dist/widget/css/compiled.css +0 -26
- package/dist/widget/css/index.css +0 -686
- package/dist/widget/hooks/useAddressWalletIcon.d.ts.map +0 -1
- package/dist/widget/hooks/useAmountUsd.d.ts.map +0 -1
- package/dist/widget/hooks/useBalanceVisible.d.ts.map +0 -1
- package/dist/widget/hooks/useChainFilter.d.ts.map +0 -1
- package/dist/widget/hooks/useCheckout.d.ts.map +0 -1
- package/dist/widget/hooks/useClickTracking.d.ts.map +0 -1
- package/dist/widget/hooks/useCombinedHistory.d.ts.map +0 -1
- package/dist/widget/hooks/useConnector.d.ts.map +0 -1
- package/dist/widget/hooks/useCustomTokenSearch.d.ts.map +0 -1
- package/dist/widget/hooks/useDebounce.d.ts.map +0 -1
- package/dist/widget/hooks/useDebugScreens.d.ts.map +0 -1
- package/dist/widget/hooks/useDefaultDestinationToken.d.ts.map +0 -1
- package/dist/widget/hooks/useDefaultOriginToken.d.ts.map +0 -1
- package/dist/widget/hooks/useDepositMonitor.d.ts.map +0 -1
- package/dist/widget/hooks/useDestinationSelectedToken.d.ts.map +0 -1
- package/dist/widget/hooks/useDisplayCurrencyPreference.d.ts.map +0 -1
- package/dist/widget/hooks/useEarnPool.d.ts.map +0 -1
- package/dist/widget/hooks/useExecutingIntentsCount.d.ts.map +0 -1
- package/dist/widget/hooks/useExternalFundingReceiptSync.d.ts.map +0 -1
- package/dist/widget/hooks/useFiatOnRampCurrencies.d.ts.map +0 -1
- package/dist/widget/hooks/useFiatSelectedCurrency.d.ts.map +0 -1
- package/dist/widget/hooks/useGetIntent.d.ts.map +0 -1
- package/dist/widget/hooks/useIntentReceiptBalances.d.ts.map +0 -1
- package/dist/widget/hooks/useIntentTransactionHistory.d.ts.map +0 -1
- package/dist/widget/hooks/useIsConnectedWalletSmartContract.d.ts +0 -7
- package/dist/widget/hooks/useIsConnectedWalletSmartContract.d.ts.map +0 -1
- package/dist/widget/hooks/useIsMobile.d.ts.map +0 -1
- package/dist/widget/hooks/useIsSequenceWallet.d.ts.map +0 -1
- package/dist/widget/hooks/useLocalePreference.d.ts.map +0 -1
- package/dist/widget/hooks/useMeldTransactionHistory.d.ts.map +0 -1
- package/dist/widget/hooks/useMeldTransactionStatus.d.ts.map +0 -1
- package/dist/widget/hooks/useOnRampCountryDefaults.d.ts.map +0 -1
- package/dist/widget/hooks/useOnRampPaymentMethods.d.ts.map +0 -1
- package/dist/widget/hooks/useOnRampProviderWidget.d.ts.map +0 -1
- package/dist/widget/hooks/useOnRampQuote.d.ts.map +0 -1
- package/dist/widget/hooks/useOnRampTransactionStatus.d.ts.map +0 -1
- package/dist/widget/hooks/useOriginSelectedToken.d.ts.map +0 -1
- package/dist/widget/hooks/usePayMessage.d.ts.map +0 -1
- package/dist/widget/hooks/usePriceImpactWarning.d.ts.map +0 -1
- package/dist/widget/hooks/useQuote.d.ts +0 -378
- package/dist/widget/hooks/useQuote.d.ts.map +0 -1
- package/dist/widget/hooks/useRecentTokens.d.ts.map +0 -1
- package/dist/widget/hooks/useRecipients.d.ts.map +0 -1
- package/dist/widget/hooks/useScreenTracking.d.ts +0 -2
- package/dist/widget/hooks/useScreenTracking.d.ts.map +0 -1
- package/dist/widget/hooks/useSelectedFeeOption.d.ts.map +0 -1
- package/dist/widget/hooks/useSelectedFundMethod.d.ts.map +0 -1
- package/dist/widget/hooks/useSelectedRecipient.d.ts.map +0 -1
- package/dist/widget/hooks/useSendForm.d.ts.map +0 -1
- package/dist/widget/hooks/useSwapAmount.d.ts.map +0 -1
- package/dist/widget/hooks/useSwapState.d.ts.map +0 -1
- package/dist/widget/hooks/useTargetAmount.d.ts.map +0 -1
- package/dist/widget/hooks/useTheme.d.ts.map +0 -1
- package/dist/widget/hooks/useTokenList.d.ts.map +0 -1
- package/dist/widget/hooks/useTrailsSendTransaction.d.ts.map +0 -1
- package/dist/widget/hooks/useViewManager.d.ts.map +0 -1
- package/dist/widget/hooks/useWalletConnectUri.d.ts +0 -11
- package/dist/widget/hooks/useWalletConnectUri.d.ts.map +0 -1
- package/dist/widget/hooks/useWalletConnectionContext.d.ts.map +0 -1
- package/dist/widget/hooks/useWidgetProps.d.ts.map +0 -1
- package/dist/widget/types.d.ts +0 -44
- package/dist/widget/types.d.ts.map +0 -1
- package/dist/widget/utils/historyUtils.d.ts +0 -18
- package/dist/widget/utils/historyUtils.d.ts.map +0 -1
- package/src/abi.ts +0 -38
- package/src/abis/erc20.ts +0 -60
- package/src/abis/trailsHydrate.ts +0 -185
- package/src/abis/trailsRouter.ts +0 -121
- package/src/abis/trailsSweep.ts +0 -32
- package/src/abortController.ts +0 -35
- package/src/analytics.ts +0 -2029
- package/src/buffer.ts +0 -10
- package/src/chainSwitch.ts +0 -95
- package/src/chains.ts +0 -570
- package/src/config.ts +0 -118
- package/src/constants.ts +0 -239
- package/src/contractUtils.ts +0 -46
- package/src/cssUtils.ts +0 -5
- package/src/customChains.ts +0 -24
- package/src/customTokens.ts +0 -168
- package/src/decoders.ts +0 -365
- package/src/ens.ts +0 -74
- package/src/error.ts +0 -268
- package/src/estimate.ts +0 -480
- package/src/explorer.ts +0 -38
- package/src/fees.ts +0 -362
- package/src/gasless.ts +0 -638
- package/src/index.ts +0 -205
- package/src/indexerClient.ts +0 -118
- package/src/intentReceiptMonitor.ts +0 -99
- package/src/intentReceiptPoller.ts +0 -327
- package/src/intents.ts +0 -1133
- package/src/keyMachineClient.ts +0 -29
- package/src/keymachine/index.ts +0 -175
- package/src/keymachine/key-machine.gen.ts +0 -993
- package/src/localeUtils.ts +0 -244
- package/src/logger/index.ts +0 -95
- package/src/logger/useSyncLoggerDebug.ts +0 -11
- package/src/logger.ts +0 -1
- package/src/meld/components/MeldCountriesList.tsx +0 -237
- package/src/meld/components/MeldFundMethods.tsx +0 -265
- package/src/meld/components/MeldProvidersList.tsx +0 -187
- package/src/meld/components/MeldTokensList.tsx +0 -321
- package/src/meld/components/SimpleHeader.tsx +0 -35
- package/src/meld/utils/meld.ts +0 -77
- package/src/mutations.ts +0 -166
- package/src/onramp/MeshConnectFlow.tsx +0 -86
- package/src/onramp/MeshConnectIframe.tsx +0 -661
- package/src/onramp/SendFromExchangeButton.tsx +0 -81
- package/src/onramp/TrailsOnRampProvider.tsx +0 -59
- package/src/onramp/index.ts +0 -31
- package/src/onramp/meshconnect.ts +0 -277
- package/src/onramp/trailsOnramp.tsx +0 -130
- package/src/onramp-client/index.ts +0 -52
- package/src/onrampClient.ts +0 -46
- package/src/paymasterSend.ts +0 -521
- package/src/placeholder.ts +0 -92
- package/src/poolUtils.ts +0 -222
- package/src/pools.ts +0 -120
- package/src/prepareSend.ts +0 -553
- package/src/query/balance.fetchers.ts +0 -753
- package/src/query/balance.hooks.ts +0 -357
- package/src/query/balance.queries.ts +0 -307
- package/src/query/chains.hooks.ts +0 -45
- package/src/query/chains.queries.ts +0 -17
- package/src/query/client.ts +0 -20
- package/src/query/fiat.fetchers.ts +0 -33
- package/src/query/fiat.hooks.ts +0 -71
- package/src/query/fiat.queries.ts +0 -67
- package/src/query/geo.fetchers.ts +0 -100
- package/src/query/geo.hooks.ts +0 -16
- package/src/query/geo.queries.ts +0 -36
- package/src/query/helpers.ts +0 -81
- package/src/query/meld.fetchers.ts +0 -97
- package/src/query/meld.hooks.ts +0 -18
- package/src/query/meld.queries.ts +0 -184
- package/src/query/persister.ts +0 -11
- package/src/query/price.fetchers.ts +0 -53
- package/src/query/price.hooks.ts +0 -46
- package/src/query/price.queries.ts +0 -364
- package/src/query/tokenList.queries.ts +0 -118
- package/src/queryParams.ts +0 -100
- package/src/recover.ts +0 -1728
- package/src/sendUserOp.ts +0 -512
- package/src/theme.ts +0 -2
- package/src/toSimpleSmartAccount.ts +0 -567
- package/src/toast.ts +0 -110
- package/src/tokens.ts +0 -1862
- package/src/trailsClient.ts +0 -40
- package/src/transactionIntent/constants.ts +0 -15
- package/src/transactionIntent/deposits/depositOrchestrator.ts +0 -243
- package/src/transactionIntent/deposits/gaslessDeposit.ts +0 -705
- package/src/transactionIntent/deposits/index.ts +0 -3
- package/src/transactionIntent/deposits/standardDeposit.ts +0 -590
- package/src/transactionIntent/execution/index.ts +0 -1
- package/src/transactionIntent/execution/transactionState.ts +0 -38
- package/src/transactionIntent/handlers/index.ts +0 -1
- package/src/transactionIntent/handlers/intentHandler.ts +0 -1613
- package/src/transactionIntent/helpers/index.ts +0 -1
- package/src/transactionIntent/helpers/transactionStateHelpers.ts +0 -440
- package/src/transactionIntent/index.ts +0 -10
- package/src/transactionIntent/quote/feeExtractors.ts +0 -61
- package/src/transactionIntent/quote/index.ts +0 -3
- package/src/transactionIntent/quote/normalizeQuote.ts +0 -559
- package/src/transactionIntent/quote/quoteHelpers.ts +0 -117
- package/src/transactionIntent/types.ts +0 -241
- package/src/transactionIntent/utils/balanceChecker.ts +0 -103
- package/src/transactionIntent/utils/erc20Approval.ts +0 -171
- package/src/transactionIntent/utils/index.ts +0 -2
- package/src/transactionIntent/utils/resilientDepositTracker.ts +0 -171
- package/src/transactionIntent/utils/testnetHelpers.ts +0 -5
- package/src/transactionIntent/validators.ts +0 -27
- package/src/transactions.ts +0 -429
- package/src/types.d.ts +0 -16
- package/src/umd.tsx +0 -33
- package/src/utils/address.ts +0 -78
- package/src/utils/allowance.ts +0 -47
- package/src/utils/fiat.ts +0 -32
- package/src/utils/format.ts +0 -625
- package/src/utils/passthrough.ts +0 -93
- package/src/utils/time.ts +0 -118
- package/src/utils/validation.ts +0 -104
- package/src/utils.ts +0 -112
- package/src/version.ts +0 -8
- package/src/vite-env.d.ts +0 -4
- package/src/walletUtils.ts +0 -293
- package/src/wallets.ts +0 -544
- package/src/widget/analytics/useWidgetAnalytics.ts +0 -56
- package/src/widget/assets/Exchange-icon-black.svg +0 -5
- package/src/widget/assets/MetaMask-icon-fox-with-margins.svg +0 -31
- package/src/widget/assets/MetaMask-icon-fox.svg +0 -26
- package/src/widget/assets/MetaMask-logo-black.svg +0 -3
- package/src/widget/assets/MetaMask-logo-white.svg +0 -16
- package/src/widget/assets/Trails-logo-black.svg +0 -13
- package/src/widget/assets/Trails-logo-white.svg +0 -13
- package/src/widget/assets/WalletChange-black.svg +0 -5
- package/src/widget/assets/WalletConnect-logo-black.svg +0 -14
- package/src/widget/assets/WalletConnect-logo-blue.svg +0 -14
- package/src/widget/assets/WalletConnect-logo-white.svg +0 -14
- package/src/widget/assets/WalletConnect-logo.svg +0 -40
- package/src/widget/assets/aave.svg +0 -14
- package/src/widget/assets/morpho.svg +0 -14
- package/src/widget/compiled.css +0 -26
- package/src/widget/components/AccountActionsDropdown.tsx +0 -31
- package/src/widget/components/AccountIntentTransactionHistory.tsx +0 -756
- package/src/widget/components/AccountIntentTransactionHistoryButton.tsx +0 -34
- package/src/widget/components/AccountSettings.tsx +0 -168
- package/src/widget/components/AddressOrEnsName.tsx +0 -24
- package/src/widget/components/AddressWalletIcon.tsx +0 -49
- package/src/widget/components/AllChainsIcon.tsx +0 -54
- package/src/widget/components/ChainFilterDropdown.tsx +0 -220
- package/src/widget/components/ChainImage.tsx +0 -40
- package/src/widget/components/ChainList.tsx +0 -158
- package/src/widget/components/ClassicSwap.tsx +0 -1761
- package/src/widget/components/ConfigDisplay.tsx +0 -158
- package/src/widget/components/ConnectWallet.tsx +0 -566
- package/src/widget/components/ConnectedWallets.tsx +0 -414
- package/src/widget/components/CopyButton.tsx +0 -108
- package/src/widget/components/CountryFilterDropdown.tsx +0 -179
- package/src/widget/components/DebugMenu.tsx +0 -50
- package/src/widget/components/DebugScreensList.tsx +0 -70
- package/src/widget/components/DebugToast.tsx +0 -63
- package/src/widget/components/DepositTracker.tsx +0 -326
- package/src/widget/components/DirectTransfer.tsx +0 -305
- package/src/widget/components/Disconnect.tsx +0 -68
- package/src/widget/components/DynamicInputStyles.tsx +0 -121
- package/src/widget/components/DynamicSizeInputField.tsx +0 -245
- package/src/widget/components/ENSAvatar.tsx +0 -33
- package/src/widget/components/Earn.tsx +0 -160
- package/src/widget/components/EarnPools.tsx +0 -417
- package/src/widget/components/EarnPoolsFilters.tsx +0 -165
- package/src/widget/components/ErrorAnimationIcon.tsx +0 -130
- package/src/widget/components/ErrorDisplay.tsx +0 -152
- package/src/widget/components/ExecutingIntentsBadge.tsx +0 -24
- package/src/widget/components/ExecutionStatusBadge.tsx +0 -53
- package/src/widget/components/FeeBreakdown.tsx +0 -155
- package/src/widget/components/FeeOption.tsx +0 -170
- package/src/widget/components/FeeOptions.tsx +0 -247
- package/src/widget/components/FiatSelector.tsx +0 -308
- package/src/widget/components/FiatSelectorButton.tsx +0 -68
- package/src/widget/components/Footer.tsx +0 -67
- package/src/widget/components/Fund.tsx +0 -2463
- package/src/widget/components/FundMethods.tsx +0 -423
- package/src/widget/components/FundWalletSelection.tsx +0 -60
- package/src/widget/components/FundingMethodSelectorButton.tsx +0 -106
- package/src/widget/components/GreenCheckAnimation.tsx +0 -119
- package/src/widget/components/HideBalances.tsx +0 -24
- package/src/widget/components/HighPriceImpactBlock.tsx +0 -44
- package/src/widget/components/HookModalContent.tsx +0 -377
- package/src/widget/components/Identicon.tsx +0 -228
- package/src/widget/components/LoadingSpinner.tsx +0 -9
- package/src/widget/components/MeldForm.tsx +0 -780
- package/src/widget/components/MeldHistory.tsx +0 -433
- package/src/widget/components/MeldStepsFlow.tsx +0 -1651
- package/src/widget/components/MeldTransactionStatus.tsx +0 -255
- package/src/widget/components/MeshExchangeSelection.tsx +0 -218
- package/src/widget/components/Modal.tsx +0 -86
- package/src/widget/components/OFTProgressBar.tsx +0 -89
- package/src/widget/components/OnRampProviderSelector.tsx +0 -263
- package/src/widget/components/OnrampDeposit.tsx +0 -122
- package/src/widget/components/OnrampErrorScreen.tsx +0 -163
- package/src/widget/components/OnrampHistoryRow.tsx +0 -321
- package/src/widget/components/OnrampPaymentMethods.tsx +0 -81
- package/src/widget/components/OnrampProviderConfirmation.tsx +0 -1060
- package/src/widget/components/OriginSelectionAmount.tsx +0 -144
- package/src/widget/components/OriginTransferInformation.tsx +0 -59
- package/src/widget/components/Pay.tsx +0 -1165
- package/src/widget/components/PaymentMethods.tsx +0 -198
- package/src/widget/components/PercentageMaxButtons.tsx +0 -112
- package/src/widget/components/PoolDeposit.tsx +0 -642
- package/src/widget/components/PoolWithdraw.tsx +0 -761
- package/src/widget/components/PriceImpactWarning.tsx +0 -87
- package/src/widget/components/QRCodeOptions.tsx +0 -65
- package/src/widget/components/QRCodeWalletSelect.tsx +0 -80
- package/src/widget/components/QrCode.tsx +0 -216
- package/src/widget/components/QuoteDetails.tsx +0 -1275
- package/src/widget/components/Receipt.tsx +0 -673
- package/src/widget/components/ReceiptRecoverableFunds.tsx +0 -135
- package/src/widget/components/RecentTokens.tsx +0 -66
- package/src/widget/components/RecipientSelectorButton.tsx +0 -50
- package/src/widget/components/Recipients.tsx +0 -413
- package/src/widget/components/RefundWarning.tsx +0 -61
- package/src/widget/components/RequiredPropsError.tsx +0 -33
- package/src/widget/components/ScreenHeader.tsx +0 -123
- package/src/widget/components/SearchInputField.tsx +0 -99
- package/src/widget/components/SessionTimeoutScreen.tsx +0 -103
- package/src/widget/components/ShadowPortal.tsx +0 -99
- package/src/widget/components/ShadowRootContext.tsx +0 -17
- package/src/widget/components/SimpleRecipientInputScreen.tsx +0 -91
- package/src/widget/components/SlippageToleranceSettings.tsx +0 -279
- package/src/widget/components/Swap.tsx +0 -50
- package/src/widget/components/SwapDisplay.tsx +0 -68
- package/src/widget/components/SwapSettings.tsx +0 -52
- package/src/widget/components/ThemeProvider.tsx +0 -115
- package/src/widget/components/ThemeSyncer.tsx +0 -47
- package/src/widget/components/Toast.tsx +0 -336
- package/src/widget/components/TokenDisplayNonSelectable.tsx +0 -40
- package/src/widget/components/TokenImage.tsx +0 -156
- package/src/widget/components/TokenList.tsx +0 -107
- package/src/widget/components/TokenSelector.tsx +0 -807
- package/src/widget/components/TokenSelectorButton.tsx +0 -123
- package/src/widget/components/TokenSkeleton.tsx +0 -53
- package/src/widget/components/Tooltip.tsx +0 -64
- package/src/widget/components/TrailsHookModal.tsx +0 -107
- package/src/widget/components/TransactionDetails.tsx +0 -534
- package/src/widget/components/TransactionHistoryItem.tsx +0 -767
- package/src/widget/components/TransferPendingVertical.tsx +0 -591
- package/src/widget/components/TruncatedAddress.tsx +0 -68
- package/src/widget/components/TruncatedTransactionHash.tsx +0 -74
- package/src/widget/components/UserPreferences.tsx +0 -570
- package/src/widget/components/WaasFeeOptions.tsx +0 -588
- package/src/widget/components/WalletConfirmation.tsx +0 -220
- package/src/widget/components/WalletConnect.tsx +0 -348
- package/src/widget/components/WalletConnectionPending.tsx +0 -178
- package/src/widget/components/WalletImage.tsx +0 -52
- package/src/widget/components/WalletList.tsx +0 -125
- package/src/widget/components/WidgetProviders.tsx +0 -82
- package/src/widget/components/Withdraw.tsx +0 -1106
- package/src/widget/components/YellowWarningAnimation.tsx +0 -146
- package/src/widget/hooks/useAddressWalletIcon.ts +0 -55
- package/src/widget/hooks/useAmountUsd.ts +0 -44
- package/src/widget/hooks/useBalanceVisible.tsx +0 -95
- package/src/widget/hooks/useChainFilter.tsx +0 -56
- package/src/widget/hooks/useCheckout.ts +0 -361
- package/src/widget/hooks/useClickTracking.ts +0 -74
- package/src/widget/hooks/useCombinedHistory.ts +0 -420
- package/src/widget/hooks/useConnector.tsx +0 -24
- package/src/widget/hooks/useCustomTokenSearch.tsx +0 -369
- package/src/widget/hooks/useDebounce.ts +0 -25
- package/src/widget/hooks/useDebugScreens.ts +0 -600
- package/src/widget/hooks/useDefaultDestinationToken.tsx +0 -179
- package/src/widget/hooks/useDefaultOriginToken.tsx +0 -407
- package/src/widget/hooks/useDepositMonitor.ts +0 -118
- package/src/widget/hooks/useDestinationSelectedToken.tsx +0 -310
- package/src/widget/hooks/useDisplayCurrencyPreference.tsx +0 -145
- package/src/widget/hooks/useEarnPool.tsx +0 -36
- package/src/widget/hooks/useExecutingIntentsCount.ts +0 -78
- package/src/widget/hooks/useExternalFundingReceiptSync.ts +0 -79
- package/src/widget/hooks/useFiatOnRampCurrencies.ts +0 -46
- package/src/widget/hooks/useFiatSelectedCurrency.tsx +0 -123
- package/src/widget/hooks/useGetIntent.ts +0 -54
- package/src/widget/hooks/useIntentReceiptBalances.ts +0 -141
- package/src/widget/hooks/useIntentTransactionHistory.ts +0 -790
- package/src/widget/hooks/useIsConnectedWalletSmartContract.ts +0 -43
- package/src/widget/hooks/useIsMobile.tsx +0 -50
- package/src/widget/hooks/useIsSequenceWallet.ts +0 -17
- package/src/widget/hooks/useLocalePreference.tsx +0 -187
- package/src/widget/hooks/useMeldTransactionHistory.ts +0 -184
- package/src/widget/hooks/useMeldTransactionStatus.ts +0 -707
- package/src/widget/hooks/useOnRampCountryDefaults.ts +0 -57
- package/src/widget/hooks/useOnRampPaymentMethods.ts +0 -72
- package/src/widget/hooks/useOnRampProviderWidget.ts +0 -184
- package/src/widget/hooks/useOnRampQuote.ts +0 -340
- package/src/widget/hooks/useOnRampTransactionStatus.ts +0 -196
- package/src/widget/hooks/useOriginSelectedToken.tsx +0 -253
- package/src/widget/hooks/usePayMessage.tsx +0 -496
- package/src/widget/hooks/usePriceImpactWarning.ts +0 -17
- package/src/widget/hooks/useQuote.ts +0 -1239
- package/src/widget/hooks/useRecentTokens.ts +0 -159
- package/src/widget/hooks/useRecipients.ts +0 -167
- package/src/widget/hooks/useScreenTracking.ts +0 -14
- package/src/widget/hooks/useSelectedFeeOption.tsx +0 -323
- package/src/widget/hooks/useSelectedFundMethod.tsx +0 -93
- package/src/widget/hooks/useSelectedRecipient.tsx +0 -75
- package/src/widget/hooks/useSendForm.ts +0 -1389
- package/src/widget/hooks/useSwapAmount.tsx +0 -50
- package/src/widget/hooks/useSwapState.tsx +0 -121
- package/src/widget/hooks/useTargetAmount.ts +0 -26
- package/src/widget/hooks/useTheme.tsx +0 -80
- package/src/widget/hooks/useTokenList.ts +0 -1168
- package/src/widget/hooks/useTrailsSendTransaction.ts +0 -987
- package/src/widget/hooks/useViewManager.tsx +0 -506
- package/src/widget/hooks/useWalletConnectUri.tsx +0 -307
- package/src/widget/hooks/useWalletConnectionContext.tsx +0 -128
- package/src/widget/hooks/useWidgetProps.tsx +0 -33
- package/src/widget/index.css +0 -686
- package/src/widget/index.tsx +0 -28
- package/src/widget/providers/TrailsModalProvider.tsx +0 -238
- package/src/widget/providers/TrailsProvider.tsx +0 -155
- package/src/widget/providers/UserActivityProvider.tsx +0 -78
- package/src/widget/providers/WidgetProviderTree.tsx +0 -90
- package/src/widget/styles.ts +0 -26
- package/src/widget/types/analytics.ts +0 -22
- package/src/widget/types/commonProps.ts +0 -56
- package/src/widget/types/svg.d.ts +0 -8
- package/src/widget/types.ts +0 -51
- package/src/widget/utils/countryUtils.ts +0 -89
- package/src/widget/utils/createWagmiConfig.ts +0 -43
- package/src/widget/utils/forexRateStore.ts +0 -120
- package/src/widget/utils/fundMethodSwitchState.ts +0 -27
- package/src/widget/utils/historyFilters.ts +0 -157
- package/src/widget/utils/historyUtils.ts +0 -101
- package/src/widget/utils/localeStore.ts +0 -68
- package/src/widget/utils/meldProviderUtils.ts +0 -26
- package/src/widget/utils/meshSupportedTokens.ts +0 -28
- package/src/widget/utils/onrampConfig.ts +0 -15
- package/src/widget/utils/statusLabel.ts +0 -3
- package/src/widget/utils/tokens.ts +0 -138
- package/src/widget/utils/trailsOnrampConfig.ts +0 -39
- package/src/widget/utils/transactionFailure.ts +0 -52
- package/src/widget/utils/viewManagerGuards.ts +0 -49
- package/src/widget/utils/windowUtils.ts +0 -138
- package/src/widget/widget.tsx +0 -3400
- /package/dist/{widget/hooks → hooks}/useAddressWalletIcon.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useAmountUsd.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useBalanceVisible.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useChainFilter.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useClickTracking.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useConnector.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useDebounce.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useDepositMonitor.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useDisplayCurrencyPreference.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useExecutingIntentsCount.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useFiatSelectedCurrency.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useGetIntent.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useIsMobile.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useIsSequenceWallet.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useLocalePreference.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useMeldTransactionHistory.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useMeldTransactionStatus.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useOnRampCountryDefaults.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/usePayMessage.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/usePriceImpactWarning.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useRecipients.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useSelectedFeeOption.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useSelectedRecipient.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useSwapAmount.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useTargetAmount.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useTheme.d.ts +0 -0
- /package/dist/{widget/hooks → hooks}/useWalletConnectionContext.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,665 +1,160 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import { useQueryClient as Qe, useMutation as qe } from "@tanstack/react-query";
|
|
5
|
-
import { useRef as _e, useCallback as W } from "react";
|
|
6
|
-
import { useWalletClient as je, useAccount as Ke, useChainId as ve } from "wagmi";
|
|
7
|
-
import { zeroAddress as x, erc20Abi as Ve } from "viem";
|
|
8
|
-
import { jsxs as w, Fragment as ce, jsx as E } from "react/jsx-runtime";
|
|
9
|
-
function st(o) {
|
|
10
|
-
const { data: f } = je(), { chainId: y } = Ke(), R = ve(), P = we(), { trailsApiKey: de, sequenceIndexerUrl: le, sequenceMetadataUrl: ue } = Re(), U = Qe(), {
|
|
11
|
-
openModal: Y,
|
|
12
|
-
setPendingSelection: me,
|
|
13
|
-
setHostTransactionState: $,
|
|
14
|
-
setHostTransactionQuote: Q,
|
|
15
|
-
setHostTransactionStates: q,
|
|
16
|
-
setHostTransactionTimestamp: _,
|
|
17
|
-
hostTransactionState: D,
|
|
18
|
-
setReceiptActionButtonText: fe,
|
|
19
|
-
setOnReceiptAction: ge,
|
|
20
|
-
retryTransactionRef: Te,
|
|
21
|
-
repeatTransactionRef: he,
|
|
22
|
-
setLastOriginSelection: ke
|
|
23
|
-
} = Pe(), j = Ue(), { supportedTokens: H } = He(), Ae = Oe(), Ce = Me(), B = _e(null), g = W(
|
|
24
|
-
(e) => {
|
|
25
|
-
$((n) => ({
|
|
26
|
-
status: e.status ?? n.status,
|
|
27
|
-
details: e.details === null ? void 0 : e.details ? { ...n.details, ...e.details } : n.details,
|
|
28
|
-
error: e.error === null ? void 0 : e.error !== void 0 ? e.error : n.error,
|
|
29
|
-
result: e.result === null ? void 0 : e.result ? { ...n.result, ...e.result } : n.result,
|
|
30
|
-
retryEnabled: e.retryEnabled !== void 0 ? e.retryEnabled : n.retryEnabled
|
|
31
|
-
}));
|
|
32
|
-
},
|
|
33
|
-
[$]
|
|
34
|
-
), z = async (e, n, s) => {
|
|
35
|
-
if (m.console.log(
|
|
36
|
-
"[trails-sdk] [useTrailsSendTransaction] Executing transaction",
|
|
37
|
-
{ variables: e, originSelection: n }
|
|
38
|
-
), !f || !f.account)
|
|
39
|
-
throw new Error(
|
|
40
|
-
"Wallet client not available. Please connect your wallet."
|
|
41
|
-
);
|
|
42
|
-
if (!e.to)
|
|
43
|
-
throw new Error("Transaction 'to' address is required.");
|
|
44
|
-
let r, a, T;
|
|
45
|
-
if (n)
|
|
46
|
-
r = n.fromTokenAddress, a = n.fromChainId, T = n.fromAmount;
|
|
47
|
-
else if (e.fromTokenAddress && e.fromChainId && e.fromAmount)
|
|
48
|
-
r = e.fromTokenAddress, a = e.fromChainId, T = e.fromAmount;
|
|
49
|
-
else if (e.to && e.value !== void 0) {
|
|
50
|
-
const t = y || R;
|
|
51
|
-
if (!t)
|
|
52
|
-
throw new Error("Chain ID not available. Please connect your wallet.");
|
|
53
|
-
a = t, r = x, T = e.value.toString();
|
|
54
|
-
} else
|
|
55
|
-
throw new Error(
|
|
56
|
-
"Origin token parameters are required. Please provide 'value' (native token), or 'fromTokenAddress'/'fromChainId'/'fromAmount' (ERC20 token), or select via modal."
|
|
57
|
-
);
|
|
58
|
-
const C = y || R;
|
|
59
|
-
if (!C)
|
|
60
|
-
throw new Error("Chain ID not available. Please connect your wallet.");
|
|
61
|
-
let A, h, i, k;
|
|
62
|
-
if (e.tokenAddress && e.tokenAmount)
|
|
63
|
-
A = e.tokenAddress, h = b(
|
|
64
|
-
H,
|
|
65
|
-
e.tokenAddress
|
|
66
|
-
)?.chainId ?? C, i = e.tokenAmount, k = e.to;
|
|
67
|
-
else if (e.to && e.value !== void 0)
|
|
68
|
-
A = x, h = C, i = e.value.toString(), k = e.to;
|
|
69
|
-
else
|
|
70
|
-
throw new Error(
|
|
71
|
-
"Either 'value' or 'tokenAddress'/'tokenAmount' must be provided."
|
|
72
|
-
);
|
|
73
|
-
const u = e.tokenAddress && e.tokenAmount ? N.EXACT_OUTPUT : N.EXACT_INPUT;
|
|
74
|
-
if (u === N.EXACT_INPUT && !T)
|
|
75
|
-
throw new Error(
|
|
76
|
-
"Origin amount is required for this transaction. Please provide 'value' or 'fromAmount'."
|
|
77
|
-
);
|
|
78
|
-
const p = u === N.EXACT_OUTPUT ? i : T;
|
|
79
|
-
let d = [];
|
|
80
|
-
try {
|
|
81
|
-
d = (await U.ensureQueryData(
|
|
82
|
-
G.withPrices(
|
|
83
|
-
f.account.address,
|
|
84
|
-
j,
|
|
85
|
-
P
|
|
86
|
-
)
|
|
87
|
-
)).balances;
|
|
88
|
-
} catch (t) {
|
|
89
|
-
m.console.warn(
|
|
90
|
-
"[trails-sdk] [useTrailsSendTransaction] Error fetching balances, proceeding with zero balance",
|
|
91
|
-
t
|
|
92
|
-
), d = [];
|
|
93
|
-
}
|
|
94
|
-
const J = d.find(
|
|
95
|
-
(t) => t.chainId === a && (re(t.contractAddress, r) || !t.contractAddress && r === x)
|
|
96
|
-
)?.balance ?? "0";
|
|
97
|
-
let Z = 0;
|
|
98
|
-
try {
|
|
99
|
-
const c = ie(a)?.nativeCurrency?.symbol ?? "";
|
|
100
|
-
c && (Z = (await Ne(P, {
|
|
101
|
-
tokenSymbol: c,
|
|
102
|
-
tokenAddress: x,
|
|
103
|
-
chainId: a
|
|
104
|
-
}))?.priceUsd ?? 0);
|
|
105
|
-
} catch (t) {
|
|
106
|
-
m.console.warn(
|
|
107
|
-
"[trails-sdk] [useTrailsSendTransaction] Error getting native token price",
|
|
108
|
-
t
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
const ee = b(
|
|
112
|
-
H,
|
|
113
|
-
r,
|
|
114
|
-
a
|
|
115
|
-
), te = b(
|
|
116
|
-
H,
|
|
117
|
-
A,
|
|
118
|
-
h
|
|
119
|
-
), { getChainRpcClient: V } = await import("./index-RfqL5Foz.js").then((t) => t.bG), ne = V(a), se = V(h), ae = async (t, c) => {
|
|
120
|
-
try {
|
|
121
|
-
const S = c === a ? ne : c === h ? se : V(c);
|
|
122
|
-
return S ? re(t, x) ? ie(c)?.nativeCurrency.decimals ?? 18 : await S.readContract({
|
|
123
|
-
address: t,
|
|
124
|
-
abi: Ve,
|
|
125
|
-
functionName: "decimals"
|
|
126
|
-
}) : null;
|
|
127
|
-
} catch (S) {
|
|
128
|
-
return m.console.error(
|
|
129
|
-
`[trails-sdk] Error fetching decimals on-chain for token ${t} on chain ${c}:`,
|
|
130
|
-
S
|
|
131
|
-
), null;
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
let O = ee?.decimals;
|
|
135
|
-
if (!O && r) {
|
|
136
|
-
const t = await ae(
|
|
137
|
-
r,
|
|
138
|
-
a
|
|
139
|
-
);
|
|
140
|
-
t !== null && (O = t);
|
|
141
|
-
}
|
|
142
|
-
O || (O = 18);
|
|
143
|
-
let M = te?.decimals;
|
|
144
|
-
if (!M && A) {
|
|
145
|
-
const t = await ae(
|
|
146
|
-
A,
|
|
147
|
-
h
|
|
148
|
-
);
|
|
149
|
-
t !== null && (M = t);
|
|
150
|
-
}
|
|
151
|
-
M || (M = 18);
|
|
152
|
-
const Ee = te?.symbol ?? "", Se = ee?.symbol ?? "", ye = (t) => {
|
|
153
|
-
s?.trackInWidget && q(t), o?.onStatusUpdate?.(t);
|
|
154
|
-
}, { send: pe, quote: xe } = await De({
|
|
155
|
-
queryClient: U,
|
|
156
|
-
account: f.account,
|
|
157
|
-
originTokenAddress: r,
|
|
158
|
-
originChainId: a,
|
|
159
|
-
originTokenBalance: J,
|
|
160
|
-
destinationChainId: h,
|
|
161
|
-
recipient: k,
|
|
162
|
-
destinationTokenAddress: A,
|
|
163
|
-
swapAmount: p,
|
|
164
|
-
tradeType: u,
|
|
165
|
-
originTokenSymbol: Se,
|
|
166
|
-
destinationTokenSymbol: Ee,
|
|
167
|
-
client: f,
|
|
168
|
-
trailsClient: P,
|
|
169
|
-
destinationCalldata: e.data ? e.data.toString() : void 0,
|
|
170
|
-
onTransactionStateChange: ye,
|
|
171
|
-
sourceTokenDecimals: O,
|
|
172
|
-
destinationTokenDecimals: M,
|
|
173
|
-
paymasterUrl: o?.paymasterUrl,
|
|
174
|
-
slippageTolerance: o?.slippageTolerance?.toString(),
|
|
175
|
-
originNativeTokenPriceUsd: Z,
|
|
176
|
-
swapProvider: o?.swapProvider,
|
|
177
|
-
bridgeProvider: o?.bridgeProvider,
|
|
178
|
-
commitIntentFn: (t) => Ae.mutateAsync(t),
|
|
179
|
-
executeIntentFn: Ce.mutateAsync,
|
|
180
|
-
checkoutOnHandlers: o?.checkoutOnHandlers,
|
|
181
|
-
sequenceIndexerUrl: le,
|
|
182
|
-
sequenceMetadataUrl: ue,
|
|
183
|
-
sequenceProjectAccessKey: de,
|
|
184
|
-
originPublicClient: ne ?? void 0,
|
|
185
|
-
destinationPublicClient: se ?? void 0,
|
|
186
|
-
isSmartWallet: o?.isSmartWallet ?? void 0,
|
|
187
|
-
mode: o?.mode ?? void 0
|
|
188
|
-
});
|
|
189
|
-
s?.trackInWidget && (Q(xe ?? null), D.details || g({
|
|
190
|
-
details: {
|
|
191
|
-
to: k,
|
|
192
|
-
tokenAddress: A,
|
|
193
|
-
tokenAmount: u === N.EXACT_OUTPUT ? i : void 0,
|
|
194
|
-
toChainId: h,
|
|
195
|
-
data: e.data
|
|
196
|
-
}
|
|
197
|
-
}), (!D.status || D.status === "idle") && _(Date.now()));
|
|
198
|
-
try {
|
|
199
|
-
s?.trackInWidget && g({ retryEnabled: !1 });
|
|
200
|
-
const {
|
|
201
|
-
depositUserTxnReceipt: t,
|
|
202
|
-
destinationIntentTransaction: c,
|
|
203
|
-
totalCompletionSeconds: S
|
|
204
|
-
} = await pe({
|
|
205
|
-
selectedFeeOption: null,
|
|
206
|
-
// Transition to "pending" when wallet signature is complete
|
|
207
|
-
onOriginSend: () => {
|
|
208
|
-
s?.trackInWidget && g({ status: "pending", error: null });
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
return s?.trackInWidget && g({
|
|
212
|
-
status: "success",
|
|
213
|
-
result: {
|
|
214
|
-
originTxHash: t?.transactionHash,
|
|
215
|
-
originExplorerUrl: t?.transactionHash ? L({
|
|
216
|
-
txHash: t.transactionHash,
|
|
217
|
-
chainId: a
|
|
218
|
-
}) : void 0,
|
|
219
|
-
destinationTxHash: c?.txnHash,
|
|
220
|
-
destinationExplorerUrl: c?.txnHash ? L({
|
|
221
|
-
txHash: c.txnHash,
|
|
222
|
-
chainId: h
|
|
223
|
-
}) : void 0
|
|
224
|
-
}
|
|
225
|
-
}), {
|
|
226
|
-
originTransaction: {
|
|
227
|
-
transactionHash: t?.transactionHash,
|
|
228
|
-
explorerUrl: L({
|
|
229
|
-
txHash: t?.transactionHash,
|
|
230
|
-
chainId: a
|
|
231
|
-
}),
|
|
232
|
-
receipt: t
|
|
233
|
-
},
|
|
234
|
-
destinationTransaction: {
|
|
235
|
-
transactionHash: c?.txnHash,
|
|
236
|
-
explorerUrl: L({
|
|
237
|
-
txHash: c?.txnHash,
|
|
238
|
-
chainId: h
|
|
239
|
-
}),
|
|
240
|
-
receipt: c
|
|
241
|
-
},
|
|
242
|
-
totalCompletionSeconds: S
|
|
243
|
-
};
|
|
244
|
-
} catch (t) {
|
|
245
|
-
if (s?.trackInWidget) {
|
|
246
|
-
const c = X(t);
|
|
247
|
-
g(c ? {
|
|
248
|
-
status: "confirmation",
|
|
249
|
-
error: null,
|
|
250
|
-
retryEnabled: !0
|
|
251
|
-
} : {
|
|
252
|
-
status: "error",
|
|
253
|
-
error: F(t),
|
|
254
|
-
retryEnabled: !1
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
throw t;
|
|
258
|
-
}
|
|
259
|
-
}, l = qe({
|
|
260
|
-
mutationFn: async (e) => {
|
|
261
|
-
m.console.log(
|
|
262
|
-
"[trails-sdk] [useTrailsSendTransaction] Starting transaction",
|
|
263
|
-
e
|
|
264
|
-
), B.current = e, fe(
|
|
265
|
-
o?.receiptActionButtonText ?? "Transact Again"
|
|
266
|
-
), ge(o?.onReceiptAction ?? null);
|
|
267
|
-
const n = e.value !== void 0, s = e.fromTokenAddress !== void 0 && e.fromChainId !== void 0, r = n || s;
|
|
268
|
-
let a;
|
|
269
|
-
if (e.tokenAddress && H) {
|
|
270
|
-
const i = b(
|
|
271
|
-
H,
|
|
272
|
-
e.tokenAddress
|
|
273
|
-
);
|
|
274
|
-
i && (a = i.chainId);
|
|
275
|
-
}
|
|
276
|
-
a || (a = y || R);
|
|
277
|
-
let T = !0, C = !0;
|
|
278
|
-
if (f?.account)
|
|
279
|
-
try {
|
|
280
|
-
if (r) {
|
|
281
|
-
let i, k, u;
|
|
282
|
-
if (e.value !== void 0 ? (i = x, k = y || R || 1, u = e.value.toString()) : e.fromTokenAddress && e.fromChainId && (i = e.fromTokenAddress, k = e.fromChainId, u = e.fromAmount), i && k && u && u !== "0") {
|
|
283
|
-
const { balances: p } = await U.ensureQueryData(
|
|
284
|
-
G.withPrices(
|
|
285
|
-
f.account.address,
|
|
286
|
-
j,
|
|
287
|
-
P
|
|
288
|
-
)
|
|
289
|
-
);
|
|
290
|
-
T = oe(
|
|
291
|
-
p,
|
|
292
|
-
i,
|
|
293
|
-
u,
|
|
294
|
-
k
|
|
295
|
-
), m.console.log(
|
|
296
|
-
"[trails-sdk] [useTrailsSendTransaction] Origin token balance check:",
|
|
297
|
-
{
|
|
298
|
-
tokenAddress: i,
|
|
299
|
-
amount: u,
|
|
300
|
-
chainId: k,
|
|
301
|
-
hasSufficientBalance: T
|
|
302
|
-
}
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if (T && e.tokenAddress && e.tokenAmount) {
|
|
307
|
-
const i = await U.ensureQueryData(
|
|
308
|
-
G.withPrices(
|
|
309
|
-
f.account.address,
|
|
310
|
-
j,
|
|
311
|
-
P
|
|
312
|
-
)
|
|
313
|
-
);
|
|
314
|
-
C = oe(
|
|
315
|
-
i.balances,
|
|
316
|
-
e.tokenAddress,
|
|
317
|
-
e.tokenAmount,
|
|
318
|
-
a
|
|
319
|
-
), m.console.log(
|
|
320
|
-
"[trails-sdk] [useTrailsSendTransaction] Destination token balance check:",
|
|
321
|
-
{
|
|
322
|
-
tokenAddress: e.tokenAddress,
|
|
323
|
-
tokenAmount: e.tokenAmount,
|
|
324
|
-
chainId: a,
|
|
325
|
-
hasSufficientBalance: C
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
}
|
|
329
|
-
} catch (i) {
|
|
330
|
-
m.console.warn(
|
|
331
|
-
"[trails-sdk] [useTrailsSendTransaction] Error checking balances, defaulting to origin selection:",
|
|
332
|
-
i
|
|
333
|
-
), T = !1, C = !1;
|
|
334
|
-
}
|
|
335
|
-
const A = !r || !T || !C;
|
|
336
|
-
if (m.console.log(
|
|
337
|
-
"[trails-sdk] [useTrailsSendTransaction] Origin selection decision:",
|
|
338
|
-
{
|
|
339
|
-
hasOriginParams: r,
|
|
340
|
-
hasSufficientOriginBalance: T,
|
|
341
|
-
hasSufficientDestinationTokenBalance: C,
|
|
342
|
-
needsOriginSelection: A
|
|
343
|
-
}
|
|
344
|
-
), A) {
|
|
345
|
-
const i = !(e.tokenAddress && e.tokenAmount), k = {
|
|
346
|
-
to: e.to,
|
|
347
|
-
tokenAddress: e.tokenAddress,
|
|
348
|
-
tokenAmount: e.tokenAmount,
|
|
349
|
-
toChainId: a,
|
|
350
|
-
data: e.data
|
|
351
|
-
};
|
|
352
|
-
return g({
|
|
353
|
-
status: "awaiting-origin",
|
|
354
|
-
details: k,
|
|
355
|
-
error: null,
|
|
356
|
-
result: null
|
|
357
|
-
}), Q(null), q([]), _(Date.now()), new Promise((u, p) => {
|
|
358
|
-
me({
|
|
359
|
-
resolve: async (d) => {
|
|
360
|
-
try {
|
|
361
|
-
B.current = {
|
|
362
|
-
...e,
|
|
363
|
-
fromTokenAddress: d.fromTokenAddress,
|
|
364
|
-
fromChainId: d.fromChainId,
|
|
365
|
-
fromAmount: d.fromAmount
|
|
366
|
-
}, ke({
|
|
367
|
-
tokenAddress: d.fromTokenAddress,
|
|
368
|
-
chainId: d.fromChainId,
|
|
369
|
-
amount: d.fromAmount
|
|
370
|
-
}), g({ status: "confirmation" });
|
|
371
|
-
const I = await z(e, d, {
|
|
372
|
-
trackInWidget: !0
|
|
373
|
-
});
|
|
374
|
-
u(I);
|
|
375
|
-
} catch (I) {
|
|
376
|
-
X(I) || g({
|
|
377
|
-
status: "error",
|
|
378
|
-
error: F(I)
|
|
379
|
-
}), p(I);
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
reject: (d) => {
|
|
383
|
-
const I = d instanceof Error ? d : new Error(String(d));
|
|
384
|
-
g({
|
|
385
|
-
status: "error",
|
|
386
|
-
error: F(I)
|
|
387
|
-
}), p(I);
|
|
388
|
-
},
|
|
389
|
-
requireAmountInput: i
|
|
390
|
-
}), setTimeout(() => {
|
|
391
|
-
m.console.log(
|
|
392
|
-
"[trails-sdk] [useTrailsSendTransaction] Calling openModal()"
|
|
393
|
-
), Y();
|
|
394
|
-
}, 0);
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
const h = {
|
|
398
|
-
to: e.to,
|
|
399
|
-
tokenAddress: e.tokenAddress,
|
|
400
|
-
tokenAmount: e.tokenAmount,
|
|
401
|
-
toChainId: a,
|
|
402
|
-
data: e.data
|
|
403
|
-
};
|
|
404
|
-
return g({
|
|
405
|
-
status: "confirmation",
|
|
406
|
-
details: h,
|
|
407
|
-
error: null,
|
|
408
|
-
result: null
|
|
409
|
-
}), Q(null), q([]), _(Date.now()), Y(), z(e, void 0, { trackInWidget: !0 });
|
|
410
|
-
},
|
|
411
|
-
onSuccess: (e, n) => {
|
|
412
|
-
m.console.log(
|
|
413
|
-
"[trails-sdk] [useTrailsSendTransaction] Transaction successful",
|
|
414
|
-
{ data: e, variables: n }
|
|
415
|
-
), U.invalidateQueries({ queryKey: ["prepareSend"] }), o?.onSuccess?.(e, n);
|
|
416
|
-
},
|
|
417
|
-
onError: (e, n) => {
|
|
418
|
-
m.console.error(
|
|
419
|
-
"[trails-sdk] [useTrailsSendTransaction] Transaction error",
|
|
420
|
-
{ error: e, variables: n }
|
|
421
|
-
);
|
|
422
|
-
const s = F(e), r = X(e);
|
|
423
|
-
D.status !== "idle" && !r && g({
|
|
424
|
-
status: "error",
|
|
425
|
-
error: s
|
|
426
|
-
}), o?.onError?.(new Error(s), n);
|
|
427
|
-
},
|
|
428
|
-
onSettled: (e, n, s) => {
|
|
429
|
-
m.console.log(
|
|
430
|
-
"[trails-sdk] [useTrailsSendTransaction] Transaction settled",
|
|
431
|
-
{ data: e, error: n, variables: s }
|
|
432
|
-
), o?.onSettled?.(e, n, s);
|
|
433
|
-
}
|
|
434
|
-
}), K = W(
|
|
435
|
-
(e, n) => {
|
|
436
|
-
l.mutate(e, {
|
|
437
|
-
onSuccess: (s) => {
|
|
438
|
-
n?.onSuccess?.(s);
|
|
439
|
-
},
|
|
440
|
-
onError: (s) => {
|
|
441
|
-
n?.onError?.(s);
|
|
442
|
-
},
|
|
443
|
-
onSettled: (s, r) => {
|
|
444
|
-
n?.onSettled?.(s, r);
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
|
-
},
|
|
448
|
-
[l]
|
|
449
|
-
), Ie = W(
|
|
450
|
-
async (e, n) => l.mutateAsync(e, {
|
|
451
|
-
onSuccess: (s) => {
|
|
452
|
-
n?.onSuccess?.(s);
|
|
453
|
-
},
|
|
454
|
-
onError: (s) => {
|
|
455
|
-
n?.onError?.(s);
|
|
456
|
-
},
|
|
457
|
-
onSettled: (s, r) => {
|
|
458
|
-
n?.onSettled?.(s, r);
|
|
459
|
-
}
|
|
460
|
-
}),
|
|
461
|
-
[l]
|
|
462
|
-
), v = W(() => {
|
|
463
|
-
B.current && K(B.current);
|
|
464
|
-
}, [K]);
|
|
465
|
-
return Te.current = v, he.current = v, {
|
|
466
|
-
sendTransaction: K,
|
|
467
|
-
sendTransactionAsync: Ie,
|
|
468
|
-
retry: v,
|
|
469
|
-
data: l.data,
|
|
470
|
-
error: l.error,
|
|
471
|
-
isPending: l.isPending,
|
|
472
|
-
isSuccess: l.isSuccess,
|
|
473
|
-
isError: l.isError,
|
|
474
|
-
isIdle: l.isIdle,
|
|
475
|
-
status: l.status,
|
|
476
|
-
reset: l.reset,
|
|
477
|
-
variables: l.variables
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
const Ge = ["JPY", "KRW", "VND", "CLP", "ISK"], Xe = {
|
|
481
|
-
USD: "$",
|
|
482
|
-
EUR: "€",
|
|
483
|
-
GBP: "£",
|
|
484
|
-
JPY: "¥",
|
|
485
|
-
CNY: "¥",
|
|
486
|
-
KRW: "₩",
|
|
487
|
-
INR: "₹",
|
|
488
|
-
CAD: "C$",
|
|
489
|
-
AUD: "A$",
|
|
490
|
-
CHF: "CHF",
|
|
491
|
-
SEK: "kr",
|
|
492
|
-
NOK: "kr",
|
|
493
|
-
DKK: "kr"
|
|
494
|
-
};
|
|
495
|
-
function at(o) {
|
|
496
|
-
return {
|
|
497
|
-
decimals: Ge.includes(o) ? 0 : 2,
|
|
498
|
-
symbol: Xe[o] || o
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
const ot = ({
|
|
502
|
-
onNavigateToOnramp: o
|
|
503
|
-
}) => {
|
|
504
|
-
const f = Be(), y = f?.config.mesh?.exchanges && f.config.mesh.exchanges.length > 0;
|
|
505
|
-
return We(f?.config) ? y ? o ? /* @__PURE__ */ w(ce, { children: [
|
|
506
|
-
/* @__PURE__ */ E("div", { className: "border-b border-gray-200 dark:border-gray-700" }),
|
|
507
|
-
/* @__PURE__ */ w(
|
|
508
|
-
"button",
|
|
509
|
-
{
|
|
510
|
-
type: "button",
|
|
511
|
-
onClick: o,
|
|
512
|
-
className: "w-full text-left px-3 py-4 text-sm flex items-center justify-between cursor-pointer transition-colors trails-text-primary trails-hover-bg",
|
|
513
|
-
children: [
|
|
514
|
-
/* @__PURE__ */ w("div", { className: "flex items-center gap-3", children: [
|
|
515
|
-
/* @__PURE__ */ E(Fe, { className: "w-4 h-4" }),
|
|
516
|
-
/* @__PURE__ */ E("span", { className: "text-sm font-bold", children: "Send from Exchange" })
|
|
517
|
-
] }),
|
|
518
|
-
/* @__PURE__ */ E(Le, { className: "w-5 h-5 text-gray-400" })
|
|
519
|
-
]
|
|
520
|
-
}
|
|
521
|
-
)
|
|
522
|
-
] }) : null : /* @__PURE__ */ w(ce, { children: [
|
|
523
|
-
/* @__PURE__ */ E("div", { className: "border-b border-gray-200 dark:border-gray-700" }),
|
|
524
|
-
/* @__PURE__ */ E("div", { className: "px-3 py-4 text-sm", children: /* @__PURE__ */ w("div", { className: "flex items-center gap-3 text-amber-600 dark:text-amber-400", children: [
|
|
525
|
-
/* @__PURE__ */ E(be, { className: "w-4 h-4 flex-shrink-0" }),
|
|
526
|
-
/* @__PURE__ */ w("div", { className: "flex-1", children: [
|
|
527
|
-
/* @__PURE__ */ E("p", { className: "font-medium", children: "Exchange list not configured" }),
|
|
528
|
-
/* @__PURE__ */ E("p", { className: "text-xs mt-1 text-amber-500 dark:text-amber-500", children: "Please configure at least one exchange in the onramp settings." })
|
|
529
|
-
] })
|
|
530
|
-
] }) })
|
|
531
|
-
] }) : null;
|
|
532
|
-
};
|
|
2
|
+
import { $ as s, $t as a, A as t, An as n, At as r, B as o, Bn as i, Bt as l, C as u, Cn as c, Ct as d, D as g, Dn as T, Dt as I, E as m, En as C, Et as p, F as f, Fn as E, Ft as h, G as A, Gt as R, H as k, Ht as M, I as v, In as y, It as S, J as P, Jt as B, K as O, Kt as F, L, Ln as U, Lt as Q, M as H, Mn as D, Mt as N, N as x, Nn as b, Nt as w, O as _, On as V, Ot as W, P as j, Pn as q, Pt as z, Q as G, Qt as K, R as Z, Rn as J, Rt as X, S as Y, Sn as $, St as ee, T as se, Tn as ae, Tt as te, U as ne, Ut as re, V as oe, Vt as ie, W as le, Wt as ue, X as ce, Xt as de, Y as ge, Yt as Te, Z as Ie, Zt as me, _ as Ce, _n as pe, _t as fe, a as Ee, an as he, at as Ae, b as Re, bn as ke, bt as Me, c as ve, cn as ye, ct as Se, d as Pe, dn as Be, dt as Oe, en as Fe, et as Le, f as Ue, fn as Qe, ft as He, g as De, gn as Ne, gt as xe, h as be, hn as we, ht as _e, i as Ve, in as We, it as je, j as qe, jn as ze, jt as Ge, k as Ke, kn as Ze, kt as Je, l as Xe, ln as Ye, lt as $e, m as es, mn as ss, mt as as, n as ts, nn as ns, nt as rs, o as os, on as is, ot as ls, p as us, pn as cs, pt as ds, q as gs, qt as Ts, r as Is, rn as ms, rt as Cs, s as ps, sn as fs, st as Es, t as hs, tn as As, tt as Rs, u as ks, un as Ms, ut as vs, v as ys, vn as Ss, vt as Ps, w as Bs, wn as Os, wt as Fs, x as Ls, xn as Us, xt as Qs, y as Hs, yn as Ds, yt as Ns, z as xs, zn as bs, zt as ws } from "./src-4HYDQv2T.js";
|
|
3
|
+
import { D as Vs, O as Ws, a as js, c as qs, l as zs, r as Gs, t as Ks } from "./chains-CcoarGia.js";
|
|
533
4
|
export {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
5
|
+
ts as Earn,
|
|
6
|
+
Ve as Fund,
|
|
7
|
+
Ds as InsufficientBalanceError,
|
|
8
|
+
je as MIN_REFETCH_INTERVAL,
|
|
9
|
+
xs as MeshConnectFlow,
|
|
10
|
+
o as MeshConnectIframe,
|
|
11
|
+
Is as Pay,
|
|
12
|
+
He as QuoteError,
|
|
13
|
+
vs as RouteProvider,
|
|
14
|
+
bs as SDK_VERSION,
|
|
15
|
+
hs as SendFromExchangeButton,
|
|
16
|
+
G as SimpleHeader,
|
|
17
|
+
os as Swap,
|
|
18
|
+
M as TRAILS_ROUTER_PLACEHOLDER_AMOUNT,
|
|
19
|
+
l as TradeType,
|
|
20
|
+
ke as TrailsApiClientError,
|
|
21
|
+
we as TrailsClient,
|
|
22
|
+
Us as TrailsError,
|
|
23
|
+
f as TrailsHookModal,
|
|
24
|
+
x as TrailsModalProvider,
|
|
25
|
+
P as TrailsOnRampProvider,
|
|
26
|
+
Rs as TrailsOnramp,
|
|
27
|
+
qe as TrailsProvider,
|
|
28
|
+
ps as TrailsWidget,
|
|
29
|
+
$ as UserRejectionError,
|
|
30
|
+
ve as WidgetFundMethod,
|
|
31
|
+
Ee as Withdraw,
|
|
32
|
+
ws as attemptSwitchChain,
|
|
33
|
+
te as balanceQueries,
|
|
34
|
+
Ue as buildRefundTransactionWithSignature,
|
|
35
|
+
he as calcAmountUsdPrice,
|
|
36
|
+
r as calculateOriginAndDestinationIntentAddresses,
|
|
37
|
+
We as chainQueries,
|
|
38
|
+
Ge as commitIntent,
|
|
39
|
+
me as convertApiTokenInfoToToken,
|
|
40
|
+
oe as createMeshLinkToken,
|
|
41
|
+
Xe as createModalController,
|
|
42
|
+
Ns as encodeDestinationForIntentProtocol,
|
|
43
|
+
_ as fetchCountryCode,
|
|
44
|
+
ks as fetchIntentTokenBalancesViaRpc,
|
|
45
|
+
de as fiatQueries,
|
|
46
|
+
is as formatBalanceFields,
|
|
47
|
+
fs as formatPriceFields,
|
|
48
|
+
ye as formatTvl,
|
|
49
|
+
Ye as formatUsdAmountFormatted,
|
|
50
|
+
Ms as formatUsdAmountLocaleDisplay,
|
|
51
|
+
Be as formatUsdFields,
|
|
52
|
+
g as geoQueries,
|
|
53
|
+
p as getAccountTotalBalanceUsd,
|
|
54
|
+
Qs as getAccountTransactionHistory,
|
|
55
|
+
ge as getActiveMeshMode,
|
|
56
|
+
Ks as getAllChains,
|
|
57
|
+
k as getBinanceIntegrationId,
|
|
58
|
+
ne as getBitfinexIntegrationId,
|
|
59
|
+
Gs as getChainInfo,
|
|
60
|
+
js as getChainRpcClient,
|
|
61
|
+
le as getCoinbaseIntegrationId,
|
|
62
|
+
S as getCommittedIntents,
|
|
63
|
+
Ce as getCurrencyInfo,
|
|
64
|
+
Ts as getERC20TransferData,
|
|
65
|
+
c as getErrorBoundary,
|
|
66
|
+
Os as getErrorCode,
|
|
67
|
+
I as getHasSufficientBalanceToken,
|
|
68
|
+
W as getHasSufficientBalanceUsd,
|
|
69
|
+
N as getIntent,
|
|
70
|
+
w as getIntentConfigurationFromCalls,
|
|
71
|
+
ae as getIsApiError,
|
|
72
|
+
C as getIsBalanceTooLowError,
|
|
73
|
+
T as getIsInsufficientLiquidityError,
|
|
74
|
+
V as getIsNoAvailableQuoteError,
|
|
75
|
+
Ze as getIsQuoteFailedError,
|
|
76
|
+
n as getIsQuoteInputError,
|
|
77
|
+
ze as getIsQuoteTokenError,
|
|
78
|
+
D as getIsRateLimitedError,
|
|
79
|
+
b as getIsRequiredAmountNotMetError,
|
|
80
|
+
q as getIsUserRejectionError,
|
|
81
|
+
E as getIsWalletAlreadyConnectedError,
|
|
82
|
+
A as getMeshIntegrationId,
|
|
83
|
+
O as getMeshIntegrations,
|
|
84
|
+
gs as getMeshSupportedTokens,
|
|
85
|
+
Vs as getMinLogLevel,
|
|
86
|
+
s as getOnrampClient,
|
|
87
|
+
y as getPrettifiedErrorMessage,
|
|
88
|
+
qs as getRpcUrl,
|
|
89
|
+
zs as getSupportedChains,
|
|
90
|
+
K as getSupportedTokens,
|
|
91
|
+
re as getTokenPrice,
|
|
92
|
+
ue as getTokenPrices,
|
|
93
|
+
Ne as getTrailsClient,
|
|
94
|
+
v as getTrailsOnrampConfig,
|
|
95
|
+
ee as getTxTimeDiff,
|
|
96
|
+
i as getVersion,
|
|
97
|
+
ie as intentProtocolQueries,
|
|
98
|
+
Je as invalidateTokenBalancesCache,
|
|
99
|
+
R as invalidateTokenPricesCache,
|
|
100
|
+
ce as isMeshEnabled,
|
|
101
|
+
U as isTrailsApiClientError,
|
|
102
|
+
J as isTrailsError,
|
|
103
|
+
cs as isValidInteger,
|
|
104
|
+
ss as isValidNumeric,
|
|
105
|
+
Ss as isZeroAccount,
|
|
106
|
+
Ws as logger,
|
|
107
|
+
Re as meldQueries,
|
|
108
|
+
Qe as normalizeNumber,
|
|
109
|
+
L as normalizeTrailsOnrampConfig,
|
|
110
|
+
Me as pollIntentReceipt,
|
|
111
|
+
Oe as prepareSend,
|
|
112
|
+
F as priceQueries,
|
|
113
|
+
z as quoteIntent,
|
|
114
|
+
Q as removeCommittedIntent,
|
|
115
|
+
as as resolveChainId,
|
|
116
|
+
_e as resolveTokenAddress,
|
|
117
|
+
xe as resolveTokenInput,
|
|
118
|
+
h as sendOriginTransaction,
|
|
119
|
+
us as signPayload,
|
|
120
|
+
X as storeCommittedIntent,
|
|
121
|
+
Z as trailsOnramp,
|
|
122
|
+
Ae as useAccountTotalBalanceUsd,
|
|
123
|
+
d as useAccountTransactionHistory,
|
|
124
|
+
Ke as useChainRpcClient,
|
|
125
|
+
fe as useCommitIntent,
|
|
126
|
+
se as useCountryCode,
|
|
127
|
+
m as useCountryList,
|
|
128
|
+
B as useExchangeRate,
|
|
129
|
+
Ps as useExecuteIntent,
|
|
130
|
+
Te as useFiatCurrencyList,
|
|
131
|
+
Ls as useGetIntent,
|
|
132
|
+
a as useGetTokenImageUrl,
|
|
133
|
+
ls as useHasSufficientBalanceToken,
|
|
134
|
+
Es as useHasSufficientBalanceUsd,
|
|
135
|
+
Fs as useIndexerGatewayClient,
|
|
136
|
+
Bs as useIntentReceiptMonitor,
|
|
137
|
+
es as useIntentRecover,
|
|
138
|
+
be as useIntentRecoverWithAddress,
|
|
139
|
+
Y as useIntentTransactionHistory,
|
|
140
|
+
De as useKeymachineIntentRecovery,
|
|
141
|
+
ys as useMeldPaymentMethods,
|
|
142
|
+
Hs as useMeldServiceProviders,
|
|
143
|
+
Pe as useOfflineIntentRecovery,
|
|
144
|
+
Le as useOnrampClient,
|
|
145
|
+
ds as useQuote,
|
|
146
|
+
t as useSupportedChains,
|
|
147
|
+
Fe as useSupportedTokens,
|
|
148
|
+
As as useTokenAddress,
|
|
149
|
+
Se as useTokenBalances,
|
|
150
|
+
$e as useTokenBalancesForMultipleAccounts,
|
|
151
|
+
ns as useTokenInfo,
|
|
152
|
+
ms as useTokenList,
|
|
153
|
+
rs as useTokenPrice,
|
|
154
|
+
Cs as useTokenPrices,
|
|
155
|
+
H as useTrails,
|
|
156
|
+
pe as useTrailsClient,
|
|
157
|
+
j as useTrailsModal,
|
|
158
|
+
Ie as useTrailsOnRamp,
|
|
159
|
+
u as useTrailsSendTransaction
|
|
665
160
|
};
|