@rozoai/intent-pay 0.0.42 → 0.0.43-beta.1

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 (32) hide show
  1. package/build/components/DaimoPayButton/index.d.ts +40 -30
  2. package/build/hooks/useDepositAddressOptions.d.ts +1 -0
  3. package/build/hooks/useSolanaDestination.d.ts +2 -0
  4. package/build/hooks/useSupportedChains.d.ts +2 -1
  5. package/build/hooks/useWalletPaymentOptions.d.ts +18 -0
  6. package/build/index.d.ts +2 -0
  7. package/build/package.json.js +2 -2
  8. package/build/payment/paymentFsm.d.ts +7 -7
  9. package/build/src/components/Common/OrderHeader/index.js +2 -2
  10. package/build/src/components/Common/OrderHeader/index.js.map +1 -1
  11. package/build/src/components/Common/TokenChainLogo/index.js.map +1 -1
  12. package/build/src/components/DaimoPayButton/index.js +94 -40
  13. package/build/src/components/DaimoPayButton/index.js.map +1 -1
  14. package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js +58 -79
  15. package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +1 -1
  16. package/build/src/hooks/useDepositAddressOptions.js +7 -6
  17. package/build/src/hooks/useDepositAddressOptions.js.map +1 -1
  18. package/build/src/hooks/useSolanaDestination.js +4 -0
  19. package/build/src/hooks/useSolanaDestination.js.map +1 -1
  20. package/build/src/hooks/useSupportedChains.js +5 -4
  21. package/build/src/hooks/useSupportedChains.js.map +1 -1
  22. package/build/src/hooks/useWalletPaymentOptions.js +19 -2
  23. package/build/src/hooks/useWalletPaymentOptions.js.map +1 -1
  24. package/build/src/index.js +1 -0
  25. package/build/src/index.js.map +1 -1
  26. package/build/src/payment/paymentEffects.js +3 -3
  27. package/build/src/payment/paymentEffects.js.map +1 -1
  28. package/build/src/types/chainAddress.js +79 -0
  29. package/build/src/types/chainAddress.js.map +1 -0
  30. package/build/types/chainAddress.d.ts +27 -0
  31. package/package.json +10 -11
  32. package/src/index.ts +64 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rozoai/intent-pay",
3
3
  "private": false,
4
- "version": "0.0.42",
4
+ "version": "0.0.43-beta.1",
5
5
  "author": "RozoAI",
6
6
  "homepage": "https://github.com/RozoAI/intent-pay",
7
7
  "license": "BSD-2-Clause",
@@ -26,14 +26,6 @@
26
26
  "build",
27
27
  "README.md"
28
28
  ],
29
- "scripts": {
30
- "start": "rollup --config rollup.config.js -w",
31
- "dev": "rollup --config rollup.config.js -w",
32
- "build": "rollup --config rollup.config.js",
33
- "prepare": "npm run build",
34
- "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --max-warnings=0",
35
- "release": "bumpp"
36
- },
37
29
  "keywords": [
38
30
  "ens",
39
31
  "react-hook",
@@ -51,7 +43,7 @@
51
43
  "@albedo-link/intent": "^0.13.0",
52
44
  "@reown/appkit": "^1.7.0",
53
45
  "@rollup/plugin-typescript": "^12.1.2",
54
- "@rozoai/intent-common": "0.0.31",
46
+ "@rozoai/intent-common": "0.0.32-beta.1",
55
47
  "@solana/spl-token": "^0.4.13",
56
48
  "@solana/wallet-adapter-base": "^0.9.23",
57
49
  "@solana/wallet-adapter-react": "^0.15.35",
@@ -109,5 +101,12 @@
109
101
  "rollup-plugin-terser": "^7.0.2",
110
102
  "rollup-plugin-visualizer": "^6.0.5",
111
103
  "typescript-plugin-styled-components": "^3.0.0"
104
+ },
105
+ "scripts": {
106
+ "start": "rollup --config rollup.config.js -w",
107
+ "dev": "rollup --config rollup.config.js -w",
108
+ "build": "rollup --config rollup.config.js",
109
+ "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --max-warnings=0",
110
+ "release": "bumpp"
112
111
  }
113
- }
112
+ }
package/src/index.ts ADDED
@@ -0,0 +1,64 @@
1
+ export type * as Types from "./types";
2
+
3
+ export { version } from "../package.json";
4
+
5
+ // Configure Rozo Pay
6
+ export { default as getDefaultConfig } from "./defaultConfig";
7
+ export { RozoPayProvider } from "./provider/DaimoPayProvider";
8
+
9
+ // Pay button
10
+ export {
11
+ RozoPayButton,
12
+ RozoPayButtonCustomProps,
13
+ RozoPayButtonProps,
14
+ RozoPayment,
15
+ } from "./components/DaimoPayButton";
16
+
17
+ // Hooks to track payment status + UI status.
18
+ export { useRozoPay } from "./hooks/useDaimoPay";
19
+ export { useRozoPayStatus } from "./hooks/useDaimoPayStatus";
20
+ export { useRozoPayUI } from "./hooks/useDaimoPayUI";
21
+
22
+ // For convenience, export components to show connected account.
23
+ export { default as Avatar } from "./components/Common/Avatar";
24
+ export { default as ChainIcon } from "./components/Common/Chain";
25
+ export { wallets } from "./wallets";
26
+
27
+ // Export utilities.
28
+ export * from "./utils/exports";
29
+
30
+ // Export types
31
+ export * from "./types";
32
+
33
+ // Export chain address utilities and types
34
+ export {
35
+ EVM_CHAIN_IDS,
36
+ getChainTypeName,
37
+ isEvmChain,
38
+ isSolanaChain,
39
+ isStellarChain,
40
+ isValidEvmAddress,
41
+ isValidSolanaAddress,
42
+ isValidStellarAddress,
43
+ NON_EVM_CHAIN_IDS,
44
+ validateAddressForChain,
45
+ } from "./types/chainAddress";
46
+ export type {
47
+ EvmChainId,
48
+ NonEvmChainId,
49
+ SupportedChainId,
50
+ } from "./types/chainAddress";
51
+
52
+ // TODO: expose this more selectively.
53
+ export { usePayContext } from "./hooks/usePayContext";
54
+ export { PayContext as RozoPayContext } from "./provider/PayContext";
55
+
56
+ // Stellar integration
57
+ export { useRozoConnectStellar } from "./provider/StellarContextProvider";
58
+
59
+ // EVM utils
60
+ export { getAddress as getEVMAddress, isAddress as isEVMAddress } from "viem";
61
+ export {
62
+ createConfig as createRozoWagmiConfig,
63
+ WagmiProvider as RozoWagmiProvider,
64
+ } from "wagmi";