Real-time per-block sBTC payroll and payment streaming on Bitcoin via Stacks
Vesper is a decentralized payment streaming protocol built on Stacks that enables real-time, per-block sBTC payroll distributions. Instead of monthly or weekly payouts, Vesper allows employers and service providers to stream payments continuously, with recipients able to withdraw their earnings on-chain as they accrue.
- β±οΈ Per-block streaming: Payments settle every Stacks block (~10 minutes)
- βΏ sBTC integration: Secure Bitcoin settlement via Stacks sBTC
- π³οΈ DAO governance: Token holders vote on protocol parameters and upgrades
- β Cancellable streams: Payers can cancel active streams with customizable escrow models
- π¦ Batch payroll: Pay multiple recipients in a single transaction
- π Analytics dashboard: Real-time tracking of payment streams and DAO governance
| Task | Feature | Status | Details |
|---|---|---|---|
| 1.1-1.4 | Smart Contract Core | β Complete | Data model, error handling, 9 state functions, 12 getters |
| 1.5 | Unit Tests | β Complete | 28/28 tests passing (100%) |
| 1.6 | Frontend Scaffold | β Complete | Vite 5, React 18, TypeScript, Tailwind CSS |
| 1.7 | Wallet Integration | β Complete | @stacks/connect with Hiro Wallet support |
| 1.8 | Contract Builders & UI | β Complete | 11 contract functions + dark mode system (20+ components) |
| 1.9-1.12 | Frontend Pages | β Complete | Create stream, dashboard, detail, GitHub CI/CD |
| 1.13-1.14 | Feature Branch Sync | β Complete | All features synced to main with latest CI/CD |
Daily Batch Transaction Script v1 (5 commits)
- β Wallet generation & testnet faucet funding
- β 14-step batch transaction execution (create/withdraw/topup/cancel)
- β Automatic sweep-back fund recovery with gas cost tracking
- β JSON logging with daily batch summaries
- β
npm scripts:
npm run batch(mainnet),npm run batch:testnet(testnet)
Daily Batch Automation Workflow (4 commits)
- β Cron-scheduled daily execution at 2 AM UTC on testnet
- β Manual dispatch support for ad-hoc testing (mainnet/testnet)
- β Batch monitoring workflow with log parsing and reporting
- β Complete secrets setup documentation (SECRETS_SETUP.md)
- β Daily automation operations runbook (DAILY_AUTOMATION.md)
Deploy Phase 1 to Testnet (3 commits)
- β Testnet deployment script with validation checks
- β Batch verification script for contract testing
- β³ This commit: Update README and deployment documentation
Testnet Resources:
- π Testnet Deployment Guide - Step-by-step deployment
- π Secrets Setup Guide - GitHub Actions secrets configuration
- π Daily Automation Runbook - Operations and troubleshooting
Next Phase: After testnet verification
- Phase 2: Mainnet contract deployment
- Phase 3: Production frontend deployment to Vercel
- Phase 4: Mainnet monitoring and alerting
- Node.js 18+ and npm
- Stacks CLI with Clarinet
- A Stacks wallet (Hiro Wallet or similar)
# Clone repository
git clone https://github.com/Amas-01/Vesper.git
cd Vesper
# Install dependencies
npm install
# Run smart contract tests
npm run test
# Start development frontend
cd frontend && npm run dev
# Build for production
npm run build
# Run daily batch script locally (testnet)
npm run batch:testnet
# Check batch logs
cat scripts/logs/batch-$(date +%Y-%m-%d).json | jqSee TESTNET_DEPLOYMENT.md for detailed testnet deployment instructions.
Automated daily batch execution: DAILY_AUTOMATION.md
- πΊοΈ Roadmap - Complete Phase 1-3 timeline and task breakdown
- ποΈ Architecture - System design and component overview
- ποΈ Data Model - Clarity data structures and storage
- π Smart Contracts - Contract reference and function signatures
- βοΈ Frontend Components - React component library
- π§ͺ Testing Strategy - Test coverage and execution
- π Testnet Deployment - Step-by-step testnet deployment guide
- βοΈ Daily Automation - Daily batch automation operations runbook
- π Secrets Setup - GitHub Actions secrets configuration
- π CI/CD Pipeline - GitHub Actions workflows and build optimization
Vesper/
βββ contracts/ # Clarity smart contracts
β βββ vesper-core.clar # Core streaming logic (β
Complete)
β βββ Stream data structure # StreamData type definition
β βββ State-changing functions # create, withdraw, cancel, topup, expire
β βββ Read-only functions # get-stream, get-balance, get-progress, etc.
β
βββ frontend/ # React + TypeScript web application
β βββ src/
β β βββ components/ # React UI components (20+)
β β β βββ layout/ # Header, Footer, Layout wrapper
β β β βββ wallet/ # ConnectWallet, WalletStatus
β β β βββ stream/ # StreamCard, StreamList, Withdraw/Cancel buttons
β β β βββ ui/ # Button, Input, Modal, Badge, Spinner, Toast
β β βββ pages/ # Route pages (4)
β β β βββ Home.tsx # Landing page with gradients
β β β βββ Dashboard.tsx # Stream management dashboard
β β β βββ CreateStream.tsx # Stream creation form
β β β βββ StreamDetail.tsx # Individual stream view with progress
β β βββ hooks/ # React custom hooks (β
Complete)
β β β βββ useWallet.ts # Wallet connection & auth
β β β βββ useStream.ts # Contract state-changing operations
β β β βββ useContract.ts # Read-only contract queries
β β βββ lib/ # Utilities & helpers
β β β βββ contracts.ts # Contract builders & fetchers (11 functions)
β β β βββ stacks.ts # Network config & constants
β β β βββ utils.ts # Helper functions
β β βββ store/ # Zustand state management
β β β βββ walletStore.ts # Wallet state (address, session)
β β β βββ streamStore.ts # Stream data cache
β β βββ types/ # TypeScript interfaces
β β β βββ stream.ts # Stream, Progress types
β β β βββ wallet.ts # Wallet, Session types
β β βββ App.tsx # Root component with dark mode
β β βββ index.css # Dark mode design system (180+ lines)
β β βββ main.tsx # React entry point
β βββ tailwind.config.js # Dark palette (vesper + slate-dark)
β βββ vite.config.ts # Vite build configuration
β βββ package.json # npm dependencies (327 modules)
β
βββ docs/ # Additional documentation
β βββ ARCHITECTURE.md # System design overview
β βββ DATA_MODEL.md # Clarity type definitions
β βββ CONTRACTS.md # Contract function reference
β βββ FRONTEND_COMPONENTS.md # UI component catalog
β βββ TESTING.md # Test strategies
β βββ DEPLOYMENT.md # Deploy to testnet/mainnet
β
βββ tests/ # Test files
β βββ [Test fixtures and helpers]
β
βββ deployments/ # Deployment configurations
β βββ [Network-specific configs]
β
βββ settings/ # Environment settings (.gitignore protected)
β βββ [Network configs - not tracked]
β
βββ ROADMAP.md # Phase 1-3 development timeline (β
Updated)
βββ README.md # This file
βββ LICENSE # MIT License
| Layer | Technology | Version |
|---|---|---|
| Smart Contracts | Clarity / Stacks | v2 |
| Frontend Framework | React | 18.2.0 |
| Build Tool | Vite | 5.4.21 |
| Language | TypeScript | 5.3.3 |
| Styling | Tailwind CSS | 3.3.0 |
| State Management | Zustand | 4.4.0 |
| Routing | React Router | 6.20.0 |
| Wallet Integration | @stacks/connect | 7.2.0 |
| Testing | Clarinet SDK | Latest |
cd contracts
clarinet test # Run all unit tests
clarinet run # Execute contract calls
clarinet test --watch # Watch mode testingcd frontend
npm run dev # Start dev server (http://localhost:5173)
npm run build # Production build
npm run preview # Preview production build
npm run lint # ESLint checks- Feature branches:
feat/task-1.X-*,fix/*,style/* - Batch commits by concern (not one-file-per-commit)
- Detailed PR descriptions with scope/testing/impact
- Squash merge to main after review
Current Feature Branches (Ready for PR):
feat/task-1.8-contract-builders- Smart contract builders & React hooksstyle/dark-mode-redesign- Complete dark mode UI systemfix/connect-wallet-integration- ConnectWallet modal & debugging
Merge Base: feat/frontend-vite-init β Main development branch
Vesper Protocol is developed by the Stacks community. For inquiries, reach out via GitHub Discussions.
MIT License - see LICENSE file for details
Built on Stacks | Bitcoin Settlement | Community-Driven