@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,41 @@
|
|
|
1
|
+
import { Environment } from '@imtbl/config';
|
|
2
|
+
import { TransakNFTData } from './TransakTypes';
|
|
3
|
+
export type TransakWidgetType = 'on-ramp' | 'nft-checkout';
|
|
4
|
+
export type TransakNFTCheckoutParams = {
|
|
5
|
+
nftData: TransakNFTData[];
|
|
6
|
+
calldata: string;
|
|
7
|
+
cryptoCurrencyCode: string;
|
|
8
|
+
estimatedGasLimit: number;
|
|
9
|
+
exchangeScreenTitle: string;
|
|
10
|
+
walletAddress: string;
|
|
11
|
+
email: string;
|
|
12
|
+
partnerOrderId?: string;
|
|
13
|
+
excludeFiatCurrencies?: string[];
|
|
14
|
+
};
|
|
15
|
+
type UseTransakIframeProps = {
|
|
16
|
+
type: TransakWidgetType;
|
|
17
|
+
contractId: string;
|
|
18
|
+
environment: Environment;
|
|
19
|
+
transakParams: TransakNFTCheckoutParams;
|
|
20
|
+
onError?: () => void;
|
|
21
|
+
};
|
|
22
|
+
export declare const TRANSAK_WIDGET_BASE_URL: {
|
|
23
|
+
sandbox: string;
|
|
24
|
+
production: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const TRANSAK_API_BASE_URL: {
|
|
27
|
+
sandbox: string;
|
|
28
|
+
production: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const TRANSAK_ENVIRONMENT: {
|
|
31
|
+
sandbox: string;
|
|
32
|
+
production: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const TRANSAK_API_KEY: {
|
|
35
|
+
sandbox: string;
|
|
36
|
+
production: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const useTransakIframe: (props: UseTransakIframeProps) => {
|
|
39
|
+
iframeSrc: string;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Checkout } from '@imtbl/checkout-sdk';
|
|
2
|
+
export interface UnableToConnectDrawerProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
checkout: Checkout;
|
|
5
|
+
onCloseDrawer: () => void;
|
|
6
|
+
onTryAgain?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function UnableToConnectDrawer({ visible, checkout, onCloseDrawer, onTryAgain, }: UnableToConnectDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EIP6963ProviderDetail, EIP6963ProviderInfo, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
3
|
+
import { MenuItemProps } from '@biom3/react';
|
|
4
|
+
import { ConnectEIP6963ProviderError } from '../../lib/connectEIP6963Provider';
|
|
5
|
+
type ConnectWalletDrawerProps = {
|
|
6
|
+
heading: string;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
onClose: (address?: string) => void;
|
|
9
|
+
onConnect?: (provider: WrappedBrowserProvider, providerInfo: EIP6963ProviderInfo) => void;
|
|
10
|
+
onError?: (errorType: ConnectEIP6963ProviderError) => void;
|
|
11
|
+
providerType: 'from' | 'to';
|
|
12
|
+
walletOptions: EIP6963ProviderDetail[];
|
|
13
|
+
bottomSlot?: ReactNode;
|
|
14
|
+
menuItemSize?: MenuItemProps['size'];
|
|
15
|
+
disabledOptions?: {
|
|
16
|
+
label: string;
|
|
17
|
+
rdns: string;
|
|
18
|
+
}[];
|
|
19
|
+
getShouldRequestWalletPermissions?: (providerInfo: EIP6963ProviderInfo) => boolean | undefined;
|
|
20
|
+
shouldIdentifyUser?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function ConnectWalletDrawer({ heading, visible, onClose, onConnect, onError, providerType, walletOptions, bottomSlot, menuItemSize, disabledOptions, getShouldRequestWalletPermissions, shouldIdentifyUser, }: ConnectWalletDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EIP6963ProviderDetail, EIP6963ProviderInfo, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
type DeliverToWalletDrawerProps = {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
onClose: (toAddress?: string) => void;
|
|
5
|
+
walletOptions: EIP6963ProviderDetail[];
|
|
6
|
+
onConnect?: (providerType: 'from' | 'to', provider: WrappedBrowserProvider, providerInfo: EIP6963ProviderInfo) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function DeliverToWalletDrawer({ visible, onClose, onConnect, walletOptions, }: DeliverToWalletDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EIP6963ProviderDetail, EIP6963ProviderInfo, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
type PayWithWalletDrawerProps = {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
onClose: (fromAddress?: string) => void;
|
|
5
|
+
onConnect: (providerType: 'from' | 'to', provider: WrappedBrowserProvider, providerInfo: EIP6963ProviderInfo) => void;
|
|
6
|
+
onPayWithCard?: () => void;
|
|
7
|
+
walletOptions: EIP6963ProviderDetail[];
|
|
8
|
+
insufficientBalance?: boolean;
|
|
9
|
+
showOnRampOption?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function PayWithWalletDrawer({ visible, onClose, onConnect, onPayWithCard, walletOptions, insufficientBalance, showOnRampOption, }: PayWithWalletDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MenuItemProps } from '@biom3/react';
|
|
2
|
+
export interface WalletConnectItemProps {
|
|
3
|
+
onWalletItemClick: () => Promise<void>;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
size?: MenuItemProps['size'];
|
|
6
|
+
}
|
|
7
|
+
export declare const WalletConnectItem: import("react").ForwardRefExoticComponent<WalletConnectItemProps & import("react").RefAttributes<unknown>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MenuItemProps } from '@biom3/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { EIP6963ProviderDetail } from '@imtbl/checkout-sdk';
|
|
4
|
+
import { WalletChangeEvent } from './WalletDrawerEvents';
|
|
5
|
+
interface WalletDrawerProps {
|
|
6
|
+
testId: string;
|
|
7
|
+
drawerText: {
|
|
8
|
+
heading: string;
|
|
9
|
+
defaultText?: string;
|
|
10
|
+
};
|
|
11
|
+
showWalletConnect?: boolean;
|
|
12
|
+
showWalletSelectorTarget?: boolean;
|
|
13
|
+
walletOptions: EIP6963ProviderDetail[];
|
|
14
|
+
showDrawer: boolean;
|
|
15
|
+
setShowDrawer: (show: boolean) => void;
|
|
16
|
+
onWalletChange: (event: WalletChangeEvent) => Promise<void>;
|
|
17
|
+
menuItemSize?: MenuItemProps['size'];
|
|
18
|
+
bottomSlot?: ReactNode;
|
|
19
|
+
disabledOptions?: {
|
|
20
|
+
label: string;
|
|
21
|
+
rdns: string;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
export declare function WalletDrawer({ testId, drawerText, walletOptions, showWalletConnect, showWalletSelectorTarget, showDrawer, setShowDrawer, onWalletChange, menuItemSize, bottomSlot, disabledOptions, }: WalletDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MenuItemProps } from '@biom3/react';
|
|
2
|
+
import { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { EIP6963ProviderInfo } from '@imtbl/checkout-sdk';
|
|
4
|
+
export interface WalletItemProps<RC extends ReactElement | undefined = undefined> {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
recommended?: boolean;
|
|
7
|
+
testId: string;
|
|
8
|
+
providerInfo: EIP6963ProviderInfo;
|
|
9
|
+
onWalletItemClick: () => void;
|
|
10
|
+
rc?: RC;
|
|
11
|
+
size?: MenuItemProps['size'];
|
|
12
|
+
badge?: ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function WalletItem<RC extends ReactElement | undefined = undefined>({ rc, testId, loading, recommended, providerInfo, onWalletItemClick, size, badge, disabled, }: WalletItemProps<RC>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Checkout } from '@imtbl/checkout-sdk';
|
|
2
|
+
export declare enum WithdrawalQueueWarningType {
|
|
3
|
+
TYPE_THRESHOLD = "exceedsThreshold",
|
|
4
|
+
TYPE_ACTIVE_QUEUE = "queueActivated"
|
|
5
|
+
}
|
|
6
|
+
export interface WithdrawalQueueDrawerProps {
|
|
7
|
+
visible: boolean;
|
|
8
|
+
checkout: Checkout;
|
|
9
|
+
onCloseDrawer: () => void;
|
|
10
|
+
warningType?: WithdrawalQueueWarningType;
|
|
11
|
+
onAdjustAmount?: () => void;
|
|
12
|
+
threshold?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function WithdrawalQueueDrawer({ visible, checkout, warningType, onCloseDrawer, onAdjustAmount, threshold, }: WithdrawalQueueDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkout } from '@imtbl/checkout-sdk';
|
|
2
|
+
type CustomAnalyticsProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
checkout: Checkout;
|
|
5
|
+
};
|
|
6
|
+
export declare function CustomAnalyticsProvider({ children, checkout }: CustomAnalyticsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StandardAnalyticsActions, StandardAnalyticsControlTypes } from '@imtbl/react-analytics';
|
|
2
|
+
export declare enum UserJourney {
|
|
3
|
+
CONNECT = "Connect",
|
|
4
|
+
WALLET = "Wallet",
|
|
5
|
+
ON_RAMP = "OnRamp",
|
|
6
|
+
SWAP = "Swap",
|
|
7
|
+
BRIDGE = "Bridge",
|
|
8
|
+
SALE = "PrimarySale",
|
|
9
|
+
ADD_TOKENS = "AddTokens",
|
|
10
|
+
PURCHASE = "Purchase"
|
|
11
|
+
}
|
|
12
|
+
export type AnalyticsControlTypes = StandardAnalyticsControlTypes | 'IframeEvent' | 'Event';
|
|
13
|
+
export declare const AnalyticsProvider: ({ children, loaderOverride: browserClass, log, }: import("react").PropsWithChildren<{
|
|
14
|
+
loaderOverride?: typeof import("@segment/analytics-next").AnalyticsBrowser;
|
|
15
|
+
log?: typeof console.debug;
|
|
16
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element, useAnalytics: () => {
|
|
17
|
+
page: (props: {
|
|
18
|
+
screen: string;
|
|
19
|
+
userJourney: UserJourney;
|
|
20
|
+
action?: StandardAnalyticsActions | undefined;
|
|
21
|
+
extras?: Record<string, unknown> | undefined;
|
|
22
|
+
}) => Promise<import("@segment/analytics-next").Context>;
|
|
23
|
+
track: (props: {
|
|
24
|
+
screen: string;
|
|
25
|
+
userJourney: UserJourney;
|
|
26
|
+
extras?: Record<string, unknown> | undefined;
|
|
27
|
+
} & ({
|
|
28
|
+
action: StandardAnalyticsActions;
|
|
29
|
+
control?: undefined;
|
|
30
|
+
controlType?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
control: string;
|
|
33
|
+
controlType: AnalyticsControlTypes;
|
|
34
|
+
action?: StandardAnalyticsActions | undefined;
|
|
35
|
+
})) => Promise<import("@segment/analytics-next").Context>;
|
|
36
|
+
identify: import("@segment/analytics-next/dist/types/core/buffer").AnalyticsBuffered["identify"];
|
|
37
|
+
group(traits: import("@segment/analytics-next").GroupTraits): Promise<import("@segment/analytics-next").Context>;
|
|
38
|
+
alias: import("@segment/analytics-next/dist/types/core/buffer").AnalyticsBuffered["alias"];
|
|
39
|
+
identifyFromCookie: () => Promise<import("@segment/analytics-next").Context>;
|
|
40
|
+
updateWriteKey: (writeKey: string) => void;
|
|
41
|
+
user: import("@segment/analytics-next/dist/types/core/buffer").AnalyticsBuffered["user"];
|
|
42
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkout } from '@imtbl/checkout-sdk';
|
|
2
|
+
type SetupAnalyticsProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
checkout: Checkout;
|
|
5
|
+
};
|
|
6
|
+
export declare function SetupAnalytics({ children, checkout }: SetupAnalyticsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Checkout, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
import { ConnectWidgetViews } from '../view-context/ConnectViewContextTypes';
|
|
3
|
+
export declare enum ConnectionStatus {
|
|
4
|
+
NOT_CONNECTED_NO_PROVIDER = "NOT_CONNECTED_NO_PROVIDER",
|
|
5
|
+
NOT_CONNECTED = "NOT_CONNECTED",
|
|
6
|
+
CONNECTED_WRONG_NETWORK = "CONNECTED_WRONG_NETWORK",
|
|
7
|
+
CONNECTED_WITH_NETWORK = "CONNECTED_WITH_NETWORK",
|
|
8
|
+
ERROR = "ERROR",
|
|
9
|
+
LOADING = "LOADING"
|
|
10
|
+
}
|
|
11
|
+
export interface ConnectLoaderState {
|
|
12
|
+
connectionStatus: ConnectionStatus;
|
|
13
|
+
deepLink?: ConnectWidgetViews;
|
|
14
|
+
checkout?: Checkout;
|
|
15
|
+
provider?: WrappedBrowserProvider;
|
|
16
|
+
}
|
|
17
|
+
export declare const initialConnectLoaderState: ConnectLoaderState;
|
|
18
|
+
export interface ConnectLoaderContextState {
|
|
19
|
+
connectLoaderState: ConnectLoaderState;
|
|
20
|
+
connectLoaderDispatch: React.Dispatch<ConnectLoaderAction>;
|
|
21
|
+
}
|
|
22
|
+
export interface ConnectLoaderAction {
|
|
23
|
+
payload: ConnectLoaderActionPayload;
|
|
24
|
+
}
|
|
25
|
+
type ConnectLoaderActionPayload = UpdateConnectionStatusPayload | SetCheckoutPayload | SetProviderPayload;
|
|
26
|
+
export declare enum ConnectLoaderActions {
|
|
27
|
+
UPDATE_CONNECTION_STATUS = "UPDATE_CONNECTION_STATUS",
|
|
28
|
+
SET_CHECKOUT = "SET_CHECKOUT",
|
|
29
|
+
SET_PROVIDER = "SET_PROVIDER"
|
|
30
|
+
}
|
|
31
|
+
export interface UpdateConnectionStatusPayload {
|
|
32
|
+
type: ConnectLoaderActions.UPDATE_CONNECTION_STATUS;
|
|
33
|
+
connectionStatus: ConnectionStatus;
|
|
34
|
+
deepLink?: ConnectWidgetViews;
|
|
35
|
+
}
|
|
36
|
+
export interface SetCheckoutPayload {
|
|
37
|
+
type: ConnectLoaderActions.SET_CHECKOUT;
|
|
38
|
+
checkout: Checkout;
|
|
39
|
+
}
|
|
40
|
+
export interface SetProviderPayload {
|
|
41
|
+
type: ConnectLoaderActions.SET_PROVIDER;
|
|
42
|
+
provider: WrappedBrowserProvider;
|
|
43
|
+
}
|
|
44
|
+
export declare const ConnectLoaderContext: import("react").Context<ConnectLoaderContextState>;
|
|
45
|
+
export type Reducer<S, A> = (prevState: S, action: A) => S;
|
|
46
|
+
export declare const connectLoaderReducer: Reducer<ConnectLoaderState, ConnectLoaderAction>;
|
|
47
|
+
export declare const useConnectLoaderState: () => readonly [ConnectLoaderState, import("react").Dispatch<ConnectLoaderAction>];
|
|
48
|
+
export {};
|
package/dist/types/context/connect-loader-context/test-components/ConnectLoaderTestComponent.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConnectLoaderState } from '../ConnectLoaderContext';
|
|
3
|
+
export interface TestProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
initialStateOverride?: ConnectLoaderState;
|
|
6
|
+
}
|
|
7
|
+
export declare function ConnectLoaderTestComponent({ children, initialStateOverride }: TestProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CryptoFiat, CryptoFiatConvertReturn } from '@imtbl/cryptofiat';
|
|
2
|
+
import { FiatSymbols } from './CryptoFiatContext';
|
|
3
|
+
export declare const updateConversions: (cryptoToFiatResult: CryptoFiatConvertReturn, fiatSymbol: FiatSymbols) => Map<string, number>;
|
|
4
|
+
export declare const getCryptoToFiatConversion: (cryptoFiat: CryptoFiat, fiatSymbol: FiatSymbols, tokenSymbols: string[]) => Promise<Map<string, number>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CryptoFiat } from '@imtbl/cryptofiat';
|
|
2
|
+
export declare enum FiatSymbols {
|
|
3
|
+
USD = "usd"
|
|
4
|
+
}
|
|
5
|
+
export interface CryptoFiatState {
|
|
6
|
+
cryptoFiat: CryptoFiat | null;
|
|
7
|
+
fiatSymbol: FiatSymbols;
|
|
8
|
+
tokenSymbols: string[];
|
|
9
|
+
conversions: Map<string, number>;
|
|
10
|
+
}
|
|
11
|
+
export declare const initialCryptoFiatState: CryptoFiatState;
|
|
12
|
+
export interface CryptoFiatContextState {
|
|
13
|
+
cryptoFiatState: CryptoFiatState;
|
|
14
|
+
cryptoFiatDispatch: React.Dispatch<CryptoFiatAction>;
|
|
15
|
+
}
|
|
16
|
+
export interface CryptoFiatAction {
|
|
17
|
+
payload: CryptoFiatActionPayload;
|
|
18
|
+
}
|
|
19
|
+
type CryptoFiatActionPayload = SetCryptoFiatPayload | SetFiatSymbolPayload | SetTokenSymbolsPayload | SetConversionsPayload;
|
|
20
|
+
export declare enum CryptoFiatActions {
|
|
21
|
+
SET_CRYPTO_FIAT = "SET_CRYPTO_FIAT",
|
|
22
|
+
SET_FIAT_SYMBOL = "SET_FIAT_SYMBOL",
|
|
23
|
+
SET_TOKEN_SYMBOLS = "SET_TOKEN_SYMBOLS",
|
|
24
|
+
SET_CONVERSIONS = "SET_CONVERSIONS"
|
|
25
|
+
}
|
|
26
|
+
export interface SetCryptoFiatPayload {
|
|
27
|
+
type: CryptoFiatActions.SET_CRYPTO_FIAT;
|
|
28
|
+
cryptoFiat: CryptoFiat;
|
|
29
|
+
}
|
|
30
|
+
export interface SetFiatSymbolPayload {
|
|
31
|
+
type: CryptoFiatActions.SET_FIAT_SYMBOL;
|
|
32
|
+
fiatSymbol: FiatSymbols;
|
|
33
|
+
}
|
|
34
|
+
export interface SetTokenSymbolsPayload {
|
|
35
|
+
type: CryptoFiatActions.SET_TOKEN_SYMBOLS;
|
|
36
|
+
tokenSymbols: string[];
|
|
37
|
+
}
|
|
38
|
+
export interface SetConversionsPayload {
|
|
39
|
+
type: CryptoFiatActions.SET_CONVERSIONS;
|
|
40
|
+
conversions: Map<string, number>;
|
|
41
|
+
}
|
|
42
|
+
export declare const CryptoFiatContext: import("react").Context<CryptoFiatContextState>;
|
|
43
|
+
export type Reducer<S, A> = (prevState: S, action: A) => S;
|
|
44
|
+
export declare const cryptoFiatReducer: Reducer<CryptoFiatState, CryptoFiatAction>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Environment } from '@imtbl/config';
|
|
3
|
+
interface CryptoFiatProviderProps {
|
|
4
|
+
environment: Environment;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_TOKEN_SYMBOLS: string[];
|
|
8
|
+
export declare function CryptoFiatProvider({ environment, children }: CryptoFiatProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface EventTargetState {
|
|
2
|
+
eventTarget: Window | EventTarget;
|
|
3
|
+
}
|
|
4
|
+
export declare const initialEventTargetState: EventTargetState;
|
|
5
|
+
export interface EventTargetContextState {
|
|
6
|
+
eventTargetState: EventTargetState;
|
|
7
|
+
eventTargetDispatch: React.Dispatch<EventTargetAction>;
|
|
8
|
+
}
|
|
9
|
+
export interface EventTargetAction {
|
|
10
|
+
payload: EventTargetActionPayload;
|
|
11
|
+
}
|
|
12
|
+
type EventTargetActionPayload = SetEventTargetPayload;
|
|
13
|
+
export declare enum EventTargetActions {
|
|
14
|
+
SET_EVENT_TARGET = "SET_EVENT_TARGET"
|
|
15
|
+
}
|
|
16
|
+
export interface SetEventTargetPayload {
|
|
17
|
+
type: EventTargetActions.SET_EVENT_TARGET;
|
|
18
|
+
eventTarget: Window | EventTarget;
|
|
19
|
+
}
|
|
20
|
+
export declare const EventTargetContext: import("react").Context<EventTargetContextState>;
|
|
21
|
+
export type Reducer<S, A> = (prevState: S, action: A) => S;
|
|
22
|
+
export declare const eventTargetReducer: Reducer<EventTargetState, EventTargetAction>;
|
|
23
|
+
export declare const useEventTargetState: () => readonly [EventTargetState, import("react").Dispatch<EventTargetAction>];
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EventTargetState } from '../EventTargetContext';
|
|
3
|
+
export interface TestProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
initialStateOverride?: EventTargetState;
|
|
6
|
+
}
|
|
7
|
+
export declare function EventTargetTestComponent({ children, initialStateOverride }: TestProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum HandoverTarget {
|
|
3
|
+
GLOBAL = "global",
|
|
4
|
+
DRAWER = "drawer",
|
|
5
|
+
LOADER = "loader"
|
|
6
|
+
}
|
|
7
|
+
export type HandoverContent = {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
animationUrl?: string;
|
|
10
|
+
inputValue?: number;
|
|
11
|
+
duration?: number;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type HandoverLoader = {
|
|
15
|
+
text: string | string[];
|
|
16
|
+
duration?: number;
|
|
17
|
+
};
|
|
18
|
+
export type HandoverContextProps = {
|
|
19
|
+
loader: HandoverLoader | null;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
showLoader: (loader: HandoverLoader) => void;
|
|
22
|
+
hideLoader: () => void;
|
|
23
|
+
handovers: {
|
|
24
|
+
[id: string]: HandoverContent;
|
|
25
|
+
};
|
|
26
|
+
addHandover: (handoverContent: HandoverContent, handoverTarget?: HandoverTarget) => void;
|
|
27
|
+
closeHandover: (handoverTarget?: HandoverTarget) => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const HandoverContext: React.Context<HandoverContextProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HandoverProviderProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare enum HandoverDuration {
|
|
6
|
+
SHORT = 1000,// in milliseconds
|
|
7
|
+
MEDIUM = 2000,
|
|
8
|
+
LONG = 3000
|
|
9
|
+
}
|
|
10
|
+
export declare function HandoverProvider({ children }: HandoverProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Checkout, EIP6963ProviderInfo, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
|
|
2
|
+
export interface ProvidersState {
|
|
3
|
+
fromProvider?: WrappedBrowserProvider;
|
|
4
|
+
fromProviderInfo?: EIP6963ProviderInfo;
|
|
5
|
+
fromAddress?: string;
|
|
6
|
+
toProvider?: WrappedBrowserProvider;
|
|
7
|
+
toProviderInfo?: EIP6963ProviderInfo;
|
|
8
|
+
toAddress?: string;
|
|
9
|
+
checkout: Checkout;
|
|
10
|
+
lockedToProvider?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const initialProvidersState: ProvidersState;
|
|
13
|
+
export interface ProvidersContextState {
|
|
14
|
+
providersState: ProvidersState;
|
|
15
|
+
providersDispatch: React.Dispatch<ProvidersContextAction>;
|
|
16
|
+
}
|
|
17
|
+
export interface ProvidersContextAction {
|
|
18
|
+
payload: ProvidersContextActionPayload;
|
|
19
|
+
}
|
|
20
|
+
type ProvidersContextActionPayload = SetProviderPayload | SetCheckoutPayload | ResetStatePayload | SetLockedToProviderPayload;
|
|
21
|
+
export declare enum ProvidersContextActions {
|
|
22
|
+
SET_PROVIDER = "SET_PROVIDER",
|
|
23
|
+
SET_CHECKOUT = "SET_CHECKOUT",
|
|
24
|
+
RESET_STATE = "RESET_STATE",
|
|
25
|
+
SET_LOCKED_TO_PROVIDER = "SET_LOCKED_TO_PROVIDER"
|
|
26
|
+
}
|
|
27
|
+
export interface SetProviderPayload {
|
|
28
|
+
type: ProvidersContextActions.SET_PROVIDER;
|
|
29
|
+
fromProvider?: WrappedBrowserProvider;
|
|
30
|
+
fromProviderInfo?: EIP6963ProviderInfo;
|
|
31
|
+
fromAddress?: string;
|
|
32
|
+
toProvider?: WrappedBrowserProvider;
|
|
33
|
+
toProviderInfo?: EIP6963ProviderInfo;
|
|
34
|
+
toAddress?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SetCheckoutPayload {
|
|
37
|
+
type: ProvidersContextActions.SET_CHECKOUT;
|
|
38
|
+
checkout: Checkout;
|
|
39
|
+
}
|
|
40
|
+
export interface ResetStatePayload {
|
|
41
|
+
type: ProvidersContextActions.RESET_STATE;
|
|
42
|
+
fromProvider?: WrappedBrowserProvider;
|
|
43
|
+
toProvider?: WrappedBrowserProvider;
|
|
44
|
+
checkout: Checkout;
|
|
45
|
+
}
|
|
46
|
+
export interface SetLockedToProviderPayload {
|
|
47
|
+
type: ProvidersContextActions.SET_LOCKED_TO_PROVIDER;
|
|
48
|
+
lockedToProvider: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare const ProvidersContext: import("react").Context<ProvidersContextState>;
|
|
51
|
+
export type Reducer<S, A> = (prevState: S, action: A) => S;
|
|
52
|
+
export declare const providersContextReducer: Reducer<ProvidersState, ProvidersContextAction>;
|
|
53
|
+
export declare const useProvidersReducer: (initialState?: ProvidersState) => readonly [ProvidersState, import("react").Dispatch<ProvidersContextAction>];
|
|
54
|
+
export declare function ProvidersContextProvider({ children, initialState, }: {
|
|
55
|
+
children: React.ReactNode;
|
|
56
|
+
initialState: ProvidersState;
|
|
57
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare const useProvidersContext: () => ProvidersContextState;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TokenBalance } from '@0xsquid/sdk/dist/types';
|
|
2
|
+
import { ViewType } from './ViewType';
|
|
3
|
+
export declare enum AddTokensWidgetViews {
|
|
4
|
+
ADD_TOKENS = "ADD_TOKENS",
|
|
5
|
+
REVIEW = "REVIEW",
|
|
6
|
+
GEO_BLOCK_ERROR = "GEO_BLOCK_ERROR"
|
|
7
|
+
}
|
|
8
|
+
export type AddTokensWidgetView = AddTokensView | AddTokensReview | GeoBlockErrorView;
|
|
9
|
+
interface AddTokensView extends ViewType {
|
|
10
|
+
type: AddTokensWidgetViews.ADD_TOKENS;
|
|
11
|
+
}
|
|
12
|
+
interface AddTokensReview extends ViewType {
|
|
13
|
+
type: AddTokensWidgetViews.REVIEW;
|
|
14
|
+
data: AddTokensReviewData;
|
|
15
|
+
}
|
|
16
|
+
interface GeoBlockErrorView extends ViewType {
|
|
17
|
+
type: AddTokensWidgetViews.GEO_BLOCK_ERROR;
|
|
18
|
+
}
|
|
19
|
+
export interface AddTokensReviewData {
|
|
20
|
+
balance: TokenBalance;
|
|
21
|
+
toAmount: string;
|
|
22
|
+
toChainId: string;
|
|
23
|
+
toTokenAddress: string;
|
|
24
|
+
additionalBuffer: number;
|
|
25
|
+
}
|
|
26
|
+
export interface AddTokensConfirmationData {
|
|
27
|
+
transactionHash: string;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ApproveBridgeResponse, BridgeTxResponse } from '@imtbl/bridge-sdk';
|
|
2
|
+
import { TransactionResponse } from 'ethers';
|
|
3
|
+
import { Transaction } from '../../lib/clients';
|
|
4
|
+
import { ViewType } from './ViewType';
|
|
5
|
+
export declare enum BridgeWidgetViews {
|
|
6
|
+
WALLET_NETWORK_SELECTION = "WALLET_NETWORK_SELECTION",
|
|
7
|
+
BRIDGE_FORM = "BRIDGE_FORM",
|
|
8
|
+
BRIDGE_REVIEW = "BRIDGE_REVIEW",
|
|
9
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
10
|
+
BRIDGE_FAILURE = "BRIDGE_FAILURE",
|
|
11
|
+
APPROVE_TRANSACTION = "APPROVE_TRANSACTION",
|
|
12
|
+
TRANSACTIONS = "TRANSACTIONS",
|
|
13
|
+
CLAIM_WITHDRAWAL = "CLAIM_WITHDRAWAL",
|
|
14
|
+
CLAIM_WITHDRAWAL_IN_PROGRESS = "CLAIM_WITHDRAWAL_IN_PROGRESS",
|
|
15
|
+
CLAIM_WITHDRAWAL_SUCCESS = "CLAIM_WITHDRAWAL_SUCCESS",
|
|
16
|
+
CLAIM_WITHDRAWAL_FAILURE = "CLAIM_WITHDRAWAL_FAILURE",
|
|
17
|
+
SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE"
|
|
18
|
+
}
|
|
19
|
+
export type BridgeWidgetView = BridgeCrossWalletSelection | BridgeForm | BridgeReview | BridgeInProgress | BridgeFailure | BridgeApproveTransaction | BridgeTransactions | BridgeClaimWithdrawal | BridgeClaimWithdrawalInProgress | BridgeClaimWithdrawalSuccess | BridgeClaimWithdrawalFailure | BridgeServiceUnavailableView;
|
|
20
|
+
interface BridgeCrossWalletSelection extends ViewType {
|
|
21
|
+
type: BridgeWidgetViews.WALLET_NETWORK_SELECTION;
|
|
22
|
+
}
|
|
23
|
+
interface BridgeForm extends ViewType {
|
|
24
|
+
type: BridgeWidgetViews.BRIDGE_FORM;
|
|
25
|
+
}
|
|
26
|
+
interface BridgeReview extends ViewType {
|
|
27
|
+
type: BridgeWidgetViews.BRIDGE_REVIEW;
|
|
28
|
+
}
|
|
29
|
+
interface BridgeInProgress extends ViewType {
|
|
30
|
+
type: BridgeWidgetViews.IN_PROGRESS;
|
|
31
|
+
transactionHash: string;
|
|
32
|
+
isTransfer: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface BridgeFailure extends ViewType {
|
|
35
|
+
type: BridgeWidgetViews.BRIDGE_FAILURE;
|
|
36
|
+
reason: string;
|
|
37
|
+
}
|
|
38
|
+
interface BridgeApproveTransaction extends ViewType {
|
|
39
|
+
type: BridgeWidgetViews.APPROVE_TRANSACTION;
|
|
40
|
+
approveTransaction: ApproveBridgeResponse | undefined;
|
|
41
|
+
transaction: BridgeTxResponse | undefined;
|
|
42
|
+
}
|
|
43
|
+
interface BridgeTransactions extends ViewType {
|
|
44
|
+
type: BridgeWidgetViews.TRANSACTIONS;
|
|
45
|
+
}
|
|
46
|
+
interface BridgeClaimWithdrawal extends ViewType {
|
|
47
|
+
type: BridgeWidgetViews.CLAIM_WITHDRAWAL;
|
|
48
|
+
transaction: Transaction;
|
|
49
|
+
}
|
|
50
|
+
interface BridgeClaimWithdrawalInProgress extends ViewType {
|
|
51
|
+
type: BridgeWidgetViews.CLAIM_WITHDRAWAL_IN_PROGRESS;
|
|
52
|
+
transactionResponse: TransactionResponse;
|
|
53
|
+
}
|
|
54
|
+
export interface BridgeClaimWithdrawalSuccess extends ViewType {
|
|
55
|
+
type: BridgeWidgetViews.CLAIM_WITHDRAWAL_SUCCESS;
|
|
56
|
+
transactionHash: string;
|
|
57
|
+
}
|
|
58
|
+
export interface BridgeClaimWithdrawalFailure extends ViewType {
|
|
59
|
+
type: BridgeWidgetViews.CLAIM_WITHDRAWAL_FAILURE;
|
|
60
|
+
transactionHash: string;
|
|
61
|
+
reason: string;
|
|
62
|
+
}
|
|
63
|
+
export interface BridgeServiceUnavailableView extends ViewType {
|
|
64
|
+
type: BridgeWidgetViews.SERVICE_UNAVAILABLE;
|
|
65
|
+
}
|
|
66
|
+
export {};
|