Appendix : Codebase Navigation Guide
Introduction
Directory Structure
rippled/
├── include/xrpl/ # Public headers
│ ├── protocol/
│ │ ├── SecretKey.h # Secret key class
│ │ ├── PublicKey.h # Public key class
│ │ ├── digest.h # Hash functions
│ │ ├── KeyType.h # Key type enumeration
│ │ └── AccountID.h # Account identifier
│ └── crypto/
│ ├── csprng.h # CSPRNG interface
│ └── secure_erase.h # Secure memory erasure
│
├── src/libxrpl/ # Core library implementation
│ ├── protocol/
│ │ ├── SecretKey.cpp # Key generation, signing (404 lines)
│ │ ├── PublicKey.cpp # Verification, canonicality (328 lines)
│ │ ├── digest.cpp # Hash implementations (109 lines)
│ │ ├── AccountID.cpp # Account ID utilities
│ │ └── tokens.cpp # Base58 encoding/decoding
│ ├── crypto/
│ │ ├── csprng.cpp # CSPRNG implementation (110 lines)
│ │ ├── secure_erase.cpp # Memory wiping (35 lines)
│ │ └── RFC1751.cpp # Mnemonic words
│ └── basics/
│ └── make_SSLContext.cpp # SSL/TLS configuration
│
└── src/xrpld/ # Daemon-specific code
├── app/tx/impl/
│ └── Transactor.cpp # Transaction signature validation
├── app/ledger/
│ └── LedgerMaster.cpp # Ledger management
└── overlay/detail/
└── Handshake.cpp # Peer cryptographic handshakeCore Cryptographic Files
1. SecretKey.cpp (404 lines)
2. PublicKey.cpp (328 lines)
3. digest.cpp (109 lines)
4. csprng.cpp (110 lines)
5. tokens.cpp
Finding Specific Functionality
"Where is...?"
Navigation by Task
Task: Understanding Ed25519 Signing
Task: Understanding Secp256k1 Verification
Task: Understanding Address Generation
Header vs Implementation
When to read headers:
When to read implementation:
Search Patterns
Using grep to find code:
Using git blame:
Using tags/symbols:
Common Code Patterns
RAII Pattern:
Error Handling Pattern:
Key Type Detection Pattern:
Quick Reference
File → Purpose Mapping
File
Purpose
Key Functions
Tips for Code Reading
Last updated

