@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,16 @@
|
|
|
1
|
+
import { TransactionRequirement } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare const getTopUpViewData: (transactionRequirements: TransactionRequirement[]) => {
|
|
3
|
+
heading: string[];
|
|
4
|
+
subheading: (string | {
|
|
5
|
+
erc20: {
|
|
6
|
+
value: string | undefined;
|
|
7
|
+
symbol: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
native: {
|
|
10
|
+
value: string | undefined;
|
|
11
|
+
symbol: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
})[];
|
|
14
|
+
amount: string;
|
|
15
|
+
tokenAddress: string | undefined;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OrderQuote } from '../types';
|
|
2
|
+
export type OrderQuoteApiResponse = {
|
|
3
|
+
config: {
|
|
4
|
+
contract_id: string;
|
|
5
|
+
};
|
|
6
|
+
currencies: Array<{
|
|
7
|
+
base: boolean;
|
|
8
|
+
decimals: number;
|
|
9
|
+
erc20_address: string;
|
|
10
|
+
exchange_id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
13
|
+
products: Record<string, {
|
|
14
|
+
pricing: Record<string, {
|
|
15
|
+
amount: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}>;
|
|
19
|
+
product_id: string;
|
|
20
|
+
quantity: number;
|
|
21
|
+
}>;
|
|
22
|
+
total_amount: Record<string, {
|
|
23
|
+
amount: number;
|
|
24
|
+
currency: string;
|
|
25
|
+
type: string;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
export declare const transformToOrderQuote: ({ config, currencies, products, total_amount, }: OrderQuoteApiResponse, preferredCurrency?: string) => OrderQuote;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ExecutedTransaction } from '../types';
|
|
2
|
+
export declare const toStringifyTransactions: (transactions: ExecutedTransaction[]) => string;
|
|
3
|
+
export declare const toPascalCase: (str: string) => string;
|
|
4
|
+
export declare const sanitizeToLatin1: (str: string) => string;
|
|
5
|
+
export declare const hexToText: (value: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TokenBalance, TransactionRequirement } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { FundingBalance, FundingBalanceResult } from '../types';
|
|
3
|
+
export declare const useFundingBalances: () => {
|
|
4
|
+
fundingBalances: FundingBalance[];
|
|
5
|
+
loadingBalances: boolean;
|
|
6
|
+
fundingBalancesResult: FundingBalanceResult[];
|
|
7
|
+
transactionRequirement: TransactionRequirement | undefined;
|
|
8
|
+
gasFees: TokenBalance | undefined;
|
|
9
|
+
queryFundingBalances: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Environment } from '@imtbl/config';
|
|
2
|
+
import { ExecuteTransactionStep } from '../types';
|
|
3
|
+
export declare enum TransactionMethod {
|
|
4
|
+
APPROVE = "approve(address spender,uint256 amount)",
|
|
5
|
+
EXECUTE = "execute(address multicallSigner, bytes32 reference, address[] targets, bytes[] data, uint256 deadline, bytes signature)"
|
|
6
|
+
}
|
|
7
|
+
type TransactionRiveAnimationsConfig = {
|
|
8
|
+
url: string;
|
|
9
|
+
stateMachine: string;
|
|
10
|
+
input: string;
|
|
11
|
+
inputValues: Record<string, StateMachineInput>;
|
|
12
|
+
};
|
|
13
|
+
export declare const getRiveAnimationName: (transactionMethod: TransactionMethod) => "" | "/access_coins.riv" | "/purchasing_items.riv";
|
|
14
|
+
export declare enum StateMachineInput {
|
|
15
|
+
START = 0,
|
|
16
|
+
WAITING = 1,
|
|
17
|
+
PROCESSING = 2,
|
|
18
|
+
COMPLETED = 3,
|
|
19
|
+
ERROR = 4
|
|
20
|
+
}
|
|
21
|
+
export declare const transactionRiveAnimations: Record<TransactionMethod, TransactionRiveAnimationsConfig>;
|
|
22
|
+
export declare function useHandoverSteps(environment: Environment): {
|
|
23
|
+
onTxnStepExecuteNextTransaction: (method: string, step: ExecuteTransactionStep) => void;
|
|
24
|
+
onTxnStepExecuteAll: (method: string, step: ExecuteTransactionStep) => void;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Environment } from '@imtbl/config';
|
|
2
|
+
import { WrappedBrowserProvider, SaleItem } from '@imtbl/checkout-sdk';
|
|
3
|
+
import { OrderQuote, OrderQuoteCurrency, SaleErrorTypes } from '../types';
|
|
4
|
+
type UseQuoteOrderParams = {
|
|
5
|
+
items: SaleItem[];
|
|
6
|
+
environmentId: string;
|
|
7
|
+
environment: Environment;
|
|
8
|
+
provider: WrappedBrowserProvider | undefined;
|
|
9
|
+
preferredCurrency?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const defaultOrderQuote: OrderQuote;
|
|
12
|
+
export type ConfigError = {
|
|
13
|
+
type: SaleErrorTypes;
|
|
14
|
+
data?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export declare const useQuoteOrder: ({ items, environment, environmentId, provider, preferredCurrency, }: UseQuoteOrderParams) => {
|
|
17
|
+
orderQuote: OrderQuote;
|
|
18
|
+
selectedCurrency: OrderQuoteCurrency | undefined;
|
|
19
|
+
orderQuoteError: ConfigError | undefined;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StandardAnalyticsActions } from '@imtbl/react-analytics';
|
|
2
|
+
import { SalePaymentTypes } from '@imtbl/checkout-sdk';
|
|
3
|
+
import { UserJourney, AnalyticsControlTypes } from '../../../context/analytics-provider/SegmentAnalyticsProvider';
|
|
4
|
+
import { ExecutedTransaction, FundingBalance } from '../types';
|
|
5
|
+
export declare const useSaleEvent: () => {
|
|
6
|
+
track: (props: {
|
|
7
|
+
screen: string;
|
|
8
|
+
userJourney: UserJourney;
|
|
9
|
+
extras?: Record<string, unknown> | undefined;
|
|
10
|
+
} & ({
|
|
11
|
+
action: StandardAnalyticsActions;
|
|
12
|
+
control?: undefined;
|
|
13
|
+
controlType?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
control: string;
|
|
16
|
+
controlType: AnalyticsControlTypes;
|
|
17
|
+
action?: StandardAnalyticsActions | undefined;
|
|
18
|
+
})) => Promise<import("@segment/analytics-next").Context>;
|
|
19
|
+
page: (props: {
|
|
20
|
+
screen: string;
|
|
21
|
+
userJourney: UserJourney;
|
|
22
|
+
action?: StandardAnalyticsActions | undefined;
|
|
23
|
+
extras?: Record<string, unknown> | undefined;
|
|
24
|
+
}) => Promise<import("@segment/analytics-next").Context>;
|
|
25
|
+
sendPageView: (screen: string, data?: Record<string, unknown>) => void;
|
|
26
|
+
sendCloseEvent: (screen?: string, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
27
|
+
sendSuccessEvent: (screen?: string, transactions?: ExecutedTransaction[], tokenIds?: string[], details?: Record<string, any>) => void;
|
|
28
|
+
sendFailedEvent: (reason: string, error: Record<string, unknown>, transactions?: ExecutedTransaction[], screen?: string, details?: Record<string, any>) => void;
|
|
29
|
+
sendTransactionSuccessEvent: (transaction: ExecutedTransaction) => void;
|
|
30
|
+
sendOrderCreated: (screen: string, details: Record<string, unknown>) => void;
|
|
31
|
+
sendSelectedPaymentMethod: (type: SalePaymentTypes, screen: string) => void;
|
|
32
|
+
sendSelectedPaymentToken: (screen: string, fundingBalance: FundingBalance, conversions: Map<string, number>) => void;
|
|
33
|
+
sendProceedToPay: (screen: string, fundingBalance: FundingBalance, conversions: Map<string, number>, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
34
|
+
sendViewFeesEvent: (screen: string, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
35
|
+
sendInsufficientFunds: (screen: string, txRequirements: any, controlType?: AnalyticsControlTypes, action?: StandardAnalyticsActions) => void;
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SignResponse, SignOrderInput, SignOrderError, ExecuteOrderResponse, ExecutedTransaction, SignPaymentTypes, SignedTransaction, ExecuteTransactionStep } from '../types';
|
|
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,119 @@
|
|
|
1
|
+
import { SaleItem, FundingStep, FundingItem, SmartCheckoutResult, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
export type SignedOrderProduct = {
|
|
3
|
+
productId: string;
|
|
4
|
+
qty: number;
|
|
5
|
+
image: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
amount: number[];
|
|
9
|
+
tokenId: string[];
|
|
10
|
+
currency: string;
|
|
11
|
+
contractType: string;
|
|
12
|
+
collectionAddress: string;
|
|
13
|
+
};
|
|
14
|
+
export type SignedOrder = {
|
|
15
|
+
currency: {
|
|
16
|
+
name: string;
|
|
17
|
+
erc20Address: string;
|
|
18
|
+
};
|
|
19
|
+
totalAmount: number;
|
|
20
|
+
products: SignedOrderProduct[];
|
|
21
|
+
};
|
|
22
|
+
export type SignedTransaction = {
|
|
23
|
+
tokenAddress: string;
|
|
24
|
+
gasEstimate: number;
|
|
25
|
+
methodCall: string;
|
|
26
|
+
params: {
|
|
27
|
+
reference: string;
|
|
28
|
+
amount: number;
|
|
29
|
+
spender: string;
|
|
30
|
+
};
|
|
31
|
+
rawData: string;
|
|
32
|
+
};
|
|
33
|
+
export type SignResponse = {
|
|
34
|
+
order: SignedOrder;
|
|
35
|
+
transactions: SignedTransaction[];
|
|
36
|
+
transactionId: string;
|
|
37
|
+
};
|
|
38
|
+
export type SignOrderInput = {
|
|
39
|
+
provider: WrappedBrowserProvider | undefined;
|
|
40
|
+
items: SaleItem[];
|
|
41
|
+
fromTokenAddress: string;
|
|
42
|
+
recipientAddress: string;
|
|
43
|
+
environment: string;
|
|
44
|
+
environmentId: string;
|
|
45
|
+
waitFulfillmentSettlements: boolean;
|
|
46
|
+
customOrderData?: Record<string, unknown>;
|
|
47
|
+
};
|
|
48
|
+
export type SignOrderError = {
|
|
49
|
+
type: SaleErrorTypes;
|
|
50
|
+
data?: Record<string, unknown>;
|
|
51
|
+
};
|
|
52
|
+
export type ExecutedTransaction = {
|
|
53
|
+
method: string;
|
|
54
|
+
hash: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
export type ExecuteOrderResponse = {
|
|
57
|
+
done: boolean;
|
|
58
|
+
transactions: ExecutedTransaction[];
|
|
59
|
+
};
|
|
60
|
+
export declare enum SaleErrorTypes {
|
|
61
|
+
DEFAULT = "DEFAULT_ERROR",
|
|
62
|
+
INVALID_PARAMETERS = "INVALID_PARAMETERS",
|
|
63
|
+
TRANSACTION_FAILED = "TRANSACTION_FAILED",
|
|
64
|
+
SERVICE_BREAKDOWN = "SERVICE_BREAKDOWN",
|
|
65
|
+
PRODUCT_NOT_FOUND = "PRODUCT_NOT_FOUND",
|
|
66
|
+
INSUFFICIENT_STOCK = "INSUFFICIENT_STOCK",
|
|
67
|
+
TRANSAK_FAILED = "TRANSAK_FAILED",
|
|
68
|
+
WALLET_FAILED = "WALLET_FAILED",
|
|
69
|
+
WALLET_REJECTED = "WALLET_REJECTED",
|
|
70
|
+
WALLET_REJECTED_NO_FUNDS = "WALLET_REJECTED_NO_FUNDS",
|
|
71
|
+
WALLET_POPUP_BLOCKED = "WALLET_POPUP_BLOCKED",
|
|
72
|
+
FUNDING_ROUTE_EXECUTE_ERROR = "FUNDING_ROUTE_EXECUTE_ERROR"
|
|
73
|
+
}
|
|
74
|
+
export type OrderQuoteCurrency = {
|
|
75
|
+
base: boolean;
|
|
76
|
+
decimals: number;
|
|
77
|
+
address: string;
|
|
78
|
+
exchangeId: string;
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
export type OrderQuotePricing = {
|
|
82
|
+
amount: number;
|
|
83
|
+
currency: string;
|
|
84
|
+
type: string;
|
|
85
|
+
};
|
|
86
|
+
export type OrderQuoteProduct = {
|
|
87
|
+
productId: string;
|
|
88
|
+
quantity: number;
|
|
89
|
+
pricing: Record<string, OrderQuotePricing>;
|
|
90
|
+
};
|
|
91
|
+
export type OrderQuote = {
|
|
92
|
+
config: {
|
|
93
|
+
contractId: string;
|
|
94
|
+
};
|
|
95
|
+
currencies: Array<OrderQuoteCurrency>;
|
|
96
|
+
products: Record<string, OrderQuoteProduct>;
|
|
97
|
+
totalAmount: Record<string, OrderQuotePricing>;
|
|
98
|
+
};
|
|
99
|
+
export declare enum SignPaymentTypes {
|
|
100
|
+
CRYPTO = "crypto",
|
|
101
|
+
FIAT = "fiat"
|
|
102
|
+
}
|
|
103
|
+
export declare enum FundingBalanceType {
|
|
104
|
+
SUFFICIENT = "SUFFICIENT"
|
|
105
|
+
}
|
|
106
|
+
export type SufficientFundingStep = {
|
|
107
|
+
type: FundingBalanceType.SUFFICIENT;
|
|
108
|
+
fundingItem: FundingItem;
|
|
109
|
+
};
|
|
110
|
+
export type FundingBalance = FundingStep | SufficientFundingStep;
|
|
111
|
+
export type FundingBalanceResult = {
|
|
112
|
+
currency: OrderQuoteCurrency;
|
|
113
|
+
smartCheckoutResult: SmartCheckoutResult;
|
|
114
|
+
};
|
|
115
|
+
export declare enum ExecuteTransactionStep {
|
|
116
|
+
BEFORE = "before",
|
|
117
|
+
PENDING = "pending",
|
|
118
|
+
AFTER = "after"
|
|
119
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OrderSummarySubViews } from '../../../context/view-context/SaleViewContextTypes';
|
|
2
|
+
type OrderSummaryProps = {
|
|
3
|
+
subView: OrderSummarySubViews;
|
|
4
|
+
};
|
|
5
|
+
export declare function OrderSummary({ subView }: OrderSummaryProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PayWithCard(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PayWithCoins(): null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PaymentMethods(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseTokens } from '@biom3/design-tokens';
|
|
2
|
+
import { SaleErrorTypes } from '../types';
|
|
3
|
+
type SaleErrorViewProps = {
|
|
4
|
+
biomeTheme: BaseTokens;
|
|
5
|
+
errorType: SaleErrorTypes | undefined;
|
|
6
|
+
transactionHash?: string;
|
|
7
|
+
blockExplorerLink?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function SaleErrorView({ biomeTheme, transactionHash, blockExplorerLink, errorType, }: SaleErrorViewProps): null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Checkout } from '@imtbl/checkout-sdk';
|
|
2
|
+
type GeoblockLoaderParams = {
|
|
3
|
+
widget: React.ReactNode;
|
|
4
|
+
serviceUnavailableView: React.ReactNode;
|
|
5
|
+
checkout: Checkout;
|
|
6
|
+
};
|
|
7
|
+
export declare function GeoblockLoader({ widget, serviceUnavailableView, checkout, }: GeoblockLoaderParams): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const selectStyle: {
|
|
2
|
+
position: string;
|
|
3
|
+
width: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const selectedOptionStyle: {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
color: string;
|
|
8
|
+
padding: string;
|
|
9
|
+
cursor: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const optionsContainerStyle: {
|
|
12
|
+
position: string;
|
|
13
|
+
width: string;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
boxShadow: string;
|
|
16
|
+
zIndex: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const optionStyle: {
|
|
19
|
+
padding: string;
|
|
20
|
+
cursor: string;
|
|
21
|
+
transition: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const optionHoverStyle: {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SwapWidgetParams } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { StrongCheckoutWidgetsConfig } from '../../lib/withDefaultWidgetConfig';
|
|
3
|
+
export type SwapWidgetInputs = SwapWidgetParams & {
|
|
4
|
+
config: StrongCheckoutWidgetsConfig;
|
|
5
|
+
};
|
|
6
|
+
export default function SwapWidget({ amount, fromTokenAddress, toTokenAddress, config, autoProceed, direction, showBackButton, }: SwapWidgetInputs): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function sendSwapWidgetCloseEvent(eventTarget: Window | EventTarget): void;
|
|
2
|
+
export declare const sendSwapSuccessEvent: (eventTarget: Window | EventTarget, transactionHash: string) => void;
|
|
3
|
+
export declare const sendSwapFailedEvent: (eventTarget: Window | EventTarget, reason: string) => void;
|
|
4
|
+
export declare const sendSwapRejectedEvent: (eventTarget: Window | EventTarget, reason: string) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IMTBLWidgetEvents, SwapWidgetParams, WidgetProperties, WidgetType } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { Base } from '../BaseWidgetRoot';
|
|
3
|
+
export declare class Swap extends Base<WidgetType.SWAP> {
|
|
4
|
+
protected eventTopic: IMTBLWidgetEvents;
|
|
5
|
+
protected getValidatedProperties({ config }: WidgetProperties<WidgetType.SWAP>): WidgetProperties<WidgetType.SWAP>;
|
|
6
|
+
protected getValidatedParameters(params: SwapWidgetParams): SwapWidgetParams;
|
|
7
|
+
private isNotPassport;
|
|
8
|
+
private topUpOptions;
|
|
9
|
+
protected render(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface SwapButtonProps {
|
|
2
|
+
loading: boolean;
|
|
3
|
+
validator: () => boolean;
|
|
4
|
+
sendTransaction: () => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export declare function SwapButton({ loading, validator, sendTransaction, }: SwapButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WidgetTheme } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { SwapFormData } from './swapFormTypes';
|
|
3
|
+
export interface SwapFromProps {
|
|
4
|
+
data?: SwapFormData;
|
|
5
|
+
theme: WidgetTheme;
|
|
6
|
+
cancelAutoProceed: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function SwapForm({ data, theme, cancelAutoProceed }: SwapFromProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TokenInfo } from '@imtbl/checkout-sdk';
|
|
2
|
+
export interface TokenSelectProps {
|
|
3
|
+
allowedTokens: TokenInfo[];
|
|
4
|
+
onChange: (token: TokenInfo) => void;
|
|
5
|
+
token?: TokenInfo;
|
|
6
|
+
testId: string;
|
|
7
|
+
filter?: string[];
|
|
8
|
+
}
|
|
9
|
+
declare function TokenSelect({ testId, onChange, token, filter, allowedTokens, }: TokenSelectProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default TokenSelect;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const containerStyles: {
|
|
2
|
+
display: string;
|
|
3
|
+
flexDirection: string;
|
|
4
|
+
alignItems: string;
|
|
5
|
+
paddingTop: string;
|
|
6
|
+
paddingBottom: string;
|
|
7
|
+
paddingX: string;
|
|
8
|
+
height: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const contentTextStyles: {
|
|
11
|
+
color: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
textAlign: string;
|
|
14
|
+
marginTop: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const actionButtonContainerStyles: {
|
|
17
|
+
display: string;
|
|
18
|
+
flexDirection: string;
|
|
19
|
+
justifyContent: string;
|
|
20
|
+
alignItems: string;
|
|
21
|
+
gap: string;
|
|
22
|
+
height: string;
|
|
23
|
+
width: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const actionButtonStyles: {
|
|
26
|
+
width: string;
|
|
27
|
+
height: string;
|
|
28
|
+
marginBottom: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const logoContainerStyles: {
|
|
31
|
+
display: string;
|
|
32
|
+
flexDirection: string;
|
|
33
|
+
justifyContent: string;
|
|
34
|
+
alignItems: string;
|
|
35
|
+
paddingTop: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const statusStyles: {
|
|
38
|
+
width: string;
|
|
39
|
+
fill: string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { WalletProviderName, GetBalanceResult, NetworkInfo, TokenInfo, SwapDirection, AssessmentResult } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { Exchange } from '@imtbl/dex-sdk';
|
|
3
|
+
export interface SwapState {
|
|
4
|
+
exchange: Exchange | null;
|
|
5
|
+
walletProviderName: WalletProviderName | null;
|
|
6
|
+
network: NetworkInfo | null;
|
|
7
|
+
tokenBalances: GetBalanceResult[];
|
|
8
|
+
supportedTopUps: TopUpFeature | null;
|
|
9
|
+
allowedTokens: TokenInfo[];
|
|
10
|
+
autoProceed: boolean;
|
|
11
|
+
riskAssessment: AssessmentResult | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface TopUpFeature {
|
|
14
|
+
isOnRampEnabled?: boolean;
|
|
15
|
+
isSwapEnabled?: boolean;
|
|
16
|
+
isBridgeEnabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const initialSwapState: SwapState;
|
|
19
|
+
export interface SwapContextState {
|
|
20
|
+
swapState: SwapState;
|
|
21
|
+
swapDispatch: React.Dispatch<SwapAction>;
|
|
22
|
+
}
|
|
23
|
+
export interface SwapAction {
|
|
24
|
+
payload: ActionPayload;
|
|
25
|
+
}
|
|
26
|
+
type ActionPayload = SetExchangePayload | SetWalletProviderNamePayload | SetNetworkPayload | SetSupportedTopUpPayload | SetTokenBalancesPayload | SetAllowedTokensPayload | SetAutoProceedPayload | SetRiskAssessmentPayload;
|
|
27
|
+
export declare enum SwapActions {
|
|
28
|
+
SET_EXCHANGE = "SET_EXCHANGE",
|
|
29
|
+
SET_WALLET_PROVIDER_NAME = "SET_WALLET_PROVIDER_NAME",
|
|
30
|
+
SET_NETWORK = "SET_NETWORK",
|
|
31
|
+
SET_SUPPORTED_TOP_UPS = "SET_SUPPORTED_TOP_UPS",
|
|
32
|
+
SET_TOKEN_BALANCES = "SET_TOKEN_BALANCES",
|
|
33
|
+
SET_ALLOWED_TOKENS = "SET_ALLOWED_TOKENS",
|
|
34
|
+
SET_AUTO_PROCEED = "SET_AUTO_PROCEED",
|
|
35
|
+
SET_RISK_ASSESSMENT = "SET_RISK_ASSESSMENT"
|
|
36
|
+
}
|
|
37
|
+
export interface SetExchangePayload {
|
|
38
|
+
type: SwapActions.SET_EXCHANGE;
|
|
39
|
+
exchange: Exchange;
|
|
40
|
+
}
|
|
41
|
+
export interface SetWalletProviderNamePayload {
|
|
42
|
+
type: SwapActions.SET_WALLET_PROVIDER_NAME;
|
|
43
|
+
walletProviderName: WalletProviderName;
|
|
44
|
+
}
|
|
45
|
+
export interface SetNetworkPayload {
|
|
46
|
+
type: SwapActions.SET_NETWORK;
|
|
47
|
+
network: NetworkInfo;
|
|
48
|
+
}
|
|
49
|
+
export interface SetTokenBalancesPayload {
|
|
50
|
+
type: SwapActions.SET_TOKEN_BALANCES;
|
|
51
|
+
tokenBalances: GetBalanceResult[];
|
|
52
|
+
}
|
|
53
|
+
export interface SetSupportedTopUpPayload {
|
|
54
|
+
type: SwapActions.SET_SUPPORTED_TOP_UPS;
|
|
55
|
+
supportedTopUps: TopUpFeature;
|
|
56
|
+
}
|
|
57
|
+
export interface SetAllowedTokensPayload {
|
|
58
|
+
type: SwapActions.SET_ALLOWED_TOKENS;
|
|
59
|
+
allowedTokens: TokenInfo[];
|
|
60
|
+
}
|
|
61
|
+
export interface SetAutoProceedPayload {
|
|
62
|
+
type: SwapActions.SET_AUTO_PROCEED;
|
|
63
|
+
autoProceed: boolean;
|
|
64
|
+
direction: SwapDirection;
|
|
65
|
+
}
|
|
66
|
+
export interface SetRiskAssessmentPayload {
|
|
67
|
+
type: SwapActions.SET_RISK_ASSESSMENT;
|
|
68
|
+
riskAssessment: AssessmentResult;
|
|
69
|
+
}
|
|
70
|
+
export declare const SwapContext: import("react").Context<SwapContextState>;
|
|
71
|
+
export type Reducer<S, A> = (prevState: S, action: A) => S;
|
|
72
|
+
export declare const swapReducer: Reducer<SwapState, SwapAction>;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Exchange, TransactionResponse } from '@imtbl/dex-sdk';
|
|
2
|
+
import { WrappedBrowserProvider, TokenInfo } from '@imtbl/checkout-sdk';
|
|
3
|
+
export declare const quotesProcessor: {
|
|
4
|
+
fromAmountIn: (exchange: Exchange, provider: WrappedBrowserProvider, fromToken: TokenInfo, fromAmount: string, toToken: TokenInfo) => Promise<TransactionResponse>;
|
|
5
|
+
fromAmountOut: (exchange: Exchange, provider: WrappedBrowserProvider, toToken: TokenInfo, toAmount: string, fromToken: TokenInfo) => Promise<TransactionResponse>;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TokenInfo } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare function validateFromToken(fromToken?: TokenInfo): string;
|
|
3
|
+
export declare function validateFromAmount(amount: string, balance?: string): string;
|
|
4
|
+
export declare function validateToToken(toToken?: TokenInfo): string;
|
|
5
|
+
export declare function validateToAmount(amount: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TransactionResponse } from '@imtbl/dex-sdk';
|
|
2
|
+
import { WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* Adjusts the quote for gas free txn so we don't have to adjust it everywhere
|
|
5
|
+
* @param checkProvider
|
|
6
|
+
* @param currentQuote
|
|
7
|
+
*/
|
|
8
|
+
export declare const processGasFree: (checkProvider: WrappedBrowserProvider, currentQuote: TransactionResponse) => TransactionResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TokenInfo } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { TransactionResponse } from '@imtbl/dex-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* Ensures that the quote token has the correct symbol. At the moment the dex quote doesn't return it.
|
|
5
|
+
* @param toToken
|
|
6
|
+
* @param currentQuote
|
|
7
|
+
*/
|
|
8
|
+
export declare const processQuoteToken: (toToken: TokenInfo, currentQuote: TransactionResponse) => TransactionResponse;
|