24 releases (8 breaking)

0.9.0 Nov 5, 2024
0.7.0 Sep 16, 2024
0.6.0 Jul 19, 2024
0.4.1 Jan 27, 2024
0.2.0 Mar 14, 2023

#39 in #bitcoin-lightning

Download history 529/week @ 2025-10-13 585/week @ 2025-10-20 567/week @ 2025-10-27 991/week @ 2025-11-03 795/week @ 2025-11-10 1138/week @ 2025-11-17 586/week @ 2025-11-24 634/week @ 2025-12-01 956/week @ 2025-12-08 1156/week @ 2025-12-15 521/week @ 2025-12-22 403/week @ 2025-12-29 393/week @ 2026-01-05 1049/week @ 2026-01-12 2017/week @ 2026-01-19 2743/week @ 2026-01-26

6,255 downloads per month
Used in 48 crates (18 directly)

MIT license

52KB
1K SLoC

lnurl-rs

MIT licensed lnurl-rs on crates.io lnurl-s on docs.rs

A rust implementation of LNURL. Supports plaintext, TLS and Onion servers. Blocking or async. WASM enabled.

Supported

  • lnurl-auth
  • lnurl-pay
  • lightning-address
  • lnurl-withdraw
  • lnurl-channel

Examples

Lnurl Pay

let ln_addr = LightningAddress::from_str("ben@zaps.benthecarman.com").unwrap();
let async_client = Builder::default().build_async().unwrap();

let res = async_client.make_request(url).await.unwrap();

if let LnUrlPayResponse(pay) = res {
    let msats = 1_000_000;
    let pay_result = async_client.get_invoice(&pay, msats, None, None).await.unwrap();

    let invoice = Bolt11Invoice::from_str(&pay_result.invoice()).unwrap();

    assert_eq!(invoice.amount_milli_satoshis(), Some(msats));
} else {
    panic!("Wrong response type");
}

Dependencies

~10–30MB
~375K SLoC