SatoshiPortal / boltz-rust

Boltz client rust crate
https://docs.boltz.exchange
30 stars 19 forks source link

Add support for fetching BOLT12 invoices from an offer #82

Closed ok300 closed 3 weeks ago

ok300 commented 3 weeks ago

This PR adds support for the POST /lightning/{currency}/bolt12/fetch endpoint, where the only currency supported for now is BTC.

i5hi commented 3 weeks ago

I investigated the test failure; some of the flags we are using are deprecated &| nightly features. Not an issue with this PR; I will merge and update CI files.

Thanks @ok300

ok300 commented 1 week ago

Do you also plan on implementing the validation that the fetched invoice does belong to the offer in boltz-rust?

I added it here: https://github.com/breez/breez-sdk-liquid/blob/81eeb66c44723aedb2d8e17208535f342a7692c9/lib/core/src/sdk.rs#L617-L637

Due to time constraints, don't know if I can create and test a PR for boltz-rust soon, but feel free to use the snippet above.