Cryptographically time-locked messages on Ethereum. Decrypt on-chain at the exact moment you choose, powered by drand randomness, hybrid encryption and trustless architectural design.
I wanted a system where I can save my messages so that I genuinely cannot open them early and they are encrypted, so others can’t read them.
┌─────────────────────────────────────────────────────────┐
│ WALLET-BASED ENCRYPTION │
│ ├─ EIP-712 typed data signing (per-capsule) │
│ ├─ Keccak256 hashing of signature │
│ ├─ HKDF-SHA256 key derivation (with capsule metadata) │
│ ├─ AES-256-GCM authenticated encryption │
│ └─ Per-message random IVs for each layer │
├─────────────────────────────────────────────────────────┤
│ META-DATA TAMPERING RESISTANT │
│ ├─ Additional Authenticated Data (AAD) in all ciphers │
│ ├─ Decryption fails if capsule metadata is modified │
│ ├─ Prevents unauthorized unlock date or nonce changes │
│ └─ Ensures only original capsule data can be decrypted │
├─────────────────────────────────────────────────────────┤
│ DRAND TIME-LOCK INTEGRATION │
│ ├─ Distributed randomness beacon consensus │
│ ├─ Threshold BLS signatures (51%+ collusion needed) │
│ ├─ Additional encryption layer over AES-256-GCM │
│ └─ Impossible to decrypt before drand round released │
├─────────────────────────────────────────────────────────┤
│ SMART CONTRACT VALIDATION │
│ ├─ Fee collection (helps me pay for bills) │
│ ├─ Capsule ownership verification │
│ ├─ Time-lock enforcement (can't unlock before date) │
│ ├─ Immutable audit trail of all capsule operations │
│ └─ Non-custodial (contract cannot decrypt messages) │
└─────────────────────────────────────────────────────────┘
| Aspect | Centralized Apps | Public Blockchains | Time Capsule Web3 |
|---|---|---|---|
| Can early unlock happen? | Yes (server compromise) | Yes (front-running) | Cryptographically impossible |
| Who controls release? | Platform | Miners/validators | Math not people |
| Privacy after unlock? | Readable to platform | Permanently public | Only decryptable by recipient |
| Trustlessness | 0% | Partial | 100% |
| Proof of Release Time | No | Timestamp only | Cryptographic proof |
- Node.js 20+
- Ethereum wallet (MetaMask, Rainbow, etc.)
- Sepolia testnet ETH (for gas)
- HardHat locally installed
git clone https://github.com/CoderLogy/Time-Capsule-Web3
cd Time-Capsule-Web3
pnpm installpnpm run dev # Start dev server
pnpm run build # Build for production
pnpm vitest # Run testsCreate a copy of .env.example and rename it as .env and fill in your values:
VITE_CONTRACT_ADDRESS=0x19FF5dc69033523f1C5b1B5589f95D49b5EF7926
VITE_CHAIN_ID=11155111
VITE_WALLETCONNECT_ID=your_wallet_connect_id from reownWe welcome contributions! Here's how to help:
- Look at our roadmap
- Follow TypeScript best practices
- Write clear commit messages
- Test your changes
- Update documentation or Readme
- Mainnet deployment with enhanced security audits
- Multi-chain support (Optimism, Arbitrum, Polygon)
- Zero-Knowledge Proof privacy mode
- Sharing capsules with others using a link
- DAO governance for protocol parameters
- NFT time capsule certificates with on-chain proofs
- Cross-chain message passing via Wormhole
- Advanced analytics dashboard for capsule insights
- Create - You write a message and set an unlock date
- Sign & Encrypt - Your wallet signs the message via EIP-712, key derived from signature
- Store - Encrypted message stored on IPFS, proof recorded on blockchain
- Decrypt - After unlock date, open capsule with the same wallet that created it
- Blockchain - Solidity, Ethers.js, Wagmi, Viem
- Encryption - WebCrypto API (AES-256-GCM, HKDF-SHA256)
- Storage - IPFS (Pinata)
- Indexing - The Graph (graphql)
- Time-Lock - drand (distributed randomness beacon that predict randomness from future)
- Sepolia -
0x19FF5dc69033523f1C5b1B5589f95D49b5EF7926 - Mainnet - Coming soon
- Optimism - Coming soon
This project uses cryptographic time-locks that are mathematically impossible to break. However, always:
- Use a secure wallet
- Keep your private keys safe
- Test on Sepolia testnet first
- ❌ Don't store sensitive information in messages
- Privacy Policy - How we collect, use, and protect your data.
- Terms & Conditions - Complete terms of service, disclaimers, liability limitations, and crypto risk warnings.
Important: By using Time Capsule Web3, you agree to our Terms & Conditions and Privacy Policy. Please read them carefully.
MIT - LICENSE
Open up a issue in this repo and I will get back to you.
