@imtbl/checkout-widgets 2.0.0-alpha.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/LICENSE.md +176 -0
- package/README.md +3 -0
- package/dist/browser/AddTokensWidget-QGKGQBKZ.js +1 -0
- package/dist/browser/BridgeWidget-2JZZV7LZ.js +1 -0
- package/dist/browser/CommerceWidget-IVNOVHCZ.js +1 -0
- package/dist/browser/ConnectWidget-ZM6T4NZJ.js +1 -0
- package/dist/browser/OnRampWidget-CXSJR4D2.js +1 -0
- package/dist/browser/SaleWidget-NS5UQNBN.js +1 -0
- package/dist/browser/SwapWidget-3DWYEOCD.js +1 -0
- package/dist/browser/WalletWidget-XWB6VELR.js +1 -0
- package/dist/browser/chunk-273L75VZ.js +26 -0
- package/dist/browser/chunk-3AHRPZYV.js +2 -0
- package/dist/browser/chunk-5AVK5XOU.js +4 -0
- package/dist/browser/chunk-5U7AR7XV.js +1 -0
- package/dist/browser/chunk-65KT4KZW.js +1 -0
- package/dist/browser/chunk-AWLYHJ5L.js +2 -0
- package/dist/browser/chunk-BVF4MRFQ.js +2 -0
- package/dist/browser/chunk-DVUYKTGV.js +2 -0
- package/dist/browser/chunk-ECAH5RC3.js +1 -0
- package/dist/browser/chunk-EEDQFEKZ.js +2 -0
- package/dist/browser/chunk-EZWBOX2K.js +1 -0
- package/dist/browser/chunk-I3HZNWUF.js +1 -0
- package/dist/browser/chunk-JF3XWEEL.js +2 -0
- package/dist/browser/chunk-JV43EWXA.js +1 -0
- package/dist/browser/chunk-K3KIUMY7.js +1 -0
- package/dist/browser/chunk-KOBELCOG.js +1 -0
- package/dist/browser/chunk-MADECDXT.js +2 -0
- package/dist/browser/chunk-ME7FB46X.js +1 -0
- package/dist/browser/chunk-NNMZJ5NV.js +2 -0
- package/dist/browser/chunk-OPMBNAY3.js +1 -0
- package/dist/browser/chunk-P7Y5EGBN.js +1 -0
- package/dist/browser/chunk-QJTHBCR2.js +1 -0
- package/dist/browser/chunk-QPOHDTWR.js +12 -0
- package/dist/browser/chunk-R5TRMOBS.js +1 -0
- package/dist/browser/chunk-R7NCCCUY.js +1 -0
- package/dist/browser/chunk-RTSPX46P.js +1 -0
- package/dist/browser/chunk-UNEH2WXY.js +1 -0
- package/dist/browser/chunk-UNLLKACC.js +1 -0
- package/dist/browser/chunk-WCTMM2S2.js +2 -0
- package/dist/browser/chunk-WWUSGIQB.js +2 -0
- package/dist/browser/chunk-XE2T4YRZ.js +2 -0
- package/dist/browser/chunk-Y7N65KJX.js +1 -0
- package/dist/browser/chunk-YOCWSYBR.js +1 -0
- package/dist/browser/chunk-Z52PVTUZ.js +2 -0
- package/dist/browser/index.cdn.js +2611 -0
- package/dist/browser/index.js +14 -0
- package/dist/node/AddTokensWidget-JVV5SAXW.js +1 -0
- package/dist/node/AddTokensWidget-LS55AEAX.cjs +1 -0
- package/dist/node/BridgeWidget-ANWHTETV.cjs +1 -0
- package/dist/node/BridgeWidget-BEHWLY4M.js +1 -0
- package/dist/node/CommerceWidget-572UHGHP.js +1 -0
- package/dist/node/CommerceWidget-RJBIBYDR.cjs +1 -0
- package/dist/node/ConnectWidget-KSU76TQZ.cjs +1 -0
- package/dist/node/ConnectWidget-SUTP57IU.js +1 -0
- package/dist/node/OnRampWidget-KWATCRL6.cjs +1 -0
- package/dist/node/OnRampWidget-XTLZQCYU.js +1 -0
- package/dist/node/SaleWidget-AKMOR4MS.cjs +1 -0
- package/dist/node/SaleWidget-MHO7WXRH.js +1 -0
- package/dist/node/SwapWidget-MNOU735K.js +1 -0
- package/dist/node/SwapWidget-OAO2LUH7.cjs +1 -0
- package/dist/node/WalletWidget-3O2ZGGS3.js +1 -0
- package/dist/node/WalletWidget-6EVH2BKX.cjs +1 -0
- package/dist/node/chunk-22SKYDXN.cjs +13 -0
- package/dist/node/chunk-2MYO4ISV.js +13 -0
- package/dist/node/chunk-3U2JWMZP.js +1 -0
- package/dist/node/chunk-3YTH4LI4.js +1 -0
- package/dist/node/chunk-4IFPHDUT.js +1 -0
- package/dist/node/chunk-6H2BBDML.js +1 -0
- package/dist/node/chunk-6TWJH2AM.js +1 -0
- package/dist/node/chunk-7UY5KYHG.cjs +1 -0
- package/dist/node/chunk-AAYNER66.js +1 -0
- package/dist/node/chunk-AIYMKAUY.cjs +1 -0
- package/dist/node/chunk-BYAQUPEK.js +1 -0
- package/dist/node/chunk-C6FRHKWB.js +2 -0
- package/dist/node/chunk-CB2MUIJZ.cjs +1 -0
- package/dist/node/chunk-FNPSTVDH.cjs +1 -0
- package/dist/node/chunk-GLDQ7MF4.js +1 -0
- package/dist/node/chunk-GNHN2ICF.cjs +1 -0
- package/dist/node/chunk-HDLNJM65.js +1 -0
- package/dist/node/chunk-HI6MCAVV.cjs +1 -0
- package/dist/node/chunk-HZLDGMYD.js +1 -0
- package/dist/node/chunk-HZNOURGW.js +1 -0
- package/dist/node/chunk-JKILWATI.js +1 -0
- package/dist/node/chunk-K52NEJW2.cjs +1 -0
- package/dist/node/chunk-KGOQ6VFE.js +1 -0
- package/dist/node/chunk-KNH42REY.js +1 -0
- package/dist/node/chunk-KSTBNWCA.js +1 -0
- package/dist/node/chunk-KWBEZYZZ.cjs +1 -0
- package/dist/node/chunk-LJK7NSTD.js +1 -0
- package/dist/node/chunk-MD2VWWAQ.js +1 -0
- package/dist/node/chunk-MKJ4R6WO.cjs +1 -0
- package/dist/node/chunk-NZFR53NE.cjs +1 -0
- package/dist/node/chunk-OQQYEFTA.js +1 -0
- package/dist/node/chunk-OXPQRBCG.js +1 -0
- package/dist/node/chunk-PBOKGTIX.cjs +1 -0
- package/dist/node/chunk-PH7MBID7.cjs +2 -0
- package/dist/node/chunk-PUPRBAZB.cjs +1 -0
- package/dist/node/chunk-QCLRQLDO.cjs +1 -0
- package/dist/node/chunk-QHSNFLEV.cjs +1 -0
- package/dist/node/chunk-QRVHE5Y7.cjs +1 -0
- package/dist/node/chunk-QYNUE7DW.js +1 -0
- package/dist/node/chunk-RA25BPS6.cjs +1 -0
- package/dist/node/chunk-RJ7GFDCE.cjs +26 -0
- package/dist/node/chunk-RLN6G3DA.js +1 -0
- package/dist/node/chunk-ROFHVMKI.cjs +1 -0
- package/dist/node/chunk-RXF5UFTS.cjs +1 -0
- package/dist/node/chunk-SLZNA32D.cjs +1 -0
- package/dist/node/chunk-TR6RIRY5.js +1 -0
- package/dist/node/chunk-U35NC4YR.js +1 -0
- package/dist/node/chunk-U3UYGXTO.cjs +1 -0
- package/dist/node/chunk-U5NIPQGN.js +1 -0
- package/dist/node/chunk-UAFMLOWU.cjs +1 -0
- package/dist/node/chunk-UQ6XJRZD.cjs +1 -0
- package/dist/node/chunk-VBZYATUZ.cjs +1 -0
- package/dist/node/chunk-VRNYQKKE.js +1 -0
- package/dist/node/chunk-WFETTIGN.cjs +1 -0
- package/dist/node/chunk-WM3DCFTT.cjs +1 -0
- package/dist/node/chunk-WMW6GDIT.cjs +1 -0
- package/dist/node/chunk-WRCRJRRN.cjs +1 -0
- package/dist/node/chunk-WX7AXFHF.js +1 -0
- package/dist/node/chunk-XOR3FOOQ.cjs +1 -0
- package/dist/node/chunk-XPPN74JV.js +1 -0
- package/dist/node/chunk-Y4BXGSPS.cjs +1 -0
- package/dist/node/chunk-YWKKC4WT.cjs +1 -0
- package/dist/node/chunk-YZP7VIZZ.js +1 -0
- package/dist/node/chunk-Z3BWDS2L.js +1 -0
- package/dist/node/chunk-ZDBKUGOB.js +26 -0
- package/dist/node/chunk-ZESSPNGI.js +1 -0
- package/dist/node/chunk-ZHUX33PW.cjs +1 -0
- package/dist/node/chunk-ZMA2BB4P.js +1 -0
- package/dist/node/index.cjs +13 -0
- package/dist/node/index.js +13 -0
- package/dist/types/components/Body/SimpleTextBody.d.ts +5 -0
- package/dist/types/components/Body/SimpleTextBodyStyles.d.ts +10 -0
- package/dist/types/components/CenteredBoxContent/CenteredBoxContent.d.ts +5 -0
- package/dist/types/components/CenteredBoxContent/CenteredBoxStyles.d.ts +6 -0
- package/dist/types/components/ChangedYourMindDrawer/ChangedYourMindDrawer.d.ts +8 -0
- package/dist/types/components/CoinSelector/CoinSelector.d.ts +12 -0
- package/dist/types/components/CoinSelector/CoinSelectorOption.d.ts +15 -0
- package/dist/types/components/CoinSelector/CoinSelectorStyles.d.ts +12 -0
- package/dist/types/components/ConnectLoader/ConnectLoader.d.ts +21 -0
- package/dist/types/components/ConnectLoader/ConnectLoaderSuccess.d.ts +5 -0
- package/dist/types/components/EOAWarningDrawer/EOAWarningDrawer.d.ts +5 -0
- package/dist/types/components/Fees/FeeStyles.d.ts +18 -0
- package/dist/types/components/Fees/Fees.d.ts +14 -0
- package/dist/types/components/FeesBreakdown/FeeItem.d.ts +9 -0
- package/dist/types/components/FeesBreakdown/FeesBreakdown.d.ts +13 -0
- package/dist/types/components/FeesBreakdown/FeesBreakdownStyles.d.ts +28 -0
- package/dist/types/components/Footer/FooterButton.d.ts +9 -0
- package/dist/types/components/Footer/FooterLogo.d.ts +4 -0
- package/dist/types/components/Footer/FooterStyles.d.ts +41 -0
- package/dist/types/components/Footer/QuickswapFooter.d.ts +7 -0
- package/dist/types/components/FormComponents/FormControlWrapper/FormControlWrapper.d.ts +12 -0
- package/dist/types/components/FormComponents/SelectForm/SelectForm.d.ts +21 -0
- package/dist/types/components/FormComponents/SelectInput/SelectInput.d.ts +34 -0
- package/dist/types/components/FormComponents/SelectInput/SelectInputStyles.d.ts +12 -0
- package/dist/types/components/FormComponents/TextInputForm/TextInputForm.d.ts +21 -0
- package/dist/types/components/Handover/Handover.d.ts +5 -0
- package/dist/types/components/Handover/HandoverAnimation.d.ts +4 -0
- package/dist/types/components/Handover/HandoverContent.d.ts +9 -0
- package/dist/types/components/Header/HeaderNavigation.d.ts +10 -0
- package/dist/types/components/Header/HeaderStyles.d.ts +6 -0
- package/dist/types/components/Hero/BridgeHero.d.ts +1 -0
- package/dist/types/components/Hero/CreditCardWarningHero.d.ts +1 -0
- package/dist/types/components/Hero/EthereumPlanetHero.d.ts +1 -0
- package/dist/types/components/Hero/HeroImageStyles.d.ts +19 -0
- package/dist/types/components/Hero/IMXCoinsHero.d.ts +1 -0
- package/dist/types/components/Hero/ImmutablePlanetHero.d.ts +1 -0
- package/dist/types/components/Hero/MetamaskConnectHero.d.ts +1 -0
- package/dist/types/components/Hero/NoServiceHero.d.ts +1 -0
- package/dist/types/components/Hero/PassportConnectHero.d.ts +1 -0
- package/dist/types/components/Hero/RocketHero.d.ts +6 -0
- package/dist/types/components/Hero/SanctionsHero.d.ts +1 -0
- package/dist/types/components/Hero/SatelliteHero.d.ts +1 -0
- package/dist/types/components/Hero/SpendingCapHero.d.ts +1 -0
- package/dist/types/components/Hero/TransferAssetsL1WarningHero.d.ts +1 -0
- package/dist/types/components/Hero/WalletApproveHero.d.ts +1 -0
- package/dist/types/components/Hero/WalletWarningHero.d.ts +1 -0
- package/dist/types/components/Hero/WarningHero.d.ts +1 -0
- package/dist/types/components/NetworkSwitchDrawer/NetworkSwitchDrawer.d.ts +10 -0
- package/dist/types/components/NotEnoughGas/NotEnoughGas.d.ts +11 -0
- package/dist/types/components/NotEnoughGas/NotEnoughGasStyles.d.ts +40 -0
- package/dist/types/components/NotEnoughImx/NotEnoughImx.d.ts +11 -0
- package/dist/types/components/NotEnoughImx/NotEnoughImxStyles.d.ts +33 -0
- package/dist/types/components/RawImage/RawImage.d.ts +6 -0
- package/dist/types/components/RawImage/RawImageStyles.d.ts +22 -0
- package/dist/types/components/SimpleLayout/SimpleLayout.d.ts +13 -0
- package/dist/types/components/SimpleLayout/SimpleLayoutStyles.d.ts +49 -0
- package/dist/types/components/Status/StatusBox.d.ts +7 -0
- package/dist/types/components/Status/StatusType.d.ts +7 -0
- package/dist/types/components/Status/StatusView.d.ts +14 -0
- package/dist/types/components/Status/StatusViewStyles.d.ts +22 -0
- package/dist/types/components/ThemeProvider/ThemeProvider.d.ts +10 -0
- package/dist/types/components/ThemeProvider/themeProviderStyles.d.ts +9 -0
- package/dist/types/components/TokenImage/TokenImage.d.ts +19 -0
- package/dist/types/components/TransactionRejected/TransactionRejected.d.ts +8 -0
- package/dist/types/components/TransactionRejected/TransactionRejectedStyles.d.ts +26 -0
- package/dist/types/components/Transactions/ChangeWallet.d.ts +4 -0
- package/dist/types/components/Transactions/ChangeWalletStyles.d.ts +31 -0
- package/dist/types/components/Transactions/ClaimWithdrawalInProgress.d.ts +6 -0
- package/dist/types/components/Transactions/EmptyStateNotConnected.d.ts +5 -0
- package/dist/types/components/Transactions/EmptyStateNotConnectedStyles.d.ts +10 -0
- package/dist/types/components/Transactions/NoTransactions.d.ts +8 -0
- package/dist/types/components/Transactions/NotEnoughEthToWithdraw.d.ts +6 -0
- package/dist/types/components/Transactions/NotEnoughEthToWithdrawStyles.d.ts +37 -0
- package/dist/types/components/Transactions/Shimmer.d.ts +1 -0
- package/dist/types/components/Transactions/SupportMessage.d.ts +7 -0
- package/dist/types/components/Transactions/SupportMessageStyles.d.ts +9 -0
- package/dist/types/components/Transactions/TransactionDetails.d.ts +7 -0
- package/dist/types/components/Transactions/TransactionItem.d.ts +18 -0
- package/dist/types/components/Transactions/TransactionItemWithdrawPending.d.ts +13 -0
- package/dist/types/components/Transactions/TransactionList.d.ts +13 -0
- package/dist/types/components/Transactions/TransactionListStyles.d.ts +16 -0
- package/dist/types/components/Transactions/Transactions.d.ts +6 -0
- package/dist/types/components/Transactions/TransactionsStyles.d.ts +26 -0
- package/dist/types/components/Transactions/noTransactionStyles.d.ts +26 -0
- package/dist/types/components/Transactions/transactionItemStyles.d.ts +30 -0
- package/dist/types/components/Transactions/transactionsType.d.ts +6 -0
- package/dist/types/components/Transak/TransakEvents.d.ts +42 -0
- package/dist/types/components/Transak/TransakIframe.d.ts +13 -0
- package/dist/types/components/Transak/TransakTypes.d.ts +9 -0
- package/dist/types/components/Transak/useTransakEvents.d.ts +24 -0
- package/dist/types/components/Transak/useTransakIframe.d.ts +41 -0
- package/dist/types/components/UnableToConnectDrawer/UnableToConnectDrawer.d.ts +8 -0
- package/dist/types/components/WalletDrawer/ConnectWalletDrawer.d.ts +23 -0
- package/dist/types/components/WalletDrawer/DeliverToWalletDrawer.d.ts +9 -0
- package/dist/types/components/WalletDrawer/PayWithWalletDrawer.d.ts +12 -0
- package/dist/types/components/WalletDrawer/WalletConnectItem.d.ts +7 -0
- package/dist/types/components/WalletDrawer/WalletDrawer.d.ts +25 -0
- package/dist/types/components/WalletDrawer/WalletDrawerEvents.d.ts +6 -0
- package/dist/types/components/WalletDrawer/WalletDrawerStyles.d.ts +7 -0
- package/dist/types/components/WalletDrawer/WalletItem.d.ts +15 -0
- package/dist/types/components/WithdrawalQueueDrawer/WithdrawalQueueDrawer.d.ts +14 -0
- package/dist/types/context/analytics-provider/CustomAnalyticsProvider.d.ts +7 -0
- package/dist/types/context/analytics-provider/SegmentAnalyticsProvider.d.ts +42 -0
- package/dist/types/context/analytics-provider/SetupAnalytics.d.ts +7 -0
- package/dist/types/context/connect-loader-context/ConnectLoader.test.d.ts +1 -0
- package/dist/types/context/connect-loader-context/ConnectLoaderContext.d.ts +48 -0
- package/dist/types/context/connect-loader-context/test-components/ConnectLoaderTestComponent.d.ts +7 -0
- package/dist/types/context/crypto-fiat-context/CryptoFiat.d.ts +4 -0
- package/dist/types/context/crypto-fiat-context/CryptoFiatContext.d.ts +45 -0
- package/dist/types/context/crypto-fiat-context/CryptoFiatContext.test.d.ts +1 -0
- package/dist/types/context/crypto-fiat-context/CryptoFiatProvider.d.ts +9 -0
- package/dist/types/context/crypto-fiat-context/test-components/CryptoFiatTestComponent.d.ts +5 -0
- package/dist/types/context/event-target-context/EventTarget.test.d.ts +1 -0
- package/dist/types/context/event-target-context/EventTargetContext.d.ts +24 -0
- package/dist/types/context/event-target-context/test-components/EventTargetTestComponent.d.ts +7 -0
- package/dist/types/context/handover-context/HandoverContext.d.ts +29 -0
- package/dist/types/context/handover-context/HandoverProvider.d.ts +11 -0
- package/dist/types/context/providers-context/ProvidersContext.d.ts +59 -0
- package/dist/types/context/view-context/AddTokensViewContextTypes.d.ts +29 -0
- package/dist/types/context/view-context/BridgeViewContextTypes.d.ts +66 -0
- package/dist/types/context/view-context/CheckoutWidgetViewContextTypes.d.ts +53 -0
- package/dist/types/context/view-context/ConnectViewContextTypes.d.ts +18 -0
- package/dist/types/context/view-context/OnRampViewContextTypes.d.ts +35 -0
- package/dist/types/context/view-context/PurchaseViewContextTypes.d.ts +20 -0
- package/dist/types/context/view-context/SaleViewContextTypes.d.ts +44 -0
- package/dist/types/context/view-context/SwapViewContextTypes.d.ts +64 -0
- package/dist/types/context/view-context/ViewContext.d.ts +75 -0
- package/dist/types/context/view-context/ViewContext.test.d.ts +1 -0
- package/dist/types/context/view-context/ViewType.d.ts +4 -0
- package/dist/types/context/view-context/WalletViewContextTypes.d.ts +26 -0
- package/dist/types/context/view-context/test-components/ViewContextTestComponent.d.ts +7 -0
- package/dist/types/factory.d.ts +9 -0
- package/dist/types/hooks/useMount.d.ts +9 -0
- package/dist/types/i18n.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/addressUtils.d.ts +1 -0
- package/dist/types/lib/addressUtils.test.d.ts +1 -0
- package/dist/types/lib/analytics/identifyUser.d.ts +8 -0
- package/dist/types/lib/analytics/identifyUser.test.d.ts +1 -0
- package/dist/types/lib/animation/listAnimation.d.ts +23 -0
- package/dist/types/lib/async/cancellablePromise.d.ts +19 -0
- package/dist/types/lib/async/cancellablePromise.test.d.ts +1 -0
- package/dist/types/lib/balance.d.ts +15 -0
- package/dist/types/lib/balance.test.d.ts +1 -0
- package/dist/types/lib/chains.d.ts +5 -0
- package/dist/types/lib/chains.test.d.ts +1 -0
- package/dist/types/lib/clients/checkoutApi.d.ts +39 -0
- package/dist/types/lib/clients/checkoutApi.test.d.ts +1 -0
- package/dist/types/lib/clients/checkoutApiType.d.ts +34 -0
- package/dist/types/lib/clients/index.d.ts +2 -0
- package/dist/types/lib/connectEIP6963Provider.d.ts +10 -0
- package/dist/types/lib/constants.d.ts +88 -0
- package/dist/types/lib/eip1193Events.d.ts +12 -0
- package/dist/types/lib/feeEstimation.d.ts +5 -0
- package/dist/types/lib/feeEstimation.test.d.ts +1 -0
- package/dist/types/lib/fetchTokenSymbols.d.ts +2 -0
- package/dist/types/lib/fetchTokenSymbols.test.d.ts +1 -0
- package/dist/types/lib/gasBalanceCheck.d.ts +2 -0
- package/dist/types/lib/gasBalanceCheck.test.d.ts +1 -0
- package/dist/types/lib/hooks/useAsyncMemo.d.ts +5 -0
- package/dist/types/lib/hooks/useBalance.d.ts +11 -0
- package/dist/types/lib/hooks/useDebounce.d.ts +2 -0
- package/dist/types/lib/hooks/useHandover.d.ts +12 -0
- package/dist/types/lib/hooks/useInjectedProviders.d.ts +16 -0
- package/dist/types/lib/hooks/useInterval.d.ts +1 -0
- package/dist/types/lib/hooks/useIsSmallScreen.d.ts +4 -0
- package/dist/types/lib/hooks/usePortalId.d.ts +1 -0
- package/dist/types/lib/hooks/useQuoteOrder.d.ts +12 -0
- package/dist/types/lib/hooks/useSignOrder.d.ts +12 -0
- package/dist/types/lib/hooks/useWalletConnect.d.ts +15 -0
- package/dist/types/lib/index.d.ts +6 -0
- package/dist/types/lib/logoUtils.d.ts +3 -0
- package/dist/types/lib/metrics.d.ts +3 -0
- package/dist/types/lib/networkStyles.d.ts +22 -0
- package/dist/types/lib/networkUtils.d.ts +3 -0
- package/dist/types/lib/orchestrationEvents.d.ts +14 -0
- package/dist/types/lib/primary-sales.d.ts +221 -0
- package/dist/types/lib/provider/index.d.ts +2 -0
- package/dist/types/lib/provider/providers.d.ts +3 -0
- package/dist/types/lib/provider/providers.test.d.ts +1 -0
- package/dist/types/lib/provider/utils.d.ts +21 -0
- package/dist/types/lib/provider/utils.test.d.ts +1 -0
- package/dist/types/lib/providerEvents.d.ts +2 -0
- package/dist/types/lib/retry.d.ts +7 -0
- package/dist/types/lib/retry.test.d.ts +1 -0
- package/dist/types/lib/squid/components/SquidFooter.d.ts +1 -0
- package/dist/types/lib/squid/components/SquidIcon.d.ts +5 -0
- package/dist/types/lib/squid/config.d.ts +2 -0
- package/dist/types/lib/squid/functions/convertToUsd.d.ts +3 -0
- package/dist/types/lib/squid/functions/fetchBalances.d.ts +5 -0
- package/dist/types/lib/squid/functions/fetchChains.d.ts +9 -0
- package/dist/types/lib/squid/functions/fetchTokens.d.ts +2 -0
- package/dist/types/lib/squid/functions/getRouteAndTokenBalances.d.ts +8 -0
- package/dist/types/lib/squid/functions/getRouteChains.d.ts +12 -0
- package/dist/types/lib/squid/functions/getTotalRouteFees.d.ts +12 -0
- package/dist/types/lib/squid/functions/isSquidNativeToken.d.ts +1 -0
- package/dist/types/lib/squid/functions/sortRoutesByFastestTime.d.ts +2 -0
- package/dist/types/lib/squid/hooks/useExecute.d.ts +13 -0
- package/dist/types/lib/squid/hooks/useRoutes.d.ts +9 -0
- package/dist/types/lib/squid/hooks/useSquid.d.ts +3 -0
- package/dist/types/lib/squid/hooks/useTokens.d.ts +3 -0
- package/dist/types/lib/squid/types.d.ts +40 -0
- package/dist/types/lib/storage.d.ts +4 -0
- package/dist/types/lib/theme.d.ts +3 -0
- package/dist/types/lib/theme.test.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +28 -0
- package/dist/types/lib/utils.test.d.ts +1 -0
- package/dist/types/lib/validations/amountInputValidations.d.ts +1 -0
- package/dist/types/lib/validations/amountInputValidations.test.d.ts +1 -0
- package/dist/types/lib/validations/widgetValidators.d.ts +3 -0
- package/dist/types/lib/validations/widgetValidators.test.d.ts +1 -0
- package/dist/types/lib/walletConnect.d.ts +40 -0
- package/dist/types/lib/withDefaultWidgetConfig.d.ts +11 -0
- package/dist/types/lib/withDefaultWidgetConfig.test.d.ts +1 -0
- package/dist/types/setupTests.d.ts +1 -0
- package/dist/types/views/error/ErrorView.d.ts +8 -0
- package/dist/types/views/error/ServiceUnavailableErrorView.d.ts +5 -0
- package/dist/types/views/error/ServiceUnavailableToRegionErrorView.d.ts +10 -0
- package/dist/types/views/error/serviceTypes.d.ts +5 -0
- package/dist/types/views/loading/LoadingView.d.ts +7 -0
- package/dist/types/views/top-up/TopUpMenuItem.d.ts +14 -0
- package/dist/types/views/top-up/TopUpView.d.ts +29 -0
- package/dist/types/widgets/BaseWidgetRoot.d.ts +39 -0
- package/dist/types/widgets/add-tokens/AddTokensRoot.d.ts +8 -0
- package/dist/types/widgets/add-tokens/AddTokensWidget.d.ts +6 -0
- package/dist/types/widgets/add-tokens/AddTokensWidgetEvents.d.ts +5 -0
- package/dist/types/widgets/add-tokens/components/AddressMissmatchDrawer.d.ts +5 -0
- package/dist/types/widgets/add-tokens/components/FiatOption.d.ts +11 -0
- package/dist/types/widgets/add-tokens/components/OnboardingDrawer.d.ts +5 -0
- package/dist/types/widgets/add-tokens/components/Options.d.ts +16 -0
- package/dist/types/widgets/add-tokens/components/OptionsDrawer.d.ts +17 -0
- package/dist/types/widgets/add-tokens/components/RouteFees.d.ts +9 -0
- package/dist/types/widgets/add-tokens/components/RouteOption.d.ts +14 -0
- package/dist/types/widgets/add-tokens/components/SelectedRouteOption.d.ts +14 -0
- package/dist/types/widgets/add-tokens/components/SelectedWallet.d.ts +20 -0
- package/dist/types/widgets/add-tokens/components/TokenDrawerMenu.d.ts +12 -0
- package/dist/types/widgets/add-tokens/context/AddTokensContext.d.ts +87 -0
- package/dist/types/widgets/add-tokens/functions/amountValidation.d.ts +10 -0
- package/dist/types/widgets/add-tokens/functions/checkSanctionedAddresses.d.ts +2 -0
- package/dist/types/widgets/add-tokens/functions/convertToNetworkChangeableProvider.d.ts +2 -0
- package/dist/types/widgets/add-tokens/functions/delay.d.ts +1 -0
- package/dist/types/widgets/add-tokens/functions/errorType.d.ts +1 -0
- package/dist/types/widgets/add-tokens/functions/getDurationFormatted.d.ts +1 -0
- package/dist/types/widgets/add-tokens/functions/getFormattedNumber.d.ts +9 -0
- package/dist/types/widgets/add-tokens/functions/onboardingState.d.ts +7 -0
- package/dist/types/widgets/add-tokens/hooks/useError.d.ts +5 -0
- package/dist/types/widgets/add-tokens/types.d.ts +28 -0
- package/dist/types/widgets/add-tokens/utils/animation.d.ts +1 -0
- package/dist/types/widgets/add-tokens/utils/config.d.ts +6 -0
- package/dist/types/widgets/add-tokens/views/AddTokens.d.ts +16 -0
- package/dist/types/widgets/add-tokens/views/Review.d.ts +9 -0
- package/dist/types/widgets/bridge/BridgeWidget.d.ts +8 -0
- package/dist/types/widgets/bridge/BridgeWidgetEvents.d.ts +5 -0
- package/dist/types/widgets/bridge/BridgeWidgetRoot.d.ts +8 -0
- package/dist/types/widgets/bridge/components/BridgeForm.d.ts +13 -0
- package/dist/types/widgets/bridge/components/BridgeFormStyles.d.ts +18 -0
- package/dist/types/widgets/bridge/components/BridgeReviewSummary.d.ts +1 -0
- package/dist/types/widgets/bridge/components/BridgeReviewSummaryStyles.d.ts +65 -0
- package/dist/types/widgets/bridge/components/NetworkItem.d.ts +10 -0
- package/dist/types/widgets/bridge/components/TokenSelectShimmer.d.ts +4 -0
- package/dist/types/widgets/bridge/components/WalletAndNetworkSelector.d.ts +1 -0
- package/dist/types/widgets/bridge/components/WalletAndNetworkSelectorStyles.d.ts +15 -0
- package/dist/types/widgets/bridge/components/WalletNetworkButton.d.ts +16 -0
- package/dist/types/widgets/bridge/components/WalletNetworkButtonStyles.d.ts +51 -0
- package/dist/types/widgets/bridge/context/BridgeContext.d.ts +78 -0
- package/dist/types/widgets/bridge/context/BridgeContext.test.d.ts +1 -0
- package/dist/types/widgets/bridge/functions/BridgeFees.d.ts +4 -0
- package/dist/types/widgets/bridge/functions/BridgeFormValidator.d.ts +3 -0
- package/dist/types/widgets/bridge/functions/TransferErc20.d.ts +2 -0
- package/dist/types/widgets/bridge/test-components/BridgeWidgetTestComponent.d.ts +8 -0
- package/dist/types/widgets/bridge/views/ApproveTransaction.d.ts +12 -0
- package/dist/types/widgets/bridge/views/Bridge.d.ts +8 -0
- package/dist/types/widgets/bridge/views/BridgeReview.d.ts +1 -0
- package/dist/types/widgets/bridge/views/ClaimWithdrawal.d.ts +5 -0
- package/dist/types/widgets/bridge/views/MoveInProgress.d.ts +5 -0
- package/dist/types/widgets/bridge/views/WalletNetworkSelectionView.d.ts +5 -0
- package/dist/types/widgets/connect/ConnectWidget.d.ts +16 -0
- package/dist/types/widgets/connect/ConnectWidgetRoot.d.ts +8 -0
- package/dist/types/widgets/connect/components/BrowserWalletItem.d.ts +6 -0
- package/dist/types/widgets/connect/components/NonPassportWarningDrawer.d.ts +5 -0
- package/dist/types/widgets/connect/components/WalletConnectItem.d.ts +5 -0
- package/dist/types/widgets/connect/components/WalletItem.d.ts +10 -0
- package/dist/types/widgets/connect/components/WalletList.d.ts +9 -0
- package/dist/types/widgets/connect/components/WalletListStyles.d.ts +8 -0
- package/dist/types/widgets/connect/connectWidgetEvents.d.ts +6 -0
- package/dist/types/widgets/connect/connectWidgetStyles.d.ts +17 -0
- package/dist/types/widgets/connect/context/ConnectContext.d.ts +50 -0
- package/dist/types/widgets/connect/context/ConnectContext.test.d.ts +1 -0
- package/dist/types/widgets/connect/views/ConnectWallet.d.ts +11 -0
- package/dist/types/widgets/connect/views/ReadyToConnect.d.ts +6 -0
- package/dist/types/widgets/connect/views/SwitchNetworkEth.d.ts +1 -0
- package/dist/types/widgets/connect/views/SwitchNetworkZkEVM.d.ts +1 -0
- package/dist/types/widgets/immutable-commerce/CommerceWidget.d.ts +10 -0
- package/dist/types/widgets/immutable-commerce/CommerceWidgetEvents.d.ts +6 -0
- package/dist/types/widgets/immutable-commerce/CommerceWidgetRoot.d.ts +66 -0
- package/dist/types/widgets/immutable-commerce/context/CommerceContext.d.ts +37 -0
- package/dist/types/widgets/immutable-commerce/functions/deduplicateSaleItemsArray.d.ts +2 -0
- package/dist/types/widgets/immutable-commerce/functions/getCommerceWidgetEvent.d.ts +5 -0
- package/dist/types/widgets/immutable-commerce/functions/getConnectLoaderParams.d.ts +7 -0
- package/dist/types/widgets/immutable-commerce/functions/getFlowRequiresContext.d.ts +8 -0
- package/dist/types/widgets/immutable-commerce/functions/getViewFromOrchestrationEventType.d.ts +5 -0
- package/dist/types/widgets/immutable-commerce/functions/isOrchestrationEvent.d.ts +7 -0
- package/dist/types/widgets/immutable-commerce/functions/isValidCommerceFlow.d.ts +7 -0
- package/dist/types/widgets/immutable-commerce/hooks/useMount.d.ts +5 -0
- package/dist/types/widgets/immutable-commerce/hooks/useWidgetEvents.d.ts +6 -0
- package/dist/types/widgets/on-ramp/OnRampWidget.d.ts +6 -0
- package/dist/types/widgets/on-ramp/OnRampWidgetEvents.d.ts +3 -0
- package/dist/types/widgets/on-ramp/OnRampWidgetRoot.d.ts +9 -0
- package/dist/types/widgets/on-ramp/TransakEvents.d.ts +19 -0
- package/dist/types/widgets/on-ramp/views/OnRampMain.d.ts +10 -0
- package/dist/types/widgets/on-ramp/views/OrderInProgress.d.ts +1 -0
- package/dist/types/widgets/on-ramp/views/onRampStyles.d.ts +14 -0
- package/dist/types/widgets/purchase/PurchaseWidget.d.ts +6 -0
- package/dist/types/widgets/purchase/PurchaseWidgetEvents.d.ts +5 -0
- package/dist/types/widgets/purchase/PurchaseWidgetRoot.d.ts +8 -0
- package/dist/types/widgets/purchase/context/PurchaseContext.d.ts +24 -0
- package/dist/types/widgets/purchase/types.d.ts +0 -0
- package/dist/types/widgets/purchase/views/Purchase.d.ts +7 -0
- package/dist/types/widgets/purchase/views/Review.d.ts +1 -0
- package/dist/types/widgets/sale/SaleWidget.d.ts +13 -0
- package/dist/types/widgets/sale/SaleWidgetEvents.d.ts +8 -0
- package/dist/types/widgets/sale/SaleWidgetRoot.d.ts +10 -0
- package/dist/types/widgets/sale/components/CoinsDrawer.d.ts +19 -0
- package/dist/types/widgets/sale/components/CoinsDrawerItem.d.ts +17 -0
- package/dist/types/widgets/sale/components/CreditCardWarningDrawer.d.ts +1 -0
- package/dist/types/widgets/sale/components/FundingRouteExecute/FundingRouteExecute.d.ts +7 -0
- package/dist/types/widgets/sale/components/OrderFees.d.ts +15 -0
- package/dist/types/widgets/sale/components/OrderItem.d.ts +14 -0
- package/dist/types/widgets/sale/components/OrderItems.d.ts +12 -0
- package/dist/types/widgets/sale/components/OrderReview.d.ts +15 -0
- package/dist/types/widgets/sale/components/PaymentOption.d.ts +12 -0
- package/dist/types/widgets/sale/components/PaymentOptions.d.ts +11 -0
- package/dist/types/widgets/sale/components/SelectCoinDropdown.d.ts +13 -0
- package/dist/types/widgets/sale/components/WithCard.d.ts +9 -0
- package/dist/types/widgets/sale/context/SaleContextProvider.d.ts +57 -0
- package/dist/types/widgets/sale/functions/fetchFundingBalances.d.ts +20 -0
- package/dist/types/widgets/sale/functions/fetchFundingBalancesUtils.d.ts +12 -0
- package/dist/types/widgets/sale/functions/fetchFundingBalancesUtils.test.d.ts +4 -0
- package/dist/types/widgets/sale/functions/fundingBalanceFees.d.ts +7 -0
- package/dist/types/widgets/sale/functions/fundingBalanceFees.test.d.ts +2 -0
- package/dist/types/widgets/sale/functions/getTopUpViewData.d.ts +16 -0
- package/dist/types/widgets/sale/functions/getTopUpViewData.test.d.ts +1 -0
- package/dist/types/widgets/sale/functions/signUtils.d.ts +3 -0
- package/dist/types/widgets/sale/functions/transformToOrderQuote.d.ts +28 -0
- package/dist/types/widgets/sale/functions/transformToOrderQuote.test.d.ts +1 -0
- package/dist/types/widgets/sale/functions/utils.d.ts +5 -0
- package/dist/types/widgets/sale/functions/utils.test.d.ts +1 -0
- package/dist/types/widgets/sale/hooks/useFundingBalances.d.ts +10 -0
- package/dist/types/widgets/sale/hooks/useHandoverSteps.d.ts +26 -0
- package/dist/types/widgets/sale/hooks/useQuoteOrder.d.ts +21 -0
- package/dist/types/widgets/sale/hooks/useSaleEvents.d.ts +36 -0
- package/dist/types/widgets/sale/hooks/useSignOrder.d.ts +12 -0
- package/dist/types/widgets/sale/types.d.ts +119 -0
- package/dist/types/widgets/sale/utils/analytics.d.ts +3 -0
- package/dist/types/widgets/sale/utils/config.d.ts +4 -0
- package/dist/types/widgets/sale/utils/pricing.d.ts +2 -0
- package/dist/types/widgets/sale/utils/pricing.test.d.ts +1 -0
- package/dist/types/widgets/sale/views/LoadingHandover.d.ts +7 -0
- package/dist/types/widgets/sale/views/OrderSummary.d.ts +6 -0
- package/dist/types/widgets/sale/views/PayWithCard.d.ts +1 -0
- package/dist/types/widgets/sale/views/PayWithCoins.d.ts +1 -0
- package/dist/types/widgets/sale/views/PaymentMethods.d.ts +1 -0
- package/dist/types/widgets/sale/views/SaleErrorView.d.ts +10 -0
- package/dist/types/widgets/swap/GeoblockLoader.d.ts +8 -0
- package/dist/types/widgets/swap/SwapStyles.d.ts +26 -0
- package/dist/types/widgets/swap/SwapWidget.d.ts +6 -0
- package/dist/types/widgets/swap/SwapWidgetEvents.d.ts +4 -0
- package/dist/types/widgets/swap/SwapWidgetRoot.d.ts +10 -0
- package/dist/types/widgets/swap/components/SwapButton.d.ts +6 -0
- package/dist/types/widgets/swap/components/SwapButtonStyles.d.ts +9 -0
- package/dist/types/widgets/swap/components/SwapForm.d.ts +8 -0
- package/dist/types/widgets/swap/components/TokenSelect.d.ts +10 -0
- package/dist/types/widgets/swap/components/UnableToSwap.d.ts +6 -0
- package/dist/types/widgets/swap/components/UnableToSwapStyles.d.ts +40 -0
- package/dist/types/widgets/swap/components/swapFormTypes.d.ts +8 -0
- package/dist/types/widgets/swap/context/SwapContext.d.ts +73 -0
- package/dist/types/widgets/swap/context/SwapContext.test.d.ts +6 -0
- package/dist/types/widgets/swap/functions/FetchQuote.d.ts +6 -0
- package/dist/types/widgets/swap/functions/FetchQuote.test.d.ts +1 -0
- package/dist/types/widgets/swap/functions/SwapValidator.d.ts +5 -0
- package/dist/types/widgets/swap/functions/SwapValidator.test.d.ts +1 -0
- package/dist/types/widgets/swap/functions/processGasFree.d.ts +8 -0
- package/dist/types/widgets/swap/functions/processGasFree.test.d.ts +1 -0
- package/dist/types/widgets/swap/functions/processQuoteToken.d.ts +8 -0
- package/dist/types/widgets/swap/functions/processSecondaryFees.d.ts +10 -0
- package/dist/types/widgets/swap/functions/processSecondaryFees.test.d.ts +1 -0
- package/dist/types/widgets/swap/functions/swapConversionRate.d.ts +4 -0
- package/dist/types/widgets/swap/functions/swapConversionRate.test.d.ts +1 -0
- package/dist/types/widgets/swap/functions/swapFees.d.ts +18 -0
- package/dist/types/widgets/swap/functions/swapFees.test.d.ts +1 -0
- package/dist/types/widgets/swap/helpers.d.ts +10 -0
- package/dist/types/widgets/swap/test-components/SwapWidgetTestComponent.d.ts +8 -0
- package/dist/types/widgets/swap/views/ApproveERC20Onboarding.d.ts +5 -0
- package/dist/types/widgets/swap/views/SwapCoins.d.ts +11 -0
- package/dist/types/widgets/swap/views/SwapInProgress.d.ts +8 -0
- package/dist/types/widgets/wallet/WalletWidget.d.ts +8 -0
- package/dist/types/widgets/wallet/WalletWidgetEvents.d.ts +4 -0
- package/dist/types/widgets/wallet/WalletWidgetRoot.d.ts +8 -0
- package/dist/types/widgets/wallet/components/BalanceItem/BalanceItem.d.ts +8 -0
- package/dist/types/widgets/wallet/components/BalanceItem/BalanceItemStyles.d.ts +3 -0
- package/dist/types/widgets/wallet/components/NetworkMenu/NetworkMenu.d.ts +1 -0
- package/dist/types/widgets/wallet/components/NetworkMenu/NetworkMenuStyles.d.ts +22 -0
- package/dist/types/widgets/wallet/components/TokenBalanceList/TokenBalanceList.d.ts +9 -0
- package/dist/types/widgets/wallet/components/TokenBalanceList/TokenBalanceListStyles.d.ts +14 -0
- package/dist/types/widgets/wallet/components/TotalTokenBalance/TotalTokenBalance.d.ts +6 -0
- package/dist/types/widgets/wallet/components/TotalTokenBalance/TotalTokenBalanceStyles.d.ts +20 -0
- package/dist/types/widgets/wallet/components/TransferAssetsL1Warning.d.ts +6 -0
- package/dist/types/widgets/wallet/components/WalletAddress/WalletAddress.d.ts +6 -0
- package/dist/types/widgets/wallet/context/WalletContext.d.ts +54 -0
- package/dist/types/widgets/wallet/context/WalletContext.test.d.ts +1 -0
- package/dist/types/widgets/wallet/functions/tokenBalances.d.ts +12 -0
- package/dist/types/widgets/wallet/functions/tokenBalances.test.d.ts +1 -0
- package/dist/types/widgets/wallet/test-components/WalletWidgetTestComponent.d.ts +8 -0
- package/dist/types/widgets/wallet/tokenDataStub.d.ts +6 -0
- package/dist/types/widgets/wallet/views/CoinInfo.d.ts +1 -0
- package/dist/types/widgets/wallet/views/Settings.d.ts +4 -0
- package/dist/types/widgets/wallet/views/SettingsStyles.d.ts +9 -0
- package/dist/types/widgets/wallet/views/WalletBalances.d.ts +8 -0
- package/dist/types/widgets/wallet/views/WalletBalancesStyles.d.ts +23 -0
- package/package.json +116 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare const baseWidgetProviderEvent = "IMTBL_WIDGET_PROVIDER_EVENT";
|
|
3
|
+
export declare enum ProviderEvent {
|
|
4
|
+
CHAIN_CHANGED = "chainChanged",
|
|
5
|
+
ACCOUNTS_CHANGED = "accountsChanged"
|
|
6
|
+
}
|
|
7
|
+
export declare function addAccountsChangedListener(browserProvider: WrappedBrowserProvider, handleAccountsChanged: (e: any) => void): void;
|
|
8
|
+
export declare function removeAccountsChangedListener(browserProvider: WrappedBrowserProvider, handleAccountsChanged: (e: any) => void): void;
|
|
9
|
+
export declare function addChainChangedListener(browserProvider: WrappedBrowserProvider, handleChainChanged: (e: any) => void): void;
|
|
10
|
+
export declare function removeChainChangedListener(browserProvider: WrappedBrowserProvider, handleChainChanged: (e: any) => void): void;
|
|
11
|
+
export declare function imtblWidgetsProviderUpdated(): void;
|
|
12
|
+
export declare function addProviderListenersForWidgetRoot(provider: WrappedBrowserProvider): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GasEstimateBridgeToL2Result, GasEstimateSwapResult, OnRampProviderFees } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare function formatFiatDecimals(value: number): string;
|
|
3
|
+
export declare const getOnRampFeeEstimation: (onRampFees: OnRampProviderFees) => string;
|
|
4
|
+
export declare const getSwapFeeEstimation: (swapFees: GasEstimateSwapResult, conversions: Map<string, number>) => string;
|
|
5
|
+
export declare const getBridgeFeeEstimation: (bridgeFees: GasEstimateBridgeToL2Result, conversions: Map<string, number>) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Checkout, GetBalanceResult, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
export interface UseBalanceParams {
|
|
3
|
+
checkout: Checkout | undefined;
|
|
4
|
+
provider: WrappedBrowserProvider | undefined;
|
|
5
|
+
refreshCallback: (balance: GetBalanceResult[]) => void;
|
|
6
|
+
errorCallback: (error: Error) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useBalance: ({ checkout, provider, refreshCallback, errorCallback, }: UseBalanceParams) => {
|
|
9
|
+
balancesLoading: boolean;
|
|
10
|
+
refreshBalances: (silent?: boolean) => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const useHandover: ({ id }?: {
|
|
2
|
+
id?: string;
|
|
3
|
+
}) => {
|
|
4
|
+
loader: import("../../context/handover-context/HandoverContext").HandoverLoader | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
showLoader: (loader: import("../../context/handover-context/HandoverContext").HandoverLoader) => void;
|
|
7
|
+
hideLoader: () => void;
|
|
8
|
+
handover: import("../../context/handover-context/HandoverContext").HandoverContent;
|
|
9
|
+
getHandover: (handoverId: string) => import("../../context/handover-context/HandoverContext").HandoverContent;
|
|
10
|
+
addHandover: (handoverContent: import("../../context/handover-context/HandoverContext").HandoverContent, handoverTarget?: import("../../context/handover-context/HandoverContext").HandoverTarget) => void;
|
|
11
|
+
closeHandover: (handoverTarget?: import("../../context/handover-context/HandoverContext").HandoverTarget) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Checkout, EIP6963ProviderDetail } from '@imtbl/checkout-sdk';
|
|
2
|
+
export interface UseInjectedProvidersParams {
|
|
3
|
+
checkout: Checkout | null;
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
ethereum: any;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Hook that supplies a sorted list of EIP-6963 injected provider detail.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useInjectedProviders: ({ checkout }: UseInjectedProvidersParams) => {
|
|
14
|
+
findProvider: (rdns: string) => EIP6963ProviderDetail | undefined;
|
|
15
|
+
providers: EIP6963ProviderDetail[];
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useInterval(callback: () => void, delay: number | null): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePortalId(): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OrderQuote, OrderQuoteCurrency, SaleErrorTypes, OrderQuoteApiResponse, UseQuoteOrderParams } from '../primary-sales';
|
|
2
|
+
export declare const defaultOrderQuote: OrderQuote;
|
|
3
|
+
export type ConfigError = {
|
|
4
|
+
type: SaleErrorTypes;
|
|
5
|
+
data?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export declare const transformToOrderQuote: ({ config, currencies, products, total_amount, }: OrderQuoteApiResponse, preferredCurrency?: string) => OrderQuote;
|
|
8
|
+
export declare const useQuoteOrder: ({ items, environment, environmentId, provider, preferredCurrency, }: UseQuoteOrderParams) => {
|
|
9
|
+
orderQuote: OrderQuote;
|
|
10
|
+
selectedCurrency: OrderQuoteCurrency | undefined;
|
|
11
|
+
orderQuoteError: ConfigError | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SignResponse, SignOrderInput, SignOrderError, ExecuteOrderResponse, ExecutedTransaction, SignPaymentTypes, SignedTransaction, ExecuteTransactionStep } from '../primary-sales';
|
|
2
|
+
export declare const useSignOrder: (input: SignOrderInput) => {
|
|
3
|
+
sign: (paymentType: SignPaymentTypes, fromTokenAddress: string) => Promise<SignResponse | undefined>;
|
|
4
|
+
signResponse: SignResponse | undefined;
|
|
5
|
+
signError: SignOrderError | undefined;
|
|
6
|
+
filteredTransactions: SignedTransaction[];
|
|
7
|
+
currentTransactionIndex: number;
|
|
8
|
+
executeAll: (signData: SignResponse | undefined, onTxnSuccess: (txn: ExecutedTransaction) => void, onTxnError: (error: any, txns: ExecutedTransaction[]) => void, onTxnStep?: (method: string, step: ExecuteTransactionStep) => void) => Promise<ExecutedTransaction[]>;
|
|
9
|
+
executeResponse: ExecuteOrderResponse;
|
|
10
|
+
tokenIds: string[];
|
|
11
|
+
executeNextTransaction: (onTxnSuccess: (txn: ExecutedTransaction) => void, onTxnError: (error: any, txns: ExecutedTransaction[]) => void, onTxnStep?: (method: string, step: ExecuteTransactionStep) => void) => Promise<boolean>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import EthereumProvider from '@walletconnect/ethereum-provider';
|
|
2
|
+
import { WalletConnectModal } from '@walletconnect/modal';
|
|
3
|
+
export interface OpenWalletConnectModalParams {
|
|
4
|
+
connectCallback: (ethereumProvider: EthereumProvider) => void;
|
|
5
|
+
restoreSession?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const useWalletConnect: () => {
|
|
8
|
+
isWalletConnectEnabled: boolean;
|
|
9
|
+
ethereumProvider: EthereumProvider | null;
|
|
10
|
+
walletConnectBusy: boolean;
|
|
11
|
+
walletConnectModal: WalletConnectModal | null;
|
|
12
|
+
openWalletConnectModal: ({ connectCallback, restoreSession, }: OpenWalletConnectModalParams) => Promise<unknown>;
|
|
13
|
+
getWalletLogoUrl: () => Promise<string | undefined>;
|
|
14
|
+
getWalletName: () => string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { WalletProviderName } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare function getWalletLogoByName(walletProviderName: WalletProviderName | string): "WalletConnectSymbol" | "MetaMaskSymbol" | "PassportSymbolOutlined";
|
|
3
|
+
export declare function getWalletDisplayName(walletProviderName: WalletProviderName | string): "Passport" | "MetaMask" | "Other" | "WalletConnect";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Flow } from '@imtbl/metrics';
|
|
2
|
+
export declare const withMetrics: <T>(fn: (flow: Flow) => T, flowName: string) => T;
|
|
3
|
+
export declare const withMetricsAsync: <T>(fn: (flow: Flow) => Promise<T>, flowName: string, anonymousId?: string, errorType?: (error: any) => string) => Promise<T>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChainName } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare const logoColour: {
|
|
3
|
+
15003: string;
|
|
4
|
+
13473: string;
|
|
5
|
+
13371: string;
|
|
6
|
+
1: string;
|
|
7
|
+
11155111: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const networkIcon: {
|
|
10
|
+
15003: string;
|
|
11
|
+
13371: string;
|
|
12
|
+
13473: string;
|
|
13
|
+
1: string;
|
|
14
|
+
11155111: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const networkName: {
|
|
17
|
+
15003: ChainName;
|
|
18
|
+
13371: ChainName;
|
|
19
|
+
13473: ChainName;
|
|
20
|
+
1: ChainName;
|
|
21
|
+
11155111: ChainName;
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IMTBLWidgetEvents, RequestBridgeEvent, RequestOnrampEvent, RequestSwapEvent, RequestGoBackEvent, RequestAddTokensEvent } from '@imtbl/checkout-sdk';
|
|
2
|
+
declare function sendRequestOnrampEvent(eventTarget: Window | EventTarget, imtblWidgetEvent: IMTBLWidgetEvents, eventData: RequestOnrampEvent): void;
|
|
3
|
+
declare function sendRequestSwapEvent(eventTarget: Window | EventTarget, imtblWidgetEvent: IMTBLWidgetEvents, eventData: RequestSwapEvent): void;
|
|
4
|
+
declare function sendRequestBridgeEvent(eventTarget: Window | EventTarget, imtblWidgetEvent: IMTBLWidgetEvents, eventData: RequestBridgeEvent): void;
|
|
5
|
+
declare function sendRequestGoBackEvent(eventTarget: Window | EventTarget, imtblWidgetEvent: IMTBLWidgetEvents, eventData: RequestGoBackEvent): void;
|
|
6
|
+
declare function sendRequestAddTokensEvent(eventTarget: Window | EventTarget, imtblWidgetEvent: IMTBLWidgetEvents, eventData: RequestAddTokensEvent): void;
|
|
7
|
+
export declare const orchestrationEvents: {
|
|
8
|
+
sendRequestBridgeEvent: typeof sendRequestBridgeEvent;
|
|
9
|
+
sendRequestSwapEvent: typeof sendRequestSwapEvent;
|
|
10
|
+
sendRequestOnrampEvent: typeof sendRequestOnrampEvent;
|
|
11
|
+
sendRequestGoBackEvent: typeof sendRequestGoBackEvent;
|
|
12
|
+
sendRequestAddTokensEvent: typeof sendRequestAddTokensEvent;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { Environment } from '@imtbl/config';
|
|
2
|
+
import { SaleItem, FundingStep, FundingItem, SmartCheckoutResult, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
3
|
+
export type SignedOrderProduct = {
|
|
4
|
+
productId: string;
|
|
5
|
+
qty: number;
|
|
6
|
+
image: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
amount: number[];
|
|
10
|
+
tokenId: string[];
|
|
11
|
+
currency: string;
|
|
12
|
+
contractType: string;
|
|
13
|
+
collectionAddress: string;
|
|
14
|
+
};
|
|
15
|
+
export type SignedOrder = {
|
|
16
|
+
currency: {
|
|
17
|
+
name: string;
|
|
18
|
+
erc20Address: string;
|
|
19
|
+
};
|
|
20
|
+
totalAmount: number;
|
|
21
|
+
products: SignedOrderProduct[];
|
|
22
|
+
};
|
|
23
|
+
export type SignedTransaction = {
|
|
24
|
+
tokenAddress: string;
|
|
25
|
+
gasEstimate: number;
|
|
26
|
+
methodCall: string;
|
|
27
|
+
params: {
|
|
28
|
+
reference: string;
|
|
29
|
+
amount: number;
|
|
30
|
+
spender: string;
|
|
31
|
+
};
|
|
32
|
+
rawData: string;
|
|
33
|
+
};
|
|
34
|
+
export type SignResponse = {
|
|
35
|
+
order: SignedOrder;
|
|
36
|
+
transactions: SignedTransaction[];
|
|
37
|
+
transactionId: string;
|
|
38
|
+
};
|
|
39
|
+
export type SignOrderInput = {
|
|
40
|
+
provider: WrappedBrowserProvider | undefined;
|
|
41
|
+
items: SaleItem[];
|
|
42
|
+
fromTokenAddress: string;
|
|
43
|
+
recipientAddress: string;
|
|
44
|
+
environment: string;
|
|
45
|
+
environmentId: string;
|
|
46
|
+
waitFulfillmentSettlements: boolean;
|
|
47
|
+
customOrderData?: Record<string, unknown>;
|
|
48
|
+
};
|
|
49
|
+
export type SignOrderError = {
|
|
50
|
+
type: SaleErrorTypes;
|
|
51
|
+
data?: Record<string, unknown>;
|
|
52
|
+
};
|
|
53
|
+
export type ExecutedTransaction = {
|
|
54
|
+
method: string;
|
|
55
|
+
hash: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
export type ExecuteOrderResponse = {
|
|
58
|
+
done: boolean;
|
|
59
|
+
transactions: ExecutedTransaction[];
|
|
60
|
+
};
|
|
61
|
+
export declare enum SaleErrorTypes {
|
|
62
|
+
DEFAULT = "DEFAULT_ERROR",
|
|
63
|
+
INVALID_PARAMETERS = "INVALID_PARAMETERS",
|
|
64
|
+
TRANSACTION_FAILED = "TRANSACTION_FAILED",
|
|
65
|
+
SERVICE_BREAKDOWN = "SERVICE_BREAKDOWN",
|
|
66
|
+
PRODUCT_NOT_FOUND = "PRODUCT_NOT_FOUND",
|
|
67
|
+
INSUFFICIENT_STOCK = "INSUFFICIENT_STOCK",
|
|
68
|
+
TRANSAK_FAILED = "TRANSAK_FAILED",
|
|
69
|
+
WALLET_FAILED = "WALLET_FAILED",
|
|
70
|
+
WALLET_REJECTED = "WALLET_REJECTED",
|
|
71
|
+
WALLET_REJECTED_NO_FUNDS = "WALLET_REJECTED_NO_FUNDS",
|
|
72
|
+
WALLET_POPUP_BLOCKED = "WALLET_POPUP_BLOCKED",
|
|
73
|
+
FUNDING_ROUTE_EXECUTE_ERROR = "FUNDING_ROUTE_EXECUTE_ERROR"
|
|
74
|
+
}
|
|
75
|
+
export type OrderQuoteCurrency = {
|
|
76
|
+
base: boolean;
|
|
77
|
+
decimals: number;
|
|
78
|
+
address: string;
|
|
79
|
+
exchangeId: string;
|
|
80
|
+
name: string;
|
|
81
|
+
};
|
|
82
|
+
export type OrderQuotePricing = {
|
|
83
|
+
amount: number;
|
|
84
|
+
currency: string;
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
export type OrderQuoteProduct = {
|
|
88
|
+
productId: string;
|
|
89
|
+
quantity: number;
|
|
90
|
+
pricing: Record<string, OrderQuotePricing>;
|
|
91
|
+
};
|
|
92
|
+
export type OrderQuote = {
|
|
93
|
+
config: {
|
|
94
|
+
contractId: string;
|
|
95
|
+
};
|
|
96
|
+
currencies: Array<OrderQuoteCurrency>;
|
|
97
|
+
products: Record<string, OrderQuoteProduct>;
|
|
98
|
+
totalAmount: Record<string, OrderQuotePricing>;
|
|
99
|
+
};
|
|
100
|
+
export declare enum SignPaymentTypes {
|
|
101
|
+
CRYPTO = "crypto",
|
|
102
|
+
FIAT = "fiat"
|
|
103
|
+
}
|
|
104
|
+
export declare enum FundingBalanceType {
|
|
105
|
+
SUFFICIENT = "SUFFICIENT"
|
|
106
|
+
}
|
|
107
|
+
export type SufficientFundingStep = {
|
|
108
|
+
type: FundingBalanceType.SUFFICIENT;
|
|
109
|
+
fundingItem: FundingItem;
|
|
110
|
+
};
|
|
111
|
+
export type FundingBalance = FundingStep | SufficientFundingStep;
|
|
112
|
+
export type FundingBalanceResult = {
|
|
113
|
+
currency: OrderQuoteCurrency;
|
|
114
|
+
smartCheckoutResult: SmartCheckoutResult;
|
|
115
|
+
};
|
|
116
|
+
export declare enum ExecuteTransactionStep {
|
|
117
|
+
BEFORE = "before",
|
|
118
|
+
PENDING = "pending",
|
|
119
|
+
AFTER = "after"
|
|
120
|
+
}
|
|
121
|
+
export type OrderQuoteApiResponse = {
|
|
122
|
+
config: {
|
|
123
|
+
contract_id: string;
|
|
124
|
+
};
|
|
125
|
+
currencies: Array<{
|
|
126
|
+
base: boolean;
|
|
127
|
+
decimals: number;
|
|
128
|
+
erc20_address: string;
|
|
129
|
+
exchange_id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
}>;
|
|
132
|
+
products: Record<string, {
|
|
133
|
+
pricing: Record<string, {
|
|
134
|
+
amount: number;
|
|
135
|
+
currency: string;
|
|
136
|
+
type: string;
|
|
137
|
+
}>;
|
|
138
|
+
product_id: string;
|
|
139
|
+
quantity: number;
|
|
140
|
+
}>;
|
|
141
|
+
total_amount: Record<string, {
|
|
142
|
+
amount: number;
|
|
143
|
+
currency: string;
|
|
144
|
+
type: string;
|
|
145
|
+
}>;
|
|
146
|
+
};
|
|
147
|
+
export declare const PRIMARY_SALES_API_BASE_URL: {
|
|
148
|
+
sandbox: string;
|
|
149
|
+
production: string;
|
|
150
|
+
};
|
|
151
|
+
export type UseQuoteOrderParams = {
|
|
152
|
+
items: SaleItem[];
|
|
153
|
+
environmentId: string;
|
|
154
|
+
environment: Environment;
|
|
155
|
+
provider: WrappedBrowserProvider | undefined;
|
|
156
|
+
preferredCurrency?: string;
|
|
157
|
+
};
|
|
158
|
+
export type ConfigError = {
|
|
159
|
+
type: SaleErrorTypes;
|
|
160
|
+
data?: Record<string, unknown>;
|
|
161
|
+
};
|
|
162
|
+
export type SignApiTransaction = {
|
|
163
|
+
contract_address: string;
|
|
164
|
+
gas_estimate: number;
|
|
165
|
+
method_call: string;
|
|
166
|
+
params: {
|
|
167
|
+
amount?: number;
|
|
168
|
+
spender?: string;
|
|
169
|
+
data?: string[];
|
|
170
|
+
deadline?: number;
|
|
171
|
+
multicallSigner?: string;
|
|
172
|
+
reference?: string;
|
|
173
|
+
signature?: string;
|
|
174
|
+
targets?: string[];
|
|
175
|
+
};
|
|
176
|
+
raw_data: string;
|
|
177
|
+
};
|
|
178
|
+
export type SignApiProduct = {
|
|
179
|
+
product_id: string;
|
|
180
|
+
collection_address: string;
|
|
181
|
+
contract_type: string;
|
|
182
|
+
detail: {
|
|
183
|
+
amount: number;
|
|
184
|
+
token_id: string;
|
|
185
|
+
}[];
|
|
186
|
+
};
|
|
187
|
+
export type SignApiResponse = {
|
|
188
|
+
order: {
|
|
189
|
+
currency: {
|
|
190
|
+
name: string;
|
|
191
|
+
decimals: number;
|
|
192
|
+
erc20_address: string;
|
|
193
|
+
};
|
|
194
|
+
currency_symbol: string;
|
|
195
|
+
products: SignApiProduct[];
|
|
196
|
+
total_amount: string;
|
|
197
|
+
};
|
|
198
|
+
transactions: SignApiTransaction[];
|
|
199
|
+
};
|
|
200
|
+
export declare enum SignCurrencyFilter {
|
|
201
|
+
CONTRACT_ADDRESS = "contract_address",
|
|
202
|
+
CURRENCY_SYMBOL = "currency_symbol"
|
|
203
|
+
}
|
|
204
|
+
export type SignApiRequest = {
|
|
205
|
+
recipient_address: string;
|
|
206
|
+
currency_filter: SignCurrencyFilter;
|
|
207
|
+
currency_value: string;
|
|
208
|
+
payment_type: string;
|
|
209
|
+
products: {
|
|
210
|
+
product_id: string;
|
|
211
|
+
quantity: number;
|
|
212
|
+
}[];
|
|
213
|
+
custom_data?: Record<string, unknown>;
|
|
214
|
+
};
|
|
215
|
+
export type SignApiError = {
|
|
216
|
+
code: string;
|
|
217
|
+
details: any;
|
|
218
|
+
link: string;
|
|
219
|
+
message: string;
|
|
220
|
+
trace_id: string;
|
|
221
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Checkout, WrappedBrowserProvider, WalletProviderName } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare function connectToProvider(checkout: Checkout, provider: WrappedBrowserProvider, changeAccount?: boolean): Promise<WrappedBrowserProvider>;
|
|
3
|
+
export declare function createAndConnectToProvider(checkout: Checkout, walletProviderName: WalletProviderName, changeAccount?: boolean): Promise<WrappedBrowserProvider>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EIP6963ProviderDetail, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare function isPassportProvider(provider?: WrappedBrowserProvider | null): boolean;
|
|
3
|
+
export declare function isMetaMaskProvider(provider?: WrappedBrowserProvider | null): boolean;
|
|
4
|
+
export declare function isWalletConnectProvider(provider?: WrappedBrowserProvider | null): boolean;
|
|
5
|
+
export declare const getProviderDetailByProvider: (browserPovider: WrappedBrowserProvider, providers?: EIP6963ProviderDetail[]) => EIP6963ProviderDetail | undefined;
|
|
6
|
+
export declare function getWalletProviderNameByProvider(web3Provider: WrappedBrowserProvider | undefined, providers?: EIP6963ProviderDetail[]): string;
|
|
7
|
+
export declare function getProviderSlugFromRdns(rdns: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Checks conditions to operate a gas-free flow.
|
|
10
|
+
*
|
|
11
|
+
* TODO:
|
|
12
|
+
* - Phase 1 (2024): Allow all passport wallets to be gas-free.
|
|
13
|
+
* - Phase 2 & 3 (2025): Not all passport wallets will be gas-free.
|
|
14
|
+
* Therefore, the gas-free condition must be checked against the relayer's
|
|
15
|
+
* `im_getFeeOptions` endpoint, which should return zero for
|
|
16
|
+
* passport accounts with gas sponsorship enabled.
|
|
17
|
+
*
|
|
18
|
+
* Refer to the docs for more details:
|
|
19
|
+
* https://docs.immutable.com/docs/zkevm/architecture/gas-sponsorship-for-gamers/
|
|
20
|
+
*/
|
|
21
|
+
export declare function isGasFree(provider?: WrappedBrowserProvider | null): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface RetryType {
|
|
2
|
+
retryIntervalMs: number;
|
|
3
|
+
retries?: number;
|
|
4
|
+
nonRetryable?: (err: any) => boolean;
|
|
5
|
+
nonRetryableSilently?: (err: any) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const retry: <T>(fn: () => Promise<T> | T, { retries, retryIntervalMs, nonRetryable, nonRetryableSilently, }: RetryType) => Promise<T | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SquidFooter(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Squid } from '@0xsquid/sdk';
|
|
2
|
+
import { TokenBalance } from '@0xsquid/sdk/dist/types';
|
|
3
|
+
import { WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
4
|
+
import { Chain } from '../types';
|
|
5
|
+
export declare const fetchBalances: (squid: Squid, chains: Chain[], provider: WrappedBrowserProvider) => Promise<TokenBalance[]>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RouteResponse } from '@0xsquid/squid-types';
|
|
2
|
+
import { Chain } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Get the chains from the route
|
|
5
|
+
* @param chains - The chains to search through
|
|
6
|
+
* @param route - The route to get the chains from
|
|
7
|
+
* @returns The chains from the route
|
|
8
|
+
*/
|
|
9
|
+
export declare const getRouteChains: (chains: Chain[] | null, route: RouteResponse | undefined) => {
|
|
10
|
+
fromChain: Chain | undefined;
|
|
11
|
+
toChain: Chain | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RouteResponse } from '@0xsquid/squid-types';
|
|
2
|
+
/**
|
|
3
|
+
* Get the total fees for a route
|
|
4
|
+
*/
|
|
5
|
+
export declare function getTotalRouteFees(route?: RouteResponse): {
|
|
6
|
+
fees: number;
|
|
7
|
+
feesUsd: number;
|
|
8
|
+
gasFees: number;
|
|
9
|
+
gasFeesUsd: number;
|
|
10
|
+
totalFees: number;
|
|
11
|
+
totalFeesUsd: number;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isSquidNativeToken: (token: string) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RouteResponse } from '@0xsquid/squid-types';
|
|
2
|
+
import { Squid } from '@0xsquid/sdk';
|
|
3
|
+
import { TransactionReceipt } from 'ethers';
|
|
4
|
+
import { Environment } from '@imtbl/config';
|
|
5
|
+
import { StatusResponse } from '@0xsquid/sdk/dist/types';
|
|
6
|
+
import { EIP6963ProviderInfo, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
7
|
+
export declare const useExecute: (contextId: string, environment: Environment) => {
|
|
8
|
+
checkProviderChain: (provider: WrappedBrowserProvider, chainId: string) => Promise<boolean>;
|
|
9
|
+
getAllowance: (provider: WrappedBrowserProvider, routeResponse: RouteResponse) => Promise<bigint | undefined>;
|
|
10
|
+
approve: (fromProviderInfo: EIP6963ProviderInfo, provider: WrappedBrowserProvider, routeResponse: RouteResponse) => Promise<TransactionReceipt | undefined>;
|
|
11
|
+
execute: (squid: Squid, fromProviderInfo: EIP6963ProviderInfo, provider: WrappedBrowserProvider, routeResponse: RouteResponse) => Promise<TransactionReceipt | undefined>;
|
|
12
|
+
getStatus: (squid: Squid, transactionHash: string) => Promise<StatusResponse | undefined>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenBalance } from '@0xsquid/sdk/dist/types';
|
|
2
|
+
import { Squid } from '@0xsquid/sdk';
|
|
3
|
+
import { AmountData, RouteData, RouteResponseData, Token } from '../types';
|
|
4
|
+
export declare const useRoutes: () => {
|
|
5
|
+
fetchRoutesWithRateLimit: (squid: Squid, tokens: Token[], balances: TokenBalance[], toChanId: string, toTokenAddress: string, toAmount: string, bulkNumber?: number, delayMs?: number, isSwapAllowed?: boolean) => Promise<RouteData[]>;
|
|
6
|
+
getAmountData: (tokens: Token[], balance: TokenBalance, toAmount: string, toChainId: string, toTokenAddress: string, additionalBuffer?: number) => AmountData | undefined;
|
|
7
|
+
getRoute: (squid: Squid, fromToken: Token, toToken: Token, toAddress: string, fromAmount: string, toAmount: string, fromAddress?: string, quoteOnly?: boolean) => Promise<RouteResponseData>;
|
|
8
|
+
resetRoutes: () => void;
|
|
9
|
+
};
|