@clawlabz/clawnetwork 0.1.4 → 0.1.5

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 (3) hide show
  1. package/README.md +24 -2
  2. package/index.ts +3 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,10 +7,32 @@ Official ClawNetwork plugin for OpenClaw Gateway.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- openclaw plugins install @clawlabz/clawnetwork@latest
10
+ openclaw plugins install @clawlabz/clawnetwork@latest --dangerously-force-unsafe-install
11
11
  ```
12
12
 
13
- That's it. Restart your Gateway and a light node starts automatically, joining the mainnet.
13
+ If you get a `Rate limit exceeded` error from ClawHub, install via npm instead:
14
+
15
+ ```bash
16
+ npm pack @clawlabz/clawnetwork@latest && openclaw plugins install ./clawlabz-clawnetwork-*.tgz --dangerously-force-unsafe-install && rm -f clawlabz-clawnetwork-*.tgz
17
+ ```
18
+
19
+ > **Why the flag?** This plugin manages a blockchain node as a child process (`child_process`), which triggers OpenClaw's built-in code scanner. The flag confirms you trust this package. This is safe — the plugin only spawns the official `claw-node` binary and binds to localhost.
20
+
21
+ Restart your Gateway and a light node starts automatically, joining the mainnet.
22
+
23
+ ## Update
24
+
25
+ ```bash
26
+ openclaw plugins uninstall clawnetwork
27
+ openclaw plugins install @clawlabz/clawnetwork@latest --dangerously-force-unsafe-install
28
+ ```
29
+
30
+ If ClawHub is rate-limited, use the npm one-liner above.
31
+
32
+ > **Your wallet and node data are safe.** Uninstall only removes the plugin code (`~/.openclaw/extensions/clawnetwork/`). Your wallet (`~/.openclaw/workspace/clawnetwork/wallet.json`), chain data, and node config are untouched.
33
+ >
34
+ > Once [openclaw#60140](https://github.com/openclaw/openclaw/pull/60140) is merged, a single command will work:
35
+ > `openclaw plugins update clawnetwork --dangerously-force-unsafe-install`
14
36
 
15
37
  ## What happens on first start
16
38
 
package/index.ts CHANGED
@@ -733,9 +733,9 @@ async function autoRegisterAgent(cfg: PluginConfig, wallet: WalletData, api: Ope
733
733
  // Mining: Auto Miner Registration + Heartbeat Loop
734
734
  // ============================================================
735
735
 
736
- // Heartbeat interval: MINER_GRACE_BLOCKS is 2000, at 3s/block = ~6000s.
737
- // Send heartbeat every ~1000 blocks (~50 min) to stay well within grace period.
738
- const MINER_HEARTBEAT_INTERVAL_MS = 50 * 60 * 1000 // 50 minutes
736
+ // V2 heartbeat: chain requires 100 blocks × 3s = 300s minimum between heartbeats.
737
+ // Use 310s to provide margin for block time variance.
738
+ const MINER_HEARTBEAT_INTERVAL_MS = 310 * 1000 // 310 seconds (~5.2 minutes)
739
739
  let minerHeartbeatTimer: unknown = null
740
740
 
741
741
  async function autoRegisterMiner(cfg: PluginConfig, wallet: WalletData, api: OpenClawApi): Promise<void> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawlabz/clawnetwork",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Run a ClawNetwork blockchain node inside OpenClaw. Every agent is a blockchain node.",
5
5
  "type": "module",
6
6
  "license": "MIT",