LittleBit is an educational library of Bitcoin primitives, with implementations in Python and Rust.
- Help the reader understand how Bitcoin really works at a fundamental level.
- Focus on readability in the Python implementation; on correctness, and performance in the Rust implementation.
- Zero (ish) dependency on third-party packages.
DISCLAIMER: This software comes sans warranty. Do NOT use this code for anything other than educational purposes. I beg you.
Legend: π Done Β π In Progress Β π TODO Β π Python Β π¦ Rust
Internal links to code inside the repository are indicated
like this
. External links look like this.
Component | Status |
---|---|
Elliptic Curve Cryptography (ECC) | |
Finite Field
|
π β π
π¦ β π |
Elliptic Curve |
π β π
π¦ β π |
secp256k1 |
π β π
π¦ β π |
Signatures |
π β π
π¦ β π |
Serialization | |
SEC Format |
π β π
π¦ β π |
DER Format |
π β π
π¦ β π |
Base58 |
π β π
π¦ β π |
Bitcoin Address Format |
π β π
π¦ β π |
Wallet Import Format (WIF) |
π β π
π¦ β π |
Transactions |
Note: This table is not complete.
This is an educational project. You can help out by:
- π¬ Auditing the codebase, asking questions, reporting bugs (please create issues).
- π― Improving coverage of unit tests.
- Ξ» Β Adding (clever) type annotations, especially with the Rust part.
- π¬ Adding code comments and explanations.