@cfxdevkit/devnode 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 ADDED
@@ -0,0 +1,35 @@
1
+ # @cfxdevkit/devnode
2
+
3
+ Programmatic wrapper around `@xcfx/node` for running a local Conflux Core + eSpace dev environment.
4
+
5
+ ## What's inside
6
+
7
+ - `ServerManager` — start/stop the local node, mine blocks, fund accounts
8
+ - Configuration defaults tuned for the DevKit workspace (chainId 2029, evmChainId 2030)
9
+ - Helpers for mining, genesis accounts, and RPC URL resolution
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { ServerManager } from '@cfxdevkit/devnode';
15
+
16
+ const node = new ServerManager();
17
+ await node.start();
18
+
19
+ const accounts = node.getAccounts(); // pre-funded genesis accounts
20
+ await node.mine(5); // mine 5 blocks
21
+ await node.startMining(500); // auto-mine every 500 ms
22
+ await node.stop();
23
+ ```
24
+
25
+ ## Running
26
+
27
+ ```bash
28
+ pnpm --filter @cfxdevkit/devnode build
29
+ pnpm --filter @cfxdevkit/devnode test
30
+ ```
31
+
32
+ ## When to use
33
+
34
+ Import `ServerManager` from `@cfxdevkit/devnode` to control a local Conflux node in automated tests,
35
+ CI pipelines, or from the `conflux-devkit` backend.