Welcome to BSV Code Academy
Your Complete Guide to Building on BSV Blockchain
Welcome to the BSV Code Academy - a comprehensive, modular learning platform for developers at all skill levels who want to build applications on the Bitcoin Satoshi Vision (BSV) blockchain. From beginner to intermediate production-ready applications.
π How to Use This Repository
This academy is organized into three complementary systems that work together:
1. π Learning Paths (Structured Courses)
Start here for guided learning
Follow progressive courses from beginner to intermediate. Each course teaches concepts and references the SDK Components and Code Features below.
When to use: You want to learn systematically
Path: Read courses in order, following the references to components
Time: Full path ~9-11 hours
2. π§ SDK Components (Technical Reference)
Use as reference documentation
Deep-dive documentation for each part of the BSV SDK. Think of these as your technical manual - comprehensive API docs with examples.
When to use: You need detailed technical specs or API reference
Path: Jump directly to the component you need
Time: 15-30 minutes per component
3. π» Code Features (Ready-to-Use Examples)
Copy and adapt for your projects
Production-ready code examples for specific features. Copy, modify, and use in your applications.
When to use: You need working code for a specific task
Path: Find the feature, copy the code, adapt to your needs
Time: 5-15 minutes per feature
π Quick Start Guides
For Complete Beginners
"I'm new to BSV blockchain development"
1. Start β learning-paths/beginner/getting-started/
2. Follow β All 7 beginner courses in order
3. Practice β Use code-features examples
4. Reference β SDK components when neededEstimated time: ~5 hours You'll learn: Development setup, BSV fundamentals, create wallet, build transactions, integrate wallets
For Experienced Developers
"I know blockchain, new to BSV"
1. Quick scan β learning-paths/beginner/bsv-fundamentals/
2. Jump to β learning-paths/intermediate/
3. Reference β sdk-components/ for API details
4. Use β code-features/ for specific implementationsEstimated time: 3-4 hours to get productive You'll learn: BSV-specific features, transaction building, SPV, BRC standards, payment systems, tokenization
For SDK Reference
"I need API documentation"
1. Go to β sdk-components/
2. Find your component (e.g., transaction/, signatures/)
3. Read β API Reference section
4. Try β Common Patterns examplesEstimated time: 15-30 minutes per component You'll find: Complete API docs, usage patterns, best practices
For Code Examples
"I need working code for [specific task]"
1. Go to β code-features/
2. Find relevant feature (e.g., transaction-building/, multi-signature/)
3. Copy β Code examples
4. Adapt β To your use caseEstimated time: 5-15 minutes per feature You'll get: Production-ready TypeScript code you can use immediately
π Learning Paths (Structured Courses)
π’ Beginner Path
Goal: Learn BSV development fundamentals
Total time: ~5 hours Prerequisites: Basic programming knowledge (JavaScript/TypeScript) Outcome: Build simple BSV applications
π‘ Intermediate Path
Goal: Build production applications
Core Projects (Build Real Applications)
Project
Time
What You'll Build
| Crowdfunding Platform | 4-6h | Token-based crowdfunding with escrow and automated payouts |
Total time: 4-6 hours Prerequisites: Complete beginner path Outcome: Build a production-ready application with full frontend and backend
π§ SDK Components (Technical Reference)
Complete API documentation for the BSV TypeScript SDK
Core Cryptography
Private Keys - Key generation, WIF, signing
Public Keys - Address derivation, verification
Signatures - ECDSA, DER encoding, SIGHASH types
Transaction Components
Transaction - Build and manage transactions
Transaction Input - UTXO spending
Transaction Output - Locking scripts, OP_RETURN
Script - Bitcoin Script operations and opcodes
Script Templates - Reusable script patterns
Advanced Features
HD Wallets - BRC-42/43 hierarchical derivation
UTXO Management - Coin selection strategies
SPV - ChainTracker, header validation
Merkle Proofs - Proof creation and verification
Network & Standards
P2PKH - Standard payment template
BEEF - BRC-62 transaction envelopes
ARC - Transaction broadcasting
BRC-29 - Payment protocol
BRC-42 - Key derivation standard
How to use: Click into any component for complete API reference, usage patterns, and examples.
π» Code Features (Ready-to-Use Examples)
Production-ready code you can copy and adapt
Transaction Operations
Transaction Building - Multi-input, batch payments
Transaction Creation - Create transactions from scratch
Transaction Signing - All SIGHASH types
Sign Transaction - Transaction signing examples
Transaction Broadcasting - ARC integration
Broadcast ARC - ARC broadcasting examples
Transaction Chains - BEEF format chains
Batch Operations - Efficient batch processing
Wallet & Keys
Create Wallet - HD wallet creation
Generate Private Key - Key generation
BRC-42 Derivation - Hierarchical keys
UTXO Management - Selection strategies
Message Signing - Sign and verify messages
Scripts & Templates
P2PKH Template - Standard payments
Multi-Signature - M-of-N multisig
Custom Scripts - Hash locks, timelocks
Custom Templates - Template creation
Standard Transactions - P2PKH, P2PK
Verification & Security
SPV - SPV client implementation
SPV Verification - Merkle proof validation
SPV Validation - Transaction validation with SPV
Double Spend Detection - Security monitoring
Advanced Patterns
Smart Contracts - Escrow, vesting, oracles
Atomic Swaps - Trustless exchanges
Payment Channels - Off-chain payments
OP_RETURN - Data embedding
Business Applications
Payment Processing - Invoices, subscriptions
Payment Distribution - Split payments
E-commerce Integration - Checkout systems
Marketplace - Escrow patterns
Content Paywall - Paywalled content
How to use: Browse features, find what you need, copy the code, adapt to your project.
π― Learning by Use Case
"I want to build a wallet"
1. Learning: beginner/first-wallet/ + intermediate/bsv-primitives/
2. Components: hd-wallets/, private-keys/, utxo-management/
3. Code: create-wallet/, utxo-management/, brc-42-derivation/"I want to integrate payments"
1. Learning: beginner/first-transaction/
2. Components: transaction/, arc/, brc-29/
3. Code: payment-processing/, transaction-broadcasting/, batch-operations/πΊοΈ Complete Repository Map
gitbook-bsv-code-academy/
β
βββ learning-paths/ # π Structured courses (follow in order)
β βββ beginner/ # 7 courses (~5 hours)
β βββ intermediate/ # 1 project (~4-6 hours)
β
βββ sdk-components/ # π§ Technical reference (jump to as needed)
β βββ private-keys/ # API docs + patterns
β βββ transaction/ # API docs + patterns
β βββ script/ # API docs + patterns
β βββ ... (17 components total)
β
βββ code-features/ # π» Ready-to-use code (copy & adapt)
β βββ transaction-building/ # Production examples
β βββ multi-signature/ # Production examples
β βββ payment-processing/ # Production examples
β βββ ... (31 features total)
β
βββ assets/ # π¨ Images, diagrams, icons
βββ resources/ # π External links and referencesπ What's Inside
π 8 Structured Courses covering beginner β intermediate
7 Beginner courses
1 Intermediate project
π§ 17 SDK Components with complete API documentation
π» 31 Code Features with production-ready examples
π Comprehensive documentation covering all aspects of BSV development
β‘ Latest Tech including Teranode architecture and deployment
π οΈ Installation & Setup
Prerequisites
Node.js 18+
TypeScript 4.9+
Basic terminal/command line knowledge
Install BSV SDK
npm install @bsv/sdkQuick Test
import { PrivateKey } from '@bsv/sdk'
const key = PrivateKey.fromRandom()
console.log('Address:', key.toPublicKey().toAddress())Full setup guide: learning-paths/beginner/development-environment/
π€ How Components Work Together
Modular Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LEARNING PATHS β
β (Teach concepts, guide through building applications) β
β β β
β References β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SDK COMPONENTS β
β (Technical reference - "What is this? How does β
β this API work? What are the methods?") β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CODE FEATURES β
β (Production examples - "Show me working code!") β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββExample Flow:
You're learning about transactions β Read
learning-paths/beginner/first-transaction/Need API details β Reference
sdk-components/transaction/Want working code β Copy from
code-features/transaction-building/
π Recommended Learning Sequences
Fastest Path to Production (1 week intensive)
Days 1-3: Beginner essentials (getting-started, fundamentals, first-wallet, first-transaction)
Days 4-7: Intermediate project (crowdfunding-platform) + code-features implementationComprehensive Mastery (1-2 weeks part-time)
Week 1: All beginner courses (7 courses, ~5 hours)
Week 2: Intermediate project (crowdfunding-platform, 4-6 hours)
+ code-features for additional patternsSDK Reference User (ongoing)
- Keep sdk-components/ bookmarked
- Jump to specific components as needed
- Use code-features/ for implementation patternsπ Key Features
β Complete Coverage - From "Hello World" to running Teranode infrastructure β Production Ready - All code examples tested with real @bsv/sdk API β Modular Design - Use what you need, skip what you don't β Latest Technology - Includes Teranode, latest BRC standards β TypeScript First - Modern, type-safe development β Cross-Referenced - Easy navigation between related topics
π External Resources
Official BSV Resources
BSV Blockchain - Official BSV website
BSV Skills Center - Official learning hub
Teranode Docs - Teranode documentation
BRC Standards Hub - BSV protocol standards
BRC GitHub Repository - BRC specifications source
Developer Tools
BSV TypeScript SDK - Official SDK repository
BSV SDK Documentation - SDK API reference
MetaNet Desktop Wallet - BSV desktop wallet
Wallet Toolbox - WalletClient API documentation
Get BSV - Orange Gateway - Purchase BSV with fiat
WhatsOnChain - BSV blockchain explorer
Gorilla Pool - Mining pool and tools
Community
BSV Discord - Developer community
BSV Developers - Reddit community
Stack Overflow - Q&A (tag: bsv)
π€ Contributing
This is a living documentation project. Contributions are welcome!
Found an error? Open an issue
Have improvements? Submit a pull request
Want to add examples? We'd love to see them!
π License
This documentation is provided as-is for educational purposes.
π Get Started Now!
Choose your path:
π New to BSV? β Start Learning
π Need API docs? β Browse SDK Components
π» Want code examples? β Explore Code Features
Happy Building on BSV! π
Built with β€οΈ for the BSV developer community
Last updated
