0xtrails 0.16.2 → 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/actions/index.d.ts
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
export type { SupportedChainName as ActionsSupportedChainName, ChainIdentifier as ActionsChainIdentifier, } from './types.js';
|
|
9
|
-
export type { EarnMarket, EarnMarketToken, EarnMarketRewardRate, EarnMarketRewardRateComponent, EarnMarketStatistics, EarnMarketMetadata, EarnMarketStatus, EarnMarketArgumentField, EarnMarketArguments, EarnActionArgs, ProviderId, Provider, ProviderType, EarnType, EarnBalance, EarnBalances, EarnBalanceQuery, EarnBalanceError, } from './types/earn.js';
|
|
10
|
-
export { buildCall, buildApproveAndCall, buildErc20Approve, getAmountWithSlippage, erc20Utils, getEarnProviders, getEarnMarkets, getEarnBalances, } from './utils.js';
|
|
11
|
-
export type { GetProvidersParams, GetProvidersResult, GetMarketsParams, GetMarketsResult, GetEarnBalancesParams, GetEarnBalancesResult, } from './utils.js';
|
|
12
|
-
export { resolveActionsToCalls } from './resolveActions.js';
|
|
13
|
-
export type { ResolveActionsToCallsParams } from './resolveActions.js';
|
|
14
|
-
export { encodeDestinationCalls, flattenDestinationCalls, } from './destinationCalls.js';
|
|
15
|
-
export type { DestinationCallsInput, EncodedDestinationCalls, } from './destinationCalls.js';
|
|
16
|
-
export { QuoteError } from '../quoteError.js';
|
|
17
|
-
export type { QuoteErrorCode } from '../quoteError.js';
|
|
18
|
-
export { uniswapV3 } from './custom-integrations/uniswapV3/uniswapV3.js';
|
|
19
|
-
export type { UniswapV3ChainScoped, UniswapV3GetPoolParams, UniswapV3QuoteSwapParams, UniswapV3QuoteSwapResponse, UniswapV3QuoteSwapType, UniswapV3SwapExactInputSingleParams, UniswapV3SwapExactOutputSingleParams, } from './custom-integrations/uniswapV3/types.js';
|
|
20
|
-
export { sushiswapV3 } from './custom-integrations/sushiswapV3/sushiswapV3.js';
|
|
21
|
-
export type { SushiSwapV3ChainScoped, SushiSwapV3GetPoolParams, SushiSwapV3QuoteSwapParams, SushiSwapV3QuoteSwapResponse, SushiSwapV3QuoteSwapType, SushiSwapV3SwapExactInputSingleParams, SushiSwapV3SwapExactOutputSingleParams, } from './custom-integrations/sushiswapV3/types.js';
|
|
22
|
-
export { TRAILS_ROUTER_ADDRESS } from './constants.js';
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { A as SupportedChainId, C as SupportedTokenSymbol, D as TokenOrAddress, E as TokenInfo, O as SwapProvider, S as LendActionItem, T as TokenAccessor, _ as CustomActionItem, a as AssertActionItem, b as FeePercent, c as AssertNativeBalanceItem, d as BuildCallParams, f as Call, g as ChainName, h as ChainIdentifier, j as SupportedChainName, k as SwapType, l as AssertNotExpiredItem, m as ChainId, n as ActionDirection, o as AssertERC20AllowanceItem, p as CallWithData, r as ActionItem, s as AssertERC20BalanceItem, t as ActionAmount, u as BuildApproveAndCallParams, v as DepositActionItem, w as SwapActionItem, y as Erc20Utils } from "../types-BK0WkVnx.js";
|
|
4
|
+
import { A as deposit, C as DynamicAmount, D as self, E as isSelfAddress, M as swap, O as assertCondition, S as resolveActionsToCalls, T as isDynamicAmount, _ as DestinationCallsInput, a as SushiSwapV3QuoteSwapResponse, b as flattenDestinationCalls, c as SushiSwapV3SwapExactOutputSingleParams, d as UniswapV3GetPoolParams, f as UniswapV3QuoteSwapParams, g as UniswapV3SwapExactOutputSingleParams, h as UniswapV3SwapExactInputSingleParams, i as SushiSwapV3QuoteSwapParams, j as lend, k as custom, l as uniswapV3, m as UniswapV3QuoteSwapType, n as SushiSwapV3ChainScoped, o as SushiSwapV3QuoteSwapType, p as UniswapV3QuoteSwapResponse, r as SushiSwapV3GetPoolParams, s as SushiSwapV3SwapExactInputSingleParams, t as sushiswapV3, u as UniswapV3ChainScoped, v as EncodedDestinationCalls, w as dynamic, x as ResolveActionsToCallsParams, y as encodeDestinationCalls } from "../sushiswapV3-D3h41LNZ.js";
|
|
5
|
+
import { A as Provider, C as EarnMarketMetadata, D as EarnMarketStatus, E as EarnMarketStatistics, M as ProviderType, O as EarnMarketToken, S as EarnMarketArguments, T as EarnMarketRewardRateComponent, _ as EarnBalanceError, a as GetProvidersParams, b as EarnMarket, c as buildCall, d as getAmountWithSlippage, f as getEarnBalances, g as EarnBalance, h as EarnActionArgs, i as GetMarketsResult, j as ProviderId, k as EarnType, l as buildErc20Approve, m as getEarnProviders, n as GetEarnBalancesResult, o as GetProvidersResult, p as getEarnMarkets, r as GetMarketsParams, s as buildApproveAndCall, t as GetEarnBalancesParams, u as erc20Utils, v as EarnBalanceQuery, w as EarnMarketRewardRate, x as EarnMarketArgumentField, y as EarnBalances } from "../utils-KPnWBA9x.js";
|
|
6
|
+
import { n as QuoteErrorCode, t as QuoteError } from "../quoteError-CmTH5Qm2.js";
|
|
7
|
+
export { type ActionAmount, type ActionDirection, type ActionItem, type ChainIdentifier as ActionsChainIdentifier, type SupportedChainName as ActionsSupportedChainName, type AssertActionItem, type AssertERC20AllowanceItem, type AssertERC20BalanceItem, type AssertNativeBalanceItem, type AssertNotExpiredItem, type BuildApproveAndCallParams, type BuildCallParams, type Call, type CallWithData, type ChainId, type ChainName, type CustomActionItem, type DepositActionItem, type DestinationCallsInput, type DynamicAmount, type EarnActionArgs, type EarnBalance, type EarnBalanceError, type EarnBalanceQuery, type EarnBalances, type EarnMarket, type EarnMarketArgumentField, type EarnMarketArguments, type EarnMarketMetadata, type EarnMarketRewardRate, type EarnMarketRewardRateComponent, type EarnMarketStatistics, type EarnMarketStatus, type EarnMarketToken, type EarnType, type EncodedDestinationCalls, type Erc20Utils, type FeePercent, type GetEarnBalancesParams, type GetEarnBalancesResult, type GetMarketsParams, type GetMarketsResult, type GetProvidersParams, type GetProvidersResult, type LendActionItem, type Provider, type ProviderId, type ProviderType, QuoteError, type QuoteErrorCode, type ResolveActionsToCallsParams, type SupportedChainId, type SupportedTokenSymbol, type SushiSwapV3ChainScoped, type SushiSwapV3GetPoolParams, type SushiSwapV3QuoteSwapParams, type SushiSwapV3QuoteSwapResponse, type SushiSwapV3QuoteSwapType, type SushiSwapV3SwapExactInputSingleParams, type SushiSwapV3SwapExactOutputSingleParams, type SwapActionItem, type SwapProvider, SwapType, type TokenAccessor, type TokenInfo, type TokenOrAddress, type UniswapV3ChainScoped, type UniswapV3GetPoolParams, type UniswapV3QuoteSwapParams, type UniswapV3QuoteSwapResponse, type UniswapV3QuoteSwapType, type UniswapV3SwapExactInputSingleParams, type UniswapV3SwapExactOutputSingleParams, assertCondition, buildApproveAndCall, buildCall, buildErc20Approve, custom, deposit, dynamic, encodeDestinationCalls, erc20Utils, flattenDestinationCalls, getAmountWithSlippage, getEarnBalances, getEarnMarkets, getEarnProviders, isDynamicAmount, isSelfAddress, lend, resolveActionsToCalls, self, sushiswapV3, swap, uniswapV3 };
|
package/dist/actions/index.js
CHANGED
|
@@ -1,37 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { dynamic as i, isDynamicAmount as e, isSelfAddress as m, self as s } from "./dynamic.js";
|
|
3
|
-
import { TRAILS_ROUTER_ADDRESS as a } from "./constants.js";
|
|
4
|
-
import { buildApproveAndCall as n, buildCall as f, buildErc20Approve as d, erc20Utils as u, getAmountWithSlippage as A, getEarnBalances as c, getEarnMarkets as E, getEarnProviders as C } from "./utils.js";
|
|
5
|
-
import { uniswapV3 as g } from "./custom-integrations/uniswapV3/uniswapV3.js";
|
|
6
|
-
import { sushiswapV3 as v } from "./custom-integrations/sushiswapV3/sushiswapV3.js";
|
|
7
|
-
import { SwapType as R } from "./resolvers.js";
|
|
8
|
-
import { resolveActionsToCalls as b } from "./resolveActions.js";
|
|
9
|
-
import { encodeDestinationCalls as h, flattenDestinationCalls as U } from "./destinationCalls.js";
|
|
10
|
-
import { assertCondition as _, custom as k, deposit as x, lend as B, swap as I } from "./actionBuilder.js";
|
|
11
|
-
export {
|
|
12
|
-
r as QuoteError,
|
|
13
|
-
R as SwapType,
|
|
14
|
-
a as TRAILS_ROUTER_ADDRESS,
|
|
15
|
-
_ as assertCondition,
|
|
16
|
-
n as buildApproveAndCall,
|
|
17
|
-
f as buildCall,
|
|
18
|
-
d as buildErc20Approve,
|
|
19
|
-
k as custom,
|
|
20
|
-
x as deposit,
|
|
21
|
-
i as dynamic,
|
|
22
|
-
h as encodeDestinationCalls,
|
|
23
|
-
u as erc20Utils,
|
|
24
|
-
U as flattenDestinationCalls,
|
|
25
|
-
A as getAmountWithSlippage,
|
|
26
|
-
c as getEarnBalances,
|
|
27
|
-
E as getEarnMarkets,
|
|
28
|
-
C as getEarnProviders,
|
|
29
|
-
e as isDynamicAmount,
|
|
30
|
-
m as isSelfAddress,
|
|
31
|
-
B as lend,
|
|
32
|
-
b as resolveActionsToCalls,
|
|
33
|
-
s as self,
|
|
34
|
-
v as sushiswapV3,
|
|
35
|
-
I as swap,
|
|
36
|
-
g as uniswapV3
|
|
37
|
-
};
|
|
1
|
+
import{C as e,S as t,T as n,_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S,y as C}from"../actionBuilder-CAS2u5wu.js";export{n as QuoteError,d as SwapType,v as assertCondition,s as buildApproveAndCall,h as buildCall,f as buildErc20Approve,p as custom,g as deposit,S as dynamic,m as encodeDestinationCalls,l as erc20Utils,_ as flattenDestinationCalls,c as getAmountWithSlippage,r as getEarnBalances,b as getEarnMarkets,C as getEarnProviders,t as isDynamicAmount,e as isSelfAddress,u as lend,a as resolveActionsToCalls,x as self,y as sushiswapV3,i as swap,o as uniswapV3};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`https://nodes.sequence.app`,t=`https://indexer.sequence.app`,n=`https://metadata.sequence.app`,r=`https://trails-api.sequence.app`,i=`10c5ac56159da00924d110c07c3f6e3a`,a=`0.05`,o={trailsApiKey:``,sequenceIndexerUrl:t,sequenceNodeGatewayUrl:e,sequenceMetadataUrl:n,trailsApiUrl:r,walletConnectProjectId:i,slippageTolerance:a,debug:!1,commitHash:void 0};o.commitHash=f();let s=!1;function c(e){s=e}function l(){return s}function u(e){Object.assign(o,e)}function d(e){return e?o[e]:o}function f(){let e=p(`CF_PAGES_COMMIT_SHA`),t=p(`VITE_COMMIT_SHA`);return e&&console.log(`[trails-sdk][config] commit hash from CF_PAGES_COMMIT_SHA: ${e}`),t&&console.log(`[trails-sdk][config] commit hash from VITE_COMMIT_SHA: ${t}`),e||t}function p(e){if(import.meta.env){let t=import.meta.env[`VITE_${e}`];if(t!==void 0&&t!==``)return t;let n=import.meta.env[e];if(n!==void 0&&n!==``)return n}if(typeof process<`u`&&process?.env){let t=process.env[e];if(t!==void 0&&t!==``)return t}}const m=1e3,h=60*m,g=60*h,_=24*g,v=3600,y=()=>Date.now(),b=e=>y()-e,x=e=>Math.floor(e/m),S=(e,t)=>e>0&&b(e)<t,C=e=>Math.min(m*2**e,30*m);function w(e){if(e<60)return`${e}s`;let t=Math.floor(e/v),n=Math.floor(e%v/60),r=e%60;return t===0?r>0?`${n}m${r}s`:`${n}m`:`${t}h${[n>0&&`${n}m`,r>0&&`${r}s`].filter(Boolean).join(``)}`}const T=e=>{if(!e)return{relative:null,full:null};try{let t=new Date(e),n=y()-t.getTime(),r=Math.floor(n/m),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24),s=Math.floor(o/7),c=Math.floor(o/30),l=Math.floor(o/365),u;u=r<60?`just now`:i<60?`${i}m ago`:a<24?`${a}h ago`:o<7?o===1?`1 day ago`:`${o} days ago`:s<4?s===1?`1 week ago`:`${s} weeks ago`:c<12?c===1?`1 month ago`:`${c} months ago`:l===1?`1 year ago`:`${l} years ago`;let d=t.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`2-digit`,minute:`2-digit`});return{relative:u,full:d}}catch{return{relative:null,full:null}}};function E(e){return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`}function D(e){if(!e)return`Sent just now`;let t=x(b(e));if(t<1)return`Sent just now`;if(t===1)return`Sent 1 second ago`;if(t<60)return`Sent ${t} seconds ago`;let n=Math.floor(t/60);if(n===1)return`Sent 1 minute ago`;if(n<60)return`Sent ${n} minutes ago`;let r=Math.floor(n/60);if(r===1)return`Sent 1 hour ago`;if(r<24)return`Sent ${r} hours ago`;let i=Math.floor(r/24);return i===1?`Sent 1 day ago`:`Sent ${i} days ago`}const O={trailsUtilsAddress:`0x000000004f702C8398e158108937814d074cD74b`,trailsIntentEntrypointAddress:`0x91E9e3Fe369CF005dB2857Ef24955A66d1E692Cf`,trailsRouterAddress:`0xBaE357CBAA04a68cbfD5a560Ab06C4E9A3328A90`,trailsRouterShimAddress:`0xde04013becF982866A04d928A6df25e0D1FAaA71`};export{i as C,r as D,e as E,a as S,n as T,d as _,h as a,c as b,E as c,S as d,y as f,f as g,x as h,v as i,w as l,D as m,_ as n,m as o,C as p,g as r,b as s,O as t,T as u,p as v,t as w,u as x,l as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}export{r as t};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { t as Token$1 } from "./tokenTypes-D812t5L9.js";
|
|
2
|
+
import { TokenInfo } from "@0xtrails/api";
|
|
3
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
4
|
+
|
|
5
|
+
//#region src/tokens.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Converts ApiTokenInfo (from trails-api) to Token
|
|
8
|
+
*/
|
|
9
|
+
declare function convertApiTokenInfoToToken(tokenInfo: TokenInfo, options?: {
|
|
10
|
+
balance?: string;
|
|
11
|
+
priceUsd?: number;
|
|
12
|
+
}): Token$1;
|
|
13
|
+
declare function getSupportedTokens(config: {
|
|
14
|
+
trailsApiKey: string;
|
|
15
|
+
trailsApiUrl: string;
|
|
16
|
+
queryClient?: QueryClient;
|
|
17
|
+
}): Promise<Token$1[]>;
|
|
18
|
+
declare function getTokenInfo(chainId: number, contractAddress: string, config: {
|
|
19
|
+
trailsApiKey: string;
|
|
20
|
+
trailsApiUrl: string;
|
|
21
|
+
sequenceMetadataUrl: string;
|
|
22
|
+
queryClient?: QueryClient;
|
|
23
|
+
}): Promise<Token$1 | null>;
|
|
24
|
+
declare function getTokenAddress(chainId: number, tokenSymbol: string, config: {
|
|
25
|
+
trailsApiKey: string;
|
|
26
|
+
trailsApiUrl: string;
|
|
27
|
+
queryClient?: QueryClient;
|
|
28
|
+
}): Promise<string>;
|
|
29
|
+
declare function getCommonTokenImageUrl({
|
|
30
|
+
symbol,
|
|
31
|
+
contractAddress,
|
|
32
|
+
chainId
|
|
33
|
+
}: {
|
|
34
|
+
symbol?: string | null;
|
|
35
|
+
contractAddress?: string | null;
|
|
36
|
+
chainId?: number | null;
|
|
37
|
+
}): "" | "https://assets.sequence.info/images/tokens/large/1/0x0000000000000000000000000000000000000000.webp" | "https://assets.sequence.info/images/tokens/large/1/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.webp" | "https://assets.sequence.info/images/tokens/large/137/0x0000000000000000000000000000000000000000.webp" | "https://assets.sequence.info/images/tokens/large/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.webp" | "https://assets.sequence.info/images/tokens/large/1/0xdac17f958d2ee523a2206206994597c13d831ec7.webp" | "https://assets.sequence.info/images/tokens/large/1/0x6b175474e89094c44da98b954eedeac495271d0f.webp" | "https://assets.sequence.info/images/tokens/large/1/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.webp" | "https://assets.sequence.info/images/tokens/large/1/0x0d8775f648430679a709e98d2b0cb6250d2887ef.webp" | "https://assets.sequence.info/images/tokens/large/42161/0x912ce59144191c1204e64559fe8253a0e49e6548.webp" | "https://assets.sequence.info/images/tokens/large/1/0x514910771af9ca656af840dff83e8264ecf986ca.webp" | "https://assets.sequence.info/images/tokens/large/42793/0x0000000000000000000000000000000000000000.webp" | "https://assets.sequence.info/images/tokens/large/56/0x0000000000000000000000000000000000000000.webp" | "https://assets.coingecko.com/coins/images/976/standard/Tezos-logo.png?1696502091" | "https://raw.githubusercontent.com/0xsequence/token-directory/master/index/somnia/logos/somi.png" | "https://assets.coingecko.com/coins/images/34258/large/round_icon_2048_px.png?1719523838" | "https://assets.sequence.info/images/tokens/large/33139/0x0000000000000000000000000000000000000000.webp" | "https://assets.coingecko.com/coins/images/53575/large/anime.jpg?1736748703" | "https://assets.sequence.info/images/tokens/large/43114/0x0000000000000000000000000000000000000000.webp" | "https://assets.coingecko.com/coins/images/4128/standard/solana.png?1718769756" | "https://assets.sequence.info/images/tokens/large/143/0x0000000000000000000000000000000000000000.webp" | "https://assets.coingecko.com/coins/images/53705/standard/usdt0.jpg?1737086183" | "https://assets.coingecko.com/coins/images/39284/standard/Circle_Agora_White_on_Olive_1080px.png?1722961274";
|
|
38
|
+
declare function getSequenceMetadataTokenImageUrl({
|
|
39
|
+
chainId,
|
|
40
|
+
contractAddress,
|
|
41
|
+
fallbackImageUrl,
|
|
42
|
+
sequenceMetadataUrl
|
|
43
|
+
}: {
|
|
44
|
+
chainId: number;
|
|
45
|
+
contractAddress: string;
|
|
46
|
+
fallbackImageUrl?: string;
|
|
47
|
+
sequenceMetadataUrl?: string;
|
|
48
|
+
}): string;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/plugins/edgeTypes.d.ts
|
|
51
|
+
/** Registered edge rails. Extend when adding Bitcoin, Tron, etc. */
|
|
52
|
+
declare const EDGE_RAIL: {
|
|
53
|
+
readonly SOLANA: "solana";
|
|
54
|
+
};
|
|
55
|
+
type EdgeRailId = (typeof EDGE_RAIL)[keyof typeof EDGE_RAIL];
|
|
56
|
+
/** Solana-origin edge wallet + RPC config (Relay `EdgeRail.SOLANA`). */
|
|
57
|
+
type SolanaEdgeOriginConfig = {
|
|
58
|
+
rail: typeof EDGE_RAIL.SOLANA;
|
|
59
|
+
rpcUrls: readonly string[];
|
|
60
|
+
signerPublicKeyBase58: string;
|
|
61
|
+
};
|
|
62
|
+
/** Discriminated union of per-rail origin configs. */
|
|
63
|
+
type EdgeOriginConfig = SolanaEdgeOriginConfig;
|
|
64
|
+
/** Solana-destination edge config (EVM → Solana, etc.). */
|
|
65
|
+
type SolanaEdgeDestinationConfig = {
|
|
66
|
+
rail: typeof EDGE_RAIL.SOLANA; /** Relay edge chain id — not the SDK UI chain id (101). */
|
|
67
|
+
chainId: number; /** Recipient in the destination rail's native address format. */
|
|
68
|
+
recipient: string;
|
|
69
|
+
};
|
|
70
|
+
/** Discriminated union of per-rail destination configs. */
|
|
71
|
+
type EdgeDestinationConfig = SolanaEdgeDestinationConfig;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated Use {@link SolanaEdgeOriginConfig} (`rail`-discriminated). Kept for
|
|
74
|
+
* backward-compatible imports; omits the `rail` discriminator only.
|
|
75
|
+
*/
|
|
76
|
+
type SolanaEdgeWalletConfig = Omit<SolanaEdgeOriginConfig, "rail">;
|
|
77
|
+
declare function isSolanaEdgeOriginConfig(config: EdgeOriginConfig): config is SolanaEdgeOriginConfig;
|
|
78
|
+
declare function isSolanaEdgeDestinationConfig(config: EdgeDestinationConfig): config is SolanaEdgeDestinationConfig;
|
|
79
|
+
declare function createSolanaEdgeOriginConfig(config: Omit<SolanaEdgeOriginConfig, "rail">): SolanaEdgeOriginConfig;
|
|
80
|
+
declare function createSolanaEdgeDestinationConfig(config: Omit<SolanaEdgeDestinationConfig, "rail">): SolanaEdgeDestinationConfig;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/plugins/edge.d.ts
|
|
83
|
+
type EdgeDepositParams = {
|
|
84
|
+
providerQuote: unknown;
|
|
85
|
+
};
|
|
86
|
+
/** Options when resolving a destination edge recipient from widget / intent input. */
|
|
87
|
+
type BuildEdgeDestinationConfigOptions = {
|
|
88
|
+
/**
|
|
89
|
+
* Recipient in the destination rail's native address format. Each plugin
|
|
90
|
+
* validates format and resolves from props and/or a connected wallet.
|
|
91
|
+
*/
|
|
92
|
+
recipient?: string | null;
|
|
93
|
+
};
|
|
94
|
+
interface EdgePlugin {
|
|
95
|
+
/** Which edge rail this plugin implements (Relay `EdgeRail` counterpart). */
|
|
96
|
+
readonly rail: EdgeRailId;
|
|
97
|
+
/** Whether this plugin handles the given chain ID as an origin (wallet-state independent). */
|
|
98
|
+
supportsChain(fromChainId: number): boolean;
|
|
99
|
+
/** Returns config when wallet is connected and ready; null otherwise. */
|
|
100
|
+
buildEdgeConfig(fromChainId: number): EdgeOriginConfig | null;
|
|
101
|
+
executeDeposit(params: EdgeDepositParams): Promise<string[]>;
|
|
102
|
+
/** Origin tokens supported by this rail. */
|
|
103
|
+
getOriginTokens(): Token$1[];
|
|
104
|
+
/** Whether this plugin handles the given chain ID as a destination (wallet-state independent). */
|
|
105
|
+
supportsDestinationChain?(toChainId: number): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Returns destination edge config when a valid recipient is available
|
|
108
|
+
* (from `options.recipient` and/or a connected wallet for the rail).
|
|
109
|
+
*/
|
|
110
|
+
buildEdgeDestinationConfig?(toChainId: number, options?: BuildEdgeDestinationConfigOptions): EdgeDestinationConfig | null;
|
|
111
|
+
/** Destination tokens supported by this rail. */
|
|
112
|
+
getDestinationTokens?(): Token$1[];
|
|
113
|
+
}
|
|
114
|
+
declare const EdgePluginContext: import("react").Context<EdgePlugin[]>;
|
|
115
|
+
declare function useEdgePlugins(): EdgePlugin[];
|
|
116
|
+
/** Returns the first registered plugin that supports the given chain as an origin, or null. */
|
|
117
|
+
declare function useEdgePluginForChain(fromChainId: number | null): EdgePlugin | null;
|
|
118
|
+
/** Returns the first registered plugin that supports the given chain as a destination, or null. */
|
|
119
|
+
declare function useEdgePluginForDestinationChain(toChainId: number | null): EdgePlugin | null;
|
|
120
|
+
//#endregion
|
|
121
|
+
export { getTokenAddress as C, getSupportedTokens as S, isSolanaEdgeDestinationConfig as _, useEdgePluginForChain as a, getCommonTokenImageUrl as b, EDGE_RAIL as c, EdgeRailId as d, SolanaEdgeDestinationConfig as f, createSolanaEdgeOriginConfig as g, createSolanaEdgeDestinationConfig as h, EdgePluginContext as i, EdgeDestinationConfig as l, SolanaEdgeWalletConfig as m, EdgeDepositParams as n, useEdgePluginForDestinationChain as o, SolanaEdgeOriginConfig as p, EdgePlugin as r, useEdgePlugins as s, BuildEdgeDestinationConfigOptions as t, EdgeOriginConfig as u, isSolanaEdgeOriginConfig as v, getTokenInfo as w, getSequenceMetadataTokenImageUrl as x, convertApiTokenInfoToToken as y };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as e,useContext as t,useMemo as n}from"react";const r={SOLANA:`solana`};function i(e){return e.rail===r.SOLANA}function a(e){return e.rail===r.SOLANA}function o(e){return{rail:r.SOLANA,...e}}function s(e){return{rail:r.SOLANA,...e}}const c=e([]);function l(){return t(c)}function u(e){let t=l();return n(()=>e?t.find(t=>t.supportsChain(e))??null:null,[e,t])}function d(e){let t=l();return n(()=>e?t.find(t=>t.supportsDestinationChain?.(e))??null:null,[e,t])}export{r as a,a as c,l as i,i as l,u as n,s as o,d as r,o as s,c as t};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,38 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type
|
|
7
|
-
export { useGetIntent } from './useGetIntent.js';
|
|
8
|
-
export type { UseGetIntentParams, UseGetIntentReturn, } from './useGetIntent.js';
|
|
9
|
-
export { useIntentTransactionHistory } from './useIntentTransactionHistory.js';
|
|
10
|
-
export type { UseIntentTransactionHistoryParams, UseIntentTransactionHistoryReturn, } from './useIntentTransactionHistory.js';
|
|
11
|
-
export { useAccountTransactionHistory } from '../transactions.js';
|
|
12
|
-
export type { UseAccountTransactionHistoryParams, UseAccountTransactionHistoryReturn, } from '../transactions.js';
|
|
13
|
-
export { useCommitIntent, useExecuteIntent } from '../mutations.js';
|
|
14
|
-
export { useEarnMarkets } from '../actions/hooks/useEarnMarkets.js';
|
|
15
|
-
export type { UseEarnMarketsParams, UseEarnMarketsReturn, } from '../actions/hooks/useEarnMarkets.js';
|
|
16
|
-
export { useEarnBalances } from '../actions/hooks/useEarnBalances.js';
|
|
17
|
-
export type { UseEarnBalancesParams, UseEarnBalancesReturn, } from '../actions/hooks/useEarnBalances.js';
|
|
18
|
-
export { useEarnProviders } from '../actions/hooks/useEarnProviders.js';
|
|
19
|
-
export type { UseEarnProvidersParams, UseEarnProvidersReturn, } from '../actions/hooks/useEarnProviders.js';
|
|
20
|
-
export { useResolveActions } from '../actions/hooks/useResolveActions.js';
|
|
21
|
-
export type { UseResolveActionsProps, UseResolveActionsReturn, } from '../actions/hooks/useResolveActions.js';
|
|
22
|
-
export { MIN_REFETCH_INTERVAL, useAccountTotalBalanceUsd, useHasSufficientBalanceToken, useHasSufficientBalanceUsd, useTokenBalances, useTokenBalancesForMultipleAccounts, } from '../query/balance.hooks.js';
|
|
23
|
-
export type { NativeTokenBalance, TokenBalance, } from '../query/balance.hooks.js';
|
|
24
|
-
export { useSupportedTokens, useTokenList, useGetTokenImageUrl, useGetSequenceMetadataTokenImageUrl, useTokenAddress, useTokenInfo, } from '../query/token.hooks.js';
|
|
25
|
-
export { useTokenPrice, useTokenPrices } from '../query/price.hooks.js';
|
|
26
|
-
export { useSupportedChains, usePublicClient } from '../query/chains.hooks.js';
|
|
27
|
-
export { useIndexerGatewayClient } from '../indexerClient.js';
|
|
28
|
-
export { useCountryCode, useCountryList } from '../query/geo.hooks.js';
|
|
29
|
-
export { useFiatCurrencyList, useExchangeRate } from '../query/fiat.hooks.js';
|
|
30
|
-
export { useMeldPaymentMethods, useMeldServiceProviders, } from '../query/meld.hooks.js';
|
|
31
|
-
export { useTrailsClient } from '../trailsClient.js';
|
|
32
|
-
export { useOnrampClient } from '../onrampClient.js';
|
|
33
|
-
export { useKeymachineIntentRecovery, useIntentRecover, useIntentRecoverWithAddress, } from '../recover.js';
|
|
34
|
-
export type { UseKeymachineIntentRecoveryParams, UseKeymachineIntentRecoveryReturn, UseIntentRecoverParams, UseIntentRecoverReturn, UseIntentRecoverWithAddressParams, UseIntentRecoverWithAddressReturn, } from '../recover.js';
|
|
35
|
-
export { useOfflineIntentRecovery } from '../offlineRecovery.js';
|
|
36
|
-
export type { UseOfflineIntentRecoveryParams, UseOfflineIntentRecoveryReturn, } from '../offlineRecovery.js';
|
|
37
|
-
export type { Mode } from './useViewManager.js';
|
|
38
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { n as QuoteErrorCode } from "../quoteError-CmTH5Qm2.js";
|
|
4
|
+
import { C as SwapReturn, E as useQuote, T as UseQuoteReturn, b as Quote, dt as UseAccountTransactionHistoryParams, ft as UseAccountTransactionHistoryReturn, ht as useAccountTransactionHistory, t as Mode, w as UseQuoteProps } from "../useViewManager-BeUH_k1s.js";
|
|
5
|
+
import { A as useTokenPrice, B as TokenBalance, C as useFiatCurrencyList, Ct as TrailsSendTransactionVariables, D as usePublicClient, Dt as IntentReceiptStatus, E as useIndexerGatewayClient, Et as useTrailsSendTransaction, F as useTokenAddress, G as useHasSufficientBalanceUsd, H as UseHasSufficientBalanceUsdParams, I as useTokenInfo, K as useTokenBalances, L as useTokenList, M as useGetSequenceMetadataTokenImageUrl, N as useGetTokenImageUrl, Ot as useIntentReceiptMonitor, P as useSupportedTokens, R as MIN_REFETCH_INTERVAL, S as useExchangeRate, St as useGetIntent, T as useCountryList, Tt as UseTrailsSendTransactionReturnType, U as useAccountTotalBalanceUsd, V as UseHasSufficientBalanceTokenParams, W as useHasSufficientBalanceToken, _t as UseIntentTransactionHistoryParams, at as useResolveActions, b as useMeldPaymentMethods, bt as UseGetIntentParams, c as UseIntentRecoverWithAddressParams, ct as useEarnProviders, d as UseKeymachineIntentRecoveryReturn, dt as useEarnBalances, ft as UseEarnMarketsParams, g as useKeymachineIntentRecovery, gt as useExecuteIntent, h as useIntentRecoverWithAddress, ht as useCommitIntent, i as useOfflineIntentRecovery, it as UseResolveActionsReturn, j as useTokenPrices, jt as useTrailsClient, k as useSupportedChains, l as UseIntentRecoverWithAddressReturn, lt as UseEarnBalancesParams, m as useIntentRecover, mt as useEarnMarkets, n as UseOfflineIntentRecoveryReturn, o as UseIntentRecoverParams, ot as UseEarnProvidersParams, pt as UseEarnMarketsReturn, q as useTokenBalancesForMultipleAccounts, rt as UseResolveActionsProps, s as UseIntentRecoverReturn, st as UseEarnProvidersReturn, t as UseOfflineIntentRecoveryParams, u as UseKeymachineIntentRecoveryParams, ut as UseEarnBalancesReturn, v as useOnrampClient, vt as UseIntentTransactionHistoryReturn, w as useCountryCode, wt as UseTrailsSendTransactionParameters, x as useMeldServiceProviders, xt as UseGetIntentReturn, yt as useIntentTransactionHistory, z as NativeTokenBalance } from "../offlineRecovery-BfgccnFf.js";
|
|
6
|
+
export { type IntentReceiptStatus, MIN_REFETCH_INTERVAL, type Mode, type NativeTokenBalance, type Quote, type QuoteErrorCode, type SwapReturn, type TokenBalance, type TrailsSendTransactionVariables, type UseAccountTransactionHistoryParams, type UseAccountTransactionHistoryReturn, type UseEarnBalancesParams, type UseEarnBalancesReturn, type UseEarnMarketsParams, type UseEarnMarketsReturn, type UseEarnProvidersParams, type UseEarnProvidersReturn, type UseGetIntentParams, type UseGetIntentReturn, type UseHasSufficientBalanceTokenParams, type UseHasSufficientBalanceUsdParams, type UseIntentRecoverParams, type UseIntentRecoverReturn, type UseIntentRecoverWithAddressParams, type UseIntentRecoverWithAddressReturn, type UseIntentTransactionHistoryParams, type UseIntentTransactionHistoryReturn, type UseKeymachineIntentRecoveryParams, type UseKeymachineIntentRecoveryReturn, type UseOfflineIntentRecoveryParams, type UseOfflineIntentRecoveryReturn, type UseQuoteProps, type UseQuoteReturn, type UseResolveActionsProps, type UseResolveActionsReturn, type UseTrailsSendTransactionParameters, type UseTrailsSendTransactionReturnType, useAccountTotalBalanceUsd, useAccountTransactionHistory, useCommitIntent, useCountryCode, useCountryList, useEarnBalances, useEarnMarkets, useEarnProviders, useExchangeRate, useExecuteIntent, useFiatCurrencyList, useGetIntent, useGetSequenceMetadataTokenImageUrl, useGetTokenImageUrl, useHasSufficientBalanceToken, useHasSufficientBalanceUsd, useIndexerGatewayClient, useIntentReceiptMonitor, useIntentRecover, useIntentRecoverWithAddress, useIntentTransactionHistory, useKeymachineIntentRecovery, useMeldPaymentMethods, useMeldServiceProviders, useOfflineIntentRecovery, useOnrampClient, usePublicClient, useQuote, useResolveActions, useSupportedChains, useSupportedTokens, useTokenAddress, useTokenBalances, useTokenBalancesForMultipleAccounts, useTokenInfo, useTokenList, useTokenPrice, useTokenPrices, useTrailsClient, useTrailsSendTransaction };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,67 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useGetSequenceMetadataTokenImageUrl as o, useGetTokenImageUrl as t, useSupportedTokens as r, useTokenAddress as s, useTokenInfo as n, useTokenList as i } from "../query/token.hooks.js";
|
|
3
|
-
import { useExchangeRate as m, useFiatCurrencyList as a } from "../query/fiat.hooks.js";
|
|
4
|
-
import { useIndexerGatewayClient as p } from "../indexerClient.js";
|
|
5
|
-
import { useAccountTransactionHistory as l } from "../transactions.js";
|
|
6
|
-
import { usePublicClient as d, useSupportedChains as I } from "../query/chains.hooks.js";
|
|
7
|
-
import { useCommitIntent as C, useExecuteIntent as y } from "../mutations.js";
|
|
8
|
-
import { useResolveActions as v } from "../actions/hooks/useResolveActions.js";
|
|
9
|
-
import { useQuote as M } from "./useQuote.js";
|
|
10
|
-
import { MIN_REFETCH_INTERVAL as S, useAccountTotalBalanceUsd as B, useHasSufficientBalanceToken as P, useHasSufficientBalanceUsd as h, useTokenBalances as H, useTokenBalancesForMultipleAccounts as x } from "../query/balance.hooks.js";
|
|
11
|
-
import { useTokenPrice as L, useTokenPrices as U } from "../query/price.hooks.js";
|
|
12
|
-
import { useOnrampClient as F } from "../onrampClient.js";
|
|
13
|
-
import { useTrailsClient as O } from "../trailsClient.js";
|
|
14
|
-
import { useCountryCode as b, useCountryList as q } from "../query/geo.hooks.js";
|
|
15
|
-
import { useIntentReceiptMonitor as K } from "../intentReceiptMonitor.js";
|
|
16
|
-
import { useEarnMarkets as V } from "../actions/hooks/useEarnMarkets.js";
|
|
17
|
-
import { useEarnBalances as j } from "../actions/hooks/useEarnBalances.js";
|
|
18
|
-
import { useEarnProviders as D } from "../actions/hooks/useEarnProviders.js";
|
|
19
|
-
import { useTrailsSendTransaction as X } from "./useTrailsSendTransaction.js";
|
|
20
|
-
import { useIntentTransactionHistory as Z } from "./useIntentTransactionHistory.js";
|
|
21
|
-
import { useGetIntent as ee } from "./useGetIntent.js";
|
|
22
|
-
import { useMeldPaymentMethods as te, useMeldServiceProviders as re } from "../query/meld.hooks.js";
|
|
23
|
-
import { useIntentRecover as ne, useIntentRecoverWithAddress as ie, useKeymachineIntentRecovery as ue } from "../recover.js";
|
|
24
|
-
import { useOfflineIntentRecovery as ae } from "../offlineRecovery.js";
|
|
25
|
-
export {
|
|
26
|
-
S as MIN_REFETCH_INTERVAL,
|
|
27
|
-
B as useAccountTotalBalanceUsd,
|
|
28
|
-
l as useAccountTransactionHistory,
|
|
29
|
-
C as useCommitIntent,
|
|
30
|
-
b as useCountryCode,
|
|
31
|
-
q as useCountryList,
|
|
32
|
-
j as useEarnBalances,
|
|
33
|
-
V as useEarnMarkets,
|
|
34
|
-
D as useEarnProviders,
|
|
35
|
-
m as useExchangeRate,
|
|
36
|
-
y as useExecuteIntent,
|
|
37
|
-
a as useFiatCurrencyList,
|
|
38
|
-
ee as useGetIntent,
|
|
39
|
-
o as useGetSequenceMetadataTokenImageUrl,
|
|
40
|
-
t as useGetTokenImageUrl,
|
|
41
|
-
P as useHasSufficientBalanceToken,
|
|
42
|
-
h as useHasSufficientBalanceUsd,
|
|
43
|
-
p as useIndexerGatewayClient,
|
|
44
|
-
K as useIntentReceiptMonitor,
|
|
45
|
-
ne as useIntentRecover,
|
|
46
|
-
ie as useIntentRecoverWithAddress,
|
|
47
|
-
Z as useIntentTransactionHistory,
|
|
48
|
-
ue as useKeymachineIntentRecovery,
|
|
49
|
-
te as useMeldPaymentMethods,
|
|
50
|
-
re as useMeldServiceProviders,
|
|
51
|
-
ae as useOfflineIntentRecovery,
|
|
52
|
-
F as useOnrampClient,
|
|
53
|
-
d as usePublicClient,
|
|
54
|
-
M as useQuote,
|
|
55
|
-
v as useResolveActions,
|
|
56
|
-
I as useSupportedChains,
|
|
57
|
-
r as useSupportedTokens,
|
|
58
|
-
s as useTokenAddress,
|
|
59
|
-
H as useTokenBalances,
|
|
60
|
-
x as useTokenBalancesForMultipleAccounts,
|
|
61
|
-
n as useTokenInfo,
|
|
62
|
-
i as useTokenList,
|
|
63
|
-
L as useTokenPrice,
|
|
64
|
-
U as useTokenPrices,
|
|
65
|
-
O as useTrailsClient,
|
|
66
|
-
X as useTrailsSendTransaction
|
|
67
|
-
};
|
|
1
|
+
"use client";import{$ as e,$t as t,B as n,Dn as r,En as i,F as a,Fn as o,Ft as s,Gt as c,H as l,I as u,In as d,It as f,J as p,Kt as m,L as h,Lt as g,Mn as _,Mt as v,Nn as y,Nt as b,Pn as x,Pt as S,Q as C,Qt as w,Rt as T,Tt as E,U as D,Ut as O,Wt as k,X as A,Y as j,Z as M,ir as N,it as P,jn as F,jt as I,k as L,nt as R,q as z,z as B}from"../src-Cy3oxYgV.js";export{b as MIN_REFETCH_INTERVAL,S as useAccountTotalBalanceUsd,w as useAccountTransactionHistory,c as useCommitIntent,C as useCountryCode,e as useCountryList,j as useEarnBalances,A as useEarnMarkets,p as useEarnProviders,i as useExchangeRate,m as useExecuteIntent,r as useFiatCurrencyList,l as useGetIntent,F as useGetSequenceMetadataTokenImageUrl,_ as useGetTokenImageUrl,s as useHasSufficientBalanceToken,f as useHasSufficientBalanceUsd,t as useIndexerGatewayClient,M as useIntentReceiptMonitor,a as useIntentRecover,u as useIntentRecoverWithAddress,D as useIntentTransactionHistory,h as useKeymachineIntentRecovery,B as useMeldPaymentMethods,n as useMeldServiceProviders,L as useOfflineIntentRecovery,E as useOnrampClient,R as usePublicClient,O as useQuote,k as useResolveActions,P as useSupportedChains,y as useSupportedTokens,x as useTokenAddress,g as useTokenBalances,T as useTokenBalancesForMultipleAccounts,o as useTokenInfo,d as useTokenList,I as useTokenPrice,v as useTokenPrices,N as useTrailsClient,z as useTrailsSendTransaction};
|
package/dist/hydrate/index.d.ts
CHANGED
|
@@ -1,8 +1,196 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { x as HydrateTypeData } from "../types-BK0WkVnx.js";
|
|
4
|
+
import { a as EncodeHydrateExecuteAndSweepCalldataParams, c as EncodeHydrateExecuteCalldataWithPayload, d as decodeHydrateExecuteCalldata, f as encodeHydrateExecuteAndSweepCalldata, i as DecodeHydrateExecuteCalldataResult, l as EncodeHydrateExecuteCalldataWithSingleCall, m as hydrateFunctionsAbi, n as encodeMulticallHydrateExecute, o as EncodeHydrateExecuteCalldataParams, p as encodeHydrateExecuteCalldata, r as DecodeHydrateExecuteAndSweepCalldataResult, s as EncodeHydrateExecuteCalldataWithPacked, t as createHydratePayload, u as decodeHydrateExecuteAndSweepCalldata } from "../multicall-BCUHt_9t.js";
|
|
5
|
+
import { Payload } from "@0xsequence/wallet-primitives";
|
|
6
|
+
import { Address, Bytes, Hex } from "ox";
|
|
7
|
+
import { AbiFunction as AbiFunction$1 } from "ox/AbiFunction";
|
|
8
|
+
|
|
9
|
+
//#region src/hydrate/types.d.ts
|
|
10
|
+
type ExplicitHydrateDataSource = "self" | Address.Address;
|
|
11
|
+
type RuntimeHydrateDataSource = "msg.sender" | "tx.origin";
|
|
12
|
+
type HydrateDataSource = ExplicitHydrateDataSource | RuntimeHydrateDataSource;
|
|
13
|
+
interface CalldataSelector {
|
|
14
|
+
offset: number;
|
|
15
|
+
size: number;
|
|
16
|
+
}
|
|
17
|
+
interface ByteRange {
|
|
18
|
+
callIndex: number;
|
|
19
|
+
offset: number;
|
|
20
|
+
size: number;
|
|
21
|
+
}
|
|
22
|
+
type HydrateCallLike = {
|
|
23
|
+
data: Hex.Hex;
|
|
24
|
+
};
|
|
25
|
+
interface PayloadSelector {
|
|
26
|
+
resolve(calls: readonly HydrateCallLike[]): ByteRange[];
|
|
27
|
+
toString(): string;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/hydrate/constants.d.ts
|
|
31
|
+
declare const HYDRATE_PROXY_ADDRESS: `0x${string}`;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/hydrate/source.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* Helper constructors for hydrate runtime sources.
|
|
36
|
+
*/
|
|
37
|
+
declare const HydrateSource: {
|
|
38
|
+
self(): ExplicitHydrateDataSource;
|
|
39
|
+
msgSender(): RuntimeHydrateDataSource;
|
|
40
|
+
txOrigin(): RuntimeHydrateDataSource;
|
|
41
|
+
address(address: HydrateDataSource): ExplicitHydrateDataSource;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/hydrate/selectors.d.ts
|
|
45
|
+
declare class PathBuilder {
|
|
46
|
+
private readonly steps;
|
|
47
|
+
callData(callIndex: number): this;
|
|
48
|
+
slice(offset: number, size: number): this;
|
|
49
|
+
abi(functionAbi: string | AbiFunction$1): this;
|
|
50
|
+
argSlot(arg: number | string): this;
|
|
51
|
+
argBytesData(arg: number | string): this;
|
|
52
|
+
encodedCallsPayload(): this;
|
|
53
|
+
encodedCallData(index: number): this;
|
|
54
|
+
asSelector(): PayloadSelector;
|
|
55
|
+
}
|
|
56
|
+
declare const HydrateSelector: {
|
|
57
|
+
readonly offset: (offset: number, size: number) => CalldataSelector;
|
|
58
|
+
readonly range: (callIndex: number, offset: number, size: number) => PayloadSelector;
|
|
59
|
+
readonly path: () => PathBuilder;
|
|
60
|
+
/**
|
|
61
|
+
* Calldata span for a static ABI argument (`address`, `uint256`, `bool`,
|
|
62
|
+
* fixed arrays, static tuples, etc.). Offset and size follow standard ABI
|
|
63
|
+
* head encoding. Not supported: dynamic tuples (tuples with any dynamic
|
|
64
|
+
* component), `bytes`, `string`, unbounded `T[]`, and fixed-length arrays
|
|
65
|
+
* whose element type is dynamic — use `offset` or the path selector API.
|
|
66
|
+
*/
|
|
67
|
+
readonly argument: (functionAbi: string | AbiFunction$1, arg: number | string) => CalldataSelector;
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/hydrate/builder.d.ts
|
|
71
|
+
type HydrateBuilderInput = HydrateCallLike[] | Payload.Calls;
|
|
72
|
+
/** Patch an `address` word in inner-call calldata at `selector` (wire: `address`). */
|
|
73
|
+
type HydrateDataAddressSpec = {
|
|
74
|
+
kind: "address";
|
|
75
|
+
callIndex: number;
|
|
76
|
+
selector: CalldataSelector | PayloadSelector;
|
|
77
|
+
address: HydrateDataSource;
|
|
78
|
+
};
|
|
79
|
+
/** Patch a `uint256` with native balance for `address` (wire: `balance`). */
|
|
80
|
+
type HydrateDataBalanceSpec = {
|
|
81
|
+
kind: "balance";
|
|
82
|
+
callIndex: number;
|
|
83
|
+
selector: CalldataSelector | PayloadSelector;
|
|
84
|
+
address: HydrateDataSource;
|
|
85
|
+
};
|
|
86
|
+
/** Patch a `uint256` with `IERC20(token).balanceOf(holder)` (wire: `erc20Balance`, holder in `address`). */
|
|
87
|
+
type HydrateDataErc20BalanceSpec = {
|
|
88
|
+
kind: "erc20Balance";
|
|
89
|
+
callIndex: number;
|
|
90
|
+
selector: CalldataSelector | PayloadSelector;
|
|
91
|
+
token: Address.Address;
|
|
92
|
+
address: HydrateDataSource;
|
|
93
|
+
};
|
|
94
|
+
/** Patch a `uint256` with `IERC20(token).allowance(owner, spender)` (wire: `erc20Allowance`). */
|
|
95
|
+
type HydrateDataErc20AllowanceSpec = {
|
|
96
|
+
kind: "erc20Allowance";
|
|
97
|
+
callIndex: number;
|
|
98
|
+
selector: CalldataSelector | PayloadSelector;
|
|
99
|
+
address: HydrateDataSource;
|
|
100
|
+
token: Address.Address;
|
|
101
|
+
spender: HydrateDataSource;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Calldata patch for one inner call: includes `callIndex` for the builder.
|
|
105
|
+
* Each encoded hydrate command omits `callIndex`; {@link HydrateBuilder.build}
|
|
106
|
+
* prefixes it once per section.
|
|
107
|
+
*/
|
|
108
|
+
type HydrateDataSpec = HydrateDataAddressSpec | HydrateDataBalanceSpec | HydrateDataErc20BalanceSpec | HydrateDataErc20AllowanceSpec;
|
|
109
|
+
/** One explicit selector-based patch when {@link HydrateCallData} is an array (no `callIndex`). */
|
|
110
|
+
type HydrateCalldataPatch = Omit<HydrateDataAddressSpec, "callIndex"> | Omit<HydrateDataBalanceSpec, "callIndex"> | Omit<HydrateDataErc20BalanceSpec, "callIndex"> | Omit<HydrateDataErc20AllowanceSpec, "callIndex">;
|
|
111
|
+
/** Per-argument hydration for {@link HydrateBuilder.hydrateCall} (no `callIndex` / selector). */
|
|
112
|
+
type HydrateAbiArgSpec = {
|
|
113
|
+
kind: "address";
|
|
114
|
+
address: HydrateDataSource;
|
|
115
|
+
} | {
|
|
116
|
+
kind: "balance";
|
|
117
|
+
address: HydrateDataSource;
|
|
118
|
+
} | {
|
|
119
|
+
kind: "erc20Balance";
|
|
120
|
+
token: Address.Address;
|
|
121
|
+
address: HydrateDataSource;
|
|
122
|
+
} | {
|
|
123
|
+
kind: "erc20Allowance";
|
|
124
|
+
address: HydrateDataSource;
|
|
125
|
+
token: Address.Address;
|
|
126
|
+
spender: HydrateDataSource;
|
|
127
|
+
};
|
|
128
|
+
/** ABI-driven calldata patches: function + argument names → {@link HydrateAbiArgSpec}. */
|
|
129
|
+
type HydrateAbiCalldataPatch = {
|
|
130
|
+
/** Function signature string or `AbiFunction` from `ox`. */function: string | AbiFunction$1;
|
|
131
|
+
args: Record<string, HydrateAbiArgSpec>;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* `hydrateCall` `data`: either ABI argument patches, or an ordered list of explicit
|
|
135
|
+
* selector patches (offsets, {@link HydrateSelector.path}, etc.).
|
|
136
|
+
*/
|
|
137
|
+
type HydrateCallData = HydrateAbiCalldataPatch | ReadonlyArray<HydrateCalldataPatch>;
|
|
138
|
+
/** Parameters for {@link HydrateBuilder.hydrateCall}. */
|
|
139
|
+
type HydrateCallParams = {
|
|
140
|
+
callIndex: number;
|
|
141
|
+
data?: HydrateCallData;
|
|
142
|
+
to?: HydrateDataSource;
|
|
143
|
+
value?: HydrateDataSource;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Builds HydrateProxy `hydratePayload` bytes from calldata selectors, without
|
|
147
|
+
* hand-encoding command flags or offsets. Sections are emitted in ascending
|
|
148
|
+
* call index, matching HydrateProxy execution order.
|
|
149
|
+
*
|
|
150
|
+
* Create instances with {@link HydrateBuilder.from}. Use {@link HydrateBuilder.hydrateCall}
|
|
151
|
+
* for all hydrations (`data` as ABI args or explicit patch list, `to`, `value`).
|
|
152
|
+
*/
|
|
153
|
+
declare class HydrateBuilder {
|
|
154
|
+
private readonly calls;
|
|
155
|
+
private readonly byCall;
|
|
156
|
+
/**
|
|
157
|
+
* @param callsInput Ordered `{ data }` entries (array index = packed call
|
|
158
|
+
* index), or v3 `Payload.Calls` (only each `call.data` is used).
|
|
159
|
+
*/
|
|
160
|
+
private constructor();
|
|
161
|
+
/**
|
|
162
|
+
* Start a builder from ordered `{ data }` entries (index = packed call index),
|
|
163
|
+
* or from v3 `Payload.Calls` (only each `call.data` is used).
|
|
164
|
+
*/
|
|
165
|
+
static from(callsInput: HydrateBuilderInput): HydrateBuilder;
|
|
166
|
+
private data;
|
|
167
|
+
/**
|
|
168
|
+
* Queue hydrations for one packed call. `data` is either ABI `function` + `args`,
|
|
169
|
+
* or an ordered list of explicit selector patches; optional `to` / `value`.
|
|
170
|
+
*/
|
|
171
|
+
hydrateCall(params: HydrateCallParams): this;
|
|
172
|
+
private to;
|
|
173
|
+
private value;
|
|
174
|
+
private appendCommand;
|
|
175
|
+
/** Resolve `selector` to a single byte range on `callIndex`, with bounds checks. */
|
|
176
|
+
private resolveSelector;
|
|
177
|
+
/** Resolve `selector` for `callIndex`; ensures size is 20 or 32 bytes. */
|
|
178
|
+
private resolveAddressSelector;
|
|
179
|
+
/** Resolve `selector` for `callIndex`; ensures a 32-byte word within calldata. */
|
|
180
|
+
private resolveUint256Selector;
|
|
181
|
+
/** Ensures selector targets 20- or 32-byte address encoding. */
|
|
182
|
+
private assertAddressSelector;
|
|
183
|
+
/** Ensures selector spans a full 32-byte ABI word. */
|
|
184
|
+
private assertUint256Selector;
|
|
185
|
+
/** Ensures selector fits within the call’s calldata buffer. */
|
|
186
|
+
private assertSelectorBounds;
|
|
187
|
+
/** Ensures `index` is a valid uint8 and within `calls.length`. */
|
|
188
|
+
private assertCallIndex;
|
|
189
|
+
/**
|
|
190
|
+
* Concatenate all sections: per call index, `[tindex][commands…][0x00]`.
|
|
191
|
+
* Returns empty bytes when there are no commands.
|
|
192
|
+
*/
|
|
193
|
+
build(): Bytes.Bytes;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
export { type ByteRange, type CalldataSelector, type DecodeHydrateExecuteAndSweepCalldataResult, type DecodeHydrateExecuteCalldataResult, type EncodeHydrateExecuteAndSweepCalldataParams, type EncodeHydrateExecuteCalldataParams, type EncodeHydrateExecuteCalldataWithPacked, type EncodeHydrateExecuteCalldataWithPayload, type EncodeHydrateExecuteCalldataWithSingleCall, type ExplicitHydrateDataSource, HYDRATE_PROXY_ADDRESS, type HydrateAbiArgSpec, type HydrateAbiCalldataPatch, HydrateBuilder, type HydrateCallData, type HydrateCallLike, type HydrateCallParams, type HydrateCalldataPatch, type HydrateDataSource, type HydrateDataSpec, HydrateSelector, HydrateSource, type HydrateTypeData, type PayloadSelector, type RuntimeHydrateDataSource, createHydratePayload, decodeHydrateExecuteAndSweepCalldata, decodeHydrateExecuteCalldata, encodeHydrateExecuteAndSweepCalldata, encodeHydrateExecuteCalldata, encodeMulticallHydrateExecute, hydrateFunctionsAbi };
|
package/dist/hydrate/index.js
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { HydrateSource as a } from "./source.js";
|
|
3
|
-
import { HydrateSelector as o } from "./selectors.js";
|
|
4
|
-
import { HydrateBuilder as l } from "./builder.js";
|
|
5
|
-
import { decodeHydrateExecuteAndSweepCalldata as y, decodeHydrateExecuteCalldata as i, encodeHydrateExecuteAndSweepCalldata as H, encodeHydrateExecuteCalldata as p, hydrateFunctionsAbi as u } from "./encodeExecute.js";
|
|
6
|
-
import { createHydratePayload as E, encodeMulticallHydrateExecute as f } from "./multicall.js";
|
|
7
|
-
export {
|
|
8
|
-
t as HYDRATE_PROXY_ADDRESS,
|
|
9
|
-
l as HydrateBuilder,
|
|
10
|
-
o as HydrateSelector,
|
|
11
|
-
a as HydrateSource,
|
|
12
|
-
E as createHydratePayload,
|
|
13
|
-
y as decodeHydrateExecuteAndSweepCalldata,
|
|
14
|
-
i as decodeHydrateExecuteCalldata,
|
|
15
|
-
H as encodeHydrateExecuteAndSweepCalldata,
|
|
16
|
-
p as encodeHydrateExecuteCalldata,
|
|
17
|
-
f as encodeMulticallHydrateExecute,
|
|
18
|
-
u as hydrateFunctionsAbi
|
|
19
|
-
};
|
|
1
|
+
import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"../hydrate-QyWqQfec.js";export{n as HYDRATE_PROXY_ADDRESS,t as HydrateBuilder,i as HydrateSelector,u as HydrateSource,l as createHydratePayload,s as decodeHydrateExecuteAndSweepCalldata,r as decodeHydrateExecuteCalldata,e as encodeHydrateExecuteAndSweepCalldata,o as encodeHydrateExecuteCalldata,a as encodeMulticallHydrateExecute,c as hydrateFunctionsAbi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./defineProperty-BbfpZ9Tg.js";import{Payload as t}from"@0xsequence/wallet-primitives";import{encodeFunctionData as n,erc20Abi as r,zeroAddress as i}from"viem";import{AbiFunction as a,Address as o,Bytes as s,Hex as c}from"ox";var l=class extends Error{constructor(t,n,r){super(n,r===void 0?void 0:{cause:r}),e(this,`code`,void 0),this.name=`PlaceholderError`,this.code=t}};const u=114316045351081986197366228715807272115562181347258027827511447451103061843027n,d=`0xd80d3a37a85094663c36c062e5ef689f2bf54fca`;function f(e,t){let n=t.toString(16).padStart(64,`0`),r=s.fromHex(`0x${n}`),i=s.fromHex(e),a=[];for(let e=0;e+32<=i.length;e++){let t=!0;for(let n=0;n<32;n++)if(i[e+n]!==r[n]){t=!1;break}t&&a.push(e)}return a}function p(e){return e>=4&&(e-4)%32==0}function m(e){let t=`000000000000000000000000${d.slice(2)}`.toLowerCase(),n=e.toLowerCase(),r=(n.length-2)/2,i=[];for(let e=4;e+32<=r;e+=32){let r=2+e*2;n.slice(r,r+64)===t&&i.push(e+12)}return i}function h(e,t){let n=g(e,t);if(n.length>1)throw new l(`MULTIPLE_AMOUNT_SLOTS`,`Ambiguous placeholder match; expected exactly one amount slot, found ${n.length}`);return n.length===1?n[0]:-1}function g(e,t){let n=t.toString(16).padStart(64,`0`).toLowerCase(),r=e.toLowerCase(),i=(r.length-2)/2,a=[];for(let e=4;e+32<=i;e+=32){let t=2+e*2;r.slice(t,t+64)===n&&a.push(e)}if(a.length===0){let n=f(e,t);if(n.some(e=>!p(e)))throw new l(`INVALID_AMOUNT_OFFSET`,`Invalid placeholder offset ${n.find(e=>!p(e))}; expected a 32-byte ABI word offset`)}return a}function _(e,t){if(t<=0n)return null;if(t===114316045351081986197366228715807272115562181347258027827511447451103061843027n)return e;let n=g(e,t);if(n.length===0)return null;let r=u.toString(16).padStart(64,`0`),i=e;for(let e of n){let t=2+e*2;i=i.slice(0,t)+r+i.slice(t+64)}return i}function v(e){return!e||e===`0x`||!c.validate(e,{strict:!0})?!1:g(e,u).length>0}function y(e,t){if(!e||e===`0x`)return e;if(!t||t===``)return console.warn(`replacePlaceholderInCalldata: Amount is empty, returning original calldata`),e;let n;try{n=BigInt(t)}catch(n){return console.warn(`replacePlaceholderInCalldata: Invalid amount "${t}", returning original calldata`,n),e}if(n<0n)return console.warn(`replacePlaceholderInCalldata: Amount cannot be negative (${t}), returning original calldata`),e;if(n>BigInt(`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`))return console.warn(`replacePlaceholderInCalldata: Amount exceeds uint256 max (${t}), returning original calldata`),e;let r=n.toString(16).padStart(64,`0`),i=g(e,u);if(i.length===0)return e;let a=s.fromHex(e),o=s.fromHex(`0x${r}`);for(let e of i)a.set(o,e);return s.toHex(a)}const b=o.from(`0x000000004f702C8398e158108937814d074cD74b`),x={self(){return`self`},msgSender(){return`msg.sender`},txOrigin(){return`tx.origin`},address(e){if(e===`self`||e===`msg.sender`||e===`tx.origin`)throw Error(`HydrateSource.address() requires an explicit 0x address or HydrateSource.self().`);return o.assert(e),e}};function S(e){if(typeof e==`string`){let t=a.from(e);if(t.type!==`function`)throw Error(`Expected function ABI signature`);return t}return e}function C(e,t){if(typeof t==`number`){if(!Number.isInteger(t)||t<0||t>=e.length)throw Error(`Invalid argument index ${t} for function with ${e.length} inputs`);return t}let n=e.findIndex(e=>e.name===t);if(n<0)throw Error(`Argument '${t}' not found in function inputs`);return n}function w(e,t){let n=e[t]?.type;if(!n)throw Error(`Input at index ${t} has no ABI type`);return n}function T(e,t){let n=e.slice(t,t+32);if(n.length!==32)throw Error(`Expected 32-byte word`);return s.toBigInt(n)}function E(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function D(e){let{type:t}=e;if(t===`string`||t===`bytes`||t.endsWith(`[]`))return!0;if(t===`tuple`)return e.components?.some(D)??!1;let n=E(t);return!!(n&&D({...e,type:n[1]}))}function O(e){if(D(e))return 1;if(e.type===`tuple`){let t=e.components;if(!t?.length)throw Error(`tuple ABI parameter missing components`);let n=0;for(let e of t)n+=O(e);return n}let t=E(e.type);if(t){let[n,r]=t,i=O({...e,type:r});return n===null?1:i*n}return 1}function k(e,t){let n=e.inputs,r=n[t];if(!r)throw Error(`Argument index ${t} out of bounds`);if(D(r))throw Error(`Argument ${t} is dynamic; no static slot`);let i=0;for(let e=0;e<t;e++){let t=n[e];if(!t)throw Error(`Unexpected missing ABI input`);i+=O(t)}let a=O(r);return{start:4+i*32,length:a*32}}function A(e,t,n){let r=t.inputs,i=r[n];if(!i)throw Error(`Argument index ${n} out of bounds`);if(i.type!==`bytes`&&i.type!==`string`)throw Error(`Argument ${n} must be bytes or string`);let a=0;for(let e=0;e<n;e++){let t=r[e];if(!t)throw Error(`Unexpected missing ABI input`);a+=O(t)}let o=4+a*32;if(o+32>e.length)throw Error(`Calldata too short`);let s=Number(T(e,o));if(!Number.isInteger(s)||s<0)throw Error(`Invalid dynamic offset: ${s}`);let c=4+s;if(c+32>e.length)throw Error(`Calldata too short for tail`);let l=Number(T(e,c));if(!Number.isInteger(l)||l<0)throw Error(`Invalid dynamic data length: ${l}`);let u=c+32;if(u+l>e.length)throw Error(`Dynamic bytes data out of bounds`);return{start:u,length:l}}function j(e){let t=0;if(e.length<1)throw Error(`Invalid packed data: missing globalFlag`);let n=s.toNumber(e.slice(t,t+1));t+=1,(n&1)!=1&&(t+=20),t+=n>>1&7;let r=1;if((n&16)!=16){let i=(n&32)==32?2:1;if(t+i>e.length)throw Error(`Invalid packed data: not enough bytes for callsCount`);r=s.toNumber(e.slice(t,t+i)),t+=i}let i=[];for(let n=0;n<r;n++){if(t+1>e.length)throw Error(`Invalid packed data: missing call flags`);let n=s.toNumber(e.slice(t,t+1));if(t+=1,(n&1)!=1&&(t+=20),(n&2)==2&&(t+=32),(n&4)==4){if(t+3>e.length)throw Error(`Invalid packed data: missing data length`);let n=s.toNumber(e.slice(t,t+3));if(t+=3,t+n>e.length)throw Error(`Invalid packed data: call data out of bounds`);i.push({start:t,len:n}),t+=n}else i.push({start:-1,len:0});if((n&8)==8&&(t+=32),t>e.length)throw Error(`Invalid packed data: overflow`)}return{globalFlag:n,numCalls:r,callData:i}}function M(e,t){let n=e[t.callIndex]?.data;if(!n||!c.validate(n))throw Error(`Invalid calldata at call index ${t.callIndex}`);let r=s.fromHex(n);if(t.offset<0||t.size<0||t.offset+t.size>r.length)throw Error(`Range out of bounds for call ${t.callIndex}`);return r.slice(t.offset,t.offset+t.size)}var N=class{constructor(t){e(this,`steps`,void 0),this.steps=t}resolve(e){let t={ranges:[]};for(let n of this.steps)t=n.apply(e,t);if(t.ranges.length===0)throw Error(`Path resolved to empty ranges`);return t.ranges}toString(){return`path(${this.steps.map(e=>e.description).join(` -> `)})`}},ee=class{constructor(){e(this,`steps`,[])}callData(e){if(!Number.isInteger(e)||e<0)throw Error(`Invalid call index: ${e}`);return this.steps.push({description:`calldata(${e})`,apply(t){let n=t[e]?.data;if(!n||!c.validate(n))throw Error(`Call ${e} has invalid calldata`);return{ranges:[{callIndex:e,offset:0,size:s.fromHex(n).length}]}}}),this}slice(e,t){return this.steps.push({description:`slice(${e},${t})`,apply(n,r){if(r.ranges.length===0)throw Error(`slice() has no active ranges`);return{ranges:r.ranges.map(n=>{if(e<0||t<0||e+t>n.size)throw Error(`slice() out of bounds`);return{callIndex:n.callIndex,offset:n.offset+e,size:t}})}}}),this}abi(e){let t=S(e);return this.steps.push({description:`abi(${t.name})`,apply(e,n){if(n.ranges.length===0)throw Error(`abi() has no active ranges`);let r=a.getSelector(t);for(let i of n.ranges){let n=M(e,i);if(n.length<4||s.toHex(n.slice(0,4)).toLowerCase()!==r.toLowerCase())throw Error(`ABI selector mismatch for ${t.name}`)}return{ranges:n.ranges,method:t}}}),this}argSlot(e){return this.steps.push({description:`argslot(${String(e)})`,apply(t,n){if(!n.method)throw Error(`argSlot() requires abi() binding`);let r=n.method.inputs,i=C(r,e),{start:a,length:o}=k(n.method,i);return{ranges:n.ranges.map(e=>{if(a+o>e.size)throw Error(`argSlot() out of bounds`);return{callIndex:e.callIndex,offset:e.offset+a,size:o}})}}}),this}argBytesData(e){return this.steps.push({description:`argbytes(${String(e)})`,apply(t,n){if(!n.method)throw Error(`argBytesData() requires abi() binding`);let r=n.method.inputs,i=C(r,e);return{ranges:n.ranges.map(e=>{let{start:r,length:a}=A(M(t,e),n.method,i);return{callIndex:e.callIndex,offset:e.offset+r,size:a}})}}}),this}encodedCallsPayload(){return this.steps.push({description:`encodedcallspayload()`,apply(e,t){if(t.ranges.length===0)throw Error(`encodedCallsPayload() has no active ranges`);return{ranges:t.ranges}}}),this}encodedCallData(e){return this.steps.push({description:`encodedcalldata(${e})`,apply(t,n){if(!Number.isInteger(e)||e<0)throw Error(`Invalid encoded call index`);if(n.ranges.length===0)throw Error(`encodedCallData() has no active ranges`);return{ranges:n.ranges.map(n=>{let r=j(M(t,n));if(e>=r.callData.length)throw Error(`encodedCallData(${e}) out of range`);let i=r.callData[e];if(!i||i.start<0)throw Error(`encodedCallData(${e}) has no calldata`);return{callIndex:n.callIndex,offset:n.offset+i.start,size:i.len}})}}}),this}asSelector(){return new N([...this.steps])}};const P={offset(e,t){if(!Number.isInteger(e)||e<0)throw Error(`Invalid calldata offset: ${e}`);if(!Number.isInteger(t)||t<=0)throw Error(`Invalid selector size: ${t}`);return{offset:e,size:t}},range(e,t,n){if(!Number.isInteger(e)||e<0)throw Error(`Invalid call index: ${e}`);let r=this.offset(t,n);return{resolve(t){let n=t[e]?.data;if(!n||!c.validate(n))throw Error(`Invalid calldata at call index ${e}`);let i=s.fromHex(n).length;if(r.offset+r.size>i)throw Error(`Range out of bounds for call ${e}`);return[{callIndex:e,offset:r.offset,size:r.size}]},toString(){return`range(${e},${t},${n})`}}},path(){return new ee},argument(e,t){let n=S(e),r=n.inputs,i=C(r,t),a=r[i];if(!a)throw Error(`Argument index ${i} out of bounds`);if(D(a)){let e=w(r,i);throw Error(`Argument '${String(t)}' has dynamic type '${e}'. Use HydrateSelector.offset(...) or path-based selectors.`)}let{start:o,length:s}=k(n,i);return{offset:o,size:s}}};function F(e){if(e===`self`)return 0;if(e===`msg.sender`)return 1;if(e===`tx.origin`)return 2;if(o.validate(e))return 3;throw Error(`Invalid hydrate data source`)}function I(e){if(!Number.isInteger(e)||e<0||e>65535)throw Error(`Calldata offset out of uint16 range: ${e}`)}function L(e){return I(e),s.fromNumber(e,{size:2})}function R(e){return e.offset+e.size}function z(e){let t=0;if(e.type===`address`)t=16;else if(e.type===`balance`)t=32;else if(e.type===`erc20Balance`)t=48;else if(e.type===`erc20Allowance`)t=64;else if(e.type===`to`)t=80;else if(e.type===`value`)t=96;else throw Error(`Unknown hydrate type`);t|=F(e.address);let n=[s.fromNumber(t,{size:1})];if(o.validate(e.address)&&n.push(s.fromHex(e.address)),e.type===`address`||e.type===`balance`||e.type===`erc20Balance`||e.type===`erc20Allowance`){if(n.push(L(e.calldataOffset)),e.type===`erc20Balance`)n.push(s.fromHex(e.token));else if(e.type===`erc20Allowance`){n.push(s.fromHex(e.token));let t=F(e.spender);n.push(s.fromNumber(t,{size:1})),o.validate(e.spender)&&n.push(s.fromHex(e.spender))}}return s.concat(...n)}function B(e){return!Array.isArray(e)}function V(e){if(typeof e==`string`){let t=a.from(e);if(t.type!==`function`)throw Error(`Expected function ABI signature`);return t}return e}function H(e,t){if(typeof t==`number`){if(!Number.isInteger(t)||t<0||t>=e.length)throw Error(`Invalid argument index ${t} for function with ${e.length} inputs`);return t}let n=e.findIndex(e=>e.name===t);if(n<0)throw Error(`Argument '${t}' not found in function inputs`);return n}function U(e,t,n){let r=t.type;if(n.kind===`address`){if(r!==`address`)throw Error(`hydrateCall(): cannot use kind "address" for argument "${e}"; ABI type is ${r}`);return}if(!/^(u?int\d+|uint|int)$/.test(r))throw Error(`hydrateCall(): cannot use kind "${n.kind}" for argument "${e}"; expected a uint/int ABI head word, got ${r}`)}var W=class t{constructor(t){e(this,`calls`,void 0),e(this,`byCall`,new Map),this.calls=Array.isArray(t)?t:t.calls.map(e=>({data:e.data??`0x`}))}static from(e){return new t(e)}data(e){let{callIndex:t}=e;switch(this.assertCallIndex(t),e.kind){case`address`:{let{selector:n,address:r}=e,i=this.resolveAddressSelector(t,n),a=i.size===32?i.offset+12:i.offset;this.appendCommand(t,z({type:`address`,address:r,calldataOffset:a}));break}case`balance`:{let{selector:n,address:r}=e,i=this.resolveUint256Selector(t,n);this.appendCommand(t,z({type:`balance`,address:r,calldataOffset:i.offset}));break}case`erc20Balance`:{let{selector:n,token:r,address:i}=e,a=this.resolveUint256Selector(t,n);o.assert(r),this.appendCommand(t,z({type:`erc20Balance`,token:r,address:i,calldataOffset:a.offset}));break}case`erc20Allowance`:{let{selector:n,address:r,token:i,spender:a}=e,s=this.resolveUint256Selector(t,n);o.assert(i),this.appendCommand(t,z({type:`erc20Allowance`,address:r,token:i,spender:a,calldataOffset:s.offset}));break}}return this}hydrateCall(e){let{callIndex:t,data:n,to:r,value:i}=e,a=!1;if(n!==void 0)if(B(n)){if(Object.keys(n.args).length===0)throw Error(`hydrateCall(): data.args must not be empty`);a=!0}else{if(n.length===0)throw Error(`hydrateCall(): data patch list must not be empty`);a=!0}let o=r!==void 0,s=i!==void 0;if(!a&&!o&&!s)throw Error(`hydrateCall() requires at least one of data, to, or value`);if(this.assertCallIndex(t),n!==void 0)if(B(n)){let{function:e,args:r}=n,i=Object.entries(r),a=V(e),o=a.inputs,s=i.map(([e,t])=>{let n=H(o,e),r=o[n];if(!r)throw Error(`Argument index ${n} out of bounds`);return U(e,r,t),{spec:t,selector:P.argument(a,e)}});s.sort((e,t)=>e.selector.offset-t.selector.offset);for(let{spec:e,selector:n}of s)this.data({...e,callIndex:t,selector:n})}else for(let e of n)this.data({...e,callIndex:t});return o&&this.to({callIndex:t,address:r}),s&&this.value({callIndex:t,address:i}),this}to(e){let{callIndex:t,address:n}=e;return this.assertCallIndex(t),this.appendCommand(t,z({type:`to`,address:n})),this}value(e){let{callIndex:t,address:n}=e;return this.assertCallIndex(t),this.appendCommand(t,z({type:`value`,address:n})),this}appendCommand(e,t){let n=this.byCall.get(e)??[];n.push(t),this.byCall.set(e,n)}resolveSelector(e,t){if(`resolve`in t){let n=t.resolve(this.calls);if(n.length!==1)throw Error(`Selector must resolve exactly one range for call ${e}, got ${n.length}`);let r=n[0];if(!r||r.callIndex!==e)throw Error(`Selector resolved to call ${r?.callIndex??`unknown`}; expected ${e}`);return this.assertSelectorBounds(e,{offset:r.offset,size:r.size}),r}return this.assertSelectorBounds(e,t),{callIndex:e,offset:t.offset,size:t.size}}resolveAddressSelector(e,t){let n=this.resolveSelector(e,t);return this.assertAddressSelector(e,{offset:n.offset,size:n.size}),n}resolveUint256Selector(e,t){let n=this.resolveSelector(e,t);return this.assertUint256Selector(e,{offset:n.offset,size:n.size}),n}assertAddressSelector(e,t){if(t.size!==20&&t.size!==32)throw Error(`Address selector must resolve to 20 or 32 bytes, got ${t.size}`);this.assertSelectorBounds(e,t)}assertUint256Selector(e,t){if(t.size!==32)throw Error(`Uint256 selector must resolve to 32 bytes, got ${t.size}`);this.assertSelectorBounds(e,t)}assertSelectorBounds(e,t){let n=this.calls[e]?.data;if(!n||!c.validate(n))throw Error(`Invalid calldata at call index ${e}`);let r=s.fromHex(n).length;if(R(t)>r)throw Error(`Selector out of bounds for call ${e}: need ${R(t)} bytes, got ${r}`);I(t.offset)}assertCallIndex(e){if(!Number.isInteger(e)||e<0||e>255)throw Error(`Invalid call index ${e}; must be uint8`);if(e>=this.calls.length)throw Error(`Call index ${e} out of range (calls length ${this.calls.length})`)}build(){if(this.byCall.size===0)return s.from([]);let e=[],t=[...this.byCall.keys()].sort((e,t)=>e-t);for(let n of t){let t=this.byCall.get(n)??[];if(t.length!==0){e.push(s.fromNumber(n,{size:1}));for(let n of t)e.push(n);e.push(s.fromNumber(0,{size:1}))}}return e.length===0?s.from([]):s.concat(...e)}};const G=a.from(`function hydrateExecute(bytes packedPayload, bytes hydratePayload) payable`),K=a.from(`function hydrateExecuteAndSweep(bytes packedPayload, bytes hydratePayload, address sweepTarget, address[] tokensToSweep, bool sweepNative) payable`),q=[G,K];function J(e){let n;if(`packedPayload`in e)n=c.from(e.packedPayload);else if(`target`in e){let r={type:`call`,space:0n,nonce:0n,calls:[{to:e.target,data:e.calldata,value:0n,gasLimit:0n,delegateCall:!1,onlyFallback:!1,behaviorOnError:`revert`}]};n=s.toHex(t.encode(r))}else if(`payload`in e)n=s.toHex(t.encode(e.payload));else{let t=e,n=typeof t==`object`&&t&&!Array.isArray(t)&&!(t instanceof Uint8Array)?Object.keys(t).sort().join(`, `):String(t);throw Error(`encodeHydrateExecuteCalldata: invalid arguments. Expected exactly one of: \`{ packedPayload, hydratePayload }\`, \`{ target, calldata, hydratePayload }\`, or \`{ payload, hydratePayload }\`. Received keys: ${n}`)}return a.encodeData(G,[n,c.from(e.hydratePayload)])}function Y(e){return a.encodeData(K,[c.from(e.packedPayload),c.from(e.hydratePayload),e.sweepTarget,e.tokensToSweep,e.sweepNative])}function X(e){let[t,n]=a.decodeData(G,e);return{packedPayload:t,hydratePayload:n}}function Z(e){let[t,n,r,i,o]=a.decodeData(K,e);return{packedPayload:t,hydratePayload:n,sweepTarget:r,tokensToSweep:i,sweepNative:o}}const Q=`0x095ea7b3`;function te(e,t){let n=2+t*2,r=n+64,i=e.slice(0,n),a=e.slice(r);return`${i}${`0`.repeat(64)}${a}`}function ne(e){return e.length<138||e.slice(0,10).toLowerCase()!==Q?null:`0x${e.slice(34,74)}`}function re(e,t,n){let r=n.toLowerCase();for(let n=t+1;n<e.length;n++)if(e[n].to.toLowerCase()===r)return!0;return!1}function ie(e){let t=u.toString(16).padStart(64,`0`).toLowerCase(),n=d.slice(2).toLowerCase();for(let r=0;r<e.length;r++){let i=e[r].data.toLowerCase();if(i.includes(t))throw Error(`encodeMulticallHydrateExecute: call ${r} still contains an un-hydrated dynamic() amount sentinel after encoding.`);if(i.includes(n))throw Error(`encodeMulticallHydrateExecute: call ${r} still contains an un-hydrated or non-ABI-aligned self() address sentinel after encoding.`)}}function $(e,t){let n=[s.fromNumber(e,{size:1})];for(let e of t)n.push(z(e));return n.push(s.fromNumber(0)),s.concat(...n)}function ae({calls:e,token:t,sweepTarget:a}){let o=[],s=[],c=new Set,l=(e,t)=>`${e.toLowerCase()}::${t.toLowerCase()}`,d=new Set,f=!1,p=e=>{if(!e)return;let t=e.toLowerCase();if(t===i.toLowerCase()){f=!0;return}d.add(t)};for(let t=0;t<e.length;t++){let a=e[t],d=a.data;if(a.dynamicAmountToken!==void 0&&a.dynamicAmountTokens!==void 0)throw Error(`encodeMulticallHydrateExecute: use either dynamicAmountToken or dynamicAmountTokens, not both.`);if(a.dynamicAmountToken?.toLowerCase()===i.toLowerCase())throw Error(`encodeMulticallHydrateExecute: dynamicAmountToken cannot be the zero address; dynamic amount hydration is ERC-20 balance based.`);if(a.dynamicAmountTokens?.length===0)throw Error(`encodeMulticallHydrateExecute: dynamicAmountTokens cannot be empty.`);for(let e of a.dynamicAmountTokens??[])if(e.toLowerCase()===i.toLowerCase())throw Error(`encodeMulticallHydrateExecute: dynamicAmountTokens cannot contain the zero address; dynamic amount hydration is ERC-20 balance based.`);let f=d.slice(0,10).toLowerCase()===Q,h=[],_=g(d,u);if(a.dynamicAmountTokens!==void 0&&a.dynamicAmountTokens.length!==_.length)throw Error(`encodeMulticallHydrateExecute: dynamicAmountTokens length must match the number of dynamic() amount sentinels.`);if(_.length>0){let i;if(a.dynamicAmountTokens!==void 0)i=[...a.dynamicAmountTokens];else{let e;if(a.dynamicAmountToken?e=a.dynamicAmountToken:f&&(e=a.to),!e)throw Error(`encodeMulticallHydrateExecute: call contains a dynamic() amount sentinel, but no hydration source could be resolved. Set dynamicAmountToken or dynamicAmountTokens.`);i=_.map(()=>e)}for(let e of _)d=te(d,e);for(let e of i)p(e);if(d.slice(0,10).toLowerCase()===Q&&_.includes(36)){let n=a.to.toLowerCase();if(i.some(e=>e.toLowerCase()!==n))throw Error(`encodeMulticallHydrateExecute: approve(spender, dynamic()) token source must match call.to.`);let r=ne(d);if(!r||!re(e,t,r))throw Error(`encodeMulticallHydrateExecute: approve(spender, dynamic()) must be followed by a call to spender in the same batch.`);c.add(l(a.to,r))}else{let e=new Map;for(let t of i)e.set(t.toLowerCase(),t);for(let t of e.values()){if(c.has(l(t,a.to)))continue;let e=n({abi:r,functionName:`approve`,args:[a.to,0n]}),i=o.length;o.push({to:t,data:e,value:0n,gasLimit:0n,delegateCall:!1,onlyFallback:!1,behaviorOnError:`revert`}),s.push({callIndex:i,datas:[{type:`erc20Balance`,token:t,calldataOffset:36,address:x.self()}]}),c.add(l(t,a.to))}}for(let e=0;e<_.length;e++)h.push({type:`erc20Balance`,token:i[e],calldataOffset:_[e],address:x.self()})}let v=m(d);if(v.length>0){let e=d;for(let t of v){let n=2+(t-12)*2;e=e.slice(0,n)+`0`.repeat(64)+e.slice(n+64)}d=e;for(let e of v)h.push({type:`address`,address:x.self(),calldataOffset:e})}if(a.hydrateEntries?.length){h.push(...a.hydrateEntries);for(let e of a.hydrateEntries)(e.type===`erc20Balance`||e.type===`erc20Allowance`)&&p(e.token)}if(f&&p(a.to),a.sweepTokens?.length)for(let e of a.sweepTokens)p(e);let y=o.length;o.push({to:a.to,data:d,value:BigInt(a.value??0),gasLimit:0n,delegateCall:!1,onlyFallback:!1,behaviorOnError:`revert`}),h.length>0&&s.push({callIndex:y,datas:h})}let h=se(s);ie(o),p(t);let _=t.toLowerCase()===i.toLowerCase();return Y({packedPayload:oe(o),hydratePayload:h,sweepTarget:a,tokensToSweep:[...d],sweepNative:_||f})}function oe(e){let n={type:`call`,space:0n,nonce:0n,calls:e};return s.toHex(t.encode(n))}function se(e){if(e.length===0)return`0x`;let t=e.map(e=>$(e.callIndex,e.datas));return s.toHex(s.concat(...t))}export{g as _,Y as a,W as c,b as d,l as f,h as g,v as h,X as i,P as l,d as m,ae as n,J as o,u as p,Z as r,q as s,$ as t,x as u,_ as v,y};
|