conflux-devkit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +102 -0
  2. package/dist/cli.js +16338 -0
  3. package/package.json +55 -0
  4. package/ui/out/404/index.html +1 -0
  5. package/ui/out/404.html +1 -0
  6. package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_buildManifest.js +1 -0
  7. package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_ssgManifest.js +1 -0
  8. package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_buildManifest.js +1 -0
  9. package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_ssgManifest.js +1 -0
  10. package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_buildManifest.js +1 -0
  11. package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_ssgManifest.js +1 -0
  12. package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_buildManifest.js +1 -0
  13. package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_ssgManifest.js +1 -0
  14. package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_buildManifest.js +1 -0
  15. package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_ssgManifest.js +1 -0
  16. package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_buildManifest.js +1 -0
  17. package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_ssgManifest.js +1 -0
  18. package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_buildManifest.js +1 -0
  19. package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_ssgManifest.js +1 -0
  20. package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_buildManifest.js +1 -0
  21. package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_ssgManifest.js +1 -0
  22. package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_buildManifest.js +1 -0
  23. package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_ssgManifest.js +1 -0
  24. package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_buildManifest.js +1 -0
  25. package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_ssgManifest.js +1 -0
  26. package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_buildManifest.js +1 -0
  27. package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_ssgManifest.js +1 -0
  28. package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_buildManifest.js +1 -0
  29. package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_ssgManifest.js +1 -0
  30. package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_buildManifest.js +1 -0
  31. package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_ssgManifest.js +1 -0
  32. package/ui/out/_next/static/chunks/205-997c9580ac2ccb04.js +1 -0
  33. package/ui/out/_next/static/chunks/238-baf384d341a98f9f.js +1 -0
  34. package/ui/out/_next/static/chunks/363-11ecfe8307834c37.js +1 -0
  35. package/ui/out/_next/static/chunks/363-fd3f659dc66a2545.js +1 -0
  36. package/ui/out/_next/static/chunks/383-30e544e3db85d4b4.js +1 -0
  37. package/ui/out/_next/static/chunks/396-0d45f2627ca2432c.js +1 -0
  38. package/ui/out/_next/static/chunks/396-de3171781a3c5f52.js +1 -0
  39. package/ui/out/_next/static/chunks/476-1a499832716820dd.js +1 -0
  40. package/ui/out/_next/static/chunks/5b8f0dd8-7fc232be3e483640.js +1 -0
  41. package/ui/out/_next/static/chunks/5b8f0dd8-f9bbf8f44d8e6302.js +1 -0
  42. package/ui/out/_next/static/chunks/606-d510a7806cc50e18.js +1 -0
  43. package/ui/out/_next/static/chunks/628-ae8f2280d891101c.js +1 -0
  44. package/ui/out/_next/static/chunks/69-a23845cfa4a23071.js +1 -0
  45. package/ui/out/_next/static/chunks/706-142eb06ca4e1b468.js +1 -0
  46. package/ui/out/_next/static/chunks/749-27e561f3f17b1ad3.js +2 -0
  47. package/ui/out/_next/static/chunks/749-bd8c206e8e58f8b0.js +2 -0
  48. package/ui/out/_next/static/chunks/781-7af4662532da98ca.js +1 -0
  49. package/ui/out/_next/static/chunks/815-ab30cec2ff88e700.js +1 -0
  50. package/ui/out/_next/static/chunks/826-c38d836f8f2bac38.js +1 -0
  51. package/ui/out/_next/static/chunks/903-2887fe814dfa6d5e.js +1 -0
  52. package/ui/out/_next/static/chunks/app/_not-found/page-1a3d8ff7bd6fafe6.js +1 -0
  53. package/ui/out/_next/static/chunks/app/_not-found/page-fe94df087cbbeedb.js +1 -0
  54. package/ui/out/_next/static/chunks/app/accounts/page-21a02cc8bbbce9cf.js +1 -0
  55. package/ui/out/_next/static/chunks/app/accounts/page-2bf2eeddfcc46fd2.js +1 -0
  56. package/ui/out/_next/static/chunks/app/accounts/page-4fb77d9b03c79ef0.js +1 -0
  57. package/ui/out/_next/static/chunks/app/accounts/page-840e013892222293.js +1 -0
  58. package/ui/out/_next/static/chunks/app/accounts/page-8828d6c27ee45d5e.js +1 -0
  59. package/ui/out/_next/static/chunks/app/accounts/page-a5a4d066c57c6eba.js +1 -0
  60. package/ui/out/_next/static/chunks/app/accounts/page-cd6edb16de77e73a.js +1 -0
  61. package/ui/out/_next/static/chunks/app/accounts/page-ce44f544affcbb2e.js +1 -0
  62. package/ui/out/_next/static/chunks/app/accounts/page-f26a4c8967b60c31.js +1 -0
  63. package/ui/out/_next/static/chunks/app/accounts/page-fc53feb7e5bf6a0b.js +1 -0
  64. package/ui/out/_next/static/chunks/app/accounts/page-fe5a9daa4d22e115.js +1 -0
  65. package/ui/out/_next/static/chunks/app/contracts/page-091eba53f5dcb62b.js +1 -0
  66. package/ui/out/_next/static/chunks/app/contracts/page-265c4f26532b42ce.js +1 -0
  67. package/ui/out/_next/static/chunks/app/contracts/page-26c527bf8b829de6.js +1 -0
  68. package/ui/out/_next/static/chunks/app/contracts/page-53e2d2d715f76290.js +1 -0
  69. package/ui/out/_next/static/chunks/app/contracts/page-56d74025e6315a3d.js +1 -0
  70. package/ui/out/_next/static/chunks/app/contracts/page-844c9f55a6ec9218.js +1 -0
  71. package/ui/out/_next/static/chunks/app/contracts/page-88416cc33eabdddb.js +1 -0
  72. package/ui/out/_next/static/chunks/app/contracts/page-9361399f80e19ab7.js +1 -0
  73. package/ui/out/_next/static/chunks/app/contracts/page-afebd14c1ae73ec9.js +1 -0
  74. package/ui/out/_next/static/chunks/app/contracts/page-b0f74db982762c7e.js +1 -0
  75. package/ui/out/_next/static/chunks/app/contracts/page-d88227b11f5ac4f6.js +1 -0
  76. package/ui/out/_next/static/chunks/app/contracts/page-e454dad9b03f36df.js +1 -0
  77. package/ui/out/_next/static/chunks/app/contracts/page-f269686063be5d4b.js +1 -0
  78. package/ui/out/_next/static/chunks/app/layout-0bf0ed51d0d1d3e8.js +1 -0
  79. package/ui/out/_next/static/chunks/app/layout-56f011c6a6b2930f.js +1 -0
  80. package/ui/out/_next/static/chunks/app/layout-7422dc714ea7b763.js +1 -0
  81. package/ui/out/_next/static/chunks/app/layout-88938a963d68eb45.js +1 -0
  82. package/ui/out/_next/static/chunks/app/layout-a1d424de4fc1d283.js +1 -0
  83. package/ui/out/_next/static/chunks/app/layout-add77f8e78dbfbf5.js +1 -0
  84. package/ui/out/_next/static/chunks/app/layout-c087511efc77c1ef.js +1 -0
  85. package/ui/out/_next/static/chunks/app/layout-eaaaddaebabc1e84.js +1 -0
  86. package/ui/out/_next/static/chunks/app/layout-ecbbc3f527378bf4.js +1 -0
  87. package/ui/out/_next/static/chunks/app/layout-f8c5fec65e6ca0ff.js +1 -0
  88. package/ui/out/_next/static/chunks/app/mining/page-14579efdb2e8f6c3.js +1 -0
  89. package/ui/out/_next/static/chunks/app/mining/page-1e273a4949e2b650.js +1 -0
  90. package/ui/out/_next/static/chunks/app/mining/page-2d151bdd475474f6.js +1 -0
  91. package/ui/out/_next/static/chunks/app/mining/page-43cfe0d01f696e96.js +1 -0
  92. package/ui/out/_next/static/chunks/app/mining/page-4ab3daab428e05f1.js +1 -0
  93. package/ui/out/_next/static/chunks/app/mining/page-64c88d55a5788e20.js +1 -0
  94. package/ui/out/_next/static/chunks/app/mining/page-79e2f952fc54ff89.js +1 -0
  95. package/ui/out/_next/static/chunks/app/mining/page-8305d73847b829c9.js +1 -0
  96. package/ui/out/_next/static/chunks/app/mining/page-ab0458f12921230c.js +1 -0
  97. package/ui/out/_next/static/chunks/app/mining/page-ac2a555e62327efe.js +1 -0
  98. package/ui/out/_next/static/chunks/app/mining/page-bb3068075a8088dd.js +1 -0
  99. package/ui/out/_next/static/chunks/app/mining/page-d4bad0ff79dd463a.js +1 -0
  100. package/ui/out/_next/static/chunks/app/network/page-3d5fbcf1eb37e0c5.js +1 -0
  101. package/ui/out/_next/static/chunks/app/network/page-4b692d29a3e609a8.js +1 -0
  102. package/ui/out/_next/static/chunks/app/network/page-5e33fbeb3a40de20.js +1 -0
  103. package/ui/out/_next/static/chunks/app/network/page-62a4488ea3bc2526.js +1 -0
  104. package/ui/out/_next/static/chunks/app/network/page-97cebccc451eb5c6.js +1 -0
  105. package/ui/out/_next/static/chunks/app/network/page-a50ebf9988b322b5.js +1 -0
  106. package/ui/out/_next/static/chunks/app/network/page-d7c0ceaa242f38f9.js +1 -0
  107. package/ui/out/_next/static/chunks/app/network/page-e152fafa7a4d7361.js +1 -0
  108. package/ui/out/_next/static/chunks/app/network/page-eea297c1ae180bda.js +1 -0
  109. package/ui/out/_next/static/chunks/app/network/page-f3c51db982b5a388.js +1 -0
  110. package/ui/out/_next/static/chunks/app/network/page-f51d9ab619db1c20.js +1 -0
  111. package/ui/out/_next/static/chunks/app/network/page-f6b4c10c7d87957f.js +1 -0
  112. package/ui/out/_next/static/chunks/app/page-165b6a1747a64947.js +1 -0
  113. package/ui/out/_next/static/chunks/app/page-348c96e8d45c2559.js +1 -0
  114. package/ui/out/_next/static/chunks/app/page-3632f4f09f69c905.js +1 -0
  115. package/ui/out/_next/static/chunks/app/page-36afbe5e1cb8094f.js +1 -0
  116. package/ui/out/_next/static/chunks/app/page-557bd6270c5ad579.js +1 -0
  117. package/ui/out/_next/static/chunks/app/page-6d79f31ac0288bac.js +1 -0
  118. package/ui/out/_next/static/chunks/app/page-71fcaf2853c53e30.js +1 -0
  119. package/ui/out/_next/static/chunks/app/page-90d8520902c1a7b0.js +1 -0
  120. package/ui/out/_next/static/chunks/app/page-c430d30cb894c926.js +1 -0
  121. package/ui/out/_next/static/chunks/app/page-ce0f985468520dbc.js +1 -0
  122. package/ui/out/_next/static/chunks/app/page-f0dced734181e611.js +1 -0
  123. package/ui/out/_next/static/chunks/app/page-f27633bfbc515249.js +1 -0
  124. package/ui/out/_next/static/chunks/app/page-f7be59ea4e13f436.js +1 -0
  125. package/ui/out/_next/static/chunks/app/wallet/page-11fb46a5f4a8b0be.js +1 -0
  126. package/ui/out/_next/static/chunks/app/wallet/page-26003843604c7c8c.js +1 -0
  127. package/ui/out/_next/static/chunks/app/wallet/page-7041ba96cf94b9d6.js +1 -0
  128. package/ui/out/_next/static/chunks/app/wallet/page-716e9207662cbb13.js +1 -0
  129. package/ui/out/_next/static/chunks/app/wallet/page-74cdd3297d391701.js +1 -0
  130. package/ui/out/_next/static/chunks/app/wallet/page-766c3286d7fc1fbb.js +1 -0
  131. package/ui/out/_next/static/chunks/app/wallet/page-a3e3f3f091deed13.js +1 -0
  132. package/ui/out/_next/static/chunks/app/wallet/page-fb7030a6672345f4.js +1 -0
  133. package/ui/out/_next/static/chunks/app/wallet/page-feeafe9afcd3702d.js +1 -0
  134. package/ui/out/_next/static/chunks/framework-bef83a85c94ff7de.js +1 -0
  135. package/ui/out/_next/static/chunks/main-764c1d152dd64cdb.js +1 -0
  136. package/ui/out/_next/static/chunks/main-app-565ce517a559065d.js +1 -0
  137. package/ui/out/_next/static/chunks/pages/_app-32ee63fa91347547.js +1 -0
  138. package/ui/out/_next/static/chunks/pages/_error-79ee453ce9bad74d.js +1 -0
  139. package/ui/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  140. package/ui/out/_next/static/chunks/webpack-ea02740f160b546a.js +1 -0
  141. package/ui/out/_next/static/css/0f4a493f8c2c55db.css +3 -0
  142. package/ui/out/_next/static/css/4169c0d861da624d.css +3 -0
  143. package/ui/out/_next/static/css/42c642225833b63d.css +3 -0
  144. package/ui/out/_next/static/css/4ec6b37afd49be73.css +3 -0
  145. package/ui/out/_next/static/css/6a8f3e28ef1137c2.css +3 -0
  146. package/ui/out/_next/static/css/6bbaea3800a74df9.css +3 -0
  147. package/ui/out/_next/static/css/73f87001fc8b2a52.css +3 -0
  148. package/ui/out/_next/static/css/90ccf9db21744740.css +3 -0
  149. package/ui/out/_next/static/css/9f0d4e440a0f0806.css +3 -0
  150. package/ui/out/_next/static/css/b1a2c26b7bd10f8d.css +3 -0
  151. package/ui/out/_next/static/css/c97b9630f605a98b.css +3 -0
  152. package/ui/out/_next/static/css/e5751e31c7620a6e.css +3 -0
  153. package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_buildManifest.js +1 -0
  154. package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_ssgManifest.js +1 -0
  155. package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_buildManifest.js +1 -0
  156. package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_ssgManifest.js +1 -0
  157. package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_buildManifest.js +1 -0
  158. package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_ssgManifest.js +1 -0
  159. package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_buildManifest.js +1 -0
  160. package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_ssgManifest.js +1 -0
  161. package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_buildManifest.js +1 -0
  162. package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_ssgManifest.js +1 -0
  163. package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_buildManifest.js +1 -0
  164. package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_ssgManifest.js +1 -0
  165. package/ui/out/accounts/index.html +1 -0
  166. package/ui/out/accounts/index.txt +9 -0
  167. package/ui/out/contracts/index.html +1 -0
  168. package/ui/out/contracts/index.txt +9 -0
  169. package/ui/out/index.html +1 -0
  170. package/ui/out/index.txt +9 -0
  171. package/ui/out/mining/index.html +1 -0
  172. package/ui/out/mining/index.txt +9 -0
  173. package/ui/out/network/index.html +1 -0
  174. package/ui/out/network/index.txt +9 -0
  175. package/ui/out/wallet/index.html +1 -0
  176. package/ui/out/wallet/index.txt +9 -0
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # conflux-devkit
2
+
3
+ Local Conflux development environment — instant local node with a web dashboard.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx conflux-devkit
9
+ ```
10
+
11
+ Opens the dashboard at **http://localhost:7748** and starts a local `@xcfx/node`
12
+ Conflux node automatically.
13
+
14
+ ## Options
15
+
16
+ ```
17
+ conflux-devkit [options]
18
+
19
+ -p, --port <port> Dashboard port (default: 7748)
20
+ --host <address> Network interface to bind on (default: 127.0.0.1)
21
+ Use 0.0.0.0 to expose on all interfaces.
22
+ --api-key <secret> Require Bearer token on all API requests.
23
+ Strongly recommended when --host is not 127.0.0.1.
24
+ --cors-origin <origin> Allowed CORS origin(s), comma-separated.
25
+ --no-open Skip opening the browser automatically.
26
+ -h, --help Show help.
27
+ ```
28
+
29
+ ## Dashboard features
30
+
31
+ | Tab | What you can do |
32
+ |---|---|
33
+ | **Node** | Start / stop / restart the local Conflux node, view live logs |
34
+ | **Accounts** | Browse genesis pre-funded accounts, fund EVM or Core Space addresses, one-click faucet |
35
+ | **Contracts** | Compile and deploy Solidity — choose from 6 built-in templates or paste custom source, call deployed contract functions |
36
+ | **Mining** | Mine N blocks on demand, or set an auto-mining interval (ms) |
37
+ | **Network** | View and update RPC / WebSocket ports and chain IDs |
38
+ | **Wallet** | Configure an encrypted HDKeystore, manage mnemonic, lock / unlock |
39
+
40
+ ### Built-in Solidity templates
41
+
42
+ | Template | Level | What it demonstrates |
43
+ |---|---|---|
44
+ | Counter | Beginner | State variable, increment/decrement, events |
45
+ | BasicNFT | Intermediate | ERC-721, minting, ownership |
46
+ | Voting | Intermediate | Proposals, weighted votes, delegation |
47
+ | Escrow | Intermediate | Two-party payment release with arbiter |
48
+ | MultiSigWallet | Advanced | M-of-N signature threshold, owner management |
49
+ | Registry | Advanced | Key-value store, access control, update logs |
50
+
51
+ ## Local RPC endpoints (default ports)
52
+
53
+ | Protocol | URL |
54
+ |---|---|
55
+ | EVM RPC | `http://localhost:8545` |
56
+ | EVM WebSocket | `ws://localhost:8546` |
57
+ | Core Space RPC | `http://localhost:12537` |
58
+ | Core Space WebSocket | `ws://localhost:12535` |
59
+
60
+ ## Security
61
+
62
+ When running with the default `--host 127.0.0.1` (loopback) no authentication
63
+ is required — only processes on the same machine can connect.
64
+
65
+ When exposing on a network interface (`--host 0.0.0.0`), always set `--api-key`:
66
+
67
+ ```bash
68
+ npx conflux-devkit --host 0.0.0.0 --api-key mysecrettoken
69
+ ```
70
+
71
+ All `/api/*` routes then require:
72
+
73
+ ```
74
+ Authorization: Bearer mysecrettoken
75
+ ```
76
+
77
+ ## Build from source
78
+
79
+ ```bash
80
+ # From the monorepo root
81
+ pnpm --filter conflux-devkit-ui build # compile Next.js UI to devtools/devkit/ui/
82
+ pnpm --filter conflux-devkit build # bundle server + CLI to devtools/devkit/dist/
83
+
84
+ # Run locally
85
+ node devtools/devkit/dist/cli.js
86
+ ```
87
+
88
+ ## WebSocket events
89
+
90
+ The server emits real-time events over WebSocket at `ws://localhost:<port>/ws`.
91
+ All messages are JSON with a `type` field:
92
+
93
+ | Event | Payload |
94
+ |---|---|
95
+ | `node:log` | `{ line: string }` — raw node log output |
96
+ | `node:status` | `{ running: boolean, pid?: number }` — node lifecycle change |
97
+ | `node:mined` | `{ blocks: number, hash: string }` — blocks mined |
98
+
99
+ ## Environment data
100
+
101
+ Node data (keystore, genesis accounts, chain state) is stored in
102
+ `devtools/devkit/data/` by default. Delete this directory to reset all state.