@daimo/pay 1.19.9 → 1.19.11
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/package.json +2 -2
- package/build/index.d.ts +0 -619
- package/build/package.json.js +0 -118
- package/build/package.json.js.map +0 -1
- package/build/src/assets/MobileWithLogos.js +0 -329
- package/build/src/assets/MobileWithLogos.js.map +0 -1
- package/build/src/assets/ScanIconWithLogos.js +0 -243
- package/build/src/assets/ScanIconWithLogos.js.map +0 -1
- package/build/src/assets/browsers.js +0 -969
- package/build/src/assets/browsers.js.map +0 -1
- package/build/src/assets/chains.js +0 -661
- package/build/src/assets/chains.js.map +0 -1
- package/build/src/assets/icons.js +0 -273
- package/build/src/assets/icons.js.map +0 -1
- package/build/src/assets/logos.js +0 -1694
- package/build/src/assets/logos.js.map +0 -1
- package/build/src/assets/wave.js +0 -46
- package/build/src/assets/wave.js.map +0 -1
- package/build/src/components/Common/Alert/index.js +0 -13
- package/build/src/components/Common/Alert/index.js.map +0 -1
- package/build/src/components/Common/Alert/styles.js +0 -55
- package/build/src/components/Common/Alert/styles.js.map +0 -1
- package/build/src/components/Common/AmountInput/AmountInputField.js +0 -62
- package/build/src/components/Common/AmountInput/AmountInputField.js.map +0 -1
- package/build/src/components/Common/AmountInput/index.js +0 -166
- package/build/src/components/Common/AmountInput/index.js.map +0 -1
- package/build/src/components/Common/Avatar/index.js +0 -78
- package/build/src/components/Common/Avatar/index.js.map +0 -1
- package/build/src/components/Common/Avatar/styles.js +0 -54
- package/build/src/components/Common/Avatar/styles.js.map +0 -1
- package/build/src/components/Common/BrowserIcon/index.js +0 -29
- package/build/src/components/Common/BrowserIcon/index.js.map +0 -1
- package/build/src/components/Common/BrowserIcon/styles.js +0 -20
- package/build/src/components/Common/BrowserIcon/styles.js.map +0 -1
- package/build/src/components/Common/Button/index.js +0 -144
- package/build/src/components/Common/Button/index.js.map +0 -1
- package/build/src/components/Common/Button/styles.js +0 -287
- package/build/src/components/Common/Button/styles.js.map +0 -1
- package/build/src/components/Common/Chain/index.js +0 -141
- package/build/src/components/Common/Chain/index.js.map +0 -1
- package/build/src/components/Common/Chain/styles.js +0 -90
- package/build/src/components/Common/Chain/styles.js.map +0 -1
- package/build/src/components/Common/ChainSelectList/index.js +0 -250
- package/build/src/components/Common/ChainSelectList/index.js.map +0 -1
- package/build/src/components/Common/ChainSelectList/styles.js +0 -226
- package/build/src/components/Common/ChainSelectList/styles.js.map +0 -1
- package/build/src/components/Common/CircleTimer.js +0 -92
- package/build/src/components/Common/CircleTimer.js.map +0 -1
- package/build/src/components/Common/ConnectorList/index.js +0 -121
- package/build/src/components/Common/ConnectorList/index.js.map +0 -1
- package/build/src/components/Common/ConnectorList/styles.js +0 -344
- package/build/src/components/Common/ConnectorList/styles.js.map +0 -1
- package/build/src/components/Common/CopyToClipboard/CopyToClipboardIcon.js +0 -78
- package/build/src/components/Common/CopyToClipboard/CopyToClipboardIcon.js.map +0 -1
- package/build/src/components/Common/CustomQRCode/QRCode.js +0 -132
- package/build/src/components/Common/CustomQRCode/QRCode.js.map +0 -1
- package/build/src/components/Common/CustomQRCode/index.js +0 -89
- package/build/src/components/Common/CustomQRCode/index.js.map +0 -1
- package/build/src/components/Common/CustomQRCode/styles.js +0 -142
- package/build/src/components/Common/CustomQRCode/styles.js.map +0 -1
- package/build/src/components/Common/FitText/index.js +0 -34
- package/build/src/components/Common/FitText/index.js.map +0 -1
- package/build/src/components/Common/Modal/index.js +0 -558
- package/build/src/components/Common/Modal/index.js.map +0 -1
- package/build/src/components/Common/Modal/styles.js +0 -665
- package/build/src/components/Common/Modal/styles.js.map +0 -1
- package/build/src/components/Common/OptionsList/index.js +0 -145
- package/build/src/components/Common/OptionsList/index.js.map +0 -1
- package/build/src/components/Common/OptionsList/styles.js +0 -138
- package/build/src/components/Common/OptionsList/styles.js.map +0 -1
- package/build/src/components/Common/OrderHeader/index.js +0 -148
- package/build/src/components/Common/OrderHeader/index.js.map +0 -1
- package/build/src/components/Common/PaymentBreakdown/index.js +0 -70
- package/build/src/components/Common/PaymentBreakdown/index.js.map +0 -1
- package/build/src/components/Common/Portal/index.js +0 -30
- package/build/src/components/Common/Portal/index.js.map +0 -1
- package/build/src/components/Common/PoweredByFooter/index.js +0 -39
- package/build/src/components/Common/PoweredByFooter/index.js.map +0 -1
- package/build/src/components/Common/ScrollArea/index.js +0 -120
- package/build/src/components/Common/ScrollArea/index.js.map +0 -1
- package/build/src/components/Common/ScrollArea/styles.js +0 -169
- package/build/src/components/Common/ScrollArea/styles.js.map +0 -1
- package/build/src/components/Common/SelectAnotherMethodButton/index.js +0 -96
- package/build/src/components/Common/SelectAnotherMethodButton/index.js.map +0 -1
- package/build/src/components/Common/Spinner/index.js +0 -64
- package/build/src/components/Common/Spinner/index.js.map +0 -1
- package/build/src/components/Common/Spinner/styles.js +0 -22
- package/build/src/components/Common/Spinner/styles.js.map +0 -1
- package/build/src/components/Common/SwitchButton/index.js +0 -43
- package/build/src/components/Common/SwitchButton/index.js.map +0 -1
- package/build/src/components/Common/ThemedButton/index.js +0 -46
- package/build/src/components/Common/ThemedButton/index.js.map +0 -1
- package/build/src/components/Common/ThemedButton/styles.js +0 -152
- package/build/src/components/Common/ThemedButton/styles.js.map +0 -1
- package/build/src/components/Common/TokenChainLogo/index.js +0 -62
- package/build/src/components/Common/TokenChainLogo/index.js.map +0 -1
- package/build/src/components/Common/Tooltip/index.js +0 -129
- package/build/src/components/Common/Tooltip/index.js.map +0 -1
- package/build/src/components/Common/Tooltip/styles.js +0 -81
- package/build/src/components/Common/Tooltip/styles.js.map +0 -1
- package/build/src/components/Common/WalletChainLogo/index.js +0 -31
- package/build/src/components/Common/WalletChainLogo/index.js.map +0 -1
- package/build/src/components/DaimoPayButton/index.js +0 -196
- package/build/src/components/DaimoPayButton/index.js.map +0 -1
- package/build/src/components/DaimoPayButton/styles.js +0 -50
- package/build/src/components/DaimoPayButton/styles.js.map +0 -1
- package/build/src/components/DaimoPayModal/ConnectUsing.js +0 -70
- package/build/src/components/DaimoPayModal/ConnectUsing.js.map +0 -1
- package/build/src/components/DaimoPayModal/ConnectWithInjector/index.js +0 -339
- package/build/src/components/DaimoPayModal/ConnectWithInjector/index.js.map +0 -1
- package/build/src/components/DaimoPayModal/ConnectWithInjector/styles.js +0 -131
- package/build/src/components/DaimoPayModal/ConnectWithInjector/styles.js.map +0 -1
- package/build/src/components/DaimoPayModal/ConnectWithQRCode.js +0 -89
- package/build/src/components/DaimoPayModal/ConnectWithQRCode.js.map +0 -1
- package/build/src/components/DaimoPayModal/index.js +0 -605
- package/build/src/components/DaimoPayModal/index.js.map +0 -1
- package/build/src/components/DaimoPayThemeProvider/DaimoPayThemeProvider.js +0 -25
- package/build/src/components/DaimoPayThemeProvider/DaimoPayThemeProvider.js.map +0 -1
- package/build/src/components/Pages/About/graphics.js +0 -853
- package/build/src/components/Pages/About/graphics.js.map +0 -1
- package/build/src/components/Pages/About/index.js +0 -222
- package/build/src/components/Pages/About/index.js.map +0 -1
- package/build/src/components/Pages/About/styles.js +0 -140
- package/build/src/components/Pages/About/styles.js.map +0 -1
- package/build/src/components/Pages/Confirmation/index.js +0 -126
- package/build/src/components/Pages/Confirmation/index.js.map +0 -1
- package/build/src/components/Pages/Connectors/index.js +0 -26
- package/build/src/components/Pages/Connectors/index.js.map +0 -1
- package/build/src/components/Pages/Error/index.js +0 -57
- package/build/src/components/Pages/Error/index.js.map +0 -1
- package/build/src/components/Pages/MobileConnectors/index.js +0 -108
- package/build/src/components/Pages/MobileConnectors/index.js.map +0 -1
- package/build/src/components/Pages/MobileConnectors/styles.js +0 -64
- package/build/src/components/Pages/MobileConnectors/styles.js.map +0 -1
- package/build/src/components/Pages/Onboarding/index.js +0 -34
- package/build/src/components/Pages/Onboarding/index.js.map +0 -1
- package/build/src/components/Pages/Onboarding/styles.js +0 -229
- package/build/src/components/Pages/Onboarding/styles.js.map +0 -1
- package/build/src/components/Pages/PayWithToken/index.js +0 -157
- package/build/src/components/Pages/PayWithToken/index.js.map +0 -1
- package/build/src/components/Pages/SelectAmount/index.js +0 -24
- package/build/src/components/Pages/SelectAmount/index.js.map +0 -1
- package/build/src/components/Pages/SelectDepositAddressAmount/index.js +0 -79
- package/build/src/components/Pages/SelectDepositAddressAmount/index.js.map +0 -1
- package/build/src/components/Pages/SelectDepositAddressChain/index.js +0 -80
- package/build/src/components/Pages/SelectDepositAddressChain/index.js.map +0 -1
- package/build/src/components/Pages/SelectExchange/index.js +0 -62
- package/build/src/components/Pages/SelectExchange/index.js.map +0 -1
- package/build/src/components/Pages/SelectExternalAmount/index.js +0 -80
- package/build/src/components/Pages/SelectExternalAmount/index.js.map +0 -1
- package/build/src/components/Pages/SelectMethod/index.js +0 -315
- package/build/src/components/Pages/SelectMethod/index.js.map +0 -1
- package/build/src/components/Pages/SelectToken/index.js +0 -99
- package/build/src/components/Pages/SelectToken/index.js.map +0 -1
- package/build/src/components/Pages/SelectWalletAmount/index.js +0 -71
- package/build/src/components/Pages/SelectWalletAmount/index.js.map +0 -1
- package/build/src/components/Pages/SelectWalletChain/index.js +0 -55
- package/build/src/components/Pages/SelectWalletChain/index.js.map +0 -1
- package/build/src/components/Pages/SelectZKP/index.js +0 -41
- package/build/src/components/Pages/SelectZKP/index.js.map +0 -1
- package/build/src/components/Pages/Solana/ConnectorSolana/index.js +0 -94
- package/build/src/components/Pages/Solana/ConnectorSolana/index.js.map +0 -1
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js +0 -92
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +0 -1
- package/build/src/components/Pages/Solana/SelectSolanaAmount/index.js +0 -24
- package/build/src/components/Pages/Solana/SelectSolanaAmount/index.js.map +0 -1
- package/build/src/components/Pages/SwitchNetworks/index.js +0 -45
- package/build/src/components/Pages/SwitchNetworks/index.js.map +0 -1
- package/build/src/components/Pages/WaitingDepositAddress/index.js +0 -586
- package/build/src/components/Pages/WaitingDepositAddress/index.js.map +0 -1
- package/build/src/components/Pages/WaitingExternal/index.js +0 -174
- package/build/src/components/Pages/WaitingExternal/index.js.map +0 -1
- package/build/src/components/Pages/WaitingWallet/index.js +0 -49
- package/build/src/components/Pages/WaitingWallet/index.js.map +0 -1
- package/build/src/components/Pages/Warning/index.js +0 -56
- package/build/src/components/Pages/Warning/index.js.map +0 -1
- package/build/src/components/Spinners/CircleSpinner/index.js +0 -104
- package/build/src/components/Spinners/CircleSpinner/index.js.map +0 -1
- package/build/src/components/Spinners/CircleSpinner/styles.js +0 -117
- package/build/src/components/Spinners/CircleSpinner/styles.js.map +0 -1
- package/build/src/components/Spinners/ExternalPaymentSpinner/index.js +0 -29
- package/build/src/components/Spinners/ExternalPaymentSpinner/index.js.map +0 -1
- package/build/src/components/Spinners/SquircleSpinner/index.js +0 -68
- package/build/src/components/Spinners/SquircleSpinner/index.js.map +0 -1
- package/build/src/components/Spinners/SquircleSpinner/styles.js +0 -66
- package/build/src/components/Spinners/SquircleSpinner/styles.js.map +0 -1
- package/build/src/components/Spinners/TokenLogoSpinner/index.js +0 -24
- package/build/src/components/Spinners/TokenLogoSpinner/index.js.map +0 -1
- package/build/src/components/Spinners/TokenLogoSpinner/styles.js +0 -40
- package/build/src/components/Spinners/TokenLogoSpinner/styles.js.map +0 -1
- package/build/src/components/Spinners/WalletPaymentSpinner/index.js +0 -37
- package/build/src/components/Spinners/WalletPaymentSpinner/index.js.map +0 -1
- package/build/src/components/Spinners/styles.js +0 -32
- package/build/src/components/Spinners/styles.js.map +0 -1
- package/build/src/constants/defaultTheme.js +0 -6
- package/build/src/constants/defaultTheme.js.map +0 -1
- package/build/src/constants/limits.js +0 -4
- package/build/src/constants/limits.js.map +0 -1
- package/build/src/constants/paymentOptions.js +0 -61
- package/build/src/constants/paymentOptions.js.map +0 -1
- package/build/src/constants/routes.js +0 -31
- package/build/src/constants/routes.js.map +0 -1
- package/build/src/constants/wallets.js +0 -7
- package/build/src/constants/wallets.js.map +0 -1
- package/build/src/defaultConfig.js +0 -65
- package/build/src/defaultConfig.js.map +0 -1
- package/build/src/defaultConnectors.js +0 -37
- package/build/src/defaultConnectors.js.map +0 -1
- package/build/src/hooks/useChainIsSupported.js +0 -10
- package/build/src/hooks/useChainIsSupported.js.map +0 -1
- package/build/src/hooks/useChains.js +0 -10
- package/build/src/hooks/useChains.js.map +0 -1
- package/build/src/hooks/useConnect.js +0 -61
- package/build/src/hooks/useConnect.js.map +0 -1
- package/build/src/hooks/useConnectCallback.js +0 -21
- package/build/src/hooks/useConnectCallback.js.map +0 -1
- package/build/src/hooks/useConnectors.js +0 -20
- package/build/src/hooks/useConnectors.js.map +0 -1
- package/build/src/hooks/useDaimoPay.js +0 -131
- package/build/src/hooks/useDaimoPay.js.map +0 -1
- package/build/src/hooks/useDaimoPayStatus.js +0 -12
- package/build/src/hooks/useDaimoPayStatus.js.map +0 -1
- package/build/src/hooks/useDaimoPayUI.js +0 -15
- package/build/src/hooks/useDaimoPayUI.js.map +0 -1
- package/build/src/hooks/useEnsFallbackConfig.js +0 -16
- package/build/src/hooks/useEnsFallbackConfig.js.map +0 -1
- package/build/src/hooks/useFitText.js +0 -133
- package/build/src/hooks/useFitText.js.map +0 -1
- package/build/src/hooks/useFocusTrap.js +0 -53
- package/build/src/hooks/useFocusTrap.js.map +0 -1
- package/build/src/hooks/useIsMobile.js +0 -11
- package/build/src/hooks/useIsMobile.js.map +0 -1
- package/build/src/hooks/useIsMounted.js +0 -10
- package/build/src/hooks/useIsMounted.js.map +0 -1
- package/build/src/hooks/useLastConnector.js +0 -24
- package/build/src/hooks/useLastConnector.js.map +0 -1
- package/build/src/hooks/useLocales.js +0 -60
- package/build/src/hooks/useLocales.js.map +0 -1
- package/build/src/hooks/useLockBodyScroll.js +0 -47
- package/build/src/hooks/useLockBodyScroll.js.map +0 -1
- package/build/src/hooks/useOrderUsdLimits.js +0 -24
- package/build/src/hooks/useOrderUsdLimits.js.map +0 -1
- package/build/src/hooks/usePayContext.js +0 -11
- package/build/src/hooks/usePayContext.js.map +0 -1
- package/build/src/hooks/usePaymentOptions.js +0 -183
- package/build/src/hooks/usePaymentOptions.js.map +0 -1
- package/build/src/hooks/usePaymentState.js +0 -399
- package/build/src/hooks/usePaymentState.js.map +0 -1
- package/build/src/hooks/usePrevious.js +0 -13
- package/build/src/hooks/usePrevious.js.map +0 -1
- package/build/src/hooks/useTokenOptions.js +0 -156
- package/build/src/hooks/useTokenOptions.js.map +0 -1
- package/build/src/hooks/useUntronAvailability.js +0 -32
- package/build/src/hooks/useUntronAvailability.js.map +0 -1
- package/build/src/hooks/useWindowSize.js +0 -23
- package/build/src/hooks/useWindowSize.js.map +0 -1
- package/build/src/index.js +0 -14
- package/build/src/index.js.map +0 -1
- package/build/src/localizations/index.js +0 -48
- package/build/src/localizations/index.js.map +0 -1
- package/build/src/localizations/locales/ar-AE.js +0 -95
- package/build/src/localizations/locales/ar-AE.js.map +0 -1
- package/build/src/localizations/locales/ca-AD.js +0 -93
- package/build/src/localizations/locales/ca-AD.js.map +0 -1
- package/build/src/localizations/locales/ee-EE.js +0 -101
- package/build/src/localizations/locales/ee-EE.js.map +0 -1
- package/build/src/localizations/locales/en-US.js +0 -145
- package/build/src/localizations/locales/en-US.js.map +0 -1
- package/build/src/localizations/locales/es-ES.js +0 -138
- package/build/src/localizations/locales/es-ES.js.map +0 -1
- package/build/src/localizations/locales/fa-IR.js +0 -93
- package/build/src/localizations/locales/fa-IR.js.map +0 -1
- package/build/src/localizations/locales/fr-FR.js +0 -93
- package/build/src/localizations/locales/fr-FR.js.map +0 -1
- package/build/src/localizations/locales/ja-JP.js +0 -93
- package/build/src/localizations/locales/ja-JP.js.map +0 -1
- package/build/src/localizations/locales/pt-BR.js +0 -145
- package/build/src/localizations/locales/pt-BR.js.map +0 -1
- package/build/src/localizations/locales/ru-RU.js +0 -97
- package/build/src/localizations/locales/ru-RU.js.map +0 -1
- package/build/src/localizations/locales/tr-TR.js +0 -101
- package/build/src/localizations/locales/tr-TR.js.map +0 -1
- package/build/src/localizations/locales/vi-VN.js +0 -101
- package/build/src/localizations/locales/vi-VN.js.map +0 -1
- package/build/src/localizations/locales/zh-CN.js +0 -93
- package/build/src/localizations/locales/zh-CN.js.map +0 -1
- package/build/src/payment/paymentEffects.js +0 -270
- package/build/src/payment/paymentEffects.js.map +0 -1
- package/build/src/payment/paymentFsm.js +0 -234
- package/build/src/payment/paymentFsm.js.map +0 -1
- package/build/src/payment/paymentStore.js +0 -18
- package/build/src/payment/paymentStore.js.map +0 -1
- package/build/src/payment/paymentUtils.js +0 -10
- package/build/src/payment/paymentUtils.js.map +0 -1
- package/build/src/provider/DaimoPayProvider.js +0 -300
- package/build/src/provider/DaimoPayProvider.js.map +0 -1
- package/build/src/provider/PayContext.js +0 -6
- package/build/src/provider/PayContext.js.map +0 -1
- package/build/src/provider/PaymentProvider.js +0 -35
- package/build/src/provider/PaymentProvider.js.map +0 -1
- package/build/src/provider/SolanaContextProvider.js +0 -14
- package/build/src/provider/SolanaContextProvider.js.map +0 -1
- package/build/src/provider/Web3ContextProvider.js +0 -36
- package/build/src/provider/Web3ContextProvider.js.map +0 -1
- package/build/src/stateStore.js +0 -36
- package/build/src/stateStore.js.map +0 -1
- package/build/src/styles/defaultTheme.js +0 -80
- package/build/src/styles/defaultTheme.js.map +0 -1
- package/build/src/styles/index.js +0 -313
- package/build/src/styles/index.js.map +0 -1
- package/build/src/styles/styled/index.js +0 -6
- package/build/src/styles/styled/index.js.map +0 -1
- package/build/src/styles/themes/base.js +0 -141
- package/build/src/styles/themes/base.js.map +0 -1
- package/build/src/styles/themes/index.js +0 -13
- package/build/src/styles/themes/index.js.map +0 -1
- package/build/src/styles/themes/midnight.js +0 -76
- package/build/src/styles/themes/midnight.js.map +0 -1
- package/build/src/styles/themes/minimal.js +0 -96
- package/build/src/styles/themes/minimal.js.map +0 -1
- package/build/src/styles/themes/nouns.js +0 -81
- package/build/src/styles/themes/nouns.js.map +0 -1
- package/build/src/styles/themes/retro.js +0 -106
- package/build/src/styles/themes/retro.js.map +0 -1
- package/build/src/styles/themes/rounded.js +0 -106
- package/build/src/styles/themes/rounded.js.map +0 -1
- package/build/src/styles/themes/soft.js +0 -71
- package/build/src/styles/themes/soft.js.map +0 -1
- package/build/src/styles/themes/web95.js +0 -132
- package/build/src/styles/themes/web95.js.map +0 -1
- package/build/src/utils/exports.js +0 -6
- package/build/src/utils/exports.js.map +0 -1
- package/build/src/utils/format.js +0 -48
- package/build/src/utils/format.js.map +0 -1
- package/build/src/utils/index.js +0 -42
- package/build/src/utils/index.js.map +0 -1
- package/build/src/utils/p3.js +0 -15
- package/build/src/utils/p3.js.map +0 -1
- package/build/src/utils/platform.js +0 -11
- package/build/src/utils/platform.js.map +0 -1
- package/build/src/utils/polling.js +0 -44
- package/build/src/utils/polling.js.map +0 -1
- package/build/src/utils/supportUrl.js +0 -16
- package/build/src/utils/supportUrl.js.map +0 -1
- package/build/src/utils/trpc.js +0 -19
- package/build/src/utils/trpc.js.map +0 -1
- package/build/src/utils/validateInput.js +0 -16
- package/build/src/utils/validateInput.js.map +0 -1
- package/build/src/wallets/index.js +0 -21
- package/build/src/wallets/index.js.map +0 -1
- package/build/src/wallets/useWallets.js +0 -278
- package/build/src/wallets/useWallets.js.map +0 -1
- package/build/src/wallets/walletConfigs.js +0 -190
- package/build/src/wallets/walletConfigs.js.map +0 -1
- package/build/src/world-mini-app/WorldPayButton.js +0 -165
- package/build/src/world-mini-app/WorldPayButton.js.map +0 -1
- package/build/src/world-mini-app/promptWorldPayment.js +0 -59
- package/build/src/world-mini-app/promptWorldPayment.js.map +0 -1
- package/build/src/world-mini-app/useWithdrawToWorld.js +0 -76
- package/build/src/world-mini-app/useWithdrawToWorld.js.map +0 -1
- package/build/src/world-mini-app/useWorldSignIn.js +0 -74
- package/build/src/world-mini-app/useWorldSignIn.js.map +0 -1
- package/build/src/world.js +0 -4
- package/build/src/world.js.map +0 -1
- package/build/types-26343050.d.ts +0 -65
- package/build/world.d.ts +0 -108
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daimo/pay",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.19.
|
|
4
|
+
"version": "1.19.11",
|
|
5
5
|
"author": "Daimo",
|
|
6
6
|
"homepage": "https://pay.daimo.com",
|
|
7
7
|
"license": "BSD-2-Clause license",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --max-warnings=0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@daimo/pay-common": "1.19.
|
|
36
|
+
"@daimo/pay-common": "1.19.11",
|
|
37
37
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
38
38
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
39
39
|
"@solana/web3.js": "^1.95.4",
|
package/build/index.d.ts
DELETED
|
@@ -1,619 +0,0 @@
|
|
|
1
|
-
import { CreateConfigParameters } from '@wagmi/core';
|
|
2
|
-
import { CreateConnectorFn, Connector } from 'wagmi';
|
|
3
|
-
import { CoinbaseWalletParameters } from 'wagmi/connectors';
|
|
4
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import React$1, { ReactElement } from 'react';
|
|
6
|
-
import { T as Theme, M as Mode, C as CustomTheme, D as DaimoPayContextOptions, L as Languages, a as DaimoPayModalOptions } from './types-26343050.js';
|
|
7
|
-
export { c as All, A as Avatar, b as CustomAvatarProps } from './types-26343050.js';
|
|
8
|
-
import { DaimoPayOrderView, PaymentStartedEvent, PaymentCompletedEvent, PaymentBouncedEvent, ExternalPaymentOptionsString, DaimoPayUserMetadata, DaimoPayOrderWithOrg, DaimoPayHydratedOrderWithOrg, DaimoPayOrder, DaimoPayOrderID, SolanaPublicKey, DaimoPayIntentStatus, PlatformType, ExternalPaymentOptionMetadata, WalletPaymentOption, DepositAddressPaymentOptionMetadata, ExternalPaymentOptions, DepositAddressPaymentOptions, DepositAddressPaymentOptionData } from '@daimo/pay-common';
|
|
9
|
-
import { Address, Hex } from 'viem';
|
|
10
|
-
import { AppRouter } from '@daimo/pay-api';
|
|
11
|
-
import { CreateTRPCClient } from '@trpc/client';
|
|
12
|
-
import { WalletName } from '@solana/wallet-adapter-base';
|
|
13
|
-
|
|
14
|
-
declare let version: string;
|
|
15
|
-
|
|
16
|
-
type DefaultConfigProps = {
|
|
17
|
-
appName: string;
|
|
18
|
-
appIcon?: string;
|
|
19
|
-
appDescription?: string;
|
|
20
|
-
appUrl?: string;
|
|
21
|
-
coinbaseWalletPreference?: CoinbaseWalletParameters<"4">["preference"];
|
|
22
|
-
additionalConnectors?: CreateConnectorFn[];
|
|
23
|
-
} & Partial<CreateConfigParameters>;
|
|
24
|
-
/** Daimo Pay recommended config, for use with wagmi's createConfig(). */
|
|
25
|
-
declare const defaultConfig: ({ appName, appIcon, appDescription, appUrl, additionalConnectors, chains, client, ...props }: DefaultConfigProps) => CreateConfigParameters;
|
|
26
|
-
|
|
27
|
-
type useConnectCallbackProps = {
|
|
28
|
-
onConnect?: ({ address, connectorId, }: {
|
|
29
|
-
address?: string;
|
|
30
|
-
connectorId?: string;
|
|
31
|
-
}) => void;
|
|
32
|
-
onDisconnect?: () => void;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type DaimoPayProviderProps = {
|
|
36
|
-
children?: React$1.ReactNode;
|
|
37
|
-
theme?: Theme;
|
|
38
|
-
mode?: Mode;
|
|
39
|
-
customTheme?: CustomTheme;
|
|
40
|
-
options?: DaimoPayContextOptions;
|
|
41
|
-
debugMode?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Be careful with this endpoint, some endpoints (incl. Alchemy) don't support
|
|
44
|
-
* `signatureSubscribe` which leads to txes behaving erratically
|
|
45
|
-
* (ex. successful txes take minutes to confirm instead of seconds)
|
|
46
|
-
*/
|
|
47
|
-
solanaRpcUrl?: string;
|
|
48
|
-
/** Custom Pay API, useful for test and staging. */
|
|
49
|
-
payApiUrl?: string;
|
|
50
|
-
} & useConnectCallbackProps;
|
|
51
|
-
/**
|
|
52
|
-
* Provides context for DaimoPayButton and hooks. Place in app root or layout.
|
|
53
|
-
*/
|
|
54
|
-
declare const DaimoPayProvider: (props: DaimoPayProviderProps) => react_jsx_runtime.JSX.Element;
|
|
55
|
-
|
|
56
|
-
/** Payment details and status. */
|
|
57
|
-
type DaimoPayment = DaimoPayOrderView;
|
|
58
|
-
/** Props for DaimoPayButton. */
|
|
59
|
-
type PayButtonPaymentProps = {
|
|
60
|
-
/**
|
|
61
|
-
* Your public app ID. Specify either (payId) or (appId + parameters).
|
|
62
|
-
*/
|
|
63
|
-
appId: string;
|
|
64
|
-
/**
|
|
65
|
-
* Destination chain ID.
|
|
66
|
-
*/
|
|
67
|
-
toChain: number;
|
|
68
|
-
/**
|
|
69
|
-
* The destination token to send, completing payment. Must be an ERC-20
|
|
70
|
-
* token or the zero address, indicating the native token / ETH.
|
|
71
|
-
*/
|
|
72
|
-
toToken: Address;
|
|
73
|
-
/**
|
|
74
|
-
* The amount of destination token to send (transfer or approve).
|
|
75
|
-
* If not provided, the user will be prompted to enter an amount.
|
|
76
|
-
*/
|
|
77
|
-
toUnits?: string;
|
|
78
|
-
/**
|
|
79
|
-
* The destination address to transfer to, or contract to call.
|
|
80
|
-
*/
|
|
81
|
-
toAddress: Address;
|
|
82
|
-
/**
|
|
83
|
-
* Optional calldata to call an arbitrary function on `toAddress`.
|
|
84
|
-
*/
|
|
85
|
-
toCallData?: Hex;
|
|
86
|
-
/**
|
|
87
|
-
* The intent verb, such as "Pay", "Deposit", or "Purchase".
|
|
88
|
-
*/
|
|
89
|
-
intent?: string;
|
|
90
|
-
/**
|
|
91
|
-
* Payment options. By default, all are enabled.
|
|
92
|
-
* Supports nested arrays for mobile wallet filtering, e.g. [["MiniPay", "Metamask"], "AllExchanges"]
|
|
93
|
-
*/
|
|
94
|
-
paymentOptions?: (ExternalPaymentOptionsString | ExternalPaymentOptionsString[])[];
|
|
95
|
-
/**
|
|
96
|
-
* Preferred chain IDs. Assets on these chains will appear first.
|
|
97
|
-
*/
|
|
98
|
-
preferredChains?: number[];
|
|
99
|
-
/**
|
|
100
|
-
* Preferred tokens. These appear first in the token list.
|
|
101
|
-
*/
|
|
102
|
-
preferredTokens?: {
|
|
103
|
-
chain: number;
|
|
104
|
-
address: Address;
|
|
105
|
-
}[];
|
|
106
|
-
/**
|
|
107
|
-
* Only allow payments on these EVM chains.
|
|
108
|
-
*/
|
|
109
|
-
evmChains?: number[];
|
|
110
|
-
/**
|
|
111
|
-
* External ID. E.g. a correlation ID.
|
|
112
|
-
*/
|
|
113
|
-
externalId?: string;
|
|
114
|
-
/**
|
|
115
|
-
* Developer metadata. E.g. correlation ID.
|
|
116
|
-
* */
|
|
117
|
-
metadata?: DaimoPayUserMetadata;
|
|
118
|
-
/**
|
|
119
|
-
* The address to refund to if the payment bounces.
|
|
120
|
-
*/
|
|
121
|
-
refundAddress?: Address;
|
|
122
|
-
/**
|
|
123
|
-
* Pass-through tokens. If the user pays via a pass-through
|
|
124
|
-
* token, it is sent directly to `toAddress` with no swapping or bridging.
|
|
125
|
-
*/
|
|
126
|
-
passthroughTokens?: PassthroughToken[];
|
|
127
|
-
/** Wallet connector id to force to the top of the list. */
|
|
128
|
-
prioritizedWalletId?: string;
|
|
129
|
-
} | {
|
|
130
|
-
/** The payment ID, generated via the Daimo Pay API. Replaces params above. */
|
|
131
|
-
payId: string;
|
|
132
|
-
/** Payment options. By default, all are enabled. */
|
|
133
|
-
paymentOptions?: (ExternalPaymentOptionsString | ExternalPaymentOptionsString[])[];
|
|
134
|
-
/** Wallet connector id to force to the top of the list. */
|
|
135
|
-
prioritizedWalletId?: string;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* Represents a pass-through token. If the user pays via a pass-through
|
|
139
|
-
* token, it is sent directly to `toAddress` with no swapping or bridging.
|
|
140
|
-
*/
|
|
141
|
-
type PassthroughToken = {
|
|
142
|
-
chain: number;
|
|
143
|
-
address: Address;
|
|
144
|
-
};
|
|
145
|
-
type PayButtonCommonProps = PayButtonPaymentProps & {
|
|
146
|
-
/** Called when user sends payment and transaction is seen on chain */
|
|
147
|
-
onPaymentStarted?: (event: PaymentStartedEvent) => void;
|
|
148
|
-
/** Called when destination transfer or call completes successfully */
|
|
149
|
-
onPaymentCompleted?: (event: PaymentCompletedEvent) => void;
|
|
150
|
-
/** Called when destination call reverts and funds are refunded */
|
|
151
|
-
onPaymentBounced?: (event: PaymentBouncedEvent) => void;
|
|
152
|
-
/** Called when the modal is opened. */
|
|
153
|
-
onOpen?: () => void;
|
|
154
|
-
/** Called when the modal is closed. */
|
|
155
|
-
onClose?: () => void;
|
|
156
|
-
/** Open the modal by default. */
|
|
157
|
-
defaultOpen?: boolean;
|
|
158
|
-
/** Automatically close the modal after a successful payment. */
|
|
159
|
-
closeOnSuccess?: boolean;
|
|
160
|
-
/** Reset the payment after a successful payment. */
|
|
161
|
-
resetOnSuccess?: boolean;
|
|
162
|
-
/** Go directly to tokens in already-connected Ethereum and Solana wallet(s).
|
|
163
|
-
* Don't let the user pick any other payment method. Used in embedded flows.*/
|
|
164
|
-
connectedWalletOnly?: boolean;
|
|
165
|
-
/** Custom message to display on confirmation page. */
|
|
166
|
-
confirmationMessage?: string;
|
|
167
|
-
/** Redirect URL to return to the app. E.g. after Coinbase, Binance, RampNetwork. */
|
|
168
|
-
redirectReturnUrl?: string;
|
|
169
|
-
/** Wallet connector id to force to the top of the list. */
|
|
170
|
-
prioritizedWalletId?: string;
|
|
171
|
-
};
|
|
172
|
-
type DaimoPayButtonProps = PayButtonCommonProps & {
|
|
173
|
-
/** Light mode, dark mode, or auto. */
|
|
174
|
-
mode?: Mode;
|
|
175
|
-
/** Named theme. See docs for options. */
|
|
176
|
-
theme?: Theme;
|
|
177
|
-
/** Custom theme. See docs for options. */
|
|
178
|
-
customTheme?: CustomTheme;
|
|
179
|
-
/** Disable interaction. */
|
|
180
|
-
disabled?: boolean;
|
|
181
|
-
};
|
|
182
|
-
type DaimoPayButtonCustomProps = PayButtonCommonProps & {
|
|
183
|
-
/** Custom renderer */
|
|
184
|
-
children: (renderProps: {
|
|
185
|
-
show: () => void;
|
|
186
|
-
hide: () => void;
|
|
187
|
-
}) => ReactElement;
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* A button that shows the Daimo Pay checkout. Replaces the traditional
|
|
191
|
-
* Connect Wallet » approve » execute sequence with a single action.
|
|
192
|
-
*/
|
|
193
|
-
declare function DaimoPayButton(props: DaimoPayButtonProps): JSX.Element;
|
|
194
|
-
declare namespace DaimoPayButton {
|
|
195
|
-
var Custom: typeof DaimoPayButtonCustom;
|
|
196
|
-
}
|
|
197
|
-
/** Like DaimoPayButton, but with custom styling. */
|
|
198
|
-
declare function DaimoPayButtonCustom(props: DaimoPayButtonCustomProps): JSX.Element;
|
|
199
|
-
declare namespace DaimoPayButtonCustom {
|
|
200
|
-
var displayName: string;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/** Payment parameters. The payment is created only after user taps pay. */
|
|
204
|
-
interface PayParams {
|
|
205
|
-
/** App ID, for authentication. */
|
|
206
|
-
appId: string;
|
|
207
|
-
/** Destination chain ID. */
|
|
208
|
-
toChain: number;
|
|
209
|
-
/** The destination token to send. */
|
|
210
|
-
toToken: Address;
|
|
211
|
-
/**
|
|
212
|
-
* The amount of the token to send.
|
|
213
|
-
* If not provided, the user will be prompted to enter an amount.
|
|
214
|
-
*/
|
|
215
|
-
toUnits?: string;
|
|
216
|
-
/** The final address to transfer to or contract to call. */
|
|
217
|
-
toAddress: Address;
|
|
218
|
-
/** Calldata for final call, or empty data for transfer. */
|
|
219
|
-
toCallData?: Hex;
|
|
220
|
-
/** The intent verb, such as Pay, Deposit, or Purchase. Default: Pay */
|
|
221
|
-
intent?: string;
|
|
222
|
-
/** Payment options. By default, all are enabled. Supports nested arrays for mobile wallet filtering. */
|
|
223
|
-
paymentOptions?: (ExternalPaymentOptionsString | ExternalPaymentOptionsString[])[];
|
|
224
|
-
/** Preferred chain IDs. */
|
|
225
|
-
preferredChains?: number[];
|
|
226
|
-
/** Preferred tokens. These appear first in the token list. */
|
|
227
|
-
preferredTokens?: {
|
|
228
|
-
chain: number;
|
|
229
|
-
address: Address;
|
|
230
|
-
}[];
|
|
231
|
-
/** Only allow payments on these EVM chains. */
|
|
232
|
-
evmChains?: number[];
|
|
233
|
-
/** External ID. E.g. a correlation ID. */
|
|
234
|
-
externalId?: string;
|
|
235
|
-
/** Developer metadata. E.g. correlation ID. */
|
|
236
|
-
metadata?: DaimoPayUserMetadata;
|
|
237
|
-
/** The address to refund to if the payment bounces or a refund is requested. */
|
|
238
|
-
refundAddress?: Address;
|
|
239
|
-
/** Pass-through tokens. If the user pays via these tokens, they're sent directly without swapping. */
|
|
240
|
-
passthroughTokens?: {
|
|
241
|
-
chain: number;
|
|
242
|
-
address: Address;
|
|
243
|
-
}[];
|
|
244
|
-
}
|
|
245
|
-
type PaymentState$1 = {
|
|
246
|
-
type: "idle";
|
|
247
|
-
} | {
|
|
248
|
-
type: "preview";
|
|
249
|
-
order: DaimoPayOrderWithOrg;
|
|
250
|
-
payParamsData: PayParamsData;
|
|
251
|
-
} | {
|
|
252
|
-
type: "unhydrated";
|
|
253
|
-
order: DaimoPayOrderWithOrg;
|
|
254
|
-
} | {
|
|
255
|
-
type: "payment_unpaid";
|
|
256
|
-
order: DaimoPayHydratedOrderWithOrg;
|
|
257
|
-
} | {
|
|
258
|
-
type: "payment_started";
|
|
259
|
-
order: DaimoPayHydratedOrderWithOrg;
|
|
260
|
-
} | {
|
|
261
|
-
type: "payment_completed";
|
|
262
|
-
order: DaimoPayHydratedOrderWithOrg;
|
|
263
|
-
} | {
|
|
264
|
-
type: "payment_bounced";
|
|
265
|
-
order: DaimoPayHydratedOrderWithOrg;
|
|
266
|
-
} | {
|
|
267
|
-
type: "error";
|
|
268
|
-
order: DaimoPayOrder | undefined;
|
|
269
|
-
message: string;
|
|
270
|
-
} | {
|
|
271
|
-
type: "warning";
|
|
272
|
-
order: DaimoPayOrder | undefined;
|
|
273
|
-
message: string;
|
|
274
|
-
};
|
|
275
|
-
type PayParamsData = {
|
|
276
|
-
appId: string;
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
type DaimoPayFunctions = {
|
|
280
|
-
/**
|
|
281
|
-
* Create a new Daimo Pay order preview with the given parameters.
|
|
282
|
-
* Call this to start a new payment flow.
|
|
283
|
-
*
|
|
284
|
-
* @param params - Parameters describing the payment to be created.
|
|
285
|
-
*/
|
|
286
|
-
createPreviewOrder: (params: PayParams) => Promise<Extract<PaymentState$1, {
|
|
287
|
-
type: "preview";
|
|
288
|
-
}>>;
|
|
289
|
-
/**
|
|
290
|
-
* Set the order ID to fetch and manage an existing Daimo Pay order.
|
|
291
|
-
* Useful for resuming or referencing a previously created order.
|
|
292
|
-
*
|
|
293
|
-
* @param id - The Daimo Pay order ID to set.
|
|
294
|
-
*/
|
|
295
|
-
setPayId: (id: DaimoPayOrderID) => Promise<Extract<PaymentState$1, {
|
|
296
|
-
type: "unhydrated" | "payment_unpaid" | "payment_started" | "payment_completed" | "payment_bounced";
|
|
297
|
-
}>>;
|
|
298
|
-
/**
|
|
299
|
-
* Hydrate the current order, locking in the payment intent details and
|
|
300
|
-
* token swap prices.
|
|
301
|
-
*/
|
|
302
|
-
hydrateOrder: (refundAddress?: Address) => Promise<Extract<PaymentState$1, {
|
|
303
|
-
type: "payment_unpaid";
|
|
304
|
-
}>>;
|
|
305
|
-
/** Trigger search for payment on the current order. */
|
|
306
|
-
paySource: () => void;
|
|
307
|
-
/**
|
|
308
|
-
* Register an Ethereum payment source for the current order.
|
|
309
|
-
* Call this after the user has submitted an Ethereum payment transaction.
|
|
310
|
-
*
|
|
311
|
-
* @param args - Details about the Ethereum payment transaction.
|
|
312
|
-
*/
|
|
313
|
-
payEthSource: (args: {
|
|
314
|
-
paymentTxHash: Hex;
|
|
315
|
-
sourceChainId: number;
|
|
316
|
-
payerAddress: Address;
|
|
317
|
-
sourceToken: Address;
|
|
318
|
-
sourceAmount: bigint;
|
|
319
|
-
}) => Promise<Extract<PaymentState$1, {
|
|
320
|
-
type: "payment_started" | "payment_completed" | "payment_bounced";
|
|
321
|
-
}>>;
|
|
322
|
-
/**
|
|
323
|
-
* Register a Solana payment source for the current order.
|
|
324
|
-
* Call this after the user has submitted a Solana payment transaction.
|
|
325
|
-
*
|
|
326
|
-
* @param args - Details about the Solana payment transaction.
|
|
327
|
-
*/
|
|
328
|
-
paySolanaSource: (args: {
|
|
329
|
-
paymentTxHash: string;
|
|
330
|
-
sourceToken: SolanaPublicKey;
|
|
331
|
-
}) => Promise<Extract<PaymentState$1, {
|
|
332
|
-
type: "payment_started" | "payment_completed" | "payment_bounced";
|
|
333
|
-
}>>;
|
|
334
|
-
/**
|
|
335
|
-
* Reset the current payment state and clear the active order.
|
|
336
|
-
* Call this to start a new payment flow.
|
|
337
|
-
*/
|
|
338
|
-
reset: () => void;
|
|
339
|
-
/**
|
|
340
|
-
* Update the user's chosen amount in USD. Applies only to deposit flow.
|
|
341
|
-
*
|
|
342
|
-
* @deprecated
|
|
343
|
-
*/
|
|
344
|
-
setChosenUsd: (usd: number) => void;
|
|
345
|
-
/** Set a non-fatal warning state with a message. */
|
|
346
|
-
setWarning: (message: string) => void;
|
|
347
|
-
/** Dismiss a warning and return to previous state. */
|
|
348
|
-
dismissWarning: () => void;
|
|
349
|
-
};
|
|
350
|
-
type DaimoPayState = {
|
|
351
|
-
[S in PaymentState$1 as S["type"]]: {
|
|
352
|
-
paymentState: S["type"];
|
|
353
|
-
order: S extends {
|
|
354
|
-
order: infer O;
|
|
355
|
-
} ? O : null;
|
|
356
|
-
paymentErrorMessage: S extends {
|
|
357
|
-
message: infer M;
|
|
358
|
-
} ? M : null;
|
|
359
|
-
};
|
|
360
|
-
}[PaymentState$1["type"]];
|
|
361
|
-
type UseDaimoPay = DaimoPayFunctions & DaimoPayState & {
|
|
362
|
-
paymentWarningMessage: string | null;
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* React hook for interacting with Daimo Pay orders and payments. Use this hook
|
|
366
|
-
* to manage the lifecycle of a Daimo Pay payment in your application.
|
|
367
|
-
*
|
|
368
|
-
* This hook provides a simple interface to create, hydrate, pay, and reset
|
|
369
|
-
* Daimo Pay orders.
|
|
370
|
-
*
|
|
371
|
-
* @returns {UseDaimoPay} An object with current payment state and methods to
|
|
372
|
-
* manage Daimo Pay orders and payments.
|
|
373
|
-
*/
|
|
374
|
-
declare function useDaimoPay(): UseDaimoPay;
|
|
375
|
-
|
|
376
|
-
/** Returns the current payment, or undefined if there is none.
|
|
377
|
-
*
|
|
378
|
-
* Status values:
|
|
379
|
-
* - `payment_unpaid` - the user has not paid yet
|
|
380
|
-
* - `payment_started` - the user has paid & payment is in progress. This status
|
|
381
|
-
* typically lasts a few seconds.
|
|
382
|
-
* - `payment_completed` - the final call or transfer succeeded
|
|
383
|
-
* - `payment_bounced` - the final call or transfer reverted. Funds were sent
|
|
384
|
-
* to the payment's configured refund address on the destination chain.
|
|
385
|
-
*/
|
|
386
|
-
declare function useDaimoPayStatus(): {
|
|
387
|
-
paymentId: string;
|
|
388
|
-
status: DaimoPayIntentStatus;
|
|
389
|
-
} | undefined;
|
|
390
|
-
|
|
391
|
-
type UseDaimoPayUI = {
|
|
392
|
-
resetPayment: (payParams?: Partial<PayParams>) => Promise<void>;
|
|
393
|
-
};
|
|
394
|
-
declare function useDaimoPayUI(): UseDaimoPayUI;
|
|
395
|
-
|
|
396
|
-
/** Icon for an EVM chain, given chain ID. No ID shows a loading spinner. */
|
|
397
|
-
declare const Chain: React$1.FC<{
|
|
398
|
-
id?: number;
|
|
399
|
-
unsupported?: boolean;
|
|
400
|
-
radius?: number | string;
|
|
401
|
-
size?: number | string;
|
|
402
|
-
}>;
|
|
403
|
-
|
|
404
|
-
/** Ethereum wallets, by name. */
|
|
405
|
-
declare const wallets: {
|
|
406
|
-
[key: string]: CreateConnectorFn;
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
declare const daimoPayVersion: string;
|
|
410
|
-
|
|
411
|
-
declare enum ROUTES {
|
|
412
|
-
SELECT_METHOD = "daimoPaySelectMethod",
|
|
413
|
-
SELECT_TOKEN = "daimoPaySelectToken",
|
|
414
|
-
SELECT_AMOUNT = "daimoPaySelectAmount",
|
|
415
|
-
SELECT_EXTERNAL_AMOUNT = "daimoPaySelectExternalAmount",
|
|
416
|
-
SELECT_EXCHANGE = "daimoPaySelectExchange",
|
|
417
|
-
SELECT_DEPOSIT_ADDRESS_AMOUNT = "daimoPaySelectDepositAddressAmount",
|
|
418
|
-
SELECT_WALLET_AMOUNT = "daimoPaySelectWalletAmount",
|
|
419
|
-
SELECT_WALLET_CHAIN = "daimoPaySelectWalletChain",
|
|
420
|
-
SELECT_ZKP2P = "daimoPaySelectZKP2P",
|
|
421
|
-
WAITING_EXTERNAL = "daimoPayWaitingExternal",
|
|
422
|
-
WAITING_WALLET = "daimoPayWaitingWallet",
|
|
423
|
-
SELECT_DEPOSIT_ADDRESS_CHAIN = "daimoPaySelectDepositAddressChain",
|
|
424
|
-
WAITING_DEPOSIT_ADDRESS = "daimoPayWaitingDepositAddress",
|
|
425
|
-
PAY_WITH_TOKEN = "daimoPayPayWithToken",
|
|
426
|
-
CONFIRMATION = "daimoPayConfirmation",
|
|
427
|
-
SOLANA_CONNECTOR = "daimoPaySolanaConnector",
|
|
428
|
-
SOLANA_SELECT_AMOUNT = "daimoPaySolanaSelectAmount",
|
|
429
|
-
SOLANA_PAY_WITH_TOKEN = "daimoPaySolanaPayWithToken",
|
|
430
|
-
ERROR = "daimoPayError",
|
|
431
|
-
ONBOARDING = "onboarding",
|
|
432
|
-
ABOUT = "about",
|
|
433
|
-
CONNECTORS = "connectors",
|
|
434
|
-
MOBILECONNECTORS = "mobileConnectors",
|
|
435
|
-
CONNECT = "connect",
|
|
436
|
-
SWITCHNETWORKS = "switchNetworks"
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
type TrpcClient = CreateTRPCClient<AppRouter>;
|
|
440
|
-
|
|
441
|
-
type WalletConfigProps = {
|
|
442
|
-
id?: string;
|
|
443
|
-
name?: string;
|
|
444
|
-
shortName?: string;
|
|
445
|
-
icon?: string | React.ReactNode;
|
|
446
|
-
iconConnector?: React.ReactNode;
|
|
447
|
-
iconShape?: "squircle" | "circle" | "square";
|
|
448
|
-
iconShouldShrink?: boolean;
|
|
449
|
-
deeplinkScheme?: string;
|
|
450
|
-
getDaimoPayDeeplink?: (payId: string, platform?: string) => string;
|
|
451
|
-
showInMobileConnectors?: boolean;
|
|
452
|
-
showOnAndroid?: boolean;
|
|
453
|
-
showOnIOS?: boolean;
|
|
454
|
-
isSolanaOnly?: boolean;
|
|
455
|
-
connector?: Connector | null;
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
type PaymentOptionsResult = {
|
|
459
|
-
externalPaymentOptions: {
|
|
460
|
-
options: Map<"external" | "zkp2p" | "exchange", ExternalPaymentOptionMetadata[]>;
|
|
461
|
-
loading: boolean;
|
|
462
|
-
parsedConfig: {
|
|
463
|
-
walletOrder: string[];
|
|
464
|
-
};
|
|
465
|
-
};
|
|
466
|
-
walletPaymentOptions: {
|
|
467
|
-
options: WalletPaymentOption[] | null;
|
|
468
|
-
isLoading: boolean;
|
|
469
|
-
};
|
|
470
|
-
solanaPaymentOptions: {
|
|
471
|
-
options: WalletPaymentOption[] | null;
|
|
472
|
-
isLoading: boolean;
|
|
473
|
-
};
|
|
474
|
-
depositAddressOptions: {
|
|
475
|
-
options: DepositAddressPaymentOptionMetadata[];
|
|
476
|
-
loading: boolean;
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
|
-
declare function usePaymentOptions({ trpc, appId, orderId, isDepositFlow, usdRequired, solanaPubKey, ethWalletAddress, platform, filterIds, preferredChains, preferredTokens, evmChains, destChainId, passthroughTokens, destAddress, log, }: {
|
|
480
|
-
trpc: TrpcClient;
|
|
481
|
-
appId: string | undefined;
|
|
482
|
-
orderId: bigint | undefined;
|
|
483
|
-
isDepositFlow: boolean;
|
|
484
|
-
usdRequired: number | undefined;
|
|
485
|
-
solanaPubKey: string | undefined;
|
|
486
|
-
ethWalletAddress: string | undefined;
|
|
487
|
-
platform: PlatformType | undefined;
|
|
488
|
-
filterIds: (string | string[])[] | undefined;
|
|
489
|
-
preferredChains: number[] | undefined;
|
|
490
|
-
preferredTokens: {
|
|
491
|
-
chain: number;
|
|
492
|
-
address: string;
|
|
493
|
-
}[] | undefined;
|
|
494
|
-
evmChains: number[] | undefined;
|
|
495
|
-
destChainId: number | undefined;
|
|
496
|
-
passthroughTokens: {
|
|
497
|
-
chain: number;
|
|
498
|
-
address: string;
|
|
499
|
-
}[] | undefined;
|
|
500
|
-
destAddress: Address | undefined;
|
|
501
|
-
log: (msg: string) => void;
|
|
502
|
-
}): PaymentOptionsResult;
|
|
503
|
-
|
|
504
|
-
/** Creates (or loads) a payment and manages the corresponding modal. */
|
|
505
|
-
interface PaymentState {
|
|
506
|
-
generatePreviewOrder: () => void;
|
|
507
|
-
resetOrder: (payParams?: Partial<PayParams>) => Promise<void>;
|
|
508
|
-
buttonProps: PayButtonPaymentProps | undefined;
|
|
509
|
-
setButtonProps: (props: PayButtonPaymentProps | undefined) => void;
|
|
510
|
-
topOptionsOrder: string[];
|
|
511
|
-
setPayId: (id: string | undefined) => Promise<void>;
|
|
512
|
-
setPayParams: (payParams: PayParams | undefined) => Promise<void>;
|
|
513
|
-
isDepositFlow: boolean;
|
|
514
|
-
paymentWaitingMessage: string | undefined;
|
|
515
|
-
selectedWallet: WalletConfigProps | undefined;
|
|
516
|
-
selectedWalletDeepLink: string | undefined;
|
|
517
|
-
externalPaymentOptions: ReturnType<typeof usePaymentOptions>["externalPaymentOptions"];
|
|
518
|
-
walletPaymentOptions: ReturnType<typeof usePaymentOptions>["walletPaymentOptions"];
|
|
519
|
-
solanaPaymentOptions: ReturnType<typeof usePaymentOptions>["solanaPaymentOptions"];
|
|
520
|
-
depositAddressOptions: ReturnType<typeof usePaymentOptions>["depositAddressOptions"];
|
|
521
|
-
/** Whether Untron receivers are currently available. `null` when unknown. */
|
|
522
|
-
untronAvailable: boolean | null;
|
|
523
|
-
selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
|
|
524
|
-
selectedTokenOption: WalletPaymentOption | undefined;
|
|
525
|
-
selectedSolanaTokenOption: WalletPaymentOption | undefined;
|
|
526
|
-
selectedDepositAddressOption: DepositAddressPaymentOptionMetadata | undefined;
|
|
527
|
-
getOrderUsdLimit: () => number;
|
|
528
|
-
setPaymentWaitingMessage: (message: string | undefined) => void;
|
|
529
|
-
tokenMode: "evm" | "solana" | "all";
|
|
530
|
-
setTokenMode: (mode: "evm" | "solana" | "all") => void;
|
|
531
|
-
setSelectedWallet: (wallet: WalletConfigProps | undefined) => void;
|
|
532
|
-
setSelectedWalletDeepLink: (deepLink: string | undefined) => void;
|
|
533
|
-
setSelectedExternalOption: (option: ExternalPaymentOptionMetadata | undefined) => void;
|
|
534
|
-
setSelectedTokenOption: (option: WalletPaymentOption | undefined) => void;
|
|
535
|
-
setSelectedSolanaTokenOption: (option: WalletPaymentOption | undefined) => void;
|
|
536
|
-
setSelectedDepositAddressOption: (option: DepositAddressPaymentOptionMetadata | undefined) => void;
|
|
537
|
-
setChosenUsd: (usd: number) => void;
|
|
538
|
-
payWithToken: (walletOption: WalletPaymentOption) => Promise<{
|
|
539
|
-
txHash?: Hex;
|
|
540
|
-
success: boolean;
|
|
541
|
-
}>;
|
|
542
|
-
payWithExternal: (option: ExternalPaymentOptions) => Promise<string>;
|
|
543
|
-
payWithDepositAddress: (option: DepositAddressPaymentOptions) => Promise<DepositAddressPaymentOptionData | null>;
|
|
544
|
-
payWithSolanaToken: (inputToken: SolanaPublicKey) => Promise<{
|
|
545
|
-
txHash: string;
|
|
546
|
-
success: boolean;
|
|
547
|
-
}>;
|
|
548
|
-
openInWalletBrowser: (wallet: WalletConfigProps, amountUsd?: number) => Promise<void>;
|
|
549
|
-
senderEnsName: string | undefined;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
type SolanaWalletName = WalletName<string>;
|
|
553
|
-
|
|
554
|
-
/** Meant for internal use. This will be non-exported in a future SDK version. */
|
|
555
|
-
declare const PayContext: React$1.Context<PayContextValue | null>;
|
|
556
|
-
type PayLogFn = (message: string, ...props: any[]) => void;
|
|
557
|
-
/** Daimo Pay internal context. */
|
|
558
|
-
type PayContextValue = {
|
|
559
|
-
theme: Theme;
|
|
560
|
-
setTheme: React$1.Dispatch<React$1.SetStateAction<Theme>>;
|
|
561
|
-
mode: Mode;
|
|
562
|
-
setMode: React$1.Dispatch<React$1.SetStateAction<Mode>>;
|
|
563
|
-
customTheme: CustomTheme | undefined;
|
|
564
|
-
setCustomTheme: React$1.Dispatch<React$1.SetStateAction<CustomTheme | undefined>>;
|
|
565
|
-
lang: Languages;
|
|
566
|
-
setLang: React$1.Dispatch<React$1.SetStateAction<Languages>>;
|
|
567
|
-
disableMobileInjector: boolean;
|
|
568
|
-
setDisableMobileInjector: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
569
|
-
setOnOpen: (fn?: () => void) => void;
|
|
570
|
-
setOnClose: (fn?: () => void) => void;
|
|
571
|
-
open: boolean;
|
|
572
|
-
setOpen: (open: boolean, meta?: Record<string, any>) => void;
|
|
573
|
-
route: string;
|
|
574
|
-
setRoute: (route: ROUTES, data?: Record<string, any>) => void;
|
|
575
|
-
errorMessage: string | React$1.ReactNode | null;
|
|
576
|
-
debugMode?: boolean;
|
|
577
|
-
log: PayLogFn;
|
|
578
|
-
displayError: (message: string | React$1.ReactNode | null, code?: any) => void;
|
|
579
|
-
resize: number;
|
|
580
|
-
triggerResize: () => void;
|
|
581
|
-
uniquePaymentMethodPage: ROUTES;
|
|
582
|
-
setUniquePaymentMethodPage: React$1.Dispatch<React$1.SetStateAction<ROUTES>>;
|
|
583
|
-
/** Session ID. */
|
|
584
|
-
sessionId: string;
|
|
585
|
-
/** EVM pending connector */
|
|
586
|
-
pendingConnectorId: string | undefined;
|
|
587
|
-
setPendingConnectorId: (id: string) => void;
|
|
588
|
-
/** Chosen Solana wallet, eg Phantom.*/
|
|
589
|
-
solanaConnector: SolanaWalletName | undefined;
|
|
590
|
-
setSolanaConnector: React$1.Dispatch<React$1.SetStateAction<SolanaWalletName | undefined>>;
|
|
591
|
-
/** Global options, across all pay buttons and payments. */
|
|
592
|
-
options?: DaimoPayContextOptions;
|
|
593
|
-
/** Loads a payment, then shows the modal to complete payment. */
|
|
594
|
-
showPayment: (modalOptions: DaimoPayModalOptions) => Promise<void>;
|
|
595
|
-
/** Payment status & callbacks. */
|
|
596
|
-
paymentState: PaymentState;
|
|
597
|
-
/** TRPC API client. Internal use only. */
|
|
598
|
-
trpc: any;
|
|
599
|
-
/** Callback to call when the payment is successful. */
|
|
600
|
-
onSuccess: () => void;
|
|
601
|
-
/**
|
|
602
|
-
* Whether to show the contact support button. Used specifically for
|
|
603
|
-
* WorldPayButton on iOS since links are broken on iOS in World App.
|
|
604
|
-
*/
|
|
605
|
-
showContactSupport: boolean;
|
|
606
|
-
setShowContactSupport: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
607
|
-
/** Custom message to display on confirmation page. */
|
|
608
|
-
confirmationMessage?: string;
|
|
609
|
-
setConfirmationMessage: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
610
|
-
/** Redirect URL to return to the app. E.g. after Coinbase, Binance, RampNetwork. */
|
|
611
|
-
redirectReturnUrl?: string;
|
|
612
|
-
setRedirectReturnUrl: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
613
|
-
} & useConnectCallbackProps;
|
|
614
|
-
|
|
615
|
-
/** Daimo Pay internal context. */
|
|
616
|
-
declare const usePayContext: () => PayContextValue;
|
|
617
|
-
|
|
618
|
-
export { Chain as ChainIcon, CustomTheme, DaimoPayButton, PayContext as DaimoPayContext, DaimoPayContextOptions, DaimoPayModalOptions, DaimoPayProvider, Languages, Mode, Theme, daimoPayVersion, defaultConfig as getDefaultConfig, useDaimoPay, useDaimoPayStatus, useDaimoPayUI, usePayContext, version, wallets };
|
|
619
|
-
export type { DaimoPayButtonCustomProps, DaimoPayButtonProps, DaimoPayment };
|