@offckb/cli 0.4.8 → 0.4.9-canary-2b6b3af.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 +40 -0
- package/build/index.js +1553 -202
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,7 @@ Options:
|
|
|
70
70
|
|
|
71
71
|
Commands:
|
|
72
72
|
node [CKB-Version] Use the CKB to start devnet
|
|
73
|
+
node stop Stop the running CKB devnet daemon
|
|
73
74
|
create [options] [project-name] Create a new CKB Smart Contract project in JavaScript.
|
|
74
75
|
deploy [options] Deploy contracts to different networks, only supports devnet and testnet
|
|
75
76
|
debug [options] Quickly debug transaction with tx-hash
|
|
@@ -81,6 +82,7 @@ Commands:
|
|
|
81
82
|
transfer-all [options] [toAddress] Transfer All CKB tokens to address, only devnet and testnet
|
|
82
83
|
balance [options] [toAddress] Check account balance, only devnet and testnet
|
|
83
84
|
debugger Port of the raw CKB Standalone Debugger
|
|
85
|
+
status [options] Show ckb-tui status interface
|
|
84
86
|
config <action> [item] [value] do a configuration action
|
|
85
87
|
help [command] display help for command
|
|
86
88
|
```
|
|
@@ -118,6 +120,40 @@ offckb node --binary-path /path/to/your/ckb/binary
|
|
|
118
120
|
|
|
119
121
|
When using `--binary-path`, it will ignore the specified version and network, and only work for devnet.
|
|
120
122
|
|
|
123
|
+
**Run in Daemon Mode**
|
|
124
|
+
|
|
125
|
+
Start the devnet in the background so your terminal stays free:
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
offckb node --daemon
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The daemon writes its logs and PID to the devnet data folder, for example:
|
|
132
|
+
|
|
133
|
+
- Logs: `~/Library/Application Support/offckb-nodejs/devnet/data/logs/daemon.log`
|
|
134
|
+
- PID file: `~/Library/Application Support/offckb-nodejs/devnet/data/logs/daemon.pid`
|
|
135
|
+
|
|
136
|
+
Stop the daemon later with:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
offckb node stop
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Agent-Friendly JSON Output**
|
|
143
|
+
|
|
144
|
+
For programmatic consumption or agent integration, add `--json` to any command to emit structured JSON logs:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
offckb node --json
|
|
148
|
+
offckb node --daemon --json
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Each log line is a single JSON object:
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{"level":"info","message":"Launching CKB devnet Node...","timestamp":"2026-07-07T07:10:00.000Z"}
|
|
155
|
+
```
|
|
156
|
+
|
|
121
157
|
**RPC & Proxy RPC**
|
|
122
158
|
|
|
123
159
|
When the Devnet starts:
|
|
@@ -134,6 +170,10 @@ offckb node --network <testnet or mainnet>
|
|
|
134
170
|
```
|
|
135
171
|
Using a proxy RPC server for Testnet/Mainnet is especially helpful for debugging transactions, since failed transactions are dumped automatically.
|
|
136
172
|
|
|
173
|
+
**Watch Network with TUI**
|
|
174
|
+
|
|
175
|
+
Once you start the CKB Node, you can use `offckb status --network devnet/testnet/mainnet` to start a CKB-TUI interface to monitor the CKB network from your node.
|
|
176
|
+
|
|
137
177
|
### 2. Create a New Contract Project {#create-project}
|
|
138
178
|
|
|
139
179
|
Generate a ready-to-use smart-contract project in JS/TS using templates:
|