Have pay just pay a bolt12 offer
I ran into the same confusion that led to #5473.
lightning-cli pay lno1zrxq... 100sat
{
"code": -32602,
"message": "Invalid bolt12: unexpected prefix lno"
}
You have to call fetchinvoice and then pay that.
Why not just do that automatically?
You have to call fetchinvoice and then pay that.
This is true for any bolt12. It is also true that it is trivial to add a pay <bolt12> helper
I can imagine needing a different flow for bolt12 offers that give away money. And repeating payments also aren't very suitable for the pay call.
I can imagine needing a different flow for bolt12 offers that give away money. And repeating payments also aren't very suitable for the pay call.
You are right, in fact I have a plugin that wrap the bolt12, so it is time to upstream the changes. Thanks for reporting
Currency conversions and repeated payments both need a different flow, so it's generalized. But if the amount is known and it's not repeated (which, TBF, is very common), it's totally possible to have pay Just Work,
Could currency conversion be handled through a plugin? So you'd simply use pay bolt12_fiat_amount and if the plugin is there, it just works, and otherwise it complains "sorry, no plugin".
Could currency conversion be handled through a plugin? So you'd simply use pay bolt12_fiat_amount and if the plugin is there, it just works, and otherwise it complains "sorry, no plugin".
Yes, but this is another story, the pay plugin should handle bolt12 IMHO, I will try to see what kind of code is required to implement it
I'm moving this to next milestone, sorry. I'd really like xpay to do this at some point though...
I started working on it, but I think it is better wait for a cycle to have the xpay in good shape before adding another pile of code on top of it.