From 65402ae45dfc97d2642c0839a8af970c0509c21f Mon Sep 17 00:00:00 2001 From: StillHammer Date: Sun, 1 Feb 2026 10:18:21 +0800 Subject: [PATCH] Add CLAUDE.md project context --- CLAUDE.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..817fcc3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,51 @@ +# Claude - blockchain-cli + +## Projet +Rust CLI pour interagir avec le blockchain node via REST API. +Partie d'un ecosysteme de 3 repos. + +## Architecture +``` +blockchain-cli/ +└── src/ + ├── main.rs # Clap parsing + dispatch + ├── commands/ # Subcommands: wallet, tx, mining, blocks, node + ├── client.rs # NodeClient (reqwest HTTP) + ├── display.rs # Colored output (owo-colors + comfy-table) + ├── config.rs # Node URL, wallet dir + └── error.rs # anyhow errors +``` + +## Design +- **Zero lib dependency** : communique UNIQUEMENT via HTTP avec le node +- **clap 4 derive** pour le parsing CLI +- **reqwest** pour HTTP +- **owo-colors + comfy-table** pour output formaté + +## Commands +``` +blockchain-cli wallet create +blockchain-cli wallet balance
+blockchain-cli tx send +blockchain-cli tx pending +blockchain-cli mine +blockchain-cli block list [--limit N] +blockchain-cli block get +blockchain-cli chain info +blockchain-cli chain validate +--node (default: http://localhost:3000) +``` + +## Commandes dev +```bash +cargo build --release +cargo run -- chain info +cargo clippy +``` + +## Repos liés +- blockchain-core (le node qu'on interroge) +- blockchain-flutter (même API) + +## Gitea +https://git.etheryale.com/StillHammer/blockchain-cli