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.
- package/README.md +102 -0
- package/dist/cli.js +16338 -0
- package/package.json +55 -0
- package/ui/out/404/index.html +1 -0
- package/ui/out/404.html +1 -0
- package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_buildManifest.js +1 -0
- package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_ssgManifest.js +1 -0
- package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_buildManifest.js +1 -0
- package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_ssgManifest.js +1 -0
- package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_buildManifest.js +1 -0
- package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_ssgManifest.js +1 -0
- package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_buildManifest.js +1 -0
- package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_ssgManifest.js +1 -0
- package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_buildManifest.js +1 -0
- package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_ssgManifest.js +1 -0
- package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_buildManifest.js +1 -0
- package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_ssgManifest.js +1 -0
- package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_buildManifest.js +1 -0
- package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_ssgManifest.js +1 -0
- package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_buildManifest.js +1 -0
- package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_ssgManifest.js +1 -0
- package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_buildManifest.js +1 -0
- package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_ssgManifest.js +1 -0
- package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_buildManifest.js +1 -0
- package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_ssgManifest.js +1 -0
- package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_buildManifest.js +1 -0
- package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_ssgManifest.js +1 -0
- package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_buildManifest.js +1 -0
- package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_ssgManifest.js +1 -0
- package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_buildManifest.js +1 -0
- package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_ssgManifest.js +1 -0
- package/ui/out/_next/static/chunks/205-997c9580ac2ccb04.js +1 -0
- package/ui/out/_next/static/chunks/238-baf384d341a98f9f.js +1 -0
- package/ui/out/_next/static/chunks/363-11ecfe8307834c37.js +1 -0
- package/ui/out/_next/static/chunks/363-fd3f659dc66a2545.js +1 -0
- package/ui/out/_next/static/chunks/383-30e544e3db85d4b4.js +1 -0
- package/ui/out/_next/static/chunks/396-0d45f2627ca2432c.js +1 -0
- package/ui/out/_next/static/chunks/396-de3171781a3c5f52.js +1 -0
- package/ui/out/_next/static/chunks/476-1a499832716820dd.js +1 -0
- package/ui/out/_next/static/chunks/5b8f0dd8-7fc232be3e483640.js +1 -0
- package/ui/out/_next/static/chunks/5b8f0dd8-f9bbf8f44d8e6302.js +1 -0
- package/ui/out/_next/static/chunks/606-d510a7806cc50e18.js +1 -0
- package/ui/out/_next/static/chunks/628-ae8f2280d891101c.js +1 -0
- package/ui/out/_next/static/chunks/69-a23845cfa4a23071.js +1 -0
- package/ui/out/_next/static/chunks/706-142eb06ca4e1b468.js +1 -0
- package/ui/out/_next/static/chunks/749-27e561f3f17b1ad3.js +2 -0
- package/ui/out/_next/static/chunks/749-bd8c206e8e58f8b0.js +2 -0
- package/ui/out/_next/static/chunks/781-7af4662532da98ca.js +1 -0
- package/ui/out/_next/static/chunks/815-ab30cec2ff88e700.js +1 -0
- package/ui/out/_next/static/chunks/826-c38d836f8f2bac38.js +1 -0
- package/ui/out/_next/static/chunks/903-2887fe814dfa6d5e.js +1 -0
- package/ui/out/_next/static/chunks/app/_not-found/page-1a3d8ff7bd6fafe6.js +1 -0
- package/ui/out/_next/static/chunks/app/_not-found/page-fe94df087cbbeedb.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-21a02cc8bbbce9cf.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-2bf2eeddfcc46fd2.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-4fb77d9b03c79ef0.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-840e013892222293.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-8828d6c27ee45d5e.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-a5a4d066c57c6eba.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-cd6edb16de77e73a.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-ce44f544affcbb2e.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-f26a4c8967b60c31.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-fc53feb7e5bf6a0b.js +1 -0
- package/ui/out/_next/static/chunks/app/accounts/page-fe5a9daa4d22e115.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-091eba53f5dcb62b.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-265c4f26532b42ce.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-26c527bf8b829de6.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-53e2d2d715f76290.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-56d74025e6315a3d.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-844c9f55a6ec9218.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-88416cc33eabdddb.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-9361399f80e19ab7.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-afebd14c1ae73ec9.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-b0f74db982762c7e.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-d88227b11f5ac4f6.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-e454dad9b03f36df.js +1 -0
- package/ui/out/_next/static/chunks/app/contracts/page-f269686063be5d4b.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-0bf0ed51d0d1d3e8.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-56f011c6a6b2930f.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-7422dc714ea7b763.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-88938a963d68eb45.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-a1d424de4fc1d283.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-add77f8e78dbfbf5.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-c087511efc77c1ef.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-eaaaddaebabc1e84.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-ecbbc3f527378bf4.js +1 -0
- package/ui/out/_next/static/chunks/app/layout-f8c5fec65e6ca0ff.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-14579efdb2e8f6c3.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-1e273a4949e2b650.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-2d151bdd475474f6.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-43cfe0d01f696e96.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-4ab3daab428e05f1.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-64c88d55a5788e20.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-79e2f952fc54ff89.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-8305d73847b829c9.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-ab0458f12921230c.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-ac2a555e62327efe.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-bb3068075a8088dd.js +1 -0
- package/ui/out/_next/static/chunks/app/mining/page-d4bad0ff79dd463a.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-3d5fbcf1eb37e0c5.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-4b692d29a3e609a8.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-5e33fbeb3a40de20.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-62a4488ea3bc2526.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-97cebccc451eb5c6.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-a50ebf9988b322b5.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-d7c0ceaa242f38f9.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-e152fafa7a4d7361.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-eea297c1ae180bda.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-f3c51db982b5a388.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-f51d9ab619db1c20.js +1 -0
- package/ui/out/_next/static/chunks/app/network/page-f6b4c10c7d87957f.js +1 -0
- package/ui/out/_next/static/chunks/app/page-165b6a1747a64947.js +1 -0
- package/ui/out/_next/static/chunks/app/page-348c96e8d45c2559.js +1 -0
- package/ui/out/_next/static/chunks/app/page-3632f4f09f69c905.js +1 -0
- package/ui/out/_next/static/chunks/app/page-36afbe5e1cb8094f.js +1 -0
- package/ui/out/_next/static/chunks/app/page-557bd6270c5ad579.js +1 -0
- package/ui/out/_next/static/chunks/app/page-6d79f31ac0288bac.js +1 -0
- package/ui/out/_next/static/chunks/app/page-71fcaf2853c53e30.js +1 -0
- package/ui/out/_next/static/chunks/app/page-90d8520902c1a7b0.js +1 -0
- package/ui/out/_next/static/chunks/app/page-c430d30cb894c926.js +1 -0
- package/ui/out/_next/static/chunks/app/page-ce0f985468520dbc.js +1 -0
- package/ui/out/_next/static/chunks/app/page-f0dced734181e611.js +1 -0
- package/ui/out/_next/static/chunks/app/page-f27633bfbc515249.js +1 -0
- package/ui/out/_next/static/chunks/app/page-f7be59ea4e13f436.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-11fb46a5f4a8b0be.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-26003843604c7c8c.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-7041ba96cf94b9d6.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-716e9207662cbb13.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-74cdd3297d391701.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-766c3286d7fc1fbb.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-a3e3f3f091deed13.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-fb7030a6672345f4.js +1 -0
- package/ui/out/_next/static/chunks/app/wallet/page-feeafe9afcd3702d.js +1 -0
- package/ui/out/_next/static/chunks/framework-bef83a85c94ff7de.js +1 -0
- package/ui/out/_next/static/chunks/main-764c1d152dd64cdb.js +1 -0
- package/ui/out/_next/static/chunks/main-app-565ce517a559065d.js +1 -0
- package/ui/out/_next/static/chunks/pages/_app-32ee63fa91347547.js +1 -0
- package/ui/out/_next/static/chunks/pages/_error-79ee453ce9bad74d.js +1 -0
- package/ui/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/ui/out/_next/static/chunks/webpack-ea02740f160b546a.js +1 -0
- package/ui/out/_next/static/css/0f4a493f8c2c55db.css +3 -0
- package/ui/out/_next/static/css/4169c0d861da624d.css +3 -0
- package/ui/out/_next/static/css/42c642225833b63d.css +3 -0
- package/ui/out/_next/static/css/4ec6b37afd49be73.css +3 -0
- package/ui/out/_next/static/css/6a8f3e28ef1137c2.css +3 -0
- package/ui/out/_next/static/css/6bbaea3800a74df9.css +3 -0
- package/ui/out/_next/static/css/73f87001fc8b2a52.css +3 -0
- package/ui/out/_next/static/css/90ccf9db21744740.css +3 -0
- package/ui/out/_next/static/css/9f0d4e440a0f0806.css +3 -0
- package/ui/out/_next/static/css/b1a2c26b7bd10f8d.css +3 -0
- package/ui/out/_next/static/css/c97b9630f605a98b.css +3 -0
- package/ui/out/_next/static/css/e5751e31c7620a6e.css +3 -0
- package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_buildManifest.js +1 -0
- package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_ssgManifest.js +1 -0
- package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_buildManifest.js +1 -0
- package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_ssgManifest.js +1 -0
- package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_buildManifest.js +1 -0
- package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_ssgManifest.js +1 -0
- package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_buildManifest.js +1 -0
- package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_ssgManifest.js +1 -0
- package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_buildManifest.js +1 -0
- package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_ssgManifest.js +1 -0
- package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_buildManifest.js +1 -0
- package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_ssgManifest.js +1 -0
- package/ui/out/accounts/index.html +1 -0
- package/ui/out/accounts/index.txt +9 -0
- package/ui/out/contracts/index.html +1 -0
- package/ui/out/contracts/index.txt +9 -0
- package/ui/out/index.html +1 -0
- package/ui/out/index.txt +9 -0
- package/ui/out/mining/index.html +1 -0
- package/ui/out/mining/index.txt +9 -0
- package/ui/out/network/index.html +1 -0
- package/ui/out/network/index.txt +9 -0
- package/ui/out/wallet/index.html +1 -0
- 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.
|