> DOCUMENTATION_v2.0

Documentation

Finish reading here and you will know how to keep an agent alive on-chain.

Quick Start

πŸš€

Run a local node

Run a COC node in one line via the npm skill (recommended)

npm install -g @chainofclaw/coc-node
coc-node install dev
Source build (advanced)
cd node
npm install
npm start
πŸ“œ

Deploy contracts

Deploy PoSe smart contracts

cd contracts
npm install
npm run compile
npm run deploy:local
🌐

Launch the explorer

Run the block explorer

cd explorer
npm install
npm run dev

Core Documents

πŸ“„ Whitepaper v0.2

COC design rationale, foundational services, PoSe v2 protocol, economic model

πŸ—οΈ System Architecture

Four-layer design, component interactions, data flows, scalability

πŸ”¬ Core Algorithms

PoSe challenge protocol, scoring formulas, witness selection, storage proofs

πŸ›‘οΈ Anti-Sybil

Sybil defense combination, bond mechanics, fault proofs

Developer Guides

βš™οΈ

Node Operations

  • βœ“Install and configure
  • βœ“Run devnet (3/5/7 nodes)
  • βœ“Monitoring and maintenance
  • βœ“Troubleshooting
πŸ“

Smart Contracts

  • βœ“Solidity contracts
  • βœ“PoSe / DID / SoulRegistry interfaces
  • βœ“Deployment and verification
  • βœ“Testing best practices
πŸ”Œ

RPC API Reference

  • βœ“Standard Ethereum RPC (77+)
  • βœ“COC custom methods (coc_*)
  • βœ“WebSocket subscriptions
  • βœ“Txpool queries
πŸ€–

Agent Operations

  • βœ“OpenClaw integration
  • βœ“Automated monitoring
  • βœ“Policy engine config
  • βœ“Security best practices

Implementation Status

Chain engine🟒 Complete

Block production, mempool, snapshots, finality

P2P network🟒 Complete

HTTP gossip + TCP Wire + Kademlia DHT, BFT dual transport, per-peer dedup

EVM execution🟒 Complete

EthereumJS + revm dual pipeline, Cancun/EIP-4844, LevelDB

JSON-RPC🟒 Complete

77+ standard methods, BigInt serialization, structured error codes

WebSocket RPC🟒 Complete

eth_subscribe, real-time events

PoSe protocol🟒 Complete (v1 + v2)

PoSeManagerV2, EIP-712, witness selection, fault proofs, Merkle reward tree, 9-layer receipt validation

Storage layer🟒 Complete

IPFS-compatible HTTP API + CidRegistry

Runtime services🟑 In progress

coc-node, coc-agent, coc-relayer integration

Test coverage🟒 Healthy

1300+ tests, 100+ files across node / services / runtime / contracts / extensions

See the project README for the full implementation status

View on GitHub

Developer Tools

πŸ’Ό CLI Wallet

Command-line wallet tool

  • β–ΈCreate addresses
  • β–ΈTransfers
  • β–ΈBalance queries

πŸ” Block Explorer

Full-featured web explorer

  • β–ΈBlock / tx lookup
  • β–ΈContract calls
  • β–ΈStorage scanner
Open tool β†’β†’

πŸ§ͺ Test Scripts

Quality-assurance tools

  • β–ΈUnit tests
  • β–ΈIntegration tests
  • β–ΈE2E tests