bolts
bolts copied to clipboard
Query parameters and fragments in lightning invoice scheme
Since lightning:<bech32> invoice format looks like an URI scheme, is it legal to append ?query1=a&query2=b as well as #fragment to it?
It sounds legal to me, but clearly I'm not an expert on that.
This could be a viable way to extend invoice functionality beyond built-in tags while letting wallets who don't recognize this just fall back to using basic invoice. But OTOH this would require wallets to be always ready to parse invoice out of larger chunk of text, perhaps this deserves an explicit mentioning in a spec?
It wouldn't be covered by the signature, but that signature isn't very useful in practice anyway... It's an approach that can be explored, I haven't thought hard enough about it yet.
I can send a pr if this is considered a good idea.