0xtrails 0.15.1 → 0.16.1
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 +63 -434
- package/dist/actions/actionBuilder.d.ts +10 -0
- package/dist/actions/actionBuilder.d.ts.map +1 -1
- package/dist/actions/actionBuilder.js +92 -80
- package/dist/actions/constants.d.ts +9 -53
- package/dist/actions/constants.d.ts.map +1 -1
- package/dist/actions/constants.js +10 -11
- package/dist/actions/custom-integrations/sushiswapV3/sushiswapV3.js +11 -11
- package/dist/actions/custom-integrations/uniswapV3/uniswapV3.js +11 -11
- package/dist/actions/destinationCalls.d.ts.map +1 -1
- package/dist/actions/destinationCalls.js +34 -27
- package/dist/actions/hooks/useEarnBalances.js +7 -7
- package/dist/actions/hooks/useEarnMarkets.js +4 -4
- package/dist/actions/hooks/useEarnProviders.js +4 -4
- package/dist/actions/hooks/useResolveActions.d.ts +2 -11
- package/dist/actions/hooks/useResolveActions.d.ts.map +1 -1
- package/dist/actions/hooks/useResolveActions.js +40 -222
- package/dist/actions/index.d.ts +6 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +35 -28
- package/dist/actions/resolveActions.d.ts +13 -0
- package/dist/actions/resolveActions.d.ts.map +1 -0
- package/dist/actions/resolveActions.js +267 -0
- package/dist/actions/resolvers.d.ts +2 -3
- package/dist/actions/resolvers.d.ts.map +1 -1
- package/dist/actions/resolvers.js +1 -1
- package/dist/actions/types.d.ts +16 -0
- package/dist/actions/types.d.ts.map +1 -1
- package/dist/actions/utils.d.ts +5 -5
- package/dist/actions/utils.d.ts.map +1 -1
- package/dist/actions/utils.js +124 -114
- package/dist/adapters/evmAdapter.d.ts +10 -0
- package/dist/adapters/evmAdapter.d.ts.map +1 -0
- package/dist/adapters/evmAdapter.js +28 -0
- package/dist/analytics.js +8 -8
- package/dist/chainRegistry.d.ts +6 -0
- package/dist/chainRegistry.d.ts.map +1 -0
- package/dist/chainRegistry.js +47 -0
- package/dist/chainResolution.d.ts +6 -0
- package/dist/chainResolution.d.ts.map +1 -0
- package/dist/chainResolution.js +53 -0
- package/dist/chainRpcClient.d.ts +8 -0
- package/dist/chainRpcClient.d.ts.map +1 -0
- package/dist/chainRpcClient.js +67 -0
- package/dist/chains.d.ts +5 -11
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +108 -208
- package/dist/config.d.ts +1 -30
- package/dist/config.d.ts.map +1 -1
- package/dist/configDefaults.d.ts +7 -0
- package/dist/configDefaults.d.ts.map +1 -0
- package/dist/configDefaults.js +9 -0
- package/dist/configStore.d.ts +31 -0
- package/dist/configStore.d.ts.map +1 -0
- package/dist/{config.js → configStore.js} +1 -1
- package/dist/constants.d.ts +2 -14
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +21 -31
- package/dist/contractConstants.d.ts +8 -0
- package/dist/contractConstants.d.ts.map +1 -0
- package/dist/contractConstants.js +9 -0
- package/dist/contractUtils.js +5 -5
- package/dist/ens.d.ts.map +1 -1
- package/dist/ens.js +78 -55
- package/dist/estimate.js +11 -11
- package/dist/fees.d.ts.map +1 -1
- package/dist/fees.js +40 -35
- package/dist/gasless.d.ts +5 -0
- package/dist/gasless.d.ts.map +1 -1
- package/dist/gasless.js +12 -12
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +63 -62
- package/dist/hooks/prepareTrailsSendTransactionDestination.js +1 -1
- package/dist/hooks/useAmountUsd.js +5 -5
- package/dist/hooks/useBluvoTokenList.d.ts +13 -0
- package/dist/hooks/useBluvoTokenList.d.ts.map +1 -0
- package/dist/hooks/useBluvoTokenList.js +57 -0
- package/dist/hooks/useCheckout.js +6 -6
- package/dist/hooks/useCombinedHistory.d.ts.map +1 -1
- package/dist/hooks/useCombinedHistory.js +89 -81
- package/dist/hooks/useCustomTokenSearch.d.ts +4 -1
- package/dist/hooks/useCustomTokenSearch.d.ts.map +1 -1
- package/dist/hooks/useCustomTokenSearch.js +106 -108
- package/dist/hooks/useDefaultDestinationToken.js +5 -5
- package/dist/hooks/useDefaultOriginToken.d.ts.map +1 -1
- package/dist/hooks/useDefaultOriginToken.js +73 -80
- package/dist/hooks/useDepositMonitor.js +15 -15
- package/dist/hooks/useDestinationSelectedToken.d.ts +8 -2
- package/dist/hooks/useDestinationSelectedToken.d.ts.map +1 -1
- package/dist/hooks/useDestinationSelectedToken.js +150 -116
- package/dist/hooks/useExchangeFundingSelection.d.ts +17 -0
- package/dist/hooks/useExchangeFundingSelection.d.ts.map +1 -0
- package/dist/hooks/useExchangeFundingSelection.js +25 -0
- package/dist/hooks/useExternalFundingReceiptSync.js +5 -5
- package/dist/hooks/useFiatSelectedCurrency.js +1 -1
- package/dist/hooks/useGetIntent.js +3 -3
- package/dist/hooks/useIntentReceiptBalances.js +6 -6
- package/dist/hooks/useIntentTransactionHistory.d.ts.map +1 -1
- package/dist/hooks/useIntentTransactionHistory.js +207 -182
- package/dist/hooks/useMeldTransactionHistory.js +5 -5
- package/dist/hooks/useMeldTransactionStatus.js +8 -8
- package/dist/hooks/useOnRampCountryDefaults.js +4 -4
- package/dist/hooks/useOnRampQuote.js +1 -1
- package/dist/hooks/useOriginSelectedToken.d.ts +5 -0
- package/dist/hooks/useOriginSelectedToken.d.ts.map +1 -1
- package/dist/hooks/useOriginSelectedToken.js +112 -46
- package/dist/hooks/usePayMessage.js +2 -2
- package/dist/hooks/useQuote.d.ts +37 -45
- package/dist/hooks/useQuote.d.ts.map +1 -1
- package/dist/hooks/useQuote.js +249 -254
- package/dist/hooks/useRecentChains.d.ts +7 -0
- package/dist/hooks/useRecentChains.d.ts.map +1 -0
- package/dist/hooks/useRecentChains.js +52 -0
- package/dist/hooks/useSelectedFundMethod.d.ts +31 -0
- package/dist/hooks/useSelectedFundMethod.d.ts.map +1 -1
- package/dist/hooks/useSelectedFundMethod.js +35 -26
- package/dist/hooks/useSelectedRecipient.d.ts.map +1 -1
- package/dist/hooks/useSelectedRecipient.js +21 -21
- package/dist/hooks/useSendForm.d.ts +8 -1
- package/dist/hooks/useSendForm.d.ts.map +1 -1
- package/dist/hooks/useSendForm.js +266 -256
- package/dist/hooks/useSwapState.d.ts +1 -1
- package/dist/hooks/useSwapState.d.ts.map +1 -1
- package/dist/hooks/useTokenList.d.ts +4 -1
- package/dist/hooks/useTokenList.d.ts.map +1 -1
- package/dist/hooks/useTokenList.js +350 -355
- package/dist/hooks/useTrailsSendTransaction.d.ts +9 -43
- package/dist/hooks/useTrailsSendTransaction.d.ts.map +1 -1
- package/dist/hooks/useTrailsSendTransaction.js +289 -306
- package/dist/hooks/useViewManager.d.ts +1 -1
- package/dist/hooks/useViewManager.d.ts.map +1 -1
- package/dist/hooks/useWalletConnectionContext.d.ts +6 -5
- package/dist/hooks/useWalletConnectionContext.d.ts.map +1 -1
- package/dist/hooks/useWalletConnectionContext.js +3 -3
- package/dist/hydrate/multicall.d.ts.map +1 -1
- package/dist/hydrate/multicall.js +127 -91
- package/dist/index.d.ts +77 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +307 -257
- package/dist/indexerClient.d.ts.map +1 -1
- package/dist/indexerClient.js +23 -25
- package/dist/intentProtocolResolver.js +2 -2
- package/dist/intents.d.ts +3 -2
- package/dist/intents.d.ts.map +1 -1
- package/dist/intents.js +58 -63
- package/dist/logger/index.js +1 -1
- package/dist/meld/components/MeldCountriesList.js +1 -1
- package/dist/meld/components/MeldFundMethods.js +7 -7
- package/dist/meld/components/MeldProvidersList.js +1 -1
- package/dist/meld/components/MeldTokensList.js +9 -9
- package/dist/meld/components/SimpleHeader.js +4 -4
- package/dist/meld/utils/meld.js +2 -2
- package/dist/offlineRecovery.d.ts.map +1 -1
- package/dist/offlineRecovery.js +107 -112
- package/dist/onramp/MeshConnectIframe.js +1 -1
- package/dist/onramp/SendFromExchangeButton.js +1 -1
- package/dist/onramp/TrailsOnRampProvider.d.ts +7 -0
- package/dist/onramp/TrailsOnRampProvider.d.ts.map +1 -1
- package/dist/onramp/bluvo/hooks/useBluvoFundingSelection.d.ts +12 -0
- package/dist/onramp/bluvo/hooks/useBluvoFundingSelection.d.ts.map +1 -0
- package/dist/onramp/bluvo/hooks/useBluvoFundingSelection.js +18 -0
- package/dist/onramp/mesh/components/MeshExchangeSelection.js +5 -5
- package/dist/onramp/mesh/hooks/useMeshSelectedTokenBalance.js +4 -4
- package/dist/onramp/mesh/hooks/useMeshSessionAccountBalance.js +1 -1
- package/dist/onramp/trailsOnramp.d.ts.map +1 -1
- package/dist/onramp/trailsOnramp.js +22 -18
- package/dist/onrampClient.d.ts.map +1 -1
- package/dist/onrampClient.js +21 -17
- package/dist/package.js +30 -28
- package/dist/prepareSend.d.ts +4 -2
- package/dist/prepareSend.d.ts.map +1 -1
- package/dist/prepareSend.js +32 -31
- package/dist/query/QueryProvider.d.ts +9 -0
- package/dist/query/QueryProvider.d.ts.map +1 -0
- package/dist/query/QueryProvider.js +13 -0
- package/dist/query/balance.fetchers.d.ts.map +1 -1
- package/dist/query/balance.fetchers.js +16 -16
- package/dist/query/balance.hooks.js +9 -9
- package/dist/query/balance.queries.js +1 -1
- package/dist/query/chains.hooks.d.ts +3 -2
- package/dist/query/chains.hooks.d.ts.map +1 -1
- package/dist/query/chains.hooks.js +25 -24
- package/dist/query/fiat.hooks.js +5 -5
- package/dist/query/geo.hooks.js +1 -1
- package/dist/query/geo.queries.js +1 -1
- package/dist/query/intentProtocol.queries.js +1 -1
- package/dist/query/persister.d.ts +0 -1
- package/dist/query/persister.d.ts.map +1 -1
- package/dist/query/persister.js +5 -5
- package/dist/query/price.hooks.js +4 -4
- package/dist/query/price.queries.js +1 -1
- package/dist/query/serialization.d.ts +3 -0
- package/dist/query/serialization.d.ts.map +1 -0
- package/dist/query/serialization.js +17 -0
- package/dist/query/token.fetchers.d.ts +13 -0
- package/dist/query/token.fetchers.d.ts.map +1 -0
- package/dist/query/token.fetchers.js +6 -0
- package/dist/{hooks/useTokens.d.ts → query/token.hooks.d.ts} +14 -25
- package/dist/query/token.hooks.d.ts.map +1 -0
- package/dist/query/token.hooks.js +68 -0
- package/dist/query/token.queries.d.ts +67 -0
- package/dist/query/token.queries.d.ts.map +1 -0
- package/dist/query/token.queries.js +144 -0
- package/dist/quoteError.d.ts +22 -0
- package/dist/quoteError.d.ts.map +1 -0
- package/dist/quoteError.js +9 -0
- package/dist/recover.d.ts +10 -3
- package/dist/recover.d.ts.map +1 -1
- package/dist/recover.js +401 -339
- package/dist/smartContractWallet.d.ts +8 -0
- package/dist/smartContractWallet.d.ts.map +1 -0
- package/dist/smartContractWallet.js +11 -0
- package/dist/tokenRegistry.d.ts +50 -0
- package/dist/tokenRegistry.d.ts.map +1 -0
- package/dist/tokenRegistry.js +589 -0
- package/dist/tokenTypes.d.ts +29 -0
- package/dist/tokenTypes.d.ts.map +1 -0
- package/dist/tokens.d.ts +10 -44
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +269 -798
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts +3 -2
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts +3 -2
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.js +52 -49
- package/dist/transactionIntent/deposits/standardDeposit.d.ts +3 -2
- package/dist/transactionIntent/deposits/standardDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/standardDeposit.js +2 -2
- package/dist/transactionIntent/handlers/intentHandler.d.ts +3 -2
- package/dist/transactionIntent/handlers/intentHandler.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/intentHandler.js +193 -193
- package/dist/transactionIntent/quote/feeExtractors.d.ts +2 -1
- package/dist/transactionIntent/quote/feeExtractors.d.ts.map +1 -1
- package/dist/transactionIntent/quote/feeExtractors.js +31 -20
- package/dist/transactionIntent/quote/normalizeQuote.js +43 -43
- package/dist/transactionIntent/quote/quoteHelpers.d.ts +3 -3
- package/dist/transactionIntent/quote/quoteHelpers.d.ts.map +1 -1
- package/dist/transactionIntent/quote/quoteHelpers.js +35 -32
- package/dist/transactionIntent/types.d.ts +9 -6
- package/dist/transactionIntent/types.d.ts.map +1 -1
- package/dist/transactionIntent/types.js +24 -7
- package/dist/transactions.d.ts +5 -0
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +8 -8
- package/dist/umd/trails.min.js +767 -1112
- package/dist/utils/tokenResolution.d.ts +19 -0
- package/dist/utils/tokenResolution.d.ts.map +1 -0
- package/dist/utils/tokenResolution.js +53 -0
- package/dist/widget/assets/components/Aave.d.ts +8 -0
- package/dist/widget/assets/components/Aave.d.ts.map +1 -0
- package/dist/widget/assets/components/Aave.js +29 -0
- package/dist/widget/assets/components/ExchangeIconBlack.d.ts +8 -0
- package/dist/widget/assets/components/ExchangeIconBlack.d.ts.map +1 -0
- package/dist/widget/assets/components/FundMethodCardBrands.d.ts +8 -0
- package/dist/widget/assets/components/FundMethodCardBrands.d.ts.map +1 -0
- package/dist/widget/assets/components/FundMethodCardBrands.js +49 -0
- package/dist/widget/assets/components/FundMethodExchangeBrands.d.ts +8 -0
- package/dist/widget/assets/components/FundMethodExchangeBrands.d.ts.map +1 -0
- package/dist/widget/assets/components/FundMethodExchangeBrands.js +37 -0
- package/dist/widget/assets/components/MetaMaskIconFox.d.ts +8 -0
- package/dist/widget/assets/components/MetaMaskIconFox.d.ts.map +1 -0
- package/dist/widget/assets/components/MetaMaskIconFoxWithMargins.d.ts +8 -0
- package/dist/widget/assets/components/MetaMaskIconFoxWithMargins.d.ts.map +1 -0
- package/dist/widget/assets/components/MetaMaskLogoBlack.d.ts +8 -0
- package/dist/widget/assets/components/MetaMaskLogoBlack.d.ts.map +1 -0
- package/dist/widget/assets/components/MetaMaskLogoWhite.d.ts +8 -0
- package/dist/widget/assets/components/MetaMaskLogoWhite.d.ts.map +1 -0
- package/dist/widget/assets/components/Morpho.d.ts +8 -0
- package/dist/widget/assets/components/Morpho.d.ts.map +1 -0
- package/dist/widget/assets/components/Morpho.js +51 -0
- package/dist/widget/assets/components/TrailsBlack.d.ts +8 -0
- package/dist/widget/assets/components/TrailsBlack.d.ts.map +1 -0
- package/dist/widget/assets/components/TrailsBlack.js +25 -0
- package/dist/widget/assets/components/TrailsWhite.d.ts +8 -0
- package/dist/widget/assets/components/TrailsWhite.d.ts.map +1 -0
- package/dist/widget/assets/components/TrailsWhite.js +25 -0
- package/dist/widget/assets/components/WalletChangeBlack.d.ts +8 -0
- package/dist/widget/assets/components/WalletChangeBlack.d.ts.map +1 -0
- package/dist/widget/assets/components/WalletConnectLogo.d.ts +8 -0
- package/dist/widget/assets/components/WalletConnectLogo.d.ts.map +1 -0
- package/dist/widget/assets/components/WalletConnectLogoBlack.d.ts +8 -0
- package/dist/widget/assets/components/WalletConnectLogoBlack.d.ts.map +1 -0
- package/dist/widget/assets/components/WalletConnectLogoBlue.d.ts +8 -0
- package/dist/widget/assets/components/WalletConnectLogoBlue.d.ts.map +1 -0
- package/dist/widget/assets/components/WalletConnectLogoWhite.d.ts +8 -0
- package/dist/widget/assets/components/WalletConnectLogoWhite.d.ts.map +1 -0
- package/dist/widget/assets/components/index.d.ts +17 -0
- package/dist/widget/assets/components/index.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoCache.d.ts +54 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoCache.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoCache.js +68 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoFlowClient.d.ts +386 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoFlowClient.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoFlowClient.js +872 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoWebClient.d.ts +192 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoWebClient.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/BluvoWebClient.js +294 -0
- package/dist/widget/bluvo/bluvo-lib/WebSocketClient.d.ts +51 -0
- package/dist/widget/bluvo/bluvo-lib/WebSocketClient.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/WebSocketClient.js +72 -0
- package/dist/widget/bluvo/bluvo-lib/WebsocketListener.d.ts +19 -0
- package/dist/widget/bluvo/bluvo-lib/WebsocketListener.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/WebsocketListener.js +62 -0
- package/dist/widget/bluvo/bluvo-lib/WorkflowTypes.d.ts +44 -0
- package/dist/widget/bluvo/bluvo-lib/WorkflowTypes.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/WorkflowTypes.js +6 -0
- package/dist/widget/bluvo/bluvo-lib/api.types.d.ts +49 -0
- package/dist/widget/bluvo/bluvo-lib/api.types.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/balanceTransform.d.ts +84 -0
- package/dist/widget/bluvo/bluvo-lib/balanceTransform.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/balanceTransform.js +26 -0
- package/dist/widget/bluvo/bluvo-lib/createMachine.d.ts +3 -0
- package/dist/widget/bluvo/bluvo-lib/createMachine.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/createMachine.js +38 -0
- package/dist/widget/bluvo/bluvo-lib/error-codes.d.ts +156 -0
- package/dist/widget/bluvo/bluvo-lib/error-codes.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/error-codes.js +115 -0
- package/dist/widget/bluvo/bluvo-lib/flow.types.d.ts +356 -0
- package/dist/widget/bluvo/bluvo-lib/flow.types.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/flowMachine.d.ts +4 -0
- package/dist/widget/bluvo/bluvo-lib/flowMachine.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/flowMachine.js +45 -0
- package/dist/widget/bluvo/bluvo-lib/flowMachine.types.d.ts +20 -0
- package/dist/widget/bluvo/bluvo-lib/flowMachine.types.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/flowStateHandlers.d.ts +39 -0
- package/dist/widget/bluvo/bluvo-lib/flowStateHandlers.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/flowStateHandlers.js +395 -0
- package/dist/widget/bluvo/bluvo-lib/index.d.ts +5 -0
- package/dist/widget/bluvo/bluvo-lib/index.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/machine.types.d.ts +15 -0
- package/dist/widget/bluvo/bluvo-lib/machine.types.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/stateHelpers.d.ts +23 -0
- package/dist/widget/bluvo/bluvo-lib/stateHelpers.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/stateHelpers.js +24 -0
- package/dist/widget/bluvo/bluvo-lib/useBluvoFlow.d.ts +325 -0
- package/dist/widget/bluvo/bluvo-lib/useBluvoFlow.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/useBluvoFlow.js +152 -0
- package/dist/widget/bluvo/bluvo-lib/useFlowMachine.d.ts +11 -0
- package/dist/widget/bluvo/bluvo-lib/useFlowMachine.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/useFlowMachine.js +25 -0
- package/dist/widget/bluvo/bluvo-lib/useWithdrawMachine.d.ts +17 -0
- package/dist/widget/bluvo/bluvo-lib/useWithdrawMachine.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawal.types.d.ts +46 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawal.types.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawalErrorHandler.d.ts +29 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawalErrorHandler.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawalErrorHandler.js +95 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawalMachine.d.ts +3 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawalMachine.d.ts.map +1 -0
- package/dist/widget/bluvo/bluvo-lib/withdrawalMachine.js +137 -0
- package/dist/widget/bluvo/index.d.ts +2 -0
- package/dist/widget/bluvo/index.d.ts.map +1 -0
- package/dist/widget/components/AccountActionsDropdown.js +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.js +143 -190
- package/dist/widget/components/AccountIntentTransactionHistoryButton.js +1 -1
- package/dist/widget/components/AccountSettings.d.ts.map +1 -1
- package/dist/widget/components/AccountSettings.js +19 -18
- package/dist/widget/components/AddressWalletIcon.d.ts +1 -1
- package/dist/widget/components/AddressWalletIcon.d.ts.map +1 -1
- package/dist/widget/components/AddressWalletIcon.js +13 -13
- package/dist/widget/components/AllChainsIcon.d.ts.map +1 -1
- package/dist/widget/components/AllChainsIcon.js +80 -13
- package/dist/widget/components/BluvoExchangeSelection.d.ts +12 -0
- package/dist/widget/components/BluvoExchangeSelection.d.ts.map +1 -0
- package/dist/widget/components/BluvoExchangeSelection.js +131 -0
- package/dist/widget/components/BluvoExchangeSelection.lazy.d.ts +2 -0
- package/dist/widget/components/BluvoExchangeSelection.lazy.d.ts.map +1 -0
- package/dist/widget/components/BluvoExchangeSelection.lazy.js +4 -0
- package/dist/widget/components/BluvoOnrampFlow.d.ts +20 -0
- package/dist/widget/components/BluvoOnrampFlow.d.ts.map +1 -0
- package/dist/widget/components/BluvoOnrampFlow.js +1472 -0
- package/dist/widget/components/BluvoOnrampFlow.lazy.d.ts +2 -0
- package/dist/widget/components/BluvoOnrampFlow.lazy.d.ts.map +1 -0
- package/dist/widget/components/BluvoOnrampFlow.lazy.js +4 -0
- package/dist/widget/components/ChainFilterDropdown.d.ts.map +1 -1
- package/dist/widget/components/ChainFilterDropdown.js +37 -37
- package/dist/widget/components/ChainList.d.ts.map +1 -1
- package/dist/widget/components/ChainList.js +157 -119
- package/dist/widget/components/ClassicSwap.d.ts.map +1 -1
- package/dist/widget/components/ClassicSwap.js +309 -300
- package/dist/widget/components/ConfigDisplay.js +3 -3
- package/dist/widget/components/ConnectWallet.d.ts +1 -6
- package/dist/widget/components/ConnectWallet.d.ts.map +1 -1
- package/dist/widget/components/ConnectWallet.js +110 -165
- package/dist/widget/components/ConnectedWallets.d.ts +3 -1
- package/dist/widget/components/ConnectedWallets.d.ts.map +1 -1
- package/dist/widget/components/ConnectedWallets.js +75 -100
- package/dist/widget/components/CopyButton.js +1 -1
- package/dist/widget/components/CountryFilterDropdown.js +1 -1
- package/dist/widget/components/DebugMenu.js +1 -1
- package/dist/widget/components/DepositTracker.js +1 -1
- package/dist/widget/components/DirectTransfer.d.ts +1 -1
- package/dist/widget/components/DirectTransfer.js +3 -3
- package/dist/widget/components/Earn.js +1 -1
- package/dist/widget/components/EarnMarkets.d.ts.map +1 -1
- package/dist/widget/components/EarnMarkets.js +162 -148
- package/dist/widget/components/EarnPools.d.ts.map +1 -1
- package/dist/widget/components/EarnPools.js +123 -103
- package/dist/widget/components/EarnPoolsFilters.d.ts.map +1 -1
- package/dist/widget/components/EarnPoolsFilters.js +19 -16
- package/dist/widget/components/EarnWithdraw.d.ts.map +1 -1
- package/dist/widget/components/EarnWithdraw.js +130 -129
- package/dist/widget/components/FeeOptions.js +1 -1
- package/dist/widget/components/FiatSelector.js +5 -5
- package/dist/widget/components/FiatSelectorButton.js +6 -6
- package/dist/widget/components/Footer.d.ts.map +1 -1
- package/dist/widget/components/Footer.js +47 -40
- package/dist/widget/components/Fund.d.ts +15 -11
- package/dist/widget/components/Fund.d.ts.map +1 -1
- package/dist/widget/components/Fund.js +13 -1088
- package/dist/widget/components/Fund.types.d.ts +22 -0
- package/dist/widget/components/Fund.types.d.ts.map +1 -0
- package/dist/widget/components/FundExactInput.d.ts +5 -0
- package/dist/widget/components/FundExactInput.d.ts.map +1 -0
- package/dist/widget/components/FundExactInput.js +1116 -0
- package/dist/widget/components/FundExactOutput.d.ts +5 -0
- package/dist/widget/components/FundExactOutput.d.ts.map +1 -0
- package/dist/widget/components/FundExactOutput.js +498 -0
- package/dist/widget/components/FundMethods.d.ts +2 -1
- package/dist/widget/components/FundMethods.d.ts.map +1 -1
- package/dist/widget/components/FundMethods.js +144 -143
- package/dist/widget/components/FundWalletSelection.d.ts +1 -0
- package/dist/widget/components/FundWalletSelection.d.ts.map +1 -1
- package/dist/widget/components/FundWalletSelection.js +18 -19
- package/dist/widget/components/FundingMethodSelectorButton.d.ts.map +1 -1
- package/dist/widget/components/FundingMethodSelectorButton.js +32 -30
- package/dist/widget/components/HookModalContent.js +11 -11
- package/dist/widget/components/MeldForm.js +15 -15
- package/dist/widget/components/MeldHistory.js +5 -5
- package/dist/widget/components/MeldStepsFlow.js +8 -8
- package/dist/widget/components/MeldTransactionStatus.js +7 -7
- package/dist/widget/components/Modal.js +3 -3
- package/dist/widget/components/OnRampProviderSelector.js +1 -1
- package/dist/widget/components/OnrampErrorScreen.js +1 -1
- package/dist/widget/components/OnrampHistoryRow.js +1 -1
- package/dist/widget/components/OnrampPaymentMethods.js +1 -1
- package/dist/widget/components/OnrampProviderConfirmation.js +7 -7
- package/dist/widget/components/Pay.d.ts.map +1 -1
- package/dist/widget/components/Pay.js +223 -216
- package/dist/widget/components/PaymentMethods.d.ts.map +1 -1
- package/dist/widget/components/PaymentMethods.js +51 -52
- package/dist/widget/components/PoolDeposit.js +35 -35
- package/dist/widget/components/QRCodeOptions.js +1 -1
- package/dist/widget/components/QRCodeWalletSelect.d.ts +1 -1
- package/dist/widget/components/QRCodeWalletSelect.js +1 -1
- package/dist/widget/components/QuoteDetails.d.ts.map +1 -1
- package/dist/widget/components/QuoteDetails.js +195 -187
- package/dist/widget/components/QuoteInputErrorBlock.d.ts +7 -0
- package/dist/widget/components/QuoteInputErrorBlock.d.ts.map +1 -0
- package/dist/widget/components/QuoteInputErrorBlock.js +22 -0
- package/dist/widget/components/Receipt.js +15 -15
- package/dist/widget/components/RecentChains.d.ts +9 -0
- package/dist/widget/components/RecentChains.d.ts.map +1 -0
- package/dist/widget/components/RecentChains.js +28 -0
- package/dist/widget/components/RecipientSelectorButton.js +5 -5
- package/dist/widget/components/Recipients.d.ts.map +1 -1
- package/dist/widget/components/Recipients.js +84 -102
- package/dist/widget/components/ScreenHeader.d.ts.map +1 -1
- package/dist/widget/components/ScreenHeader.js +20 -20
- package/dist/widget/components/SearchInputField.js +4 -4
- package/dist/widget/components/SessionTimeoutScreen.js +1 -1
- package/dist/widget/components/ShadowPortal.js +1 -1
- package/dist/widget/components/SlippageToleranceSettings.js +4 -4
- package/dist/widget/components/ThemeProvider.js +1 -1
- package/dist/widget/components/Toast.js +19 -19
- package/dist/widget/components/TokenImage.js +4 -4
- package/dist/widget/components/TokenSelector.d.ts +3 -0
- package/dist/widget/components/TokenSelector.d.ts.map +1 -1
- package/dist/widget/components/TokenSelector.js +201 -190
- package/dist/widget/components/TokenSelectorButton.d.ts.map +1 -1
- package/dist/widget/components/TokenSelectorButton.js +22 -22
- package/dist/widget/components/TrailsHookModal.d.ts +2 -2
- package/dist/widget/components/TrailsHookModal.d.ts.map +1 -1
- package/dist/widget/components/TrailsHookModal.js +47 -49
- package/dist/widget/components/TransactionDetails.d.ts.map +1 -1
- package/dist/widget/components/TransactionDetails.js +33 -23
- package/dist/widget/components/TransactionHistoryItem.d.ts.map +1 -1
- package/dist/widget/components/TransactionHistoryItem.js +278 -188
- package/dist/widget/components/TransferPendingVertical.js +2 -2
- package/dist/widget/components/UserPreferences.js +11 -11
- package/dist/widget/components/WaasFeeOptions.d.ts.map +1 -1
- package/dist/widget/components/WaasFeeOptions.js +208 -159
- package/dist/widget/components/WalletAccountHeader.js +1 -1
- package/dist/widget/components/WalletConfirmation.d.ts.map +1 -1
- package/dist/widget/components/WalletConfirmation.js +46 -47
- package/dist/widget/components/WalletConnect.d.ts.map +1 -1
- package/dist/widget/components/WalletConnect.js +83 -135
- package/dist/widget/components/WalletConnectionPending.d.ts.map +1 -1
- package/dist/widget/components/WalletConnectionPending.js +25 -25
- package/dist/widget/components/WalletList.d.ts +8 -2
- package/dist/widget/components/WalletList.d.ts.map +1 -1
- package/dist/widget/components/WalletList.js +61 -33
- package/dist/widget/components/WidgetProviders.d.ts +3 -1
- package/dist/widget/components/WidgetProviders.d.ts.map +1 -1
- package/dist/widget/components/WidgetProviders.js +32 -28
- package/dist/widget/components/Withdraw.d.ts.map +1 -1
- package/dist/widget/components/Withdraw.js +192 -185
- package/dist/widget/index.d.ts +3 -1
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +30 -26
- package/dist/widget/modes/EarnWidget.d.ts +4 -4
- package/dist/widget/modes/EarnWidget.d.ts.map +1 -1
- package/dist/widget/modes/EarnWidget.js +17 -15
- package/dist/widget/modes/FundWidget.d.ts +13 -0
- package/dist/widget/modes/FundWidget.d.ts.map +1 -1
- package/dist/widget/modes/FundWidget.js +30 -28
- package/dist/widget/modes/PayWidget.d.ts.map +1 -1
- package/dist/widget/modes/PayWidget.js +23 -21
- package/dist/widget/modes/SwapWidget.d.ts.map +1 -1
- package/dist/widget/modes/SwapWidget.js +19 -18
- package/dist/widget/modes/WithdrawWidget.d.ts +3 -3
- package/dist/widget/modes/WithdrawWidget.d.ts.map +1 -1
- package/dist/widget/modes/WithdrawWidget.js +15 -13
- package/dist/widget/props.d.ts +255 -0
- package/dist/widget/props.d.ts.map +1 -0
- package/dist/widget/props.js +14 -0
- package/dist/widget/providers/TrailsModalProvider.js +4 -4
- package/dist/widget/providers/TrailsProvider.d.ts +78 -16
- package/dist/widget/providers/TrailsProvider.d.ts.map +1 -1
- package/dist/widget/providers/TrailsProvider.js +64 -46
- package/dist/widget/providers/WalletContext.d.ts +10 -0
- package/dist/widget/providers/WalletContext.d.ts.map +1 -0
- package/dist/widget/providers/WalletContext.js +23 -0
- package/dist/widget/providers/WidgetProviderTree.d.ts +9 -7
- package/dist/widget/providers/WidgetProviderTree.d.ts.map +1 -1
- package/dist/widget/providers/WidgetProviderTree.js +31 -47
- package/dist/widget/providers/adapterConfig.d.ts +13 -0
- package/dist/widget/providers/adapterConfig.d.ts.map +1 -0
- package/dist/widget/providers/adapterConfig.js +97 -0
- package/dist/widget/providers/sequenceSupport.d.ts +42 -0
- package/dist/widget/providers/sequenceSupport.d.ts.map +1 -0
- package/dist/widget/providers/walletRuntimeResolution.d.ts +10 -0
- package/dist/widget/providers/walletRuntimeResolution.d.ts.map +1 -0
- package/dist/widget/providers/walletRuntimeResolution.js +14 -0
- package/dist/widget/shared/destinationDefaultToken.d.ts.map +1 -1
- package/dist/widget/shared/destinationDefaultToken.js +12 -13
- package/dist/widget/shared/destinationSupport.d.ts +40 -0
- package/dist/widget/shared/destinationSupport.d.ts.map +1 -0
- package/dist/widget/shared/destinationSupport.js +215 -0
- package/dist/widget/shared/resolution.d.ts +2 -17
- package/dist/widget/shared/resolution.d.ts.map +1 -1
- package/dist/widget/shared/resolution.js +32 -52
- package/dist/widget/shared/resolvePaymentSource.d.ts +2 -1
- package/dist/widget/shared/resolvePaymentSource.d.ts.map +1 -1
- package/dist/widget/shared/resolvePaymentSource.js +9 -9
- package/dist/widget/shared/types.d.ts +23 -31
- package/dist/widget/shared/types.d.ts.map +1 -1
- package/dist/widget/styles.gen.d.ts.map +1 -1
- package/dist/widget/styles.gen.js +4 -4
- package/dist/widget/utils/fundMethodSwitchState.d.ts +2 -0
- package/dist/widget/utils/fundMethodSwitchState.d.ts.map +1 -1
- package/dist/widget/utils/fundMethodSwitchState.js +3 -3
- package/dist/widget/utils/tokens.d.ts.map +1 -1
- package/dist/widget/utils/tokens.js +11 -25
- package/dist/widget/utils/trailsOnrampConfig.d.ts +5 -0
- package/dist/widget/utils/trailsOnrampConfig.d.ts.map +1 -1
- package/dist/widget/utils/viewManagerGuards.d.ts.map +1 -1
- package/dist/widget/utils/viewManagerGuards.js +5 -4
- package/dist/widget/utils/walletConnectRedirect.d.ts +19 -0
- package/dist/widget/utils/walletConnectRedirect.d.ts.map +1 -0
- package/dist/widget/utils/walletConnectRedirect.js +21 -0
- package/dist/widget/widget.d.ts +2 -224
- package/dist/widget/widget.d.ts.map +1 -1
- package/dist/widget/widget.js +995 -993
- package/dist/widgetFlowHooks.d.ts +12 -0
- package/dist/widgetFlowHooks.d.ts.map +1 -0
- package/dist/widgetFlowHooks.js +18 -0
- package/package.json +24 -22
- package/dist/hooks/useAddressWalletIcon.d.ts +0 -10
- package/dist/hooks/useAddressWalletIcon.d.ts.map +0 -1
- package/dist/hooks/useAddressWalletIcon.js +0 -33
- package/dist/hooks/useConnector.d.ts +0 -9
- package/dist/hooks/useConnector.d.ts.map +0 -1
- package/dist/hooks/useConnector.js +0 -11
- package/dist/hooks/useIsSequenceWallet.d.ts +0 -6
- package/dist/hooks/useIsSequenceWallet.d.ts.map +0 -1
- package/dist/hooks/useIsSequenceWallet.js +0 -10
- package/dist/hooks/useTokens.d.ts.map +0 -1
- package/dist/hooks/useTokens.js +0 -166
- package/dist/hooks/useWalletConnectUri.d.ts +0 -19
- package/dist/hooks/useWalletConnectUri.d.ts.map +0 -1
- package/dist/hooks/useWalletConnectUri.js +0 -122
- package/dist/query/tokenList.queries.d.ts +0 -54
- package/dist/query/tokenList.queries.d.ts.map +0 -1
- package/dist/query/tokenList.queries.js +0 -77
- package/dist/tokensApi.d.ts +0 -8
- package/dist/tokensApi.d.ts.map +0 -1
- package/dist/tokensApi.js +0 -56
- package/dist/walletUtils.d.ts +0 -42
- package/dist/walletUtils.d.ts.map +0 -1
- package/dist/walletUtils.js +0 -110
- package/dist/wallets.d.ts +0 -23
- package/dist/wallets.d.ts.map +0 -1
- package/dist/wallets.js +0 -236
- package/dist/widget/assets/FundMethod-card-brands.js +0 -4
- package/dist/widget/assets/FundMethod-exchange-brands.js +0 -4
- package/dist/widget/assets/Trails-logo-black.js +0 -4
- package/dist/widget/assets/Trails-logo-white.js +0 -4
- package/dist/widget/assets/aave.js +0 -4
- package/dist/widget/assets/morpho.js +0 -4
- package/dist/widget/components/FundMethodIcons.d.ts +0 -4
- package/dist/widget/components/FundMethodIcons.d.ts.map +0 -1
- package/dist/widget/components/FundMethodIcons.js +0 -60
- package/dist/widget/shared/tokenAllowlist.d.ts +0 -36
- package/dist/widget/shared/tokenAllowlist.d.ts.map +0 -1
- package/dist/widget/shared/tokenAllowlist.js +0 -60
- package/dist/widget/utils/createWagmiConfig.d.ts +0 -10
- package/dist/widget/utils/createWagmiConfig.d.ts.map +0 -1
- package/dist/widget/utils/createWagmiConfig.js +0 -18
package/README.md
CHANGED
|
@@ -1,491 +1,120 @@
|
|
|
1
1
|
# 0xtrails
|
|
2
2
|
|
|
3
|
-
Trails SDK for
|
|
3
|
+
Trails SDK for embedding the widget and calling Trails hooks in React apps.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install 0xtrails
|
|
9
|
-
pnpm add 0xtrails
|
|
10
|
-
yarn add 0xtrails
|
|
11
|
-
bun add 0xtrails
|
|
8
|
+
npm install 0xtrails @tanstack/react-query viem
|
|
12
9
|
```
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
If you want Trails to use your existing wagmi setup, also install `@0xtrails/adapter-wagmi` and `wagmi`.
|
|
15
12
|
|
|
16
|
-
##
|
|
13
|
+
## Standalone Widget
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
The widget is the fastest integration path. Pick a mode and pass the props.
|
|
15
|
+
For widget-only usage, `TrailsWidget` does not require `QueryClientProvider` or `TrailsProvider`.
|
|
21
16
|
|
|
22
17
|
```tsx
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
export function Checkout() {
|
|
26
|
-
return (
|
|
27
|
-
<Pay
|
|
28
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
29
|
-
to={{
|
|
30
|
-
recipient: "0xRecipientAddress",
|
|
31
|
-
chain: "base",
|
|
32
|
-
token: "USDC",
|
|
33
|
-
amount: "25",
|
|
34
|
-
}}
|
|
35
|
-
payMessage="Pay for order #1234"
|
|
36
|
-
onPaymentSuccess={(data) => console.log("Paid", data.sessionId)}
|
|
37
|
-
/>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Hooks
|
|
18
|
+
import { TrailsWidget } from '0xtrails'
|
|
43
19
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
|
48
|
-
import { WagmiProvider } from "wagmi"
|
|
49
|
-
import { TrailsProvider } from "0xtrails"
|
|
50
|
-
import { wagmiConfig } from "./wagmi"
|
|
51
|
-
|
|
52
|
-
const queryClient = new QueryClient()
|
|
20
|
+
const apiKey = 'YOUR_TRAILS_API_KEY'
|
|
53
21
|
|
|
54
22
|
export function App() {
|
|
55
|
-
return
|
|
56
|
-
<WagmiProvider config={wagmiConfig}>
|
|
57
|
-
<QueryClientProvider client={queryClient}>
|
|
58
|
-
<TrailsProvider config={{ trailsApiKey: "<YOUR_TRAILS_API_KEY>" }}>
|
|
59
|
-
<YourRoutes />
|
|
60
|
-
</TrailsProvider>
|
|
61
|
-
</QueryClientProvider>
|
|
62
|
-
</WagmiProvider>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Widget Modes
|
|
68
|
-
|
|
69
|
-
Import mode-specific wrappers from `0xtrails/widget`.
|
|
70
|
-
|
|
71
|
-
### Pay
|
|
72
|
-
|
|
73
|
-
Use `Pay` when your app knows the exact recipient, destination token, chain, and amount.
|
|
74
|
-
|
|
75
|
-
```tsx
|
|
76
|
-
import { Pay } from "0xtrails/widget"
|
|
77
|
-
|
|
78
|
-
export function PayInvoice() {
|
|
79
|
-
return (
|
|
80
|
-
<Pay
|
|
81
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
82
|
-
to={{
|
|
83
|
-
recipient: "0xMerchantAddress",
|
|
84
|
-
chain: "base",
|
|
85
|
-
token: "USDC",
|
|
86
|
-
amount: "49.99",
|
|
87
|
-
}}
|
|
88
|
-
from={{ chain: "arbitrum", token: "ETH" }}
|
|
89
|
-
paymentMethod="CONNECTED_WALLET"
|
|
90
|
-
payMessage="Invoice #INV-1001"
|
|
91
|
-
buttonText="Pay now"
|
|
92
|
-
/>
|
|
93
|
-
)
|
|
23
|
+
return <TrailsWidget apiKey={apiKey} renderInline />
|
|
94
24
|
}
|
|
95
25
|
```
|
|
96
26
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Use `Fund` to let a user add funds to a wallet or destination account. You can allow different payment methods, use a connected wallet, qr code transfers, exchanges, or fiat on ramp.
|
|
100
|
-
|
|
101
|
-
The user selects payment method in the widget UI
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
import { Fund } from "0xtrails/widget"
|
|
105
|
-
|
|
106
|
-
export function FundWallet() {
|
|
107
|
-
return (
|
|
108
|
-
<Fund
|
|
109
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
110
|
-
to={{
|
|
111
|
-
recipient: "0xUserWallet",
|
|
112
|
-
chain: "base",
|
|
113
|
-
token: "USDC",
|
|
114
|
-
}}
|
|
115
|
-
onFundingSuccess={(data) => console.log("Funded", data.sessionId)}
|
|
116
|
-
/>
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
The host app pre-selects paymentMethod to credit card for funding crypto with 100 USD.
|
|
122
|
-
|
|
123
|
-
```tsx
|
|
124
|
-
import { Fund } from "0xtrails/widget"
|
|
125
|
-
|
|
126
|
-
export function FundWallet() {
|
|
127
|
-
return (
|
|
128
|
-
<Fund
|
|
129
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
130
|
-
paymentMethod="CREDIT_DEBIT_CARD"
|
|
131
|
-
from={{
|
|
132
|
-
currency="USD",
|
|
133
|
-
amount="100"
|
|
134
|
-
}}
|
|
135
|
-
to={{
|
|
136
|
-
recipient: "0xUserWallet",
|
|
137
|
-
chain: "base",
|
|
138
|
-
token: "USDC",
|
|
139
|
-
}}
|
|
140
|
-
onFundingSuccess={(data) => console.log("Funded", data.sessionId)}
|
|
141
|
-
/>
|
|
142
|
-
)
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Swap
|
|
147
|
-
|
|
148
|
-
Use `Swap` for same-chain and cross-chain token swaps.
|
|
149
|
-
|
|
150
|
-
```tsx
|
|
151
|
-
import { Swap } from "0xtrails/widget"
|
|
152
|
-
|
|
153
|
-
export function SwapToBaseUsdc() {
|
|
154
|
-
return (
|
|
155
|
-
<Swap
|
|
156
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
157
|
-
onSwapSuccess={(data) => console.log("Swap complete", data.sessionId)}
|
|
158
|
-
/>
|
|
159
|
-
)
|
|
160
|
-
}
|
|
161
|
-
```
|
|
27
|
+
When there is no parent wallet context and no `adapters`, the widget uses its built-in EVM runtime.
|
|
162
28
|
|
|
163
|
-
|
|
29
|
+
## Hooks With `TrailsProvider`
|
|
164
30
|
|
|
165
|
-
Use `
|
|
31
|
+
Use `TrailsProvider` when you want to call Trails hooks directly.
|
|
166
32
|
|
|
167
33
|
```tsx
|
|
168
|
-
import {
|
|
169
|
-
|
|
170
|
-
export function EarnUsdc() {
|
|
171
|
-
return (
|
|
172
|
-
<Earn
|
|
173
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
174
|
-
buttonText="Deposit into a protocol"
|
|
175
|
-
onEarnSuccess={(data) => console.log("Earn deposit", data.sessionId)}
|
|
176
|
-
/>
|
|
177
|
-
)
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Withdraw
|
|
34
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
35
|
+
import { TrailsProvider, useAccountTotalBalanceUsd } from '0xtrails'
|
|
182
36
|
|
|
183
|
-
|
|
37
|
+
const apiKey = 'YOUR_TRAILS_API_KEY'
|
|
38
|
+
const queryClient = new QueryClient()
|
|
184
39
|
|
|
185
|
-
|
|
186
|
-
|
|
40
|
+
function BalancePreview() {
|
|
41
|
+
const address = '0x0000000000000000000000000000000000000000'
|
|
42
|
+
const totalBalance = useAccountTotalBalanceUsd(address)
|
|
187
43
|
|
|
188
|
-
|
|
189
|
-
return (
|
|
190
|
-
<Withdraw
|
|
191
|
-
apiKey="<YOUR_TRAILS_API_KEY>"
|
|
192
|
-
onWithdrawSuccess={(data) => console.log("Withdrawn", data.sessionId)}
|
|
193
|
-
/>
|
|
194
|
-
)
|
|
44
|
+
return <pre>{JSON.stringify(totalBalance.data, null, 2)}</pre>
|
|
195
45
|
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## `useQuote`
|
|
199
|
-
|
|
200
|
-
`useQuote` gives you a quote and an executable `send` function for a fully custom UI. Exactly one amount should be provided: `from.amount` or `from.amountRaw` for exact-input, or `to.amount` or `to.amountRaw` for exact-output. You can use "feeOptions" to allow paying gas in stablecoins.
|
|
201
|
-
|
|
202
|
-
```tsx
|
|
203
|
-
import { useQuote, QuoteError } from "0xtrails"
|
|
204
|
-
import { useAccount, useWalletClient } from "wagmi"
|
|
205
|
-
|
|
206
|
-
export function CustomSwap() {
|
|
207
|
-
const { address } = useAccount()
|
|
208
|
-
const { data: walletClient } = useWalletClient()
|
|
209
|
-
|
|
210
|
-
const {
|
|
211
|
-
quote,
|
|
212
|
-
send,
|
|
213
|
-
isLoadingQuote,
|
|
214
|
-
quoteError,
|
|
215
|
-
quoteErrorPrettified,
|
|
216
|
-
feeOptions,
|
|
217
|
-
refetchQuote,
|
|
218
|
-
abort,
|
|
219
|
-
} = useQuote({
|
|
220
|
-
from: {
|
|
221
|
-
chain: "base",
|
|
222
|
-
token: "USDC",
|
|
223
|
-
amount: "10",
|
|
224
|
-
},
|
|
225
|
-
to: {
|
|
226
|
-
chain: "arbitrum",
|
|
227
|
-
token: "ETH",
|
|
228
|
-
recipient: address,
|
|
229
|
-
},
|
|
230
|
-
onStatusUpdate: (states) => console.log("status", states),
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
if (quoteError instanceof QuoteError) {
|
|
234
|
-
console.log("Quote failed with code", quoteError.code)
|
|
235
|
-
}
|
|
236
46
|
|
|
47
|
+
export function App() {
|
|
237
48
|
return (
|
|
238
|
-
<
|
|
239
|
-
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
<>
|
|
244
|
-
<p>
|
|
245
|
-
Spend {quote.originAmountDisplay} for{" "}
|
|
246
|
-
{quote.destinationAmountDisplay}
|
|
247
|
-
</p>
|
|
248
|
-
<p>Estimated time: {quote.completionEstimateDisplay}</p>
|
|
249
|
-
<p>Fee options: {feeOptions.length}</p>
|
|
250
|
-
</>
|
|
251
|
-
)}
|
|
252
|
-
|
|
253
|
-
<button disabled={!send} onClick={() => send?.()}>
|
|
254
|
-
Send
|
|
255
|
-
</button>
|
|
256
|
-
<button onClick={() => refetchQuote()}>Refresh</button>
|
|
257
|
-
<button onClick={() => abort()}>Abort</button>
|
|
258
|
-
</section>
|
|
49
|
+
<QueryClientProvider client={queryClient}>
|
|
50
|
+
<TrailsProvider config={{ trailsApiKey: apiKey }}>
|
|
51
|
+
<BalancePreview />
|
|
52
|
+
</TrailsProvider>
|
|
53
|
+
</QueryClientProvider>
|
|
259
54
|
)
|
|
260
55
|
}
|
|
261
56
|
```
|
|
262
57
|
|
|
263
|
-
|
|
58
|
+
`TrailsProvider` mounts the built-in wallet runtime by default. Add `config.adapters` when Trails should use explicit wallet runtime adapters instead.
|
|
264
59
|
|
|
265
|
-
##
|
|
60
|
+
## Use Trails with wagmi
|
|
266
61
|
|
|
267
|
-
|
|
62
|
+
If your app already uses wagmi, add `@0xtrails/adapter-wagmi` so Trails can share your wallet setup.
|
|
268
63
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
To request a destination token and let the user pick how to pay, provide `tokenAddress` and `tokenAmount`.
|
|
64
|
+
For more options and examples, see `packages/wallet/adapters/wagmi/README.md`.
|
|
272
65
|
|
|
273
66
|
```tsx
|
|
274
|
-
import {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
const { sendTransaction, isPending } = useTrailsSendTransaction({
|
|
278
|
-
receiptActionButtonText: "Back to app",
|
|
279
|
-
})
|
|
280
|
-
|
|
281
|
-
return (
|
|
282
|
-
<>
|
|
283
|
-
<button
|
|
284
|
-
disabled={isPending}
|
|
285
|
-
onClick={() =>
|
|
286
|
-
sendTransaction({
|
|
287
|
-
to: "0xMerchantAddress",
|
|
288
|
-
tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
289
|
-
tokenAmount: "25"
|
|
290
|
-
})
|
|
291
|
-
}
|
|
292
|
-
>
|
|
293
|
-
Pay 25 USDC
|
|
294
|
-
</button>
|
|
295
|
-
</>
|
|
296
|
-
)
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
Use `fromTokenAddress`, `fromChainId`, and `fromAmount` when your app already knows the source asset. Use the `*Raw` fields when you already have smallest-unit amounts.
|
|
301
|
-
|
|
302
|
-
## Composable Actions
|
|
67
|
+
import { TrailsProvider, TrailsWidget } from '0xtrails'
|
|
68
|
+
import { wagmiAdapter } from '@0xtrails/adapter-wagmi'
|
|
69
|
+
import { WagmiProvider } from 'wagmi'
|
|
303
70
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
- `swap` for destination-chain swaps.
|
|
309
|
-
- `lend` and `deposit` for supported earn markets.
|
|
310
|
-
- `custom` for bulding your own action.
|
|
311
|
-
- `assertCondition` for runtime checks.
|
|
312
|
-
- `dynamic()` to spend the intent wallet's runtime balance when value amounts are unknown.
|
|
313
|
-
|
|
314
|
-
### Quote And Execute Actions
|
|
315
|
-
|
|
316
|
-
```tsx
|
|
317
|
-
import {
|
|
318
|
-
assertCondition,
|
|
319
|
-
dynamic,
|
|
320
|
-
lend,
|
|
321
|
-
swap,
|
|
322
|
-
useQuote,
|
|
323
|
-
} from "0xtrails"
|
|
324
|
-
import { useAccount, useWalletClient } from "wagmi"
|
|
325
|
-
|
|
326
|
-
export function QuoteActions() {
|
|
327
|
-
const { address } = useAccount()
|
|
328
|
-
const { data: walletClient } = useWalletClient()
|
|
329
|
-
|
|
330
|
-
const actions = [
|
|
331
|
-
// Check if we received enough USDC on the destination chain
|
|
332
|
-
assertCondition({
|
|
333
|
-
erc20Balance: { token: "USDC", gte: "100" },
|
|
334
|
-
}),
|
|
335
|
-
// Swap 100 USDC in WETH (defaults to Uniswap V3)
|
|
336
|
-
swap({
|
|
337
|
-
tokenIn: "USDC",
|
|
338
|
-
tokenOut: "WETH",
|
|
339
|
-
amountIn: "100",
|
|
340
|
-
fee: "0.05"
|
|
341
|
-
}),
|
|
342
|
-
// Lend all WETH received from the swap
|
|
343
|
-
lend({
|
|
344
|
-
marketId: "base-weth-aave-v3-lending",
|
|
345
|
-
amount: dynamic(),
|
|
346
|
-
receiverAddress: address,
|
|
347
|
-
}),
|
|
348
|
-
]
|
|
349
|
-
|
|
350
|
-
const { quote, send, isLoadingQuote } = useQuote({
|
|
351
|
-
from: { chain: "base", token: "USDC" },
|
|
352
|
-
to: { chain: "base", token: "USDC", amount: "100" },
|
|
353
|
-
actions,
|
|
354
|
-
})
|
|
71
|
+
const apiKey = 'YOUR_TRAILS_API_KEY'
|
|
72
|
+
// Create wagmiConfig with your chains, transports, and connectors.
|
|
73
|
+
const adapters = [wagmiAdapter({ wagmiConfig })]
|
|
355
74
|
|
|
75
|
+
export function App() {
|
|
356
76
|
return (
|
|
357
|
-
<
|
|
358
|
-
{
|
|
359
|
-
|
|
77
|
+
<WagmiProvider config={wagmiConfig}>
|
|
78
|
+
<TrailsProvider config={{ trailsApiKey: apiKey, adapters }}>
|
|
79
|
+
<TrailsWidget renderInline />
|
|
80
|
+
</TrailsProvider>
|
|
81
|
+
</WagmiProvider>
|
|
360
82
|
)
|
|
361
83
|
}
|
|
362
84
|
```
|
|
363
85
|
|
|
364
|
-
`
|
|
86
|
+
Use the same `wagmiConfig` instance for both `WagmiProvider` and `wagmiAdapter(...)` when Trails should bridge into the host-owned wagmi runtime. If there is no matching surrounding `WagmiProvider`, the adapter mounts its own runtime with the provided config.
|
|
365
87
|
|
|
366
|
-
|
|
88
|
+
## Runtime ownership
|
|
367
89
|
|
|
368
|
-
|
|
369
|
-
import { dynamic, erc20Utils, lend, swap, useTrailsSendTransaction } from "0xtrails"
|
|
370
|
-
|
|
371
|
-
export function WidgetActionRecipe({ userAddress }: { userAddress: `0x${string}` }) {
|
|
372
|
-
const actions = [
|
|
373
|
-
swap({
|
|
374
|
-
tokenIn: "USDC",
|
|
375
|
-
tokenOut: "USDT",
|
|
376
|
-
amountIn: dynamic(),
|
|
377
|
-
fee: "0.05",
|
|
378
|
-
}),
|
|
379
|
-
lend({
|
|
380
|
-
marketId: "polygon-usdt-fluid-lending",
|
|
381
|
-
amount: dynamic(),
|
|
382
|
-
receiverAddress: userAddress,
|
|
383
|
-
}),
|
|
384
|
-
]
|
|
385
|
-
|
|
386
|
-
const { sendTransaction, isPending } = useTrailsSendTransaction({
|
|
387
|
-
actions,
|
|
388
|
-
receiptActionButtonText: "Done",
|
|
389
|
-
})
|
|
90
|
+
Adapter runtime selection and lifecycle ownership are separate:
|
|
390
91
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
to: userAddress,
|
|
398
|
-
tokenAddress: erc20Utils.USDC.addressOn("polygon"),
|
|
399
|
-
tokenAmount: "50",
|
|
400
|
-
tokenDecimals: erc20Utils.USDC.decimalsOn("polygon"),
|
|
401
|
-
})
|
|
402
|
-
}
|
|
403
|
-
>
|
|
404
|
-
Choose payment token
|
|
405
|
-
</button>
|
|
406
|
-
</>
|
|
407
|
-
)
|
|
408
|
-
}
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
### Raw Destination Calls
|
|
412
|
-
|
|
413
|
-
Use `to.calls` when you need low-level ABI-encoded calls instead of action builders.
|
|
92
|
+
- wagmi runtime selection is based on `wagmiConfig` identity
|
|
93
|
+
- same config instance as the surrounding `WagmiProvider` → bridge to the host runtime
|
|
94
|
+
- no matching surrounding provider → mount an adapter-owned runtime
|
|
95
|
+
- `managedBy` is for composite adapter lists and controls lifecycle ownership in Trails
|
|
96
|
+
- `managedBy: 'host'` means Trails can use the wallet but should not own host lifecycle actions like disconnect
|
|
97
|
+
- `managedBy: 'trails'` means Trails owns that adapter's wallet lifecycle
|
|
414
98
|
|
|
415
99
|
```tsx
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
export function RawCallsQuote() {
|
|
421
|
-
const { address } = useAccount()
|
|
422
|
-
|
|
423
|
-
const stakingCall = buildCall({
|
|
424
|
-
to: "0xStakingContract",
|
|
425
|
-
data: {
|
|
426
|
-
abi: stakingAbi,
|
|
427
|
-
functionName: "stake",
|
|
428
|
-
args: [1_000_000n],
|
|
429
|
-
},
|
|
430
|
-
})
|
|
431
|
-
|
|
432
|
-
const calls = buildApproveAndCall({
|
|
433
|
-
token: erc20Utils.USDC.addressOn("base"),
|
|
434
|
-
call: stakingCall,
|
|
435
|
-
})
|
|
436
|
-
|
|
437
|
-
const { quote, send } = useQuote({
|
|
438
|
-
from: { chain: "base", token: "USDC" },
|
|
439
|
-
to: {
|
|
440
|
-
chain: "base",
|
|
441
|
-
token: "USDC",
|
|
442
|
-
amount: "1",
|
|
443
|
-
calls,
|
|
444
|
-
},
|
|
445
|
-
})
|
|
446
|
-
|
|
447
|
-
return (
|
|
448
|
-
<button disabled={!send} onClick={() => send?.()}>
|
|
449
|
-
{quote ? "Stake USDC" : "Loading quote"}
|
|
450
|
-
</button>
|
|
451
|
-
)
|
|
452
|
-
}
|
|
100
|
+
const adapters = [
|
|
101
|
+
{ adapter: wagmiAdapter({ wagmiConfig: hostWagmiConfig }), managedBy: 'host' },
|
|
102
|
+
{ adapter: wagmiAdapter({ wagmiConfig: trailsWagmiConfig }), managedBy: 'trails' },
|
|
103
|
+
]
|
|
453
104
|
```
|
|
454
105
|
|
|
455
|
-
## Utilities
|
|
456
|
-
|
|
457
|
-
Common exports from `0xtrails`:
|
|
458
|
-
|
|
459
|
-
- `getSupportedChains`, `useSupportedChains`, and `resolveChainId`.
|
|
460
|
-
- `getChainInfo`, `getAllChains`, and `attemptSwitchChain`.
|
|
461
|
-
- `useTokenList`, `useSupportedTokens`, `useTokenBalances`, `useTokenBalancesForMultipleAccounts`, `useAccountTotalBalanceUsd`, `useHasSufficientBalanceToken`, and `useHasSufficientBalanceUsd`.
|
|
462
|
-
- `getTokenPrice`, `getTokenPrices`, `useTokenPrice`, `useTokenPrices`
|
|
463
|
-
- `erc20Utils`, `buildCall`, `buildApproveAndCall`, `buildErc20Approve`, and `getAmountWithSlippage` for token metadata, ERC-20 calls, approvals, and custom calldata.
|
|
464
|
-
- `uniswapV3` and `sushiswapV3` for custom Uniswap V3 / SushiSwap V3 pool lookup, quote, and swap call construction.
|
|
465
|
-
- `useEarnProviders`, `useEarnMarkets`, `useEarnBalances`, `getEarnProviders`, `getEarnMarkets`, and `getEarnBalances`.
|
|
466
|
-
- `useResolveActions`, `encodeDestinationForIntentProtocol`, `createHydratePayload`, and `encodeMulticallHydrateExecute` for advanced destination-call and hydrate flows.
|
|
467
|
-
- `prepareSend`, `commitIntent`, `quoteIntent`, `sendOriginTransaction`, `getIntent`, `useGetIntent`, `pollIntentReceipt`, and `useIntentReceiptMonitor`.
|
|
468
|
-
- `getAccountTransactionHistory`, `useAccountTransactionHistory`, `useIntentTransactionHistory`, and `getTxTimeDiff`.
|
|
469
|
-
- `useFiatCurrencyList`, `useExchangeRate`, `getCurrencyInfo`
|
|
470
|
-
- `getTrailsClient`, `useTrailsClient`, `TrailsClient`
|
|
471
|
-
- `useIntentRecover`, `useIntentRecoverWithAddress`, `buildRefundTransactionWithSignature`, and `signPayload`.
|
|
472
|
-
|
|
473
106
|
## Development
|
|
474
107
|
|
|
475
|
-
|
|
476
|
-
# Install dependencies
|
|
477
|
-
pnpm install
|
|
478
|
-
|
|
479
|
-
# Build the package
|
|
480
|
-
pnpm run build
|
|
108
|
+
Regenerate widget SVG components from a folder of raw SVGs with `pnpm --dir packages/0xtrails icons:generate <source-dir>`.
|
|
481
109
|
|
|
482
|
-
|
|
483
|
-
pnpm test
|
|
110
|
+
## Rules
|
|
484
111
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
112
|
+
- `wagmi` is optional and only needed for adapter-based integrations
|
|
113
|
+
- hooks require both `QueryClientProvider` and `TrailsProvider`
|
|
114
|
+
- `adapters` can live on `TrailsProvider config.adapters` or `TrailsWidget adapters`
|
|
115
|
+
- do not provide adapters in both places at the same time
|
|
116
|
+
- `TrailsWidget adapters` cannot be used inside an existing parent wallet context, including the default runtime mounted by `TrailsProvider`
|
|
488
117
|
|
|
489
118
|
## License
|
|
490
119
|
|
|
491
|
-
Apache-2.0
|
|
120
|
+
Apache-2.0
|
|
@@ -86,6 +86,16 @@ type BuildCustomParams = {
|
|
|
86
86
|
* token contract and the SDK infers it automatically.
|
|
87
87
|
*/
|
|
88
88
|
dynamicAmountToken?: Address.Address;
|
|
89
|
+
/**
|
|
90
|
+
* ERC-20 tokens for calls with multiple `dynamic()` amount slots that spend
|
|
91
|
+
* different runtime balances. Tokens are matched in encoded calldata order.
|
|
92
|
+
*/
|
|
93
|
+
dynamicAmountTokens?: Address.Address[];
|
|
94
|
+
/**
|
|
95
|
+
* Additional ERC-20 or native assets to sweep back to the user after this
|
|
96
|
+
* opaque call runs.
|
|
97
|
+
*/
|
|
98
|
+
sweepTokens?: Address.Address[];
|
|
89
99
|
};
|
|
90
100
|
type AssertERC20BalanceParams = {
|
|
91
101
|
erc20Balance: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionBuilder.d.ts","sourceRoot":"","sources":["../../src/actions/actionBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"actionBuilder.d.ts","sourceRoot":"","sources":["../../src/actions/actionBuilder.ts"],"names":[],"mappings":"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"}
|