Add CLAUDE.md project context
This commit is contained in:
parent
96b4dfa77b
commit
65402ae45d
51
CLAUDE.md
Normal file
51
CLAUDE.md
Normal file
@ -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 <ADDRESS>
|
||||||
|
blockchain-cli tx send <FROM> <TO> <AMOUNT>
|
||||||
|
blockchain-cli tx pending
|
||||||
|
blockchain-cli mine <MINER_ADDRESS>
|
||||||
|
blockchain-cli block list [--limit N]
|
||||||
|
blockchain-cli block get <HASH>
|
||||||
|
blockchain-cli chain info
|
||||||
|
blockchain-cli chain validate
|
||||||
|
--node <URL> (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
|
||||||
Loading…
Reference in New Issue
Block a user