@daimo/pay 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/build/index.d.ts +2 -1
- package/build/package.json.js +3 -3
- package/build/pay/packages/connectkit/src/assets/ScanIconWithLogos.d.ts +5 -0
- package/build/pay/packages/connectkit/src/assets/browsers.d.ts +10 -0
- package/build/pay/packages/connectkit/src/assets/chains.d.ts +28 -0
- package/build/pay/packages/connectkit/src/assets/coins.d.ts +2 -0
- package/build/pay/packages/connectkit/src/assets/crepe.d.ts +4 -0
- package/build/pay/packages/connectkit/src/assets/icons.d.ts +36 -0
- package/build/pay/packages/connectkit/src/assets/logos.d.ts +205 -0
- package/build/pay/packages/connectkit/src/assets/wallet.d.ts +4 -0
- package/build/pay/packages/connectkit/src/assets/wave.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Common/Alert/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/Alert/styles.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Common/Alert/types.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/Common/AmountInput/AmountInputField.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Common/AmountInput/index.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Common/Avatar/index.d.ts +17 -0
- package/build/pay/packages/connectkit/src/components/Common/Avatar/styles.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Common/BrowserIcon/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/BrowserIcon/styles.d.ts +1 -0
- package/build/pay/packages/connectkit/src/components/Common/BrowserIcon/types.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Common/Button/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/Button/styles.d.ts +10 -0
- package/build/pay/packages/connectkit/src/components/Common/Button/types.d.ts +15 -0
- package/build/pay/packages/connectkit/src/components/Common/Chain/index.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Common/Chain/styles.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/ChainSelect/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Common/ChainSelectDropdown/index.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Common/ChainSelectDropdown/styles.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/ChainSelectList/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/ChainSelectList/styles.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Common/ConnectorList/index.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Common/ConnectorList/styles.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/Common/CopyToClipboard/CopyToClipboardIcon.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/CopyToClipboard/index.d.ts +7 -0
- package/build/pay/packages/connectkit/src/components/Common/CustomQRCode/QRCode.d.ts +12 -0
- package/build/pay/packages/connectkit/src/components/Common/CustomQRCode/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/CustomQRCode/styles.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/CustomQRCode/types.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Common/DynamicContainer/index.d.ts +7 -0
- package/build/pay/packages/connectkit/src/components/Common/FitText/index.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Common/LazyImage/index.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Common/Logo/index.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Common/Logo/styles.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Common/Modal/index.d.ts +25 -0
- package/build/pay/packages/connectkit/src/components/Common/Modal/styles.d.ts +24 -0
- package/build/pay/packages/connectkit/src/components/Common/OptionsList/index.d.ts +14 -0
- package/build/pay/packages/connectkit/src/components/Common/OptionsList/styles.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/OrderHeader/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/PaymentBreakdown/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/Portal/index.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Common/PoweredByFooter/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/ScrollArea/index.d.ts +7 -0
- package/build/pay/packages/connectkit/src/components/Common/ScrollArea/styles.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Common/Spinner/index.d.ts +1 -0
- package/build/pay/packages/connectkit/src/components/Common/Spinner/styles.d.ts +1 -0
- package/build/pay/packages/connectkit/src/components/Common/SwitchButton/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Common/ThemedButton/index.d.ts +15 -0
- package/build/pay/packages/connectkit/src/components/Common/ThemedButton/styles.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Common/TokenChainLogo/index.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/Common/Tooltip/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Common/Tooltip/styles.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Common/Tooltip/types.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Common/WalletChainLogo/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/DaimoPay.d.ts +104 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayButton/index.d.ts +153 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayButton/styles.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayModal/ConnectUsing.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayModal/ConnectWithInjector/index.d.ts +15 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayModal/ConnectWithInjector/styles.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayModal/ConnectWithQRCode.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayModal/index.d.ts +7 -0
- package/build/pay/packages/connectkit/src/components/DaimoPayThemeProvider/DaimoPayThemeProvider.d.ts +16 -0
- package/build/pay/packages/connectkit/src/components/NetworkButton/index.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Pages/About/graphics.d.ts +11 -0
- package/build/pay/packages/connectkit/src/components/Pages/About/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/About/styles.d.ts +8 -0
- package/build/pay/packages/connectkit/src/components/Pages/Confirmation/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Connectors/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Connectors/styles.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Pages/DownloadApp/index.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/Pages/MobileConnectors/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/MobileConnectors/styles.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/Pages/Onboarding/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Onboarding/styles.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Pages/PayWithToken/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectAmount/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectDepositAddressAmount/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectDepositAddressChain/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectExternalAmount/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectMethod/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectMethod/styles.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Pages/SelectToken/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Solana/ConnectSolana/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Solana/ConnectorSolana/index.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Pages/Solana/PayWithSolanaToken/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Solana/SelectSolanaAmount/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/Solana/SelectSolanaToken/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/SwitchNetworks/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/WaitingDepositAddress/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Pages/WaitingExternal/index.d.ts +3 -0
- package/build/pay/packages/connectkit/src/components/Spinners/CircleSpinner/index.d.ts +9 -0
- package/build/pay/packages/connectkit/src/components/Spinners/CircleSpinner/styles.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/Spinners/ExternalPaymentSpinner/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Spinners/SquircleSpinner/index.d.ts +5 -0
- package/build/pay/packages/connectkit/src/components/Spinners/SquircleSpinner/styles.d.ts +4 -0
- package/build/pay/packages/connectkit/src/components/Spinners/TokenLogoSpinner/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/Spinners/TokenLogoSpinner/styles.d.ts +1 -0
- package/build/pay/packages/connectkit/src/components/Spinners/styles.d.ts +2 -0
- package/build/pay/packages/connectkit/src/components/contexts/solana/index.d.ts +6 -0
- package/build/pay/packages/connectkit/src/components/contexts/web3/index.d.ts +25 -0
- package/build/pay/packages/connectkit/src/constants/defaultTheme.d.ts +4 -0
- package/build/pay/packages/connectkit/src/defaultConfig.d.ts +22 -0
- package/build/pay/packages/connectkit/src/defaultConnectors.d.ts +15 -0
- package/build/pay/packages/connectkit/src/hooks/connectors/useWalletConnectUri.d.ts +7 -0
- package/build/pay/packages/connectkit/src/hooks/hookTypes.d.ts +9 -0
- package/build/pay/packages/connectkit/src/hooks/useChainIsSupported.d.ts +2 -0
- package/build/pay/packages/connectkit/src/hooks/useChains.d.ts +3 -0
- package/build/pay/packages/connectkit/src/hooks/useConnect.d.ts +110 -0
- package/build/pay/packages/connectkit/src/hooks/useConnectCallback.d.ts +8 -0
- package/build/pay/packages/connectkit/src/hooks/useConnectors.d.ts +7 -0
- package/build/pay/packages/connectkit/src/hooks/useDaimoPayStatus.d.ts +15 -0
- package/build/pay/packages/connectkit/src/hooks/useDepositAddressOptions.d.ts +10 -0
- package/build/pay/packages/connectkit/src/hooks/useEnsFallbackConfig.d.ts +2 -0
- package/build/pay/packages/connectkit/src/hooks/useExternalPaymentOptions.d.ts +12 -0
- package/build/pay/packages/connectkit/src/hooks/useFitText.d.ts +14 -0
- package/build/pay/packages/connectkit/src/hooks/useFocusTrap.d.ts +1 -0
- package/build/pay/packages/connectkit/src/hooks/useGoogleFont.d.ts +3 -0
- package/build/pay/packages/connectkit/src/hooks/useIsMobile.d.ts +1 -0
- package/build/pay/packages/connectkit/src/hooks/useIsMounted.d.ts +3 -0
- package/build/pay/packages/connectkit/src/hooks/useLastConnector.d.ts +4 -0
- package/build/pay/packages/connectkit/src/hooks/useLocalStorage.d.ts +7 -0
- package/build/pay/packages/connectkit/src/hooks/useLocales.d.ts +1 -0
- package/build/pay/packages/connectkit/src/hooks/useLockBodyScroll.d.ts +1 -0
- package/build/pay/packages/connectkit/src/hooks/useModal.d.ts +8 -0
- package/build/pay/packages/connectkit/src/hooks/useOrderUsdLimits.d.ts +7 -0
- package/build/pay/packages/connectkit/src/hooks/usePayWithSolanaToken.d.ts +12 -0
- package/build/pay/packages/connectkit/src/hooks/usePayWithToken.d.ts +14 -0
- package/build/pay/packages/connectkit/src/hooks/usePaymentState.d.ts +90 -0
- package/build/pay/packages/connectkit/src/hooks/usePrevious.d.ts +1 -0
- package/build/pay/packages/connectkit/src/hooks/useSolanaPaymentOptions.d.ts +12 -0
- package/build/pay/packages/connectkit/src/hooks/useWalletConnectModal.d.ts +4 -0
- package/build/pay/packages/connectkit/src/hooks/useWalletPaymentOptions.d.ts +20 -0
- package/build/pay/packages/connectkit/src/hooks/useWindowSize.d.ts +4 -0
- package/build/pay/packages/connectkit/src/index.d.ts +11 -0
- package/build/pay/packages/connectkit/src/localizations/index.d.ts +93 -0
- package/build/pay/packages/connectkit/src/localizations/locales/ar-AE.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/ca-AD.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/ee-EE.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/en-US.d.ts +93 -0
- package/build/pay/packages/connectkit/src/localizations/locales/es-ES.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/fa-IR.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/fr-FR.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/index.d.ts +2 -0
- package/build/pay/packages/connectkit/src/localizations/locales/ja-JP.d.ts +93 -0
- package/build/pay/packages/connectkit/src/localizations/locales/pt-BR.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/ru-RU.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/tr-TR.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/vi-VN.d.ts +3 -0
- package/build/pay/packages/connectkit/src/localizations/locales/zh-CN.d.ts +3 -0
- package/build/pay/packages/connectkit/src/styles/defaultTheme.d.ts +3 -0
- package/build/pay/packages/connectkit/src/styles/index.d.ts +1 -0
- package/build/pay/packages/connectkit/src/styles/styled/index.d.ts +12 -0
- package/build/pay/packages/connectkit/src/styles/themes/base.d.ts +129 -0
- package/build/pay/packages/connectkit/src/styles/themes/index.d.ts +673 -0
- package/build/pay/packages/connectkit/src/styles/themes/midnight.d.ts +74 -0
- package/build/pay/packages/connectkit/src/styles/themes/minimal.d.ts +94 -0
- package/build/pay/packages/connectkit/src/styles/themes/nouns.d.ts +79 -0
- package/build/pay/packages/connectkit/src/styles/themes/retro.d.ts +89 -0
- package/build/pay/packages/connectkit/src/styles/themes/rounded.d.ts +86 -0
- package/build/pay/packages/connectkit/src/styles/themes/soft.d.ts +69 -0
- package/build/pay/packages/connectkit/src/styles/themes/web95.d.ts +91 -0
- package/build/pay/packages/connectkit/src/styles/types.d.ts +80 -0
- package/build/pay/packages/connectkit/src/types.d.ts +46 -0
- package/build/pay/packages/connectkit/src/utils/exports.d.ts +1 -0
- package/build/pay/packages/connectkit/src/utils/format.d.ts +49 -0
- package/build/pay/packages/connectkit/src/utils/index.d.ts +17 -0
- package/build/pay/packages/connectkit/src/utils/localstorage.d.ts +9 -0
- package/build/pay/packages/connectkit/src/utils/p3.d.ts +2 -0
- package/build/pay/packages/connectkit/src/utils/platform.d.ts +2 -0
- package/build/pay/packages/connectkit/src/utils/supportUrl.d.ts +2 -0
- package/build/pay/packages/connectkit/src/utils/trpc.d.ts +4 -0
- package/build/pay/packages/connectkit/src/utils/validateInput.d.ts +16 -0
- package/build/pay/packages/connectkit/src/utils/wallets.d.ts +24 -0
- package/build/pay/packages/connectkit/src/wallets/index.d.ts +5 -0
- package/build/pay/packages/connectkit/src/wallets/useWallets.d.ts +9 -0
- package/build/pay/packages/connectkit/src/wallets/walletConfigs.d.ts +30 -0
- package/build/pay/packages/connectkit/tsconfig.tsbuildinfo +1 -0
- package/build/src/assets/ScanIconWithLogos.js.map +1 -1
- package/build/src/assets/browsers.js.map +1 -1
- package/build/src/assets/chains.js.map +1 -1
- package/build/src/assets/coins.js.map +1 -1
- package/build/src/assets/crepe.js.map +1 -1
- package/build/src/assets/icons.js.map +1 -1
- package/build/src/assets/logos.js.map +1 -1
- package/build/src/assets/wallet.js.map +1 -1
- package/build/src/assets/wave.js.map +1 -1
- package/build/src/components/Common/Alert/index.js.map +1 -1
- package/build/src/components/Common/Alert/styles.js.map +1 -1
- package/build/src/components/Common/AmountInput/AmountInputField.js.map +1 -1
- package/build/src/components/Common/AmountInput/index.js.map +1 -1
- package/build/src/components/Common/Avatar/index.js.map +1 -1
- package/build/src/components/Common/Avatar/styles.js.map +1 -1
- package/build/src/components/Common/BrowserIcon/index.js.map +1 -1
- package/build/src/components/Common/BrowserIcon/styles.js.map +1 -1
- package/build/src/components/Common/Button/index.js.map +1 -1
- package/build/src/components/Common/Button/styles.js.map +1 -1
- package/build/src/components/Common/Chain/index.js.map +1 -1
- package/build/src/components/Common/Chain/styles.js.map +1 -1
- package/build/src/components/Common/ChainSelectList/index.js.map +1 -1
- package/build/src/components/Common/ChainSelectList/styles.js.map +1 -1
- package/build/src/components/Common/ConnectorList/index.js.map +1 -1
- package/build/src/components/Common/ConnectorList/styles.js.map +1 -1
- package/build/src/components/Common/CopyToClipboard/CopyToClipboardIcon.js.map +1 -1
- package/build/src/components/Common/CopyToClipboard/index.js.map +1 -1
- package/build/src/components/Common/CustomQRCode/QRCode.js.map +1 -1
- package/build/src/components/Common/CustomQRCode/index.js.map +1 -1
- package/build/src/components/Common/CustomQRCode/styles.js.map +1 -1
- package/build/src/components/Common/FitText/index.js.map +1 -1
- package/build/src/components/Common/Modal/index.js.map +1 -1
- package/build/src/components/Common/Modal/styles.js.map +1 -1
- package/build/src/components/Common/OptionsList/index.js.map +1 -1
- package/build/src/components/Common/OptionsList/styles.js.map +1 -1
- package/build/src/components/Common/OrderHeader/index.js.map +1 -1
- package/build/src/components/Common/PaymentBreakdown/index.js.map +1 -1
- package/build/src/components/Common/Portal/index.js.map +1 -1
- package/build/src/components/Common/PoweredByFooter/index.js +1 -1
- package/build/src/components/Common/PoweredByFooter/index.js.map +1 -1
- package/build/src/components/Common/ScrollArea/index.js.map +1 -1
- package/build/src/components/Common/ScrollArea/styles.js.map +1 -1
- package/build/src/components/Common/Spinner/index.js.map +1 -1
- package/build/src/components/Common/Spinner/styles.js.map +1 -1
- package/build/src/components/Common/SwitchButton/index.js.map +1 -1
- package/build/src/components/Common/ThemedButton/index.js.map +1 -1
- package/build/src/components/Common/ThemedButton/styles.js.map +1 -1
- package/build/src/components/Common/TokenChainLogo/index.js.map +1 -1
- package/build/src/components/Common/Tooltip/index.js.map +1 -1
- package/build/src/components/Common/Tooltip/styles.js.map +1 -1
- package/build/src/components/Common/WalletChainLogo/index.js.map +1 -1
- package/build/src/components/DaimoPay.js.map +1 -1
- package/build/src/components/DaimoPayButton/index.js +1 -1
- package/build/src/components/DaimoPayButton/index.js.map +1 -1
- package/build/src/components/DaimoPayButton/styles.js.map +1 -1
- package/build/src/components/DaimoPayModal/ConnectUsing.js.map +1 -1
- package/build/src/components/DaimoPayModal/ConnectWithInjector/index.js.map +1 -1
- package/build/src/components/DaimoPayModal/ConnectWithInjector/styles.js.map +1 -1
- package/build/src/components/DaimoPayModal/ConnectWithQRCode.js.map +1 -1
- package/build/src/components/DaimoPayModal/index.js.map +1 -1
- package/build/src/components/DaimoPayThemeProvider/DaimoPayThemeProvider.js.map +1 -1
- package/build/src/components/Pages/About/graphics.js.map +1 -1
- package/build/src/components/Pages/About/index.js.map +1 -1
- package/build/src/components/Pages/About/styles.js.map +1 -1
- package/build/src/components/Pages/Confirmation/index.js.map +1 -1
- package/build/src/components/Pages/Connectors/index.js.map +1 -1
- package/build/src/components/Pages/Connectors/styles.js.map +1 -1
- package/build/src/components/Pages/DownloadApp/index.js.map +1 -1
- package/build/src/components/Pages/MobileConnectors/index.js.map +1 -1
- package/build/src/components/Pages/MobileConnectors/styles.js.map +1 -1
- package/build/src/components/Pages/Onboarding/index.js.map +1 -1
- package/build/src/components/Pages/Onboarding/styles.js.map +1 -1
- package/build/src/components/Pages/PayWithToken/index.js.map +1 -1
- package/build/src/components/Pages/SelectAmount/index.js.map +1 -1
- package/build/src/components/Pages/SelectDepositAddressAmount/index.js.map +1 -1
- package/build/src/components/Pages/SelectDepositAddressChain/index.js.map +1 -1
- package/build/src/components/Pages/SelectExternalAmount/index.js.map +1 -1
- package/build/src/components/Pages/SelectMethod/index.js.map +1 -1
- package/build/src/components/Pages/SelectToken/index.js.map +1 -1
- package/build/src/components/Pages/Solana/ConnectSolana/index.js.map +1 -1
- package/build/src/components/Pages/Solana/ConnectorSolana/index.js.map +1 -1
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +1 -1
- package/build/src/components/Pages/Solana/SelectSolanaAmount/index.js.map +1 -1
- package/build/src/components/Pages/Solana/SelectSolanaToken/index.js.map +1 -1
- package/build/src/components/Pages/SwitchNetworks/index.js.map +1 -1
- package/build/src/components/Pages/WaitingDepositAddress/index.js.map +1 -1
- package/build/src/components/Pages/WaitingExternal/index.js.map +1 -1
- package/build/src/components/Spinners/CircleSpinner/index.js.map +1 -1
- package/build/src/components/Spinners/CircleSpinner/styles.js.map +1 -1
- package/build/src/components/Spinners/ExternalPaymentSpinner/index.js.map +1 -1
- package/build/src/components/Spinners/SquircleSpinner/index.js.map +1 -1
- package/build/src/components/Spinners/SquircleSpinner/styles.js.map +1 -1
- package/build/src/components/Spinners/TokenLogoSpinner/index.js.map +1 -1
- package/build/src/components/Spinners/TokenLogoSpinner/styles.js.map +1 -1
- package/build/src/components/Spinners/styles.js.map +1 -1
- package/build/src/components/contexts/solana/index.js.map +1 -1
- package/build/src/components/contexts/web3/index.js.map +1 -1
- package/build/src/constants/defaultTheme.js.map +1 -1
- package/build/src/defaultConfig.js.map +1 -1
- package/build/src/defaultConnectors.js.map +1 -1
- package/build/src/hooks/connectors/useWalletConnectUri.js.map +1 -1
- package/build/src/hooks/useChainIsSupported.js.map +1 -1
- package/build/src/hooks/useChains.js.map +1 -1
- package/build/src/hooks/useConnect.js.map +1 -1
- package/build/src/hooks/useConnectCallback.js.map +1 -1
- package/build/src/hooks/useConnectors.js.map +1 -1
- package/build/src/hooks/useDaimoPayStatus.js.map +1 -1
- package/build/src/hooks/useDepositAddressOptions.js.map +1 -1
- package/build/src/hooks/useEnsFallbackConfig.js.map +1 -1
- package/build/src/hooks/useExternalPaymentOptions.js.map +1 -1
- package/build/src/hooks/useFitText.js.map +1 -1
- package/build/src/hooks/useFocusTrap.js.map +1 -1
- package/build/src/hooks/useGoogleFont.js.map +1 -1
- package/build/src/hooks/useIsMobile.js.map +1 -1
- package/build/src/hooks/useIsMounted.js.map +1 -1
- package/build/src/hooks/useLastConnector.js.map +1 -1
- package/build/src/hooks/useLocales.js.map +1 -1
- package/build/src/hooks/useLockBodyScroll.js.map +1 -1
- package/build/src/hooks/useOrderUsdLimits.js.map +1 -1
- package/build/src/hooks/usePayWithSolanaToken.js.map +1 -1
- package/build/src/hooks/usePayWithToken.js.map +1 -1
- package/build/src/hooks/usePaymentState.js.map +1 -1
- package/build/src/hooks/usePrevious.js.map +1 -1
- package/build/src/hooks/useSolanaPaymentOptions.js.map +1 -1
- package/build/src/hooks/useWalletConnectModal.js.map +1 -1
- package/build/src/hooks/useWalletPaymentOptions.js.map +1 -1
- package/build/src/hooks/useWindowSize.js.map +1 -1
- package/build/src/localizations/index.js.map +1 -1
- package/build/src/localizations/locales/ar-AE.js.map +1 -1
- package/build/src/localizations/locales/ca-AD.js.map +1 -1
- package/build/src/localizations/locales/ee-EE.js.map +1 -1
- package/build/src/localizations/locales/en-US.js.map +1 -1
- package/build/src/localizations/locales/es-ES.js.map +1 -1
- package/build/src/localizations/locales/fa-IR.js.map +1 -1
- package/build/src/localizations/locales/fr-FR.js.map +1 -1
- package/build/src/localizations/locales/ja-JP.js.map +1 -1
- package/build/src/localizations/locales/pt-BR.js.map +1 -1
- package/build/src/localizations/locales/ru-RU.js.map +1 -1
- package/build/src/localizations/locales/tr-TR.js.map +1 -1
- package/build/src/localizations/locales/vi-VN.js.map +1 -1
- package/build/src/localizations/locales/zh-CN.js.map +1 -1
- package/build/src/styles/defaultTheme.js.map +1 -1
- package/build/src/styles/index.js.map +1 -1
- package/build/src/styles/styled/index.js.map +1 -1
- package/build/src/styles/themes/base.js.map +1 -1
- package/build/src/styles/themes/index.js.map +1 -1
- package/build/src/styles/themes/midnight.js.map +1 -1
- package/build/src/styles/themes/minimal.js.map +1 -1
- package/build/src/styles/themes/nouns.js.map +1 -1
- package/build/src/styles/themes/retro.js.map +1 -1
- package/build/src/styles/themes/rounded.js.map +1 -1
- package/build/src/styles/themes/soft.js.map +1 -1
- package/build/src/styles/themes/web95.js.map +1 -1
- package/build/src/utils/exports.js.map +1 -1
- package/build/src/utils/format.js.map +1 -1
- package/build/src/utils/index.js.map +1 -1
- package/build/src/utils/p3.js.map +1 -1
- package/build/src/utils/platform.js.map +1 -1
- package/build/src/utils/supportUrl.js.map +1 -1
- package/build/src/utils/trpc.js.map +1 -1
- package/build/src/utils/validateInput.js.map +1 -1
- package/build/src/utils/wallets.js.map +1 -1
- package/build/src/wallets/index.js.map +1 -1
- package/build/src/wallets/useWallets.js.map +1 -1
- package/build/src/wallets/walletConfigs.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const InfoBox: any;
|
|
2
|
+
export declare const InfoBoxButtons: any;
|
|
3
|
+
export declare const LearnMoreContainer: any;
|
|
4
|
+
export declare const LearnMoreButton: any;
|
|
5
|
+
export declare const ConnectorsContainer: any;
|
|
6
|
+
export declare const ConnectorButton: any;
|
|
7
|
+
export declare const ConnectorRecentlyUsed: any;
|
|
8
|
+
export declare const ConnectorLabel: any;
|
|
9
|
+
export declare const ConnectorIcon: any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const CircleSpinner: ({ logo, smallLogo, loading, unavailable, countdown, }: {
|
|
3
|
+
logo?: React.ReactNode;
|
|
4
|
+
smallLogo?: boolean;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
unavailable?: boolean;
|
|
7
|
+
countdown?: boolean;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default CircleSpinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ChainLogoContainer: any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WalletName } from "@solana/wallet-adapter-base";
|
|
2
|
+
export type SolanaWalletName = WalletName<string>;
|
|
3
|
+
export declare const SolanaContextProvider: ({ children, solanaRpcUrl, }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
solanaRpcUrl?: string;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This provider is responsible for handling reusable web3 logic across the app.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Address, Chain } from "viem";
|
|
6
|
+
type Web3Context = {
|
|
7
|
+
connect: {
|
|
8
|
+
getUri: (id?: string) => string;
|
|
9
|
+
};
|
|
10
|
+
dapp: {
|
|
11
|
+
chains: Chain[];
|
|
12
|
+
};
|
|
13
|
+
account?: {
|
|
14
|
+
chain: Chain;
|
|
15
|
+
chainIsSupported: boolean;
|
|
16
|
+
address: Address;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
declare const Web3Context: React.Context<Web3Context>;
|
|
20
|
+
export declare const Web3ContextProvider: ({ enabled, children, }: {
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const useWeb3: () => Web3Context;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CreateConfigParameters } from "@wagmi/core";
|
|
2
|
+
import { CreateConnectorFn } from "wagmi";
|
|
3
|
+
import { CoinbaseWalletParameters } from "wagmi/connectors";
|
|
4
|
+
export declare const getAppName: () => string;
|
|
5
|
+
export declare const getAppIcon: () => string;
|
|
6
|
+
type DefaultConfigProps = {
|
|
7
|
+
appName: string;
|
|
8
|
+
appIcon?: string;
|
|
9
|
+
appDescription?: string;
|
|
10
|
+
appUrl?: string;
|
|
11
|
+
/**
|
|
12
|
+
* WC 2.0 Project ID (get one here: https://cloud.walletconnect.com/sign-in),
|
|
13
|
+
* it doesn't do much besides tracking. If not provided, use Daimo's
|
|
14
|
+
* WalletConnect project ID by default. */
|
|
15
|
+
walletConnectProjectId?: string;
|
|
16
|
+
coinbaseWalletPreference?: CoinbaseWalletParameters<"4">["preference"];
|
|
17
|
+
additionalConnectors?: CreateConnectorFn[];
|
|
18
|
+
} & Partial<CreateConfigParameters>;
|
|
19
|
+
export declare const REQUIRED_CHAINS: CreateConfigParameters["chains"];
|
|
20
|
+
/** Daimo Pay recommended config, for use with wagmi's createConfig(). */
|
|
21
|
+
declare const defaultConfig: ({ appName, appIcon, appDescription, appUrl, walletConnectProjectId, coinbaseWalletPreference, additionalConnectors, chains, client, ...props }: DefaultConfigProps) => CreateConfigParameters;
|
|
22
|
+
export default defaultConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CoinbaseWalletParameters } from "@wagmi/connectors";
|
|
2
|
+
import { CreateConnectorFn } from "wagmi";
|
|
3
|
+
type DefaultConnectorsProps = {
|
|
4
|
+
app: {
|
|
5
|
+
name: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
};
|
|
10
|
+
walletConnectProjectId: string;
|
|
11
|
+
coinbaseWalletPreference?: CoinbaseWalletParameters<"4">["preference"];
|
|
12
|
+
additionalConnectors?: CreateConnectorFn[];
|
|
13
|
+
};
|
|
14
|
+
declare const defaultConnectors: ({ app, walletConnectProjectId, coinbaseWalletPreference, additionalConnectors, }: DefaultConnectorsProps) => CreateConnectorFn[];
|
|
15
|
+
export default defaultConnectors;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DaimoPayHydratedOrder, DaimoPayOrder, ExternalPaymentOptionData, ExternalPaymentOptions } from "@daimo/pay-common";
|
|
2
|
+
export type CreateOrHydrateFn = (opts: {
|
|
3
|
+
order: DaimoPayOrder;
|
|
4
|
+
refundAddress?: string;
|
|
5
|
+
externalPaymentOption?: ExternalPaymentOptions;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
hydratedOrder: DaimoPayHydratedOrder;
|
|
8
|
+
externalPaymentOptionData: ExternalPaymentOptionData | null;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a wrapper around wagmi's useConnect hook that adds some
|
|
3
|
+
* additional functionality.
|
|
4
|
+
*/
|
|
5
|
+
import { Connector, CreateConnectorFn, type UseConnectParameters } from "wagmi";
|
|
6
|
+
export declare function useConnect({ ...props }?: UseConnectParameters): {
|
|
7
|
+
status: "idle";
|
|
8
|
+
data: undefined;
|
|
9
|
+
reset: () => void;
|
|
10
|
+
error: null;
|
|
11
|
+
variables: undefined;
|
|
12
|
+
isError: false;
|
|
13
|
+
isIdle: true;
|
|
14
|
+
isPending: false;
|
|
15
|
+
isSuccess: false;
|
|
16
|
+
context: unknown;
|
|
17
|
+
failureCount: number;
|
|
18
|
+
failureReason: import("@wagmi/core").ConnectErrorType | null;
|
|
19
|
+
isPaused: boolean;
|
|
20
|
+
submittedAt: number;
|
|
21
|
+
connect: ({ connector, chainId, mutation, }: {
|
|
22
|
+
connector: CreateConnectorFn | Connector;
|
|
23
|
+
chainId?: number;
|
|
24
|
+
mutation?: UseConnectParameters["mutation"];
|
|
25
|
+
}) => void;
|
|
26
|
+
connectAsync: ({ connector, chainId, mutation, }: {
|
|
27
|
+
connector: CreateConnectorFn | Connector;
|
|
28
|
+
chainId?: number;
|
|
29
|
+
mutation?: UseConnectParameters["mutation"];
|
|
30
|
+
}) => Promise<import("wagmi/query").ConnectData<import("wagmi").Config>>;
|
|
31
|
+
connectors: readonly Connector<CreateConnectorFn>[];
|
|
32
|
+
} | {
|
|
33
|
+
status: "pending";
|
|
34
|
+
data: undefined;
|
|
35
|
+
reset: () => void;
|
|
36
|
+
error: null;
|
|
37
|
+
variables: import("wagmi/query").ConnectVariables<import("wagmi").Config, Connector<CreateConnectorFn>>;
|
|
38
|
+
isError: false;
|
|
39
|
+
isIdle: false;
|
|
40
|
+
isPending: true;
|
|
41
|
+
isSuccess: false;
|
|
42
|
+
context: unknown;
|
|
43
|
+
failureCount: number;
|
|
44
|
+
failureReason: import("@wagmi/core").ConnectErrorType | null;
|
|
45
|
+
isPaused: boolean;
|
|
46
|
+
submittedAt: number;
|
|
47
|
+
connect: ({ connector, chainId, mutation, }: {
|
|
48
|
+
connector: CreateConnectorFn | Connector;
|
|
49
|
+
chainId?: number;
|
|
50
|
+
mutation?: UseConnectParameters["mutation"];
|
|
51
|
+
}) => void;
|
|
52
|
+
connectAsync: ({ connector, chainId, mutation, }: {
|
|
53
|
+
connector: CreateConnectorFn | Connector;
|
|
54
|
+
chainId?: number;
|
|
55
|
+
mutation?: UseConnectParameters["mutation"];
|
|
56
|
+
}) => Promise<import("wagmi/query").ConnectData<import("wagmi").Config>>;
|
|
57
|
+
connectors: readonly Connector<CreateConnectorFn>[];
|
|
58
|
+
} | {
|
|
59
|
+
status: "error";
|
|
60
|
+
data: undefined;
|
|
61
|
+
reset: () => void;
|
|
62
|
+
error: import("@wagmi/core").ConnectErrorType;
|
|
63
|
+
variables: import("wagmi/query").ConnectVariables<import("wagmi").Config, Connector<CreateConnectorFn>>;
|
|
64
|
+
isError: true;
|
|
65
|
+
isIdle: false;
|
|
66
|
+
isPending: false;
|
|
67
|
+
isSuccess: false;
|
|
68
|
+
context: unknown;
|
|
69
|
+
failureCount: number;
|
|
70
|
+
failureReason: import("@wagmi/core").ConnectErrorType | null;
|
|
71
|
+
isPaused: boolean;
|
|
72
|
+
submittedAt: number;
|
|
73
|
+
connect: ({ connector, chainId, mutation, }: {
|
|
74
|
+
connector: CreateConnectorFn | Connector;
|
|
75
|
+
chainId?: number;
|
|
76
|
+
mutation?: UseConnectParameters["mutation"];
|
|
77
|
+
}) => void;
|
|
78
|
+
connectAsync: ({ connector, chainId, mutation, }: {
|
|
79
|
+
connector: CreateConnectorFn | Connector;
|
|
80
|
+
chainId?: number;
|
|
81
|
+
mutation?: UseConnectParameters["mutation"];
|
|
82
|
+
}) => Promise<import("wagmi/query").ConnectData<import("wagmi").Config>>;
|
|
83
|
+
connectors: readonly Connector<CreateConnectorFn>[];
|
|
84
|
+
} | {
|
|
85
|
+
status: "success";
|
|
86
|
+
data: import("wagmi/query").ConnectData<import("wagmi").Config>;
|
|
87
|
+
reset: () => void;
|
|
88
|
+
error: null;
|
|
89
|
+
variables: import("wagmi/query").ConnectVariables<import("wagmi").Config, Connector<CreateConnectorFn>>;
|
|
90
|
+
isError: false;
|
|
91
|
+
isIdle: false;
|
|
92
|
+
isPending: false;
|
|
93
|
+
isSuccess: true;
|
|
94
|
+
context: unknown;
|
|
95
|
+
failureCount: number;
|
|
96
|
+
failureReason: import("@wagmi/core").ConnectErrorType | null;
|
|
97
|
+
isPaused: boolean;
|
|
98
|
+
submittedAt: number;
|
|
99
|
+
connect: ({ connector, chainId, mutation, }: {
|
|
100
|
+
connector: CreateConnectorFn | Connector;
|
|
101
|
+
chainId?: number;
|
|
102
|
+
mutation?: UseConnectParameters["mutation"];
|
|
103
|
+
}) => void;
|
|
104
|
+
connectAsync: ({ connector, chainId, mutation, }: {
|
|
105
|
+
connector: CreateConnectorFn | Connector;
|
|
106
|
+
chainId?: number;
|
|
107
|
+
mutation?: UseConnectParameters["mutation"];
|
|
108
|
+
}) => Promise<import("wagmi/query").ConnectData<import("wagmi").Config>>;
|
|
109
|
+
connectors: readonly Connector<CreateConnectorFn>[];
|
|
110
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type useConnectCallbackProps = {
|
|
2
|
+
onConnect?: ({ address, connectorId, }: {
|
|
3
|
+
address?: string;
|
|
4
|
+
connectorId?: string;
|
|
5
|
+
}) => void;
|
|
6
|
+
onDisconnect?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const useConnectCallback: ({ onConnect, onDisconnect, }: useConnectCallbackProps) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Connector } from "wagmi";
|
|
2
|
+
export declare function useConnectors(): readonly Connector<import("wagmi").CreateConnectorFn>[];
|
|
3
|
+
export declare function useConnector(id: string, uuid?: string): Connector;
|
|
4
|
+
export declare function useInjectedConnector(uuid?: string): Connector;
|
|
5
|
+
export declare function useWalletConnectConnector(): Connector;
|
|
6
|
+
export declare function useCoinbaseWalletConnector(): Connector;
|
|
7
|
+
export declare function useMetaMaskConnector(): Connector;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DaimoPayIntentStatus } from "@daimo/pay-common";
|
|
2
|
+
/** Returns the current payment, or undefined if there is none.
|
|
3
|
+
*
|
|
4
|
+
* Status values:
|
|
5
|
+
* - `payment_unpaid` - the user has not paid yet
|
|
6
|
+
* - `payment_started` - the user has paid & payment is in progress. This status
|
|
7
|
+
* typically lasts a few seconds.
|
|
8
|
+
* - `payment_completed` - the final call or transfer succeeded
|
|
9
|
+
* - `payment_bounced` - the final call or transfer reverted. Funds were sent
|
|
10
|
+
* to the payment's configured refund address on the destination chain.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useDaimoPayStatus(): {
|
|
13
|
+
paymentId: string;
|
|
14
|
+
status: DaimoPayIntentStatus;
|
|
15
|
+
} | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DaimoPayOrderMode, DepositAddressPaymentOptionMetadata } from "@daimo/pay-common";
|
|
2
|
+
import { TrpcClient } from "../utils/trpc";
|
|
3
|
+
export declare function useDepositAddressOptions({ trpc, usdRequired, mode, }: {
|
|
4
|
+
trpc: TrpcClient;
|
|
5
|
+
usdRequired: number | undefined;
|
|
6
|
+
mode: DaimoPayOrderMode | undefined;
|
|
7
|
+
}): {
|
|
8
|
+
options: DepositAddressPaymentOptionMetadata[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DaimoPayOrderMode, ExternalPaymentOptionMetadata, PlatformType } from "@daimo/pay-common";
|
|
2
|
+
import { TrpcClient } from "../utils/trpc";
|
|
3
|
+
export declare function useExternalPaymentOptions({ trpc, filterIds, platform, usdRequired, mode, }: {
|
|
4
|
+
trpc: TrpcClient;
|
|
5
|
+
filterIds: string[] | undefined;
|
|
6
|
+
platform: PlatformType | undefined;
|
|
7
|
+
usdRequired: number | undefined;
|
|
8
|
+
mode: DaimoPayOrderMode | undefined;
|
|
9
|
+
}): {
|
|
10
|
+
options: ExternalPaymentOptionMetadata[];
|
|
11
|
+
loading: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TLogLevel = "debug" | "info" | "warn" | "error" | "none";
|
|
2
|
+
export type TOptions = {
|
|
3
|
+
logLevel?: TLogLevel;
|
|
4
|
+
maxFontSize?: number;
|
|
5
|
+
minFontSize?: number;
|
|
6
|
+
onFinish?: (fontSize: number) => void;
|
|
7
|
+
onStart?: () => void;
|
|
8
|
+
resolution?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const useFitText: ({ logLevel: logLevelOption, maxFontSize, minFontSize, onFinish, onStart, resolution, }?: TOptions) => {
|
|
11
|
+
fontSize: number;
|
|
12
|
+
ref: import("react").RefObject<HTMLDivElement>;
|
|
13
|
+
};
|
|
14
|
+
export default useFitText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FocusTrap(props: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useIsMobile(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useLocales(replacements?: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useLockBodyScroll(initialLocked: boolean): (boolean | import("react").Dispatch<import("react").SetStateAction<boolean>>)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useConnectCallbackProps } from "./useConnectCallback";
|
|
2
|
+
type UseModalProps = {} & useConnectCallbackProps;
|
|
3
|
+
/** Opens and closes the payment modal. */
|
|
4
|
+
export declare const useModal: ({ onConnect, onDisconnect }?: UseModalProps) => {
|
|
5
|
+
open: boolean;
|
|
6
|
+
setOpen: (show: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DaimoPayOrder, SolanaPublicKey } from "@daimo/pay-common";
|
|
2
|
+
import { TrpcClient } from "../utils/trpc";
|
|
3
|
+
import { CreateOrHydrateFn } from "./hookTypes";
|
|
4
|
+
export declare function usePayWithSolanaToken({ trpc, daimoPayOrder, setDaimoPayOrder, createOrHydrate, log, }: {
|
|
5
|
+
trpc: TrpcClient;
|
|
6
|
+
daimoPayOrder: DaimoPayOrder | undefined;
|
|
7
|
+
setDaimoPayOrder: (order: DaimoPayOrder) => void;
|
|
8
|
+
createOrHydrate: CreateOrHydrateFn;
|
|
9
|
+
log: (message: string) => void;
|
|
10
|
+
}): {
|
|
11
|
+
payWithSolanaToken: (inputToken: SolanaPublicKey) => Promise<string>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DaimoPayOrder, WalletPaymentOption } from "@daimo/pay-common";
|
|
2
|
+
import { Address } from "viem";
|
|
3
|
+
import { TrpcClient } from "../utils/trpc";
|
|
4
|
+
import { CreateOrHydrateFn } from "./hookTypes";
|
|
5
|
+
export declare function usePayWithToken({ trpc, senderAddr, daimoPayOrder, setDaimoPayOrder, createOrHydrate, log, }: {
|
|
6
|
+
trpc: TrpcClient;
|
|
7
|
+
createOrHydrate: CreateOrHydrateFn;
|
|
8
|
+
senderAddr: Address | undefined;
|
|
9
|
+
daimoPayOrder: DaimoPayOrder | undefined;
|
|
10
|
+
setDaimoPayOrder: (order: DaimoPayOrder) => void;
|
|
11
|
+
log: (message: string) => void;
|
|
12
|
+
}): {
|
|
13
|
+
payWithToken: (walletOption: WalletPaymentOption) => Promise<void>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { DaimoPayOrder, DaimoPayUserMetadata, DepositAddressPaymentOptionData, DepositAddressPaymentOptionMetadata, DepositAddressPaymentOptions, ExternalPaymentOptionMetadata, ExternalPaymentOptions, SolanaPublicKey, WalletPaymentOption } from "@daimo/pay-common";
|
|
2
|
+
import { Address, Hex } from "viem";
|
|
3
|
+
import { DaimoPayModalOptions, PaymentOption } from "../types";
|
|
4
|
+
import { TrpcClient } from "../utils/trpc";
|
|
5
|
+
import { useDepositAddressOptions } from "./useDepositAddressOptions";
|
|
6
|
+
import { useExternalPaymentOptions } from "./useExternalPaymentOptions";
|
|
7
|
+
import { useSolanaPaymentOptions } from "./useSolanaPaymentOptions";
|
|
8
|
+
import { useWalletPaymentOptions } from "./useWalletPaymentOptions";
|
|
9
|
+
/** Wallet payment details, sent to processSourcePayment after submitting tx. */
|
|
10
|
+
export type SourcePayment = Parameters<TrpcClient["processSourcePayment"]["mutate"]>[0];
|
|
11
|
+
/** Payment parameters. The payment is created only after user taps pay. */
|
|
12
|
+
export interface PayParams {
|
|
13
|
+
/** App ID, for authentication. */
|
|
14
|
+
appId: string;
|
|
15
|
+
/** Destination chain ID. */
|
|
16
|
+
toChain: number;
|
|
17
|
+
/** The destination token to send. */
|
|
18
|
+
toToken: Address;
|
|
19
|
+
/**
|
|
20
|
+
* The amount of the token to send.
|
|
21
|
+
* If not provided, the user will be prompted to enter an amount.
|
|
22
|
+
*/
|
|
23
|
+
toUnits?: string;
|
|
24
|
+
/** The final address to transfer to or contract to call. */
|
|
25
|
+
toAddress: Address;
|
|
26
|
+
/** Calldata for final call, or empty data for transfer. */
|
|
27
|
+
toCallData?: Hex;
|
|
28
|
+
/** The intent verb, such as Pay, Deposit, or Purchase. Default: Pay */
|
|
29
|
+
intent?: string;
|
|
30
|
+
/** Payment options. By default, all are enabled. */
|
|
31
|
+
paymentOptions?: PaymentOption[];
|
|
32
|
+
/** Preferred chain IDs. */
|
|
33
|
+
preferredChains?: number[];
|
|
34
|
+
/** Preferred tokens. These appear first in the token list. */
|
|
35
|
+
preferredTokens?: {
|
|
36
|
+
chain: number;
|
|
37
|
+
address: Address;
|
|
38
|
+
}[];
|
|
39
|
+
/** Only allow payments on these EVM chains. */
|
|
40
|
+
evmChains?: number[];
|
|
41
|
+
/** External ID. E.g. a correlation ID. */
|
|
42
|
+
externalId?: string;
|
|
43
|
+
/** Developer metadata. E.g. correlation ID. */
|
|
44
|
+
metadata?: DaimoPayUserMetadata;
|
|
45
|
+
}
|
|
46
|
+
/** Creates (or loads) a payment and manages the corresponding modal. */
|
|
47
|
+
export interface PaymentState {
|
|
48
|
+
setPayId: (id: string | undefined) => void;
|
|
49
|
+
setPayParams: (payParams: PayParams | undefined) => void;
|
|
50
|
+
payParams: PayParams | undefined;
|
|
51
|
+
generatePreviewOrder: (payParams: PayParams) => void;
|
|
52
|
+
daimoPayOrder: DaimoPayOrder | undefined;
|
|
53
|
+
isDepositFlow: boolean;
|
|
54
|
+
modalOptions: DaimoPayModalOptions;
|
|
55
|
+
setModalOptions: (modalOptions: DaimoPayModalOptions) => void;
|
|
56
|
+
paymentWaitingMessage: string | undefined;
|
|
57
|
+
externalPaymentOptions: ReturnType<typeof useExternalPaymentOptions>;
|
|
58
|
+
walletPaymentOptions: ReturnType<typeof useWalletPaymentOptions>;
|
|
59
|
+
solanaPaymentOptions: ReturnType<typeof useSolanaPaymentOptions>;
|
|
60
|
+
depositAddressOptions: ReturnType<typeof useDepositAddressOptions>;
|
|
61
|
+
selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
|
|
62
|
+
selectedTokenOption: WalletPaymentOption | undefined;
|
|
63
|
+
selectedSolanaTokenOption: WalletPaymentOption | undefined;
|
|
64
|
+
selectedDepositAddressOption: DepositAddressPaymentOptionMetadata | undefined;
|
|
65
|
+
getOrderUsdLimit: () => number;
|
|
66
|
+
setPaymentWaitingMessage: (message: string | undefined) => void;
|
|
67
|
+
setSelectedExternalOption: (option: ExternalPaymentOptionMetadata | undefined) => void;
|
|
68
|
+
setSelectedTokenOption: (option: WalletPaymentOption | undefined) => void;
|
|
69
|
+
setSelectedSolanaTokenOption: (option: WalletPaymentOption | undefined) => void;
|
|
70
|
+
setSelectedDepositAddressOption: (option: DepositAddressPaymentOptionMetadata | undefined) => void;
|
|
71
|
+
setChosenUsd: (usd: number) => void;
|
|
72
|
+
payWithToken: (walletOption: WalletPaymentOption) => Promise<void>;
|
|
73
|
+
payWithExternal: (option: ExternalPaymentOptions) => Promise<string>;
|
|
74
|
+
payWithDepositAddress: (option: DepositAddressPaymentOptions) => Promise<DepositAddressPaymentOptionData | null>;
|
|
75
|
+
payWithSolanaToken: (inputToken: SolanaPublicKey) => Promise<string | undefined>;
|
|
76
|
+
refreshOrder: () => Promise<void>;
|
|
77
|
+
onSuccess: (args: {
|
|
78
|
+
txHash: string;
|
|
79
|
+
txURL?: string;
|
|
80
|
+
}) => void;
|
|
81
|
+
senderEnsName: string | undefined;
|
|
82
|
+
}
|
|
83
|
+
export declare function usePaymentState({ trpc, daimoPayOrder, setDaimoPayOrder, setOpen, log, redirectReturnUrl, }: {
|
|
84
|
+
trpc: TrpcClient;
|
|
85
|
+
daimoPayOrder: DaimoPayOrder | undefined;
|
|
86
|
+
setDaimoPayOrder: (o: DaimoPayOrder) => void;
|
|
87
|
+
setOpen: (showModal: boolean, meta?: Record<string, any>) => void;
|
|
88
|
+
log: (...args: any[]) => void;
|
|
89
|
+
redirectReturnUrl?: string;
|
|
90
|
+
}): PaymentState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function usePrevious(value: any, initial?: any): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WalletPaymentOption } from "@daimo/pay-common";
|
|
2
|
+
import { TrpcClient } from "../utils/trpc";
|
|
3
|
+
/** Wallet payment options. User picks one. */
|
|
4
|
+
export declare function useSolanaPaymentOptions({ trpc, address, usdRequired, isDepositFlow, }: {
|
|
5
|
+
trpc: TrpcClient;
|
|
6
|
+
address: string | undefined;
|
|
7
|
+
usdRequired: number | undefined;
|
|
8
|
+
isDepositFlow: boolean;
|
|
9
|
+
}): {
|
|
10
|
+
options: WalletPaymentOption[] | null;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { WalletPaymentOption } from "@daimo/pay-common";
|
|
2
|
+
import { TrpcClient } from "../utils/trpc";
|
|
3
|
+
/** Wallet payment options. User picks one. */
|
|
4
|
+
export declare function useWalletPaymentOptions({ trpc, address, usdRequired, destChainId, preferredChains, preferredTokens, evmChains, isDepositFlow, log, }: {
|
|
5
|
+
trpc: TrpcClient;
|
|
6
|
+
address: string | undefined;
|
|
7
|
+
usdRequired: number | undefined;
|
|
8
|
+
destChainId: number | undefined;
|
|
9
|
+
preferredChains: number[] | undefined;
|
|
10
|
+
preferredTokens: {
|
|
11
|
+
chain: number;
|
|
12
|
+
address: string;
|
|
13
|
+
}[] | undefined;
|
|
14
|
+
evmChains: number[] | undefined;
|
|
15
|
+
isDepositFlow: boolean;
|
|
16
|
+
log: (msg: string) => void;
|
|
17
|
+
}): {
|
|
18
|
+
options: WalletPaymentOption[] | null;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
};
|