42 releases (breaking)
0.32.0 | Sep 3, 2024 |
---|---|
0.31.0 | May 9, 2024 |
0.29.0 | Jan 23, 2024 |
0.27.0 | Dec 16, 2023 |
0.1.0 | Dec 14, 2018 |
#9 in #invoice
49,067 downloads per month
Used in 114 crates
(42 directly)
195KB
4K
SLoC
lightning-invoice
This repo provides data structures for BOLT 11 lightning invoices and functions to parse and serialize these from and to bech32.
Please be sure to run the test suite since we need to check assumptions
regarding SystemTime
's bounds on your platform. You can also call check_platform
on startup or in your test suite to do so.
lib.rs
:
This crate provides data structures to represent lightning BOLT11 invoices and functions to create, encode and decode these. If you just want to use the standard en-/decoding functionality this should get you started:
- For parsing use
str::parse::<Bolt11Invoice>(&self)
(seeBolt11Invoice::from_str
) - For constructing invoices use the
InvoiceBuilder
- For serializing invoices use the
Display
/ToString
traits
Dependencies
~7.5MB
~92K SLoC