Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/accounts-show-private-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@offckb/cli': patch
---

- accounts: print the built-in dev private keys by default on a local devnet; add `--hide-private-keys` to omit them. Mainnet forks still hide keys unless `--show-private-keys` is passed (#520)
5 changes: 5 additions & 0 deletions .changeset/daemon-stop-spaced-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@offckb/cli': patch
---

- daemon: identify a running offckb daemon by anchoring the node executable and CLI script path in the process command line, so `offckb node stop` works when the CLI path contains spaces (e.g. macOS `~/Library/Application Support/...`)
11 changes: 11 additions & 0 deletions .changeset/fix-config-save-failure-and-corrupt-protection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@offckb/cli': patch
---

Fix #518: Propagate settings read/write failures and prevent overwriting corrupted config files.

- Configuration mutation commands (`offckb config set` and `offckb config rm`) now perform strict reading (`readSettingsStrict`). If `settings.json` cannot be read, parsed, or validated, the modification aborts immediately, throwing an Error with the file path and reason while leaving the existing file contents intact.
- Missing configuration files (ENOENT) continue to fall back to default settings, allowing initial creation.
- Non-mutating `readSettings()` continues to fall back to default settings on exceptions, preserving existing read-only behavior across the project.
- `writeSettings` now writes atomically to a unique temporary file in the same directory and replaces the target via `renameSync`, cleaning up temporary files on error.
- `writeSettings` throws an Error containing the config file path and underlying error instead of swallowing it, allowing the CLI error handling to exit with a non-zero exit code and emit structured `ok: false` in JSON mode.
5 changes: 5 additions & 0 deletions .changeset/fix-orphan-miner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@offckb/cli': patch
---

- node: stop the CKB node and miner when offckb exits through SIGTERM, SIGHUP, a crash or `process.exit`, and stop stale `ckb miner -C <devnet>` processes orphaned by an earlier run before starting the devnet (#512)
5 changes: 5 additions & 0 deletions .changeset/fix-script-debug-log-filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@offckb/cli': patch
---

- devnet logs: accept real CKB contract debug logs with `ckb_script::verify` target containing `DEBUG OUTPUT:` (#513)
6 changes: 6 additions & 0 deletions .changeset/fix-set-validation-and-daemon-locale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@offckb/cli': patch
---

- devnet config: include field name, rejected value, and original validation reason when `--set` validation fails (#516)
- daemon: run posix `ps` process probes with `LC_ALL=C` so daemon start time parsing succeeds under non-English locales (#519)
5 changes: 5 additions & 0 deletions .changeset/udt-destroy-full-balance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@offckb/cli': patch
---

- sdk: allow destroying the full UDT balance while keeping a zero-balance UDT cell (#517)
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,13 @@ LOG_LEVEL=debug offckb node
On a pure OffCKB devnet, OffCKB comes with 20 pre-funded accounts, each initialized with `42_000_000_00000000` capacity in the genesis block. A fork keeps the source chain genesis and therefore has no OffCKB genesis allocation; built-in dev accounts are funded by locally mined cellbase cells instead.

```sh
offckb accounts
offckb accounts --show-private-keys # trusted local terminals only
offckb accounts # prints address, private key, pubkey and lock script
offckb accounts --hide-private-keys # omit private keys, e.g. when output goes to logs
```

On a Mainnet fork, `accounts` re-encodes the same dev lock scripts with the `ckb` address prefix. Once the Indexer is caught up it also reports each account's spendable pure-CKB balance; until then the field is omitted with a warning. Private keys are hidden by default so JSON and agent logs do not collect them.
The built-in accounts are public test keys, so `accounts` prints their private keys by default (also in `--json` output).

On a Mainnet fork, `accounts` re-encodes the same dev lock scripts with the `ckb` address prefix, so private keys are hidden by default there; pass `--show-private-keys` (trusted local terminals only) to print them. Once the Indexer is caught up it also reports each account's spendable pure-CKB balance; until then the field is omitted with a warning.

- All private keys are stored in the `account/keys` file.
- Detailed information for each account is recorded in `account/account.json`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"commander": "^12.0.0",
"http-proxy": "^1.18.1",
"https-proxy-agent": "^7.0.5",
"js-yaml": "4.3.1",
"js-yaml": "5.4.1",
"node-fetch": "2",
"semver": "^7.6.0",
"tar": "^7.5.19",
Expand Down
Loading
Loading