Embed this noticeAlex Gleason (alex@gleasonator.com)'s status on Friday, 26-Jan-2024 02:44:58 JST
Alex GleasonIt seems like a mistake that you can't pass an LNURL (or LUD-16 identifier) straight into WebLN to pay an invoice. The client should not have to connect to remote servers and do the whole back-and-forth just to zap someone. This makes it impossible to implement Lightning donations in Soapbox as a purely client-side feature without completely removing the CSP.
@feld Yes but unlike media proxy the API isn't serving that URL. You would need an API that let's you proxy any URL, losing the security features of the proxy.
@ChadF@dave Looking into keysend... I don't think LNURL is precious at all. It's a wacky idea to bech32 encode URLs that will just need to be decoded back into URLs anyway. And then what do they do, they put a `lightning:` prefix in front of it!
@ChadF@dave I argued with ChatGPT about keysend for a while. It seems they added special support for Podcasting 2.0, but there is no generic use-case unlike LNURL. So it wouldn't be a suitable replacement unless every person runs their own Lightning node, which defeats the purpose of Lightning. Or if the TLV registry standardizes generic user accounts and Lightning nodes actually implement it.
@ChadF@dave If keysend is the simpler solution, why hasn't anyone invented a bech32 for it yet? lnid1, and then simply encode the parameters to WebLN.keysend in the data portion. Seems like an obvious solution?
@alex@ChadF The simple answer is that Lightning Labs never liked keysend because it was a sender generated nonce instead of receiver. They did it sort of begrudgingly. The initial Lightning spec worked purely on invoices and there has been a weird hesitancy towards keysend ever since. It baffles me.
@alex@ChadF The true solution is BOLT12, which obviates the need of all of this by allowing for open invoices to live forever and accept any amount. LND is just now starting to build this with v0.18.
to send a keysend cross app comment zap to errhead@podcastindex.com I first use an API call to get the user account info from podcastindex and find the lud16/⚡ of errhead@getalby.com
Lookup keysend node and user info at https://getalby.com/.well-known/keysend/errhead {"status":"OK","tag":"keysend","pubkey":"030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3","customData":[{"customKey":"696969","customValue":"LiPQ3WVvdeEFnuhcWNLy"}]}
the pubkey is the lightning node address, the custom key is different for each wallet provider so far, and the custom value specifies which users wallet to send the payment to.
send the payment using a keysend supporting webln implementation, which is currently only Alby's extension as far as i know, or an API call which has more options.
Metadata is passed using the TLV custom record. for user to user cross app comment zaps I use a subset of the full boostagram TLV https:/github.com/Podcastindex-org/podcast-namespace/blob/main/value/blip-0010.md