Support setting the new payment metadata field in invoices
authorMatt Corallo <git@bluematt.me>
Tue, 21 Dec 2021 06:03:07 +0000 (06:03 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 19 Apr 2023 02:57:19 +0000 (02:57 +0000)
commit8ed6e64913c3559ee897442db61b41ce129a20ec
tree071045942ae4155bc35bd7fad890a35eb47a84c0
parent928c9b806eb3b2ef7b144d02f730a30d18a19deb
Support setting the new payment metadata field in invoices

This adds support for setting the new payment metadata field in
BOLT11 invoices, using a new type flag on the builder to enforce
transition correctness.

We allow users to set the payment metadata as either optional or
required, defaulting to optional so that invoice parsing does not
fail if the sender does not support payment metadata fields.
lightning-invoice/src/lib.rs
lightning-invoice/tests/ser_de.rs