This is a value for value post: see the explanation in the footer.
TL;DR
Use a 3rd party custodial wallet to receive Zaps on Nostr
I suggest using Get Alby or Wallet of Satoshi to receive zaps on Nostr. Alby is a browser extension which gives you a Lightning Wallet and Wallet of Satoshi is phone app (with desktop capabilities). Both will give you a Lightning Address. Alby lets you chose your name so here are mine:
brianoflondon@getalby.com
yelpingparade74@walletofsatoshi.com
You can still link you Nostr identity (NIP-05 as it's called) to your Hive account. That's the ID which ends @v4v.app
brianoflondon@v4v.app
Nostr
I guess, in addition to being Hive's resident Lightning expert, I'm becoming Hive's resident Nostr expert too. I've been joined on Nostr by a few Hivians and @edicted has also given it a try.
Will it scale?
@edicted's post specifically talks about whether it will scale. I want to address the "tipping" feature they've hacked together called Zaps.
Offline problem
Lightning has a fundamental problem which I've spoken about at length and is the basic reason I have to run a service to swap Lightning into and out of Hive.
You can't receive Lightning payments into your own wallet without running your own server.
Everything else today which does this is a hack.
If you want to send Lightning to someone from your wallet in an app, you need THEM to send you an invoice from their app or server and then you pay it. This is called the Bolt 11 Invoice process
Bolt 12
There's something called Bolt 12 which I've been hearing about for 2 years, it allegedly exists in one version of the Lightning software but not in all and is therefore utterly irrelevant until everyone else builds it.
LNURL and Keysend
Keysend
There are two ways to get around this. Keysend is what we use for streaming payments in Podcasting 2.0. This can only be handled by a full Lightning Node (like the one I run) and involves giving out your Node address. This may well point to a static IP or your node might be on Tor. Either way your node needs to have "liquidity" in the right places and be up 24/7 ready to receive sats. This is what I run for all here on Hive.
You can see the kind of thing my node is doing all the time in the image: receiving very small streaming payments when someone is watching a @threespeak video in a Podcasting 2.0 player or sometimes it is forwarding payments around autonomously.
LNURLp
But Keysend has various issues and LNURL was developed as a way to allow negotiation and exchange of invoices (and some other Lightning functions like channel opening) via web requests.
What this usually means is you need a web server, with a DNS address and an HTTPS certificate to mediate requests between the open web and your Lightning Node.
The most popular self hosted Lightning node software (Umbrel) typically runs at home and is connected only via Tor. It doesn't have a web address you can directly connect to. If you want to use your home node this way, you have to set up things like a reverse proxy and register DNS names and get certificates (which need to renew). All in, it's not hard if you're technical but it's completely ridiculous for 99.9% of people.
Lightning Address for Nostr Zaps
Behind the scenes, when I tell you you can have a "lightning address" tied to your Hive account, this uses LNURLp. The system they've chosen to implement Lightning tips on Nostr relys on this functionality and if I explain it, you might understand why I'm not going to implement it. This is described in NIP-57.
Here's what happens.
A Lightning client sees
lightning:brianoflondon@v4v.app
either as human typed in text or encoded as a "Bech32" URL perhaps in a QR code (like the one at the end of my post).The Lightning client then turns that into a
GET
request and goes tohttps://v4v.app/.well-known/lnurlp/brianoflondon
(you can click on that if you want.If the client gets back an answer it should tell the client the minimum and maximum number of Sats this address can receive (currently 1,000 to 500,000 Sats for @v4vapp), whether it allows comments, an image to embed in a payment request (I send the Hive profile picture) and a new part
allowsNostr
.The client now offers the user (this is a user on Nostr trying to send a Zap) a UI box asking them to decide how much to send and whether to attach a comment.
If the user continues and choses an amount and a writes a comment, the client calls the
callback
URL which it got in step 3, in my casehttps://v4v.app/v1/lnurlp/callback/brianoflondon
with an amount and a comment included. If we're doing Nostr zaps, the client also sends a Nostr querystring value . It is a uri-encoded zap request note signed by the user's key.The web server at
v4v.app
then replies by sending a one time use Lightning Invoice back to the client. This is quite a complex action which the Lightning Node must take (my node takes a noticeable amount of time less than a second).The client displays the invoice probably as a QR code.
If the web server at
v4v.app
detects that the Lightning Invoice has been paid, it is then supposed to send out, via Nostr, the information signed by the Zap sender's Nostr key which had been sent to it in step 5, confirming the Zap was sent.
LNURLp response with Nostr
{
"tag": "payRequest",
"callback": "https://v4v.app/v1/lnurlp/callback/brianoflondon",
"minSendable": 1000000,
"maxSendable": 500000000,
"metadata": "[[\"text/plain\", \"v4v.app Lightning to Hive @brianoflondon\"], [\"text/identifier\", \"brianoflondon@v4v.app\"], [\"text/long-desc\", \"Sending Lightning to Hive account: @brianoflondon\"]]",
"commentAllowed": 1000,
"allowsNostr": true,
"nostrPubkey": "3dc473414bea4de1df1f172c3196a820719dbb58baaf8764b9edaa07c6d5e9dc"
}
And I'm not going to do that
Whilst I am supporting the full Lightning Address flow for Hive accounts via @v4vapp, I'm not adding in the Nostr stuff for a few reasons.
- Zaps are tending to be ridiculously small. 21 sats. For good reasons, I have a minimum of 1000 Sats which is 30c and from which I take quite a big static fee of 200 sats so I don't advise sending much below 10,000 sats ($2) through my system.
- At present the system I have generating Lightning Invoices doesn't care or watch for whether those invoices are paid. I don't want it to have to watch for incoming Lightning.
- I don't want the server handling this to have to store Zap information and then recall it and match it to the correct Lightning invoice which was paid.
- Sending out Nostr messages means I have to learn a whole new protocol and a Python library to do that isn't properly developed yet (or doesn't work easily with my code: I tried).
Does this Scale?
I don't think this can scale. Right now I could write a few lines of Python which would send a flood of 10,000 or 10,000,000 1 sat payments and I could even send them to myself. I think this would be a massive pain in the arse for the receiver.
If I can do this, rest assured many others can.
The whole system is a bodge: LNURLp works but it is horrifically wasteful of resources if it starts being used at scale. If 10,000 people send a popular Nostr account 10 sats, that will set off upwards of 50,000 web requests back and forth for the transfer of $20.
The Bitcoin Maxis may complain that using Hive for social media is inefficient, but the system they've hacked together in the last few weeks is definitely worse.
My recommendation
Use Hive for your Identity on Nostr: NIP-05.
Use a 3rd party custodial wallet to receive Zaps on Nostr
I suggest using Get Alby or Wallet of Satoshi to receive zaps on Nostr. Alby is a browser extension which gives you a Lightning Wallet and Wallet of Satoshi is phone app (with desktop capabilities). Both will give you a Lightning Address. Alby lets you chose your name so here are mine:
brianoflondon@getalby.com
yelpingparade74@walletofsatoshi.com
You can still link you Nostr identity (NIP-05 as it's called) to your Hive account. That's the ID which ends @v4v.app
brianoflondon@v4v.app
Setting up NIP-05
In order to set up NIP-05 you want to find your profile on @ausbitbank 's site: https://hive.ausbit.dev/@brianoflondon
Log in with any of the usual methods and find the "Posting JSON Metadata".
Within the "Extra Props" section find Nostr and click on that.
Put you Nostr PUBLIC KEY in the box, the one that looks like this:
npub18hz8xs2tafx7rhclzukrr94gypcemw6ch2hcwe9eak4q03k4a8wq2wfmgv
Make sure it starts npub
and NOT nsec
Sign the update to your profile with Keychain.
Then use yourhivename@v4v.app
as the NIP-05 identifier in any Nostr client. I quite like Snort.social.
You can follow me Brianoflondon on Nostr.
Value for Value
For the last few months while building @v4vapp I was generously supported by the DHF. Going forward I have a much more modest support which covers direct server costs and a little of my time.
If you appreciate the work I do on and around Hive, you can express this directly: upvoting posts on Hive is great. Also consider a direct donation (there's a Tip button on Hive or a Lightning Address) on all my posts.
Support Proposal 244 on PeakD
Support Proposal 244 with Hivesigner
Support Proposal 244 on Ecency
Vote for Brianoflondon's Witness KeyChain or HiveSigner