# TorChat Dart SDK (Full Node)
---- A full, cross-platform **Tor/Arti-powered** TorChat written 100% in Dart. Spin it up on Windows, macOS, Linuxβeven mobile or Raspberry Piβno C tool-chain, no hassle, and most importantly, run a full node on your phone, without too much strain. > **TL;DR** > `dart pub global activate torchat` > `torchat run` > VoilΓ : a fully-functional relay + client with gRPC endpoints and a sweet high-level SDK. --- ## π What Is It? TorChat-Dart is the **reference implementation** of the TorChat protocol in pure Dart. It exposes: | Layer | Purpose | |-------|---------| | **gRPC API** | Full power, language-agnostic. Auto-generated protobuf docs & stubs. | | **Dart SDK** | High-level classes (`TorChatClient`, `TorChatRelay`, `GroupChat`, β¦). | | **Tor/Arti wrapper** | Boots a hidden service automatically; no Tor install required. | Perfect for bots, CLIs, desktop apps, or embedding in Flutter. --- ## π Features * **Multi-platform** β runs anywhere Dart VM runs β * **Automatic Tor/Arti** β `dart run torchat:tor` launches a hidden service for you β * **gRPC over onion** β multiplexed, binary, schema-safe β * **Envelope store-and-forward** β offline delivery with spam-PoW β * **Group chat** β federated membership & signed admin events β * **Identity graph** β user profiles + attestations β * **Pluggable back-end** β swap LMDB β Hive β SQLite with one flag β --- ## π¦ Installation ```bash # 1. Install Dart β₯ 3.4 # 2. Install TorChat globally dart pub global activate torchat # 3. Run a node torchat run ``` First launch will: 1. Generate an Ed25519 keypair. 2. Start Arti & publish `xxxxxx.onion`. 3. Sync seed-peers and begin relaying. --- ## π§ Configuration `torchat.yaml` (auto-created in `$HOME/.torchat/`): ```yaml listen_port: 20900 data_dir: ~/.torchat/data tor: enabled: true socks_port: 9050 # 0 = random storage: backend: hive # hive | sqlite | lmdb pow: difficulty: 20 # leading zero bits ``` Change, save, restart β settings hot-reload. --- ## π gRPC & Protobuf Docs - **Protos** live in [`/proto`](proto/) and are versioned in this repo. - `make protodocs` autogenerates HTML docs for every RPC & message. - Language stubs: `dart run build_runner` (Dart) or `buf generate` (all major languages). ### Quick test with `grpcurl` ```bash grpcurl -plaintext -protoset out/descriptor.pb \ -d '{"value":"