You require an SSL certificate on your domain and need to follow these steps:
- Go to https://stacker.news/.well-known/lnurlp/youruser, copy the response data, and place it as a text file named "username" without extension.
- Create the following folder on your public domain data
/.well-known/lnurlp - Upload the text file to the created folder.
- Check your lightning address with a wallet that supports LNurl payments.
That's all
This is a pretty cool hack for someone whose skills are limited to hosting a static site!
Doesn't this mean that anyone can basically override any parameters you set in SN?
For example changing minSendable.
Or are there other checks in the SN server itself?
Yes, there are. So you can change it but I wouldn't recommend it since SN will still enforce the original
minSendable. You'll just make payments unreliable.This hack may not work with all LN wallets because the first request is done to
yourdoma.inand that in turn points tostacker.news. Works with many, but I have seen Alby wallet not proceeding when these two domains do not match. Have not tested it recently so maybe it was removed as no LNURL standard requires such behavior. Correct? @fiatjaf @bumiIt works with Alby. I have a lightning address on my domain using an LNurl on LNbits, and it works well.
Ah, I see. But that's not the same thing I suppose. Please share your LN address.
nicolas@saporiti.cl
Works. I successfully sent you 1sat with no fees from SN by paying an invoice I had acquired from a manually-done LNURLp request (of course it shold work with LN address straight as well, but I was manually checking and yes the domains are different — saporiti.cl sets
callbacktohttps://ln.rayito.app/lnurlp/api/v1/lnurl/cb/...so if it works from Alby it means it does not check for the domains to match anymore).Thanks. Respect. Proof of Work. Learning by doing.
"payment_hash": "b66567017dab8abd8f8af8bef6daefaed3fcdb6b53c0f7c3fdec0a97f74dddb7",Hoping it works to send 1sat to SN with no fee as well.
Now a question for @bumi and/or @fiatjaf.
Seeing it works well to host
.well-knownfile on a different domain than thecallback, can this be relied on in the future and can people do pointers like the one described in this post?YES. afaik, yes.
LNURL is stateless and the first response tells the wallet the callback URL from which it can get the lighting payment request.
So this is reliable, and also works with any lightning address service.
This also has the nice side-effect that you actually "own" your lightning address and you can at any time change the lightning address service, but keep your address. (because it's your domain)
IMO this should be promoted and more people should be aware of this.
Sats received. Rayito haves a webhook to send an email when payment is successful. Think about it; you can receive sats and traditional messages with only an email account.
I discovered stacker.news on a google search just now for exactly this! Thank you!
deleted by author
This is awesome, SN can be used in so many ways!
I always assumed the callback had to match the host serving the file, but I guess it doesn't have to be like that.
Beautiful! ⚡
Thanks for this, I hadn't thought of that!⚡⚡
Nice
Nice
Thanks for share. can we change the
minSendable?