Skip to main content

Module bolt11

Module bolt11 

Source
Expand description

Mapping between Bitcoin networks and BOLT11 invoice currencies Mapping between Bitcoin networks and BOLT11 invoice currencies.

BOLT11 uses the tb prefix for both testnet3 and testnet4, so Currency::BitcoinTestnet cannot be converted back to a single Network. The From conversions in lightning-invoice are lossy in both directions (Network::Testnet4 becomes Currency::Regtest), so use these helpers instead.

Functionsยง

currency_for_network
Returns the BOLT11 currency used for invoices on network.
currency_matches_network
Returns whether an invoice in currency can be paid on network.