๐น Demo Video
Privacy-first messaging platform built on Starknet using Tongo's zero-knowledge privacy layer and end-to-end encryption.
Built for: Starknet Re{define} Hackathon 2026
Track: Privacy ($9,675 STRK)
Live Demo: https://starknet-hackathon-one.vercel.app
Status: โ
Ready for Submission
AgentSend enables completely private messaging on Starknet by combining:
- ๐ End-to-end encryption (X25519/Curve25519)
- ๐ก๏ธ Tongo privacy layer (ElGamal + ZK proofs)
- ๐ฆ IPFS decentralized storage
- โก Starknet verification (every message is a transaction)
Result: Messages that are encrypted, anonymous, censorship-resistant, and verifiable.
- ๐ E2E Encryption: Messages encrypted with X25519 before leaving your device
- ๐๏ธ Hidden Transactions: Tongo encrypts transfer amounts using ElGamal
- ๐ญ Zero-Knowledge Proofs: Verify transactions without revealing data
- ๐ Decentralized Storage: Messages stored on IPFS (Pinata)
- ๐ On-Chain Verification: Every message is a real Starknet transaction
- ๐ Wallet-Derived Keys: Encryption keys derived from wallet signatures
- ๐ฌ Instant Messaging: Real-time chat interface
- ๐ฑ Responsive Design: Works on desktop and mobile
- ๐ Message History: Local persistence with IndexedDB
- ๐ฐ Balance Management: View Tongo balance and pending funds
- ๐ Conversation List: Manage multiple chats
- โ Delivery Status: Track message sending/delivery
โโโโโโโโโโโโโโโ
โ User A โ
โ (Wallet) โ
โโโโโโโโฌโโโโโโโ
โ
โ 1. Sign message to derive encryption keys
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 2. Encrypt message with User B's pubkeyโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 3. Upload encrypted msg to IPFS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 4. Send Tongo transfer with IPFS CID โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ IPFS โ โ Tongo โ
โ (Pinata) โ โ Contract โ
โ โ โ โ
โ โข Stores โ โ โข ElGamal โ
โ encrypted โ โ encrypted โ
โ messages โ โ amounts โ
โ โข Returns โ โ โข ZK proofs โ
โ CID โ โ โข Transfer โ
โโโโโโโโโโโโโโโ โ metadata โ
โ โโโโโโโโฌโโโโโโโ
โ โ
โ โ
โ 5. User B receives notification โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 6. Fetch encrypted msg from IPFS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 7. Decrypt with private key โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโ
โ User B โ
โ (Wallet) โ
โโโโโโโโโโโโโโโ
- Node.js 18+ and npm
- ArgentX or Braavos wallet (Sepolia testnet)
- Sepolia ETH from Starknet Faucet
# Clone the repository
git clone https://github.com/decentrathai/agentsend
cd agentsend
# Install dependencies
npm install
# Set up environment variables
cd packages/frontend
cp .env.example .env.local
# Edit .env.local with your Pinata credentials (optional for demo)
# NEXT_PUBLIC_PINATA_JWT=your_jwt_here
# Start development server
npm run dev- Connect Wallet: Click "Connect Wallet" and approve in ArgentX/Braavos
- Initialize Keys: Click "Initialize Keys" to generate encryption keypair
- Send Message:
- Enter recipient address (0x...)
- Type your message
- Click "Send"
- View History: All messages are saved locally and encrypted
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Zustand - State management
- Starknet - Layer 2 scaling solution
- starknet.js v8 - Starknet JavaScript library
- @starknet-react/core - React hooks for Starknet
- Tongo SDK - Privacy-preserving transfers
- TweetNaCl - X25519 encryption (Curve25519)
- Starknet Signatures - Deterministic key derivation
- IPFS (Pinata) - Decentralized file storage
- localStorage - Local message persistence
starknet-hackathon/
โโโ packages/
โ โโโ frontend/ # Next.js application
โ โ โโโ src/
โ โ โ โโโ app/ # Pages (home, chat)
โ โ โ โโโ components/ # React components
โ โ โ โ โโโ ChatInterface.tsx
โ โ โ โโโ hooks/ # Custom React hooks
โ โ โ โ โโโ useWallet.ts
โ โ โ โ โโโ useTongo.ts
โ โ โ โ โโโ useIPFS.ts
โ โ โ โ โโโ useEncryptionKeys.ts
โ โ โ โ โโโ useMessages.ts
โ โ โ โโโ lib/ # Utilities
โ โ โ โ โโโ encryption.ts
โ โ โ โโโ config/ # Configuration
โ โ โ โ โโโ tongo.ts
โ โ โ โโโ providers/ # React context providers
โ โ โ โโโ StarknetProvider.tsx
โ โ โโโ package.json
โ โโโ backend/ # Future: Indexer service
โ โโโ common/ # Shared types
โโโ README.md # This file
โโโ PHASE2-COMPLETE.md # Phase 2 completion report
โโโ package.json # Root workspace config
-
Key Generation:
- User signs a deterministic message with their wallet
- Signature is hashed to generate 32-byte seed
- Seed used to create X25519 keypair (public + private)
- Public key published, private key stays local
-
Message Encryption:
- Fetch recipient's public key from registry
- Generate random nonce (24 bytes)
- Encrypt message using X25519 box (XSalsa20-Poly1305)
- Result: ciphertext that only recipient can decrypt
-
Storage:
- Encrypted message uploaded to IPFS
- IPFS returns content ID (CID)
- CID included in Tongo transaction metadata
-
Tongo Privacy:
- Tiny transfer (1 wei) as message carrier
- Amount encrypted with ElGamal
- Zero-knowledge proof validates transfer
- Metadata (IPFS CID) visible but content encrypted
What's Hidden?
- โ Message content (E2E encrypted)
- โ Transfer amount (ElGamal encrypted)
- โ Recipient address linkability (multiple transfers unlinkable)
- โ Sender/recipient addresses (visible on-chain)
- โ IPFS CID (visible but content encrypted)
AgentSend qualifies for the Privacy Track by implementing:
- End-to-end encryption with industry-standard X25519
- Zero-knowledge proofs via Tongo's privacy layer
- Encrypted transaction amounts using ElGamal
- Privacy-preserving architecture from ground up
- Decentralized storage for censorship resistance
- ๐ First messaging app on Starknet with Tongo integration
- ๐ Wallet signature-based key derivation (no passwords!)
- ๐ Hybrid privacy (E2E encryption + ZK proofs)
- ๐ Decentralized storage with IPFS
- ๐ Open-source reference implementation
- Tongo Testnet Integration - Use real Tongo when testnet available
- Indexer Service - Scan chain for incoming messages
- WebSocket Notifications - Real-time message delivery
- Group Messaging - Multi-party encrypted chats
- Public Key Registry - On-chain or decentralized registry
- Message Attachments - Images, files via IPFS
- Mobile App - React Native version
- Desktop App - Electron wrapper
- Key Backup/Recovery - Secure key export/import
- Contact Management - Address book with ENS/StarkNet ID
- Message Search - Encrypted local search
- Delivery Receipts - Cryptographic read confirmations
- Forward Secrecy - Rotating keys per session
- Disappearing Messages - Auto-delete after time
- Voice/Video Calls - WebRTC with STUN/TURN
- Wallet connection (ArgentX/Braavos)
- Key derivation from wallet signatures
- E2E encryption (X25519)
- IPFS integration (Pinata) with fallback to mock
- Tongo integration (mock mode for demo)
- Message persistence (localStorage)
- Conversation management
- Chat UI with loading states
- Error handling
- Responsive design
- Real Tongo SDK integration (pending testnet contract)
- Message indexer backend
- Real-time notifications
- Production deployment
- Quick Start Guide
- Phase 1 Status
- Phase 2 Completion
- Deployment Options
- Architecture Deep Dive (Coming Soon)
- API Reference (Coming Soon)
This project was built for the Starknet Re{define} Hackathon. Contributions welcome after Feb 28, 2025!
# Run development server
npm run dev
# Run tests (coming soon)
npm run test
# Build for production
npm run build
# Lint code
npm run lintMIT License - see LICENSE file for details
- Starknet Foundation - For the Re{define} Hackathon
- FAT Solutions - For the Tongo SDK
- Pinata - For IPFS infrastructure
- ArgentX & Braavos - For wallet support
- GitHub: decentrathai/agentsend
- Demo: agentsend.vercel.app
- Hackathon: DoraHacks
Built with โค๏ธ for Starknet Re{define} Hackathon 2026