#invoice #lightning #bitcoin #encode-decode #bolt11

no-std lightning-invoice

Data structures to parse and serialize BOLT11 lightning invoices

45 releases (breaking)

0.33.1 Jan 29, 2025
0.33.0-beta1 Dec 22, 2024
0.32.0 Sep 3, 2024
0.31.0 May 9, 2024
0.1.0 Dec 14, 2018

#923 in Magic Beans

Download history 12714/week @ 2024-10-18 11578/week @ 2024-10-25 11200/week @ 2024-11-01 10784/week @ 2024-11-08 11039/week @ 2024-11-15 8141/week @ 2024-11-22 7612/week @ 2024-11-29 8162/week @ 2024-12-06 9026/week @ 2024-12-13 4415/week @ 2024-12-20 4227/week @ 2024-12-27 7665/week @ 2025-01-03 8808/week @ 2025-01-10 10156/week @ 2025-01-17 10671/week @ 2025-01-24 9595/week @ 2025-01-31

40,595 downloads per month
Used in 134 crates (48 directly)

MIT/Apache

200KB
4.5K SLoC

lightning-invoice

Docs.rs

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:

Dependencies

~7.5MB
~95K SLoC