Repository navigation
v0.1.0 - Initial Release
π Initial Release
Pure Swift BOLT #11 Lightning Invoice Decoder
This is the first release of Bolt11, a complete implementation of the BOLT #11 Lightning Network invoice protocol in pure Swift.
β¨ Features
- β Complete BOLT #11 compliance - Full implementation of the Lightning invoice specification
- β Bech32 decoding with checksum verification (BIP-0173)
- β All networks supported: mainnet, testnet, signet, regtest
- β Amount parsing with all multipliers: milli (m), micro (u), nano (n), pico (p)
- β All tagged fields supported (p, s, d, h, n, x, c, f, r, 9, m)
- β Cryptographic validation - ECDSA signature verification and public key recovery using secp256k1
- β
Pretty-print support - Beautiful formatted output with
CustomStringConvertible - β Comprehensive testing - 18 tests covering valid and invalid invoices from the spec
- β Detailed error handling - Specific error types for all failure cases
π¦ Installation
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/zeugmaster/Bolt11.git", from: "0.1.0")
]π Quick Start
import Bolt11
let invoice = try Bolt11Decoder.decode(invoiceString)
print(invoice.prettyPrint)π Requirements
- macOS 13.0+ / iOS 16.0+
- Swift 6.1+
π Documentation
See the README for complete documentation and examples.
π Credits
Implementation based on BOLT #11 specification.