bolts icon indicating copy to clipboard operation
bolts copied to clipboard

Query parameters and fragments in lightning invoice scheme

Open akumaigorodski opened this issue 5 years ago • 4 comments

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?

akumaigorodski avatar Jan 13 '20 08:01 akumaigorodski

It sounds legal to me, but clearly I'm not an expert on that.

t-bast avatar Jan 17 '20 13:01 t-bast

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?

akumaigorodski avatar Jan 17 '20 14:01 akumaigorodski

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.

t-bast avatar Jan 17 '20 14:01 t-bast

I can send a pr if this is considered a good idea.

akumaigorodski avatar Jan 17 '20 18:01 akumaigorodski