torchat 0.1.3
torchat: ^0.1.3 copied to clipboard
A gRPC-based anonymous chat node (client / server) built with Dart and Tor/Arti
TorChat Dart SDK, Node & CLI #
A full, cross-platform Tor/Arti-powered instant chat messaging system, with security and anti-censorship in mind, written almost 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 SDK is the reference implementation of the TorChat protocol in pure Dart. (and some rust)
It exposes TorChats's:
Layer | Purpose |
---|---|
Full P2P Node via gRPC | Full power, language-agnostic. Auto-generated protobuf docs & stubs. |
Dart SDK | High-level classes (TorChatClient , TorChatRelay , GroupChat , …) to assist developers create software with TorChat. |
CLI | Idealy for simple usage and some basic-level automated shell invoked needs. |
Perfect for bots, CLIs, desktop apps, or building more on top of the protocol such as useful decentralised bots. You can read more about that in the documentation.
🚀 Features #
- Multi-Platform – runs on any device ✔
- Automatic Tor/Arti –
dart run torchat:node
launches a TorChat node and supports the network ✔ - gRPC over onion – multiplexed, binary, schema-safe, anonymous and encrypted transport of your data ✔
- Envelope store-and-forward – offline delivery with spam-PoW ✔
- Group Chats – semi-federated membership & signed admin events ✔
- Identity Graph – user profiles + attestations + reputation ✔
- Pluggable back-end – swap LMDB ⇄ Hive ⇄ SQLite with one flag ✔
📦 Installation #
# 1. Install Dart ≥ 3.4
# 2. Install TorChat globally
dart pub global activate torchat
# 3. Run a node
torchat run
First launch will:
- Generate an Ed25519 keypair in which the messages you recieve will be encrypted against.
- Start Tor and establish circuits securely.
- Sync seed-peers, but will take preference over cooperating with other peers and begin relaying, reducing the dependanced of seednodes which are in a lot of ways centralizing the network.
📚 gRPC & Protobuf Docs #
- Protos live in
/proto
and are versioned in this repo. make protodocs
autogenerates HTML docs for every RPC & message.- Language stubs:
dart run build_runner
(Dart) orbuf generate
(all major languages).
🛠️ Dart SDK snippet #
import 'package:torchat/torchat.dart';
void main() async {
final node = await TorChat.bootstrap(); // starts Tor + gRPC
final client = node.client;
await client.sendMessage(
recipientPk: '<hex>',
text: 'Hello, dark net!',
);
client.onMessage.listen((msg) {
print('${msg.senderShort}: ${msg.text}');
});
}
🗺 Roadmap #
Phase | Goal | ETA |
---|---|---|
v0.1 | MVP relay + direct messages | ✅ now |
v0.2 | Group chats + signed admin events | Jun 2025 |
v0.3 | Mobile Flutter wrapper | Q3 2025 |
v1.0 | Plugin marketplace, file transfer, sticker packs | Q1 2026 |
v2.0 | We will develop it with the option to create a full blown social media platform, if enough people use it. |
🤝 Contributing #
git clone https://foss.haveno.com/tor-project/dart-torchat
dart pub get
dart test
- PRs welcome — keep commits sign-off (
-s
) for DCO.
🛡 License #
Apache-2.0