@daimo/pay 1.16.1 → 1.16.3

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.
Files changed (228) hide show
  1. package/build/index.d.ts +7 -5
  2. package/build/package.json.js +2 -2
  3. package/build/src/components/Common/OrderHeader/index.js +8 -9
  4. package/build/src/components/Common/OrderHeader/index.js.map +1 -1
  5. package/build/src/components/Common/SelectAnotherMethodButton/index.js +15 -3
  6. package/build/src/components/Common/SelectAnotherMethodButton/index.js.map +1 -1
  7. package/build/src/components/DaimoPayButton/index.js +2 -1
  8. package/build/src/components/DaimoPayButton/index.js.map +1 -1
  9. package/build/src/components/DaimoPayModal/index.js +13 -3
  10. package/build/src/components/DaimoPayModal/index.js.map +1 -1
  11. package/build/src/components/Pages/SelectDepositAddressChain/index.js +1 -1
  12. package/build/src/components/Pages/SelectDepositAddressChain/index.js.map +1 -1
  13. package/build/src/components/Pages/SelectExchange/index.js +2 -2
  14. package/build/src/components/Pages/SelectExchange/index.js.map +1 -1
  15. package/build/src/components/Pages/SelectMethod/index.js +0 -1
  16. package/build/src/components/Pages/SelectMethod/index.js.map +1 -1
  17. package/build/src/components/Pages/SelectToken/index.js +2 -2
  18. package/build/src/components/Pages/SelectToken/index.js.map +1 -1
  19. package/build/src/components/Pages/SelectZKP/index.js +2 -2
  20. package/build/src/components/Pages/SelectZKP/index.js.map +1 -1
  21. package/build/src/hooks/usePaymentState.js.map +1 -1
  22. package/build/src/hooks/useTokenOptions.js +2 -2
  23. package/build/src/hooks/useTokenOptions.js.map +1 -1
  24. package/build/src/payment/paymentFsm.js.map +1 -1
  25. package/build/src/world-mini-app/WorldPayButton.js +7 -2
  26. package/build/src/world-mini-app/WorldPayButton.js.map +1 -1
  27. package/build/world.d.ts +3 -0
  28. package/package.json +3 -3
  29. package/build/assets/MobileWithLogos.d.ts +0 -2
  30. package/build/assets/ScanIconWithLogos.d.ts +0 -6
  31. package/build/assets/browsers.d.ts +0 -10
  32. package/build/assets/chains.d.ts +0 -28
  33. package/build/assets/coins.d.ts +0 -2
  34. package/build/assets/crepe.d.ts +0 -3
  35. package/build/assets/icons.d.ts +0 -35
  36. package/build/assets/logos.d.ts +0 -207
  37. package/build/assets/wallet.d.ts +0 -3
  38. package/build/assets/wave.d.ts +0 -2
  39. package/build/components/Common/Alert/index.d.ts +0 -6
  40. package/build/components/Common/Alert/styles.d.ts +0 -2
  41. package/build/components/Common/Alert/types.d.ts +0 -5
  42. package/build/components/Common/AmountInput/AmountInputField.d.ts +0 -8
  43. package/build/components/Common/AmountInput/index.d.ts +0 -9
  44. package/build/components/Common/Avatar/index.d.ts +0 -17
  45. package/build/components/Common/Avatar/styles.d.ts +0 -2
  46. package/build/components/Common/BrowserIcon/index.d.ts +0 -4
  47. package/build/components/Common/BrowserIcon/styles.d.ts +0 -1
  48. package/build/components/Common/BrowserIcon/types.d.ts +0 -3
  49. package/build/components/Common/Button/index.d.ts +0 -4
  50. package/build/components/Common/Button/styles.d.ts +0 -10
  51. package/build/components/Common/Button/types.d.ts +0 -15
  52. package/build/components/Common/Chain/index.d.ts +0 -9
  53. package/build/components/Common/Chain/styles.d.ts +0 -4
  54. package/build/components/Common/ChainSelectList/index.d.ts +0 -4
  55. package/build/components/Common/ChainSelectList/styles.d.ts +0 -9
  56. package/build/components/Common/CircleTimer.d.ts +0 -17
  57. package/build/components/Common/ConnectorList/index.d.ts +0 -2
  58. package/build/components/Common/ConnectorList/styles.d.ts +0 -8
  59. package/build/components/Common/CopyToClipboard/CopyToClipboardIcon.d.ts +0 -6
  60. package/build/components/Common/CopyToClipboard/index.d.ts +0 -7
  61. package/build/components/Common/CustomQRCode/QRCode.d.ts +0 -12
  62. package/build/components/Common/CustomQRCode/index.d.ts +0 -6
  63. package/build/components/Common/CustomQRCode/styles.d.ts +0 -6
  64. package/build/components/Common/CustomQRCode/types.d.ts +0 -11
  65. package/build/components/Common/DynamicContainer/index.d.ts +0 -7
  66. package/build/components/Common/FitText/index.d.ts +0 -8
  67. package/build/components/Common/LazyImage/index.d.ts +0 -8
  68. package/build/components/Common/Logo/index.d.ts +0 -8
  69. package/build/components/Common/Logo/styles.d.ts +0 -3
  70. package/build/components/Common/Modal/index.d.ts +0 -25
  71. package/build/components/Common/Modal/styles.d.ts +0 -25
  72. package/build/components/Common/OptionsList/index.d.ts +0 -17
  73. package/build/components/Common/OptionsList/styles.d.ts +0 -5
  74. package/build/components/Common/OrderHeader/index.d.ts +0 -5
  75. package/build/components/Common/PaymentBreakdown/index.d.ts +0 -6
  76. package/build/components/Common/Portal/index.d.ts +0 -2
  77. package/build/components/Common/PoweredByFooter/index.d.ts +0 -5
  78. package/build/components/Common/ScrollArea/index.d.ts +0 -9
  79. package/build/components/Common/ScrollArea/styles.d.ts +0 -3
  80. package/build/components/Common/SelectAnotherMethodButton/index.d.ts +0 -1
  81. package/build/components/Common/Spinner/index.d.ts +0 -1
  82. package/build/components/Common/Spinner/styles.d.ts +0 -1
  83. package/build/components/Common/SquareTimer.d.ts +0 -19
  84. package/build/components/Common/SwitchButton/index.d.ts +0 -6
  85. package/build/components/Common/ThemedButton/index.d.ts +0 -15
  86. package/build/components/Common/ThemedButton/styles.d.ts +0 -2
  87. package/build/components/Common/TokenChainLogo/index.d.ts +0 -7
  88. package/build/components/Common/Tooltip/index.d.ts +0 -4
  89. package/build/components/Common/Tooltip/styles.d.ts +0 -3
  90. package/build/components/Common/Tooltip/types.d.ts +0 -9
  91. package/build/components/Common/WalletChainLogo/index.d.ts +0 -6
  92. package/build/components/DaimoPayButton/index.d.ts +0 -149
  93. package/build/components/DaimoPayButton/styles.d.ts +0 -4
  94. package/build/components/DaimoPayModal/ConnectUsing.d.ts +0 -2
  95. package/build/components/DaimoPayModal/ConnectWithInjector/index.d.ts +0 -15
  96. package/build/components/DaimoPayModal/ConnectWithInjector/styles.d.ts +0 -6
  97. package/build/components/DaimoPayModal/ConnectWithQRCode.d.ts +0 -12
  98. package/build/components/DaimoPayModal/index.d.ts +0 -8
  99. package/build/components/DaimoPayThemeProvider/DaimoPayThemeProvider.d.ts +0 -16
  100. package/build/components/Pages/About/graphics.d.ts +0 -11
  101. package/build/components/Pages/About/index.d.ts +0 -3
  102. package/build/components/Pages/About/styles.d.ts +0 -8
  103. package/build/components/Pages/Confirmation/index.d.ts +0 -3
  104. package/build/components/Pages/Connectors/index.d.ts +0 -3
  105. package/build/components/Pages/Connectors/styles.d.ts +0 -9
  106. package/build/components/Pages/DownloadApp/index.d.ts +0 -2
  107. package/build/components/Pages/Error/index.d.ts +0 -1
  108. package/build/components/Pages/MobileConnectors/index.d.ts +0 -3
  109. package/build/components/Pages/MobileConnectors/styles.d.ts +0 -5
  110. package/build/components/Pages/Onboarding/index.d.ts +0 -3
  111. package/build/components/Pages/Onboarding/styles.d.ts +0 -9
  112. package/build/components/Pages/PayWithToken/index.d.ts +0 -3
  113. package/build/components/Pages/SelectAmount/index.d.ts +0 -3
  114. package/build/components/Pages/SelectDepositAddressAmount/index.d.ts +0 -3
  115. package/build/components/Pages/SelectDepositAddressChain/index.d.ts +0 -3
  116. package/build/components/Pages/SelectExchange/index.d.ts +0 -3
  117. package/build/components/Pages/SelectExternalAmount/index.d.ts +0 -3
  118. package/build/components/Pages/SelectMethod/index.d.ts +0 -1
  119. package/build/components/Pages/SelectMethod/styles.d.ts +0 -9
  120. package/build/components/Pages/SelectToken/index.d.ts +0 -1
  121. package/build/components/Pages/SelectWalletAmount/index.d.ts +0 -3
  122. package/build/components/Pages/SelectWalletChain/index.d.ts +0 -3
  123. package/build/components/Pages/SelectZKP/index.d.ts +0 -3
  124. package/build/components/Pages/Solana/ConnectorSolana/index.d.ts +0 -4
  125. package/build/components/Pages/Solana/PayWithSolanaToken/index.d.ts +0 -3
  126. package/build/components/Pages/Solana/SelectSolanaAmount/index.d.ts +0 -3
  127. package/build/components/Pages/SwitchNetworks/index.d.ts +0 -3
  128. package/build/components/Pages/WaitingDepositAddress/index.d.ts +0 -1
  129. package/build/components/Pages/WaitingExternal/index.d.ts +0 -3
  130. package/build/components/Pages/WaitingWallet/index.d.ts +0 -3
  131. package/build/components/Spinners/CircleSpinner/index.d.ts +0 -9
  132. package/build/components/Spinners/CircleSpinner/styles.d.ts +0 -5
  133. package/build/components/Spinners/ExternalPaymentSpinner/index.d.ts +0 -5
  134. package/build/components/Spinners/SquircleSpinner/index.d.ts +0 -5
  135. package/build/components/Spinners/SquircleSpinner/styles.d.ts +0 -4
  136. package/build/components/Spinners/TokenLogoSpinner/index.d.ts +0 -5
  137. package/build/components/Spinners/TokenLogoSpinner/styles.d.ts +0 -1
  138. package/build/components/Spinners/WalletPaymentSpinner/index.d.ts +0 -5
  139. package/build/components/Spinners/styles.d.ts +0 -2
  140. package/build/constants/defaultTheme.d.ts +0 -4
  141. package/build/constants/routes.d.ts +0 -28
  142. package/build/defaultConfig.d.ts +0 -17
  143. package/build/defaultConnectors.d.ts +0 -14
  144. package/build/hooks/useChainIsSupported.d.ts +0 -2
  145. package/build/hooks/useChains.d.ts +0 -3
  146. package/build/hooks/useConnect.d.ts +0 -110
  147. package/build/hooks/useConnectCallback.d.ts +0 -8
  148. package/build/hooks/useConnectors.d.ts +0 -3
  149. package/build/hooks/useDaimoPay.d.ts +0 -94
  150. package/build/hooks/useDaimoPayStatus.d.ts +0 -15
  151. package/build/hooks/useDaimoPayUI.d.ts +0 -6
  152. package/build/hooks/useDepositAddressOptions.d.ts +0 -10
  153. package/build/hooks/useEnsFallbackConfig.d.ts +0 -2
  154. package/build/hooks/useExternalPaymentOptions.d.ts +0 -12
  155. package/build/hooks/useFitText.d.ts +0 -14
  156. package/build/hooks/useFocusTrap.d.ts +0 -1
  157. package/build/hooks/useGoogleFont.d.ts +0 -3
  158. package/build/hooks/useIsMobile.d.ts +0 -5
  159. package/build/hooks/useIsMounted.d.ts +0 -3
  160. package/build/hooks/useLastConnector.d.ts +0 -4
  161. package/build/hooks/useLocalStorage.d.ts +0 -7
  162. package/build/hooks/useLocales.d.ts +0 -2
  163. package/build/hooks/useLockBodyScroll.d.ts +0 -1
  164. package/build/hooks/useModal.d.ts +0 -8
  165. package/build/hooks/useOrderUsdLimits.d.ts +0 -7
  166. package/build/hooks/usePayContext.d.ts +0 -2
  167. package/build/hooks/usePaymentState.d.ts +0 -67
  168. package/build/hooks/usePrevious.d.ts +0 -1
  169. package/build/hooks/useSolanaPaymentOptions.d.ts +0 -13
  170. package/build/hooks/useTokenOptions.d.ts +0 -5
  171. package/build/hooks/useUntronAvailability.d.ts +0 -14
  172. package/build/hooks/useWalletPaymentOptions.d.ts +0 -31
  173. package/build/hooks/useWindowSize.d.ts +0 -4
  174. package/build/localizations/index.d.ts +0 -2
  175. package/build/localizations/locales/ar-AE.d.ts +0 -3
  176. package/build/localizations/locales/ca-AD.d.ts +0 -3
  177. package/build/localizations/locales/ee-EE.d.ts +0 -3
  178. package/build/localizations/locales/en-US.d.ts +0 -128
  179. package/build/localizations/locales/es-ES.d.ts +0 -3
  180. package/build/localizations/locales/fa-IR.d.ts +0 -3
  181. package/build/localizations/locales/fr-FR.d.ts +0 -3
  182. package/build/localizations/locales/index.d.ts +0 -3
  183. package/build/localizations/locales/ja-JP.d.ts +0 -91
  184. package/build/localizations/locales/pt-BR.d.ts +0 -3
  185. package/build/localizations/locales/ru-RU.d.ts +0 -3
  186. package/build/localizations/locales/tr-TR.d.ts +0 -3
  187. package/build/localizations/locales/vi-VN.d.ts +0 -3
  188. package/build/localizations/locales/zh-CN.d.ts +0 -3
  189. package/build/payment/paymentEffects.d.ts +0 -12
  190. package/build/payment/paymentFsm.d.ts +0 -131
  191. package/build/payment/paymentStore.d.ts +0 -14
  192. package/build/payment/paymentUtils.d.ts +0 -6
  193. package/build/provider/DaimoPayProvider.d.ts +0 -24
  194. package/build/provider/PayContext.d.ts +0 -66
  195. package/build/provider/PaymentProvider.d.ts +0 -8
  196. package/build/provider/SolanaContextProvider.d.ts +0 -6
  197. package/build/provider/Web3ContextProvider.d.ts +0 -24
  198. package/build/stateStore.d.ts +0 -66
  199. package/build/styles/defaultTheme.d.ts +0 -3
  200. package/build/styles/index.d.ts +0 -1
  201. package/build/styles/styled/index.d.ts +0 -12
  202. package/build/styles/themes/base.d.ts +0 -129
  203. package/build/styles/themes/index.d.ts +0 -673
  204. package/build/styles/themes/midnight.d.ts +0 -74
  205. package/build/styles/themes/minimal.d.ts +0 -94
  206. package/build/styles/themes/nouns.d.ts +0 -79
  207. package/build/styles/themes/retro.d.ts +0 -89
  208. package/build/styles/themes/rounded.d.ts +0 -86
  209. package/build/styles/themes/soft.d.ts +0 -69
  210. package/build/styles/themes/web95.d.ts +0 -91
  211. package/build/styles/types.d.ts +0 -80
  212. package/build/types.d.ts +0 -46
  213. package/build/utils/exports.d.ts +0 -1
  214. package/build/utils/format.d.ts +0 -49
  215. package/build/utils/index.d.ts +0 -17
  216. package/build/utils/localstorage.d.ts +0 -9
  217. package/build/utils/p3.d.ts +0 -2
  218. package/build/utils/platform.d.ts +0 -2
  219. package/build/utils/polling.d.ts +0 -13
  220. package/build/utils/supportUrl.d.ts +0 -2
  221. package/build/utils/trpc.d.ts +0 -4
  222. package/build/utils/validateInput.d.ts +0 -16
  223. package/build/utils/wallets.d.ts +0 -24
  224. package/build/wallets/index.d.ts +0 -5
  225. package/build/wallets/useWallets.d.ts +0 -16
  226. package/build/wallets/walletConfigs.d.ts +0 -29
  227. package/build/world-mini-app/WorldPayButton.d.ts +0 -84
  228. package/build/world-mini-app/promptWorldPayment.d.ts +0 -9
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SelectExternalAmount: React.FC;
3
- export default SelectExternalAmount;
@@ -1 +0,0 @@
1
- export default function SelectMethod(): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export default function SelectToken(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SelectWalletAmount: React.FC;
3
- export default SelectWalletAmount;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SelectWalletChain: React.FC;
3
- export default SelectWalletChain;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SelectZKP: React.FC;
3
- export default SelectZKP;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- declare const ConnectSolana: React.FC;
3
- export declare const LoadingContainer: any;
4
- export default ConnectSolana;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const PayWithSolanaToken: React.FC;
3
- export default PayWithSolanaToken;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SelectSolanaAmount: React.FC;
3
- export default SelectSolanaAmount;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SwitchNetworks: React.FC;
3
- export default SwitchNetworks;
@@ -1 +0,0 @@
1
- export default function WaitingDepositAddress(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const WaitingExternal: React.FC;
3
- export default WaitingExternal;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const WaitingWallet: React.FC;
3
- export default WaitingWallet;
@@ -1,9 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- export declare const LogoContainer: any;
2
- export declare const Logo: any;
3
- export declare const SpinnerContainer: any;
4
- export declare const ExpiringSpinner: any;
5
- export declare const Spinner: any;
@@ -1,5 +0,0 @@
1
- declare const ExternalPaymentSpinner: ({ logoURI, logoShape, }: {
2
- logoURI: string;
3
- logoShape: "circle" | "squircle";
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default ExternalPaymentSpinner;
@@ -1,5 +0,0 @@
1
- declare const SquircleSpinner: ({ logo, loading, }: {
2
- logo?: React.ReactNode;
3
- loading?: boolean;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default SquircleSpinner;
@@ -1,4 +0,0 @@
1
- export declare const LogoContainer: any;
2
- export declare const Logo: any;
3
- export declare const SpinnerContainer: any;
4
- export declare const Spinner: any;
@@ -1,5 +0,0 @@
1
- import { DaimoPayToken } from "@daimo/pay-common";
2
- declare const TokenLogoSpinner: ({ token }: {
3
- token: DaimoPayToken;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default TokenLogoSpinner;
@@ -1 +0,0 @@
1
- export declare const ChainLogoContainer: any;
@@ -1,5 +0,0 @@
1
- declare const WalletPaymentSpinner: ({ logo, logoShape, }: {
2
- logo: React.ReactNode | string;
3
- logoShape: "circle" | "squircle";
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default WalletPaymentSpinner;
@@ -1,2 +0,0 @@
1
- export declare const LoadingContainer: any;
2
- export declare const AnimationContainer: any;
@@ -1,4 +0,0 @@
1
- declare const _default: {
2
- mobileWidth: number;
3
- };
4
- export default _default;
@@ -1,28 +0,0 @@
1
- export declare enum ROUTES {
2
- SELECT_METHOD = "daimoPaySelectMethod",
3
- SELECT_TOKEN = "daimoPaySelectToken",
4
- SELECT_AMOUNT = "daimoPaySelectAmount",
5
- SELECT_EXTERNAL_AMOUNT = "daimoPaySelectExternalAmount",
6
- SELECT_EXCHANGE = "daimoPaySelectExchange",
7
- SELECT_DEPOSIT_ADDRESS_AMOUNT = "daimoPaySelectDepositAddressAmount",
8
- SELECT_WALLET_AMOUNT = "daimoPaySelectWalletAmount",
9
- SELECT_WALLET_CHAIN = "daimoPaySelectWalletChain",
10
- SELECT_ZKP2P = "daimoPaySelectZKP2P",
11
- WAITING_EXTERNAL = "daimoPayWaitingExternal",
12
- WAITING_WALLET = "daimoPayWaitingWallet",
13
- SELECT_DEPOSIT_ADDRESS_CHAIN = "daimoPaySelectDepositAddressChain",
14
- WAITING_DEPOSIT_ADDRESS = "daimoPayWaitingDepositAddress",
15
- PAY_WITH_TOKEN = "daimoPayPayWithToken",
16
- CONFIRMATION = "daimoPayConfirmation",
17
- SOLANA_CONNECTOR = "daimoPaySolanaConnector",
18
- SOLANA_SELECT_AMOUNT = "daimoPaySolanaSelectAmount",
19
- SOLANA_PAY_WITH_TOKEN = "daimoPaySolanaPayWithToken",
20
- ERROR = "daimoPayError",
21
- ONBOARDING = "onboarding",
22
- ABOUT = "about",
23
- CONNECTORS = "connectors",
24
- MOBILECONNECTORS = "mobileConnectors",
25
- CONNECT = "connect",
26
- DOWNLOAD = "download",
27
- SWITCHNETWORKS = "switchNetworks"
28
- }
@@ -1,17 +0,0 @@
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
- coinbaseWalletPreference?: CoinbaseWalletParameters<"4">["preference"];
12
- additionalConnectors?: CreateConnectorFn[];
13
- } & Partial<CreateConfigParameters>;
14
- export declare const REQUIRED_CHAINS: CreateConfigParameters["chains"];
15
- /** Daimo Pay recommended config, for use with wagmi's createConfig(). */
16
- declare const defaultConfig: ({ appName, appIcon, appDescription, appUrl, coinbaseWalletPreference, additionalConnectors, chains, client, ...props }: DefaultConfigProps) => CreateConfigParameters;
17
- export default defaultConfig;
@@ -1,14 +0,0 @@
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
- coinbaseWalletPreference?: CoinbaseWalletParameters<"4">["preference"];
11
- additionalConnectors?: CreateConnectorFn[];
12
- };
13
- declare const defaultConnectors: ({ app, coinbaseWalletPreference, additionalConnectors, }: DefaultConnectorsProps) => CreateConnectorFn[];
14
- export default defaultConnectors;
@@ -1,2 +0,0 @@
1
- /** Determines whether the current wagmi configuration supports a given chain. */
2
- export declare function useChainIsSupported(chainId?: number): boolean | null;
@@ -1,3 +0,0 @@
1
- import { Chain } from "viem";
2
- /** Returns currently configured wagmi chains. */
3
- export declare function useChains(): Chain[];
@@ -1,110 +0,0 @@
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
- data: undefined;
8
- error: null;
9
- context: unknown;
10
- reset: () => void;
11
- status: "idle";
12
- isError: false;
13
- isPending: false;
14
- isSuccess: false;
15
- failureCount: number;
16
- failureReason: import("@wagmi/core").ConnectErrorType | null;
17
- isPaused: boolean;
18
- variables: undefined;
19
- isIdle: true;
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
- data: undefined;
34
- error: null;
35
- context: unknown;
36
- reset: () => void;
37
- status: "pending";
38
- isError: false;
39
- isPending: true;
40
- isSuccess: false;
41
- failureCount: number;
42
- failureReason: import("@wagmi/core").ConnectErrorType | null;
43
- isPaused: boolean;
44
- variables: import("wagmi/query").ConnectVariables<import("wagmi").Config, Connector<CreateConnectorFn>>;
45
- isIdle: false;
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
- data: undefined;
60
- error: import("@wagmi/core").ConnectErrorType;
61
- context: unknown;
62
- reset: () => void;
63
- status: "error";
64
- isError: true;
65
- isPending: false;
66
- isSuccess: false;
67
- failureCount: number;
68
- failureReason: import("@wagmi/core").ConnectErrorType | null;
69
- isPaused: boolean;
70
- variables: import("wagmi/query").ConnectVariables<import("wagmi").Config, Connector<CreateConnectorFn>>;
71
- isIdle: false;
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
- data: import("wagmi/query").ConnectData<import("wagmi").Config>;
86
- error: null;
87
- context: unknown;
88
- reset: () => void;
89
- status: "success";
90
- isError: false;
91
- isPending: false;
92
- isSuccess: true;
93
- failureCount: number;
94
- failureReason: import("@wagmi/core").ConnectErrorType | null;
95
- isPaused: boolean;
96
- variables: import("wagmi/query").ConnectVariables<import("wagmi").Config, Connector<CreateConnectorFn>>;
97
- isIdle: false;
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
- };
@@ -1,8 +0,0 @@
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;
@@ -1,3 +0,0 @@
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;
@@ -1,94 +0,0 @@
1
- import { DaimoPayOrderID, SolanaPublicKey } from "@daimo/pay-common";
2
- import { Address, Hex } from "viem";
3
- import { PaymentState, PayParams } from "../payment/paymentFsm";
4
- type DaimoPayFunctions = {
5
- /**
6
- * Create a new Daimo Pay order preview with the given parameters.
7
- * Call this to start a new payment flow.
8
- *
9
- * @param params - Parameters describing the payment to be created.
10
- */
11
- createPreviewOrder: (params: PayParams) => Promise<Extract<PaymentState, {
12
- type: "preview";
13
- }>>;
14
- /**
15
- * Set the order ID to fetch and manage an existing Daimo Pay order.
16
- * Useful for resuming or referencing a previously created order.
17
- *
18
- * @param id - The Daimo Pay order ID to set.
19
- */
20
- setPayId: (id: DaimoPayOrderID) => Promise<Extract<PaymentState, {
21
- type: "unhydrated" | "payment_unpaid" | "payment_started" | "payment_completed" | "payment_bounced";
22
- }>>;
23
- /**
24
- * Hydrate the current order, locking in the payment intent details and
25
- * token swap prices.
26
- */
27
- hydrateOrder: (refundAddress?: Address) => Promise<Extract<PaymentState, {
28
- type: "payment_unpaid";
29
- }>>;
30
- /** Trigger search for payment on the current order. */
31
- paySource: () => void;
32
- /**
33
- * Register an Ethereum payment source for the current order.
34
- * Call this after the user has submitted an Ethereum payment transaction.
35
- *
36
- * @param args - Details about the Ethereum payment transaction.
37
- */
38
- payEthSource: (args: {
39
- paymentTxHash: Hex;
40
- sourceChainId: number;
41
- payerAddress: Address;
42
- sourceToken: Address;
43
- sourceAmount: bigint;
44
- }) => Promise<Extract<PaymentState, {
45
- type: "payment_started" | "payment_completed" | "payment_bounced";
46
- }>>;
47
- /**
48
- * Register a Solana payment source for the current order.
49
- * Call this after the user has submitted a Solana payment transaction.
50
- *
51
- * @param args - Details about the Solana payment transaction.
52
- */
53
- paySolanaSource: (args: {
54
- paymentTxHash: string;
55
- sourceToken: SolanaPublicKey;
56
- }) => Promise<Extract<PaymentState, {
57
- type: "payment_started" | "payment_completed" | "payment_bounced";
58
- }>>;
59
- /**
60
- * Reset the current payment state and clear the active order.
61
- * Call this to start a new payment flow.
62
- */
63
- reset: () => void;
64
- /**
65
- * Update the user's chosen amount in USD. Applies only to deposit flow.
66
- *
67
- * @deprecated
68
- */
69
- setChosenUsd: (usd: number) => void;
70
- };
71
- type DaimoPayState = {
72
- [S in PaymentState as S["type"]]: {
73
- paymentState: S["type"];
74
- order: S extends {
75
- order: infer O;
76
- } ? O : null;
77
- paymentErrorMessage: S extends {
78
- message: infer M;
79
- } ? M : null;
80
- };
81
- }[PaymentState["type"]];
82
- export type UseDaimoPay = DaimoPayFunctions & DaimoPayState;
83
- /**
84
- * React hook for interacting with Daimo Pay orders and payments. Use this hook
85
- * to manage the lifecycle of a Daimo Pay payment in your application.
86
- *
87
- * This hook provides a simple interface to create, hydrate, pay, and reset
88
- * Daimo Pay orders.
89
- *
90
- * @returns {UseDaimoPay} An object with current payment state and methods to
91
- * manage Daimo Pay orders and payments.
92
- */
93
- export declare function useDaimoPay(): UseDaimoPay;
94
- export {};
@@ -1,15 +0,0 @@
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;
@@ -1,6 +0,0 @@
1
- import { PayParams } from "../payment/paymentFsm";
2
- type UseDaimoPayUI = {
3
- resetPayment: (payParams?: Partial<PayParams>) => Promise<void>;
4
- };
5
- export declare function useDaimoPayUI(): UseDaimoPayUI;
6
- export {};
@@ -1,10 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- import type { Config } from "@wagmi/core";
2
- export declare function useEnsFallbackConfig(): Config | undefined;
@@ -1,12 +0,0 @@
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: Map<"external" | "zkp2p" | "exchange", ExternalPaymentOptionMetadata[]>;
11
- loading: boolean;
12
- };
@@ -1,14 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export default function FocusTrap(props: any): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { Theme } from "../types";
2
- export declare function useGoogleFont(font: string): void;
3
- export declare function useThemeFont(theme: Theme): void;
@@ -1,5 +0,0 @@
1
- export default function useIsMobile(): {
2
- isMobile: boolean;
3
- isIOS: boolean;
4
- isAndroid: boolean;
5
- };
@@ -1,3 +0,0 @@
1
- /** Utility. Returns false on first render, true after.
2
- * Useful for apps with SSR, for example. */
3
- export default function useIsMounted(): boolean;
@@ -1,4 +0,0 @@
1
- export declare const useLastConnector: () => {
2
- lastConnectorId: string | null;
3
- updateLastConnectorId: (id: string) => void;
4
- };
@@ -1,7 +0,0 @@
1
- export declare const useLocalStorage: (storageKey: string) => {
2
- data: any;
3
- add: (item: any) => void;
4
- remove: (item: any) => void;
5
- update: (items: any) => void;
6
- clear: () => void;
7
- };
@@ -1,2 +0,0 @@
1
- import { LocaleFull } from "../localizations/locales";
2
- export default function useLocales(replacements?: any): LocaleFull;
@@ -1 +0,0 @@
1
- export default function useLockBodyScroll(initialLocked: boolean): (boolean | import("react").Dispatch<import("react").SetStateAction<boolean>>)[];
@@ -1,8 +0,0 @@
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 {};
@@ -1,7 +0,0 @@
1
- import { TrpcClient } from "../utils/trpc";
2
- export declare function useOrderUsdLimits({ trpc }: {
3
- trpc: TrpcClient;
4
- }): {
5
- limits: Record<string, number>;
6
- loading: boolean;
7
- };
@@ -1,2 +0,0 @@
1
- /** Daimo Pay internal context. */
2
- export declare const usePayContext: () => import("../provider/PayContext").PayContextValue;
@@ -1,67 +0,0 @@
1
- import { DepositAddressPaymentOptionData, DepositAddressPaymentOptionMetadata, DepositAddressPaymentOptions, ExternalPaymentOptionMetadata, ExternalPaymentOptions, SolanaPublicKey, WalletPaymentOption } from "@daimo/pay-common";
2
- import { Hex } from "viem";
3
- import { PayButtonPaymentProps } from "../components/DaimoPayButton";
4
- import { ROUTES } from "../constants/routes";
5
- import { PayParams } from "../payment/paymentFsm";
6
- import { TrpcClient } from "../utils/trpc";
7
- import { WalletConfigProps } from "../wallets/walletConfigs";
8
- import { useDepositAddressOptions } from "./useDepositAddressOptions";
9
- import { useExternalPaymentOptions } from "./useExternalPaymentOptions";
10
- import { useSolanaPaymentOptions } from "./useSolanaPaymentOptions";
11
- import { useWalletPaymentOptions } from "./useWalletPaymentOptions";
12
- /** Wallet payment details, sent to processSourcePayment after submitting tx. */
13
- export type SourcePayment = Parameters<TrpcClient["processSourcePayment"]["mutate"]>[0];
14
- /** Creates (or loads) a payment and manages the corresponding modal. */
15
- export interface PaymentState {
16
- generatePreviewOrder: () => void;
17
- resetOrder: (payParams?: Partial<PayParams>) => Promise<void>;
18
- buttonProps: PayButtonPaymentProps | undefined;
19
- setButtonProps: (props: PayButtonPaymentProps | undefined) => void;
20
- setPayId: (id: string | undefined) => void;
21
- setPayParams: (payParams: PayParams | undefined) => Promise<void>;
22
- isDepositFlow: boolean;
23
- paymentWaitingMessage: string | undefined;
24
- externalPaymentOptions: ReturnType<typeof useExternalPaymentOptions>;
25
- selectedWallet: WalletConfigProps | undefined;
26
- selectedWalletDeepLink: string | undefined;
27
- showSolanaPaymentMethod: boolean;
28
- walletPaymentOptions: ReturnType<typeof useWalletPaymentOptions>;
29
- solanaPaymentOptions: ReturnType<typeof useSolanaPaymentOptions>;
30
- depositAddressOptions: ReturnType<typeof useDepositAddressOptions>;
31
- /** Whether Untron receivers are currently available. `null` when unknown. */
32
- untronAvailable: boolean | null;
33
- selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
34
- selectedTokenOption: WalletPaymentOption | undefined;
35
- selectedSolanaTokenOption: WalletPaymentOption | undefined;
36
- selectedDepositAddressOption: DepositAddressPaymentOptionMetadata | undefined;
37
- getOrderUsdLimit: () => number;
38
- setPaymentWaitingMessage: (message: string | undefined) => void;
39
- tokenMode: "evm" | "solana" | "all";
40
- setTokenMode: (mode: "evm" | "solana" | "all") => void;
41
- setSelectedWallet: (wallet: WalletConfigProps | undefined) => void;
42
- setSelectedWalletDeepLink: (deepLink: string | undefined) => void;
43
- setSelectedExternalOption: (option: ExternalPaymentOptionMetadata | undefined) => void;
44
- setSelectedTokenOption: (option: WalletPaymentOption | undefined) => void;
45
- setSelectedSolanaTokenOption: (option: WalletPaymentOption | undefined) => void;
46
- setSelectedDepositAddressOption: (option: DepositAddressPaymentOptionMetadata | undefined) => void;
47
- setChosenUsd: (usd: number) => void;
48
- payWithToken: (walletOption: WalletPaymentOption) => Promise<{
49
- txHash?: Hex;
50
- success: boolean;
51
- }>;
52
- payWithExternal: (option: ExternalPaymentOptions) => Promise<string>;
53
- payWithDepositAddress: (option: DepositAddressPaymentOptions) => Promise<DepositAddressPaymentOptionData | null>;
54
- payWithSolanaToken: (inputToken: SolanaPublicKey) => Promise<{
55
- txHash: string;
56
- success: boolean;
57
- }>;
58
- openInWalletBrowser: (wallet: WalletConfigProps, amountUsd?: number) => void;
59
- senderEnsName: string | undefined;
60
- }
61
- export declare function usePaymentState({ trpc, lockPayParams, setRoute, log, redirectReturnUrl, }: {
62
- trpc: TrpcClient;
63
- lockPayParams: boolean;
64
- setRoute: (route: ROUTES, data?: Record<string, any>) => void;
65
- log: (...args: any[]) => void;
66
- redirectReturnUrl?: string;
67
- }): PaymentState;
@@ -1 +0,0 @@
1
- export default function usePrevious(value: any, initial?: any): any;