@clawlabz/clawnetwork 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 +143 -0
- package/index.ts +1545 -0
- package/openclaw.plugin.json +63 -0
- package/package.json +55 -0
- package/skills/clawnetwork.md +43 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "clawnetwork",
|
|
3
|
+
"name": "ClawNetwork Node",
|
|
4
|
+
"description": "Run a ClawNetwork blockchain node inside OpenClaw. Every agent is a node.",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"network": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": ["mainnet", "testnet", "devnet"],
|
|
13
|
+
"default": "mainnet"
|
|
14
|
+
},
|
|
15
|
+
"autoStart": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"default": true
|
|
18
|
+
},
|
|
19
|
+
"autoDownload": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"default": true
|
|
22
|
+
},
|
|
23
|
+
"autoRegisterAgent": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"default": true
|
|
26
|
+
},
|
|
27
|
+
"rpcPort": {
|
|
28
|
+
"type": "number",
|
|
29
|
+
"default": 9710
|
|
30
|
+
},
|
|
31
|
+
"p2pPort": {
|
|
32
|
+
"type": "number",
|
|
33
|
+
"default": 9711
|
|
34
|
+
},
|
|
35
|
+
"syncMode": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": ["full", "fast", "light"],
|
|
38
|
+
"default": "full"
|
|
39
|
+
},
|
|
40
|
+
"healthCheckSeconds": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"default": 30
|
|
43
|
+
},
|
|
44
|
+
"uiPort": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"default": 19877
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"skills": ["skills/clawnetwork.md"],
|
|
51
|
+
"uiHints": {
|
|
52
|
+
"network": {
|
|
53
|
+
"label": "Network",
|
|
54
|
+
"placeholder": "mainnet"
|
|
55
|
+
},
|
|
56
|
+
"autoStart": {
|
|
57
|
+
"label": "Auto-start node when Gateway launches"
|
|
58
|
+
},
|
|
59
|
+
"syncMode": {
|
|
60
|
+
"label": "Sync Mode (light recommended for agents)"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@clawlabz/clawnetwork",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Run a ClawNetwork blockchain node inside OpenClaw. Every agent is a blockchain node.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "ClawLabz"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/clawlabz/claw-network",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/clawlabz/claw-network.git",
|
|
14
|
+
"directory": "clawnetwork-openclaw"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/clawlabz/claw-network/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"clawnetwork",
|
|
21
|
+
"openclaw",
|
|
22
|
+
"blockchain",
|
|
23
|
+
"agent",
|
|
24
|
+
"node",
|
|
25
|
+
"web3"
|
|
26
|
+
],
|
|
27
|
+
"private": false,
|
|
28
|
+
"main": "./index.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"index.ts",
|
|
31
|
+
"openclaw.plugin.json",
|
|
32
|
+
"skills/",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@clawlabz/clawnetwork-sdk": "^0.1.0"
|
|
37
|
+
},
|
|
38
|
+
"openclaw": {
|
|
39
|
+
"extensions": [
|
|
40
|
+
"./index.ts"
|
|
41
|
+
],
|
|
42
|
+
"install": {
|
|
43
|
+
"npmSpec": "@clawlabz/clawnetwork",
|
|
44
|
+
"defaultChoice": "npm"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "echo 'no build step'",
|
|
52
|
+
"lint": "node -e \"process.exit(0)\"",
|
|
53
|
+
"test": "node -e \"process.exit(0)\""
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clawnetwork
|
|
3
|
+
description: Interact with ClawNetwork blockchain — check balances, transfer CLAW, register agent identity, discover services
|
|
4
|
+
user-invocable: true
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
requires:
|
|
8
|
+
bins: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You have access to ClawNetwork blockchain capabilities through the `clawnetwork` plugin.
|
|
12
|
+
|
|
13
|
+
## Available Operations
|
|
14
|
+
|
|
15
|
+
### Check node status
|
|
16
|
+
Call `clawnetwork.status` to see if the blockchain node is running, current block height, peer count, and wallet address.
|
|
17
|
+
|
|
18
|
+
### Check balance
|
|
19
|
+
Call `clawnetwork.balance` with optional `address` param. Defaults to your own wallet.
|
|
20
|
+
|
|
21
|
+
### Transfer CLAW
|
|
22
|
+
Call `clawnetwork.transfer` with `to` (64-char hex address) and `amount` (in CLAW).
|
|
23
|
+
Always confirm with the user before executing transfers.
|
|
24
|
+
|
|
25
|
+
### Register agent identity
|
|
26
|
+
Call `clawnetwork.agent-register` with optional `name` to register your on-chain identity.
|
|
27
|
+
|
|
28
|
+
### Get testnet CLAW
|
|
29
|
+
Call `clawnetwork.faucet` to receive free CLAW on testnet/devnet.
|
|
30
|
+
|
|
31
|
+
### Register a service
|
|
32
|
+
Call `clawnetwork.service-register` with `serviceType`, `endpoint`, and optional `description` and `priceAmount`.
|
|
33
|
+
|
|
34
|
+
### Search services
|
|
35
|
+
Call `clawnetwork.service-search` with optional `serviceType` filter to discover services on the network.
|
|
36
|
+
|
|
37
|
+
## Important Rules
|
|
38
|
+
|
|
39
|
+
- Never transfer CLAW without explicit user confirmation
|
|
40
|
+
- Always show the full recipient address before transfers
|
|
41
|
+
- Validate addresses are 64-character hex strings
|
|
42
|
+
- Report balances in human-readable format (e.g., "1.5 CLAW" not "1500000000")
|
|
43
|
+
- If the node is offline, suggest running `openclaw clawnetwork start`
|