Technical Documentation
Architecture Overview
System Architecture
┌─────────────────────────────────────────┐
│ Frontend (Next.js/React) │
│ - WalletClient for user payments │
│ - createAction for transactions │
│ - internalizeAction for token claiming │
│ - listOutputs for token viewing │
└─────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ Backend (Next.js API) │
│ - Auth middleware (BRC-103) │
│ - Payment middleware (BRC-103/104) │
│ - Wallet Toolbox for server wallet │
│ - PushDrop token creation │
│ - JSON file state persistence │
└─────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ BSV Blockchain │
│ - Investment transactions │
│ - Individual token claim transactions │
└─────────────────────────────────────────┘Technology Stack
Key Components
Integration & APIs
External Dependencies
Service
Purpose
Version
Documentation
API Endpoints
GET /api/wallet-info
POST /api/invest
GET /api/status
POST /api/complete
Implementation Guide
Prerequisites
Setup Instructions
Configuration
Key Implementation Patterns
1. Frontend Wallet Integration
2. 402 Payment Flow
3. BRC-29 Key Derivation
4. Payment Middleware
5. Individual Token Claiming
6. State Persistence
Testing & Validation
Validation Criteria
Performance & Scalability
Current Metrics
Scalability Considerations
Project Structure
Maintenance & Support
Troubleshooting
Issue
Cause
Solution
Important Concepts
randomizeOutputs: false
P2PK vs P2PKH
Individual Token Claiming Pattern
Resources
Last updated
