A simple privacy-preserving guestbook smart contract built on the Midnight blockchain as a learning project.
This is a basic smart contract that allows users to:
- Create guestbooks with custom titles
- Write messages to existing guestbooks
- Edit their own messages (author verification via ZK proofs)
- Archive guestbooks (making them read-only)
- View guestbooks and their messages
All interactions are powered by zero-knowledge proofs, ensuring privacy through the Midnight blockchain.
packages/
├── contract/ # Compact smart contract (5 circuits)
├── api/ # TypeScript API layer
└── cli/ # Interactive CLI for testing
# Install dependencies
yarn install
# Build everything
yarn build
# Run the CLI
cd packages/cli
npm run startThis project was created as an initial learning project to understand:
- Compact smart contract language basics
- Zero-knowledge proof implementation
- Midnight blockchain DApp development
- Private state management
- Transaction handling with RxJS
- Smart Contract: Compact Language
- API: TypeScript + RxJS
- CLI: Node.js
- Network: Midnight Testnet
MIT License - see LICENSE file for details
This project is built on the Midnight Network.
- Built with Midnight Network SDK
- midnight-mcp - Helpful MCP server