Lightning Addresses for EVERYONE on Hive!
WORKING AGAIN!
I think it's all back to normal.... whatever normal actually is....
Earlier today 2022-05-20:
Coingeck's @coingecko 's API is still not working and I can't restart without it. Following this I will obviously work on adding another price service so I'm better prepared for this kind of thing.... living and learning!
Overnight Coingecko's API started going wrong and so I've got to clean up some stuff, all should be working again soon I hope.
You know that thing on Twitter where people (mostly) in the US can receive BTC Lightning tips direct through Twitter?
Well now literally EVERY ACCOUNT ON HIVE can receive Lightning tips!
If you like my work on bridging Lightning and Hive, please vote for my continuation proposal:
Support Proposal 222 on PeakD
Support Proposal 222 with Hivesigner
Support Proposal 222 on Ecency
You heard it right. Your very own human memorable Lightning Address looks just like this (yes it does look just like an email address):
[email protected]
Just replace brianoflondon
with your own Hive account name. Any BTC lightning sent to that address will end up as Hive in your Hive account.
You can also get yourself a QR code like the one I have at the bottom of the page.
This link will give you a QR code: just replace my hive account name with your own.
https://v4v.app/v1/lnurlp/qrcode/brianoflondon
You can save that image and put it anywhere.
And a special shout out to all Hive Devs: you can add "tip with Lightning" buttons to any Hive UI. You just need to call the api to generate the QR code (you can even cache this, it doesn't change!).
Demo
I've sped up the typing part but the rest of this is real speed. The wallet I'm using here is Breez which is a non-custodial wallet (meaning I really do hold the keys). There are custodial wallets which might shave a few seconds off the Lightning sending time.
How it works
Behind the scenes there is quite a lot going on to make this happen.
As I've written extensively before, Lightning is not a blockchain based crypto system. Lightning can only be received by a Lightning Node which is online and working 24/7 and which has "channels" open to the rest of the Lightning Network.
So in order for you to "receive" Lightning on a static address, just as you can receive Hive on your username or BTC on an address you can generate, things get interesting.
LNURL
What Lightning needed was a way to have a pointer to something on the web which could then generate a Lightning Invoice as a way to receive funds. I kind of built this from scratch myself in order for my v4v.app system to receive Hive and send Lightning: behind the scenes I don't really just receive Lightning, I generate an invoice which a mobile wallet can pay.
DIY was the way I learned
Having built this all from scratch myself, I then realised I had built most of the components I would need to implement something which has been growing in adoption on the Lightning Side: Lightning Addresses. There's a fancy website to tell you all about this and it gives you dozens of ways to grab a Lightning Address but almost all are custodial.
There is a way to set this up with your own node but it's seriously tedious work (here's a 20 min video for you to plough through.
The Flow
Part 1 flow
The background for what is going on here is in this Github repo: LNURL RFC. I'm specifically making use of LUD-01, LUD-06 and LUD-12
- LUD-01: Base LNURL encoding and decoding
- LUD-06: payRequest base spec
- LUD-12: Comments in payRequest.
When a compatible Lightning wallet scans the QR Code I produce or a user types an address like [email protected]
into a compatible wallet they are presented with a screen like this screen from Zeus. There's a visual reminder of the destination (my avatar), space to enter an amount between 1,000 and 100,000 Sats and space for an optional comment.
Part 1 technical
The Lightning Address is encoded in the QR Code as a BECH32 string and actually looks like this:
lightning:LNURL1DP68GURN8GHJ7A35WCHXZURS9UH8WETVDSKKKMN0WAHZ7MRWW4EXCUP0VFEXJCTWDANXCMMWV3HKU64WYHS
The lightning:
prefix is mostly to help Mobile apps route these strings. On my iPhone, the Breez app grabs these strings automatically if the camera sees a QR code with this encoding. On Android the same thing happens but I believe you have the option to chose which app takes over.
The Lightning app then sends a GET
request to the URL encoded in that string which is actually this:
https://v4v.app/.well-known/lnurlp/brianoflondon (you can click on it, you'll get some JSON).
If you manually type [email protected]
into a Lightning wallet as an address it just reorganizes that to make the same call.
That GET
request returns a JSON which looks like something like this:
{
"tag": "payRequest",
"callback": "https://v4v.app/v1/lnurlp/callback/brianoflondon?no_image=true",
"minSendable": 1000000,
"maxSendable": 100000000,
"metadata": "[[\"text/plain\", \"v4v.app Lightning to Hive @brianoflondon\"], [\"text/identifier\", \"[email protected]\"], [\"text/long-desc\", \"Sending Lightning to Hive account: @brianoflondon\"]]",
"commentAllowed": 1000
}
However I've actually excluded a big chunk of data from the "metadata"
field because an encoded version of the Hive avatar is sent in there as well.
Part 2 flow
The user can now be shown a range for the amount to send and an image to help identify where the payment is going: that's where I use the Hive avatar. The user can then add a comment and hit send, there will be one more confirmation and then the sats will be sent.
Part 2 technical
The wallet app can now call the "callback"
address with the parameters set by the user. When that happens my API generates a unique invoice specifically for this payment in the form of another BECH32 encoded string. This is the "regular" Lightning way of making exchanges of value.
Once the Wallet receives that invoice, it pays it.
Part 3 Hive
From here on in the rest of my @v4vapp apparatus takes over. It watches incoming payments to my Lightning node and acts on them based on various metadata in the comment field and embedded in the Invoice itself (which my software generated in part 2 above). I receive the sats and immediately make a conversion to Hive and send the Hive out. That bit is generally quicker than the Lightning side.
Support Proposal 222 on PeakD
Support Proposal 222 with Hivesigner
Support Proposal 222 on Ecency
- Vote for APSHamilton's Witness KeyChain or HiveSigner
- Vote for APSHamilton's Witness direct with HiveSigner
- Get Brave
- Use my referral link for crypto.com to sign up and we both get $25 USD
- Sign up for BlockFi
- Find my videos on 3speak
- Join the JPBLiberty Class Action law suit
- Verify my ID and Send me a direct message on Keybase
I appreciate every work you put to this which is really nice and awesome and also I have voted on your proposal as well to appreciate your good work.
I shall definitely use this. I have a qr code, then I let people scan the code to pay me. Its so useful, I will try it out when I send this comment !
How did it go?
Posted Using LeoFinance Beta
This some awesome stuff!
Wow, that’s great! Will have to test it if it really works. 👏🏻 Excellent work.
Really awesome
I did wonder if one could tip accounts with btc here like we do hive.
But doesn't it defeat the purpose? 🤔
You know that thing on Twitter where people (mostly) in the US can receive BTC Lightning tips direct through Twitter?
Well now literally EVERY ACCOUNT ON HIVE can receive Lightning tips
This is the only part of this post that makes sense to me.. the rest is nerdery and jibberish.. but that's good.. we need more nerds building shit here.. great job. Proposal supported.
!PIMP
Think you can invent a !NERD token next? 🤣😂
You must be killin' it out here!
@davedickeyyall just slapped you with 1.000 PIMP, @brianoflondon.
You earned 1.000 PIMP for the strong hand.
They're getting a workout and slapped 1/2 possible people today.
Read about some PIMP Shit or Look for the PIMP District
We don't need to know how all tjses things work thanks God.
We just need to know that there are great Devs on hive that can make it happen for us.
Thanks Brian. This looks amazing.
👍👍👍
!BEER
View or trade
BEER
.Hey @niallon11, here is a little bit of
BEER
from @davedickeyyall for you. Enjoy it!Learn how to earn FREE BEER each day by staking your
BEER
.You can receive Satoshis which get converted to HIVE which you can convert to HBD..
...which can be used to buy weed.
Skip the jibberish and get to the use cases.
Posted Using LeoFinance Beta
Lol! Yes you can buy some Weed products with HBD, lol. Now we can take your lightning too, lol.
[email protected]
Lol. Best explanation ever
This! I love how you summed it up for a cub to understand :)
Posted Using LeoFinance Beta
https://twitter.com/KillerO7/status/1527243371139543041
https://twitter.com/EoinCarroll50/status/1527257061859409920
https://twitter.com/manuphotos_/status/1527266015612223488
https://twitter.com/theebobm/status/1527284221353504768
https://twitter.com/3speakonline/status/1527284314899095553
https://twitter.com/dudeontheweb/status/1527297604018577412
https://twitter.com/EnjarGames/status/1527319865924591617
https://twitter.com/taskmaster4450/status/1527323586834608130
https://twitter.com/HiveTrending/status/1527325093944209411
https://twitter.com/hive_blockchain/status/1527338094176788494
https://twitter.com/RealManniMan/status/1527422754592636930
https://twitter.com/GisetSam/status/1527432570828472336
https://twitter.com/cpolsilver/status/1527436983743791104
https://twitter.com/DocumentingHive/status/1527553016274239490
https://twitter.com/NathanMars7/status/1527570935729078272
https://twitter.com/steevc/status/1527579722309328900
https://twitter.com/thaddeusPrime/status/1527760062197923841
https://twitter.com/Raicelys_Gomez/status/1528028201246769156
https://twitter.com/Steemadi_/status/1550120714845704198
The rewards earned on this comment will go directly to the people( @steemadi ) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.
nice
Thank you for your witness vote!
Have a !BEER on me!
To Opt-Out of my witness beer program just comment !STOP below
View or trade
BEER
.Hey @condeas, here is a little bit of
BEER
from @isnochys for you. Enjoy it!Learn how to earn FREE BEER each day by staking your
BEER
.This is a great work, thank you for making it happens real good 🤗
I thought all crypto was based on the blockchain. Mehn, I got a lot to learn with this crypto thing.
stick around, you'll learn and understand more and more every day.
Posted Using LeoFinance Beta
I'm sure gonna stick around
Posted Using LeoFinance Beta
This is really awesome! Thanks for working int his :D
This looks incredible, although reading all that confuses me, there are still many things I don't understand about Hive and the crypto world, I don't know much.
But what you show here looks awesome. I have to read it again in greater detail. Understanding how the funds can get to my Hive account, but from the side of the person giving the advice I don't quite understand that part of what to do. Maybe I read it too fast or got confused by so many things I don't understand. But it looks super fabulous, thank you very much @brianoflondon 😎
DO you understand how wiring money online works?
Not really❤️
You are the real MVP BOL. :')
Thank you for this Brain.
It worked perfectly for me :)
Posted Using LeoFinance Beta
You need to try it once more Nathan. Let's see if it works again.
This is exactly why I put the avatar in the middle of these :-) Very important part of the plan!
So there's only one time we can generate this unique QR??
Posted Using LeoFinance Beta
You can generate it as much as you like but it shouldn't change. Behind the scenes it's just a complicated way to encode this address:
https://v4v.app/.well-known/lnurlp/finguru?no_image=false
So unless I change something, that doesn't really need to change so the QR code remains static.
Got it. Just to confirm one last time, my QR code will not change even if I change my DP?
Posted Using LeoFinance Beta
i was wondering this too... if DP means profile pic that is...
no worries, just saw below. So each time you generate a new qr code it updates your profile pic in the centre. Thats cool. Proposal supported btw. amazing work
1777 Sats sent 🤜
Go Nate
Go Nate
Go Nate
You deserve to be voted as witness, which I just did. Thank you for sharing this with us dear.
Big step forwards for Hive today! Thanks a lot!
Posted Using LeoFinance Beta
This is so cool! Thank you for helping to grow our ecosystem
I couldn't get [email protected] to work with Strike. However, invoicing through v4v does work with Strike. I'll have to play with another Lightning wallet.
This is the bridge to HIVE I have been waiting for. I look forward to seeing the platform scale. Although, this alone is huge.
amazing, thanks!
@tipu curate
Upvoted 👌 (Mana: 9/39) Liquid rewards.
Absolutely brilliant!
Now we just have to wait until the BTC Lightning network becomes useful :)
That's great. Will vote for your proposal when I get back on my laptop.
Posted using LeoFinance Mobile
What if I change my Profile Picture?
You can regenerate a new QR and it'll put your new image in it.
Brilliant!
Wow, this is great news and it makes the process simple for everyone here on Hive. I think this is a great addition to the entire blockchain.
Posted Using LeoFinance Beta
The amount of work you did by yourself is impressive, especially as you started from scratch. That's super cool! Too bad I won't be able to connect to the CTT show tonight.
Cheers!
This is freaking EPIC!!! We need got all use these addresses on Twitter for our usernames! Changing mine now actually!
Question… How would we approve the invoice on our end… For instance I attempted to send from Cash app and they require an invoice approval.
I am going to try again from my Blue wallet which is non custodial to see how it reacts there.
Just something I ran into…
Can this (or anything similar) be used by exchanges as a transfer method, when people buy/sell Hive and/or Hive Dollars (HBD)?
Amazing news!
!LUV
@katerinaramm(1/1) gave you LUV. H-E tools | discord | community | <>< daily
This is very good work, I will use this in the future, thanks!
Posted using LasseCash
Well my friend!!! lets try this out!!!
Proposal voted!
Esta es una valiosa información, muchas gracias por compartir
Great work Brian. A very elegant solution.
Posted Using LeoFinance Beta
Good work! It would be interesting to see this integrated clearly into onboarding processes to make initial power ups of new accounts more efficient.
Supported for sure.
Thank you so much for this! This is the kind of work that makes HIVE to excel! I already support your proposal!!! Much success in your endeavors!!! I can't give much in gratitude but just a few tokens !PIZZA !PGM !LOLZ !CTP !HBIT
BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!
The tokens that the command sends are: 0.1 PGM-0.1 LVL-2.5 BUDS-0.01 MOTA-0.05 DEC-15 SBT-1 STARBITS-0.00000001 BTC (SWWAP.BTC)
Discord
Support the curation account @ pgm-curator with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP
Get potential votes from @ pgm-curator by paying in PGM, here is a guide
I'm a bot, if you want a hand ask @ zottone444
PIZZA Holders sent $PIZZA tips in this post's comments:
@cpol(3/5) tipped @brianoflondon (x1)
You can now send $PIZZA tips in Discord via tip.cc!
That is amazing! Thank you for what you are doing and just voted for your proposal.
Posted Using LeoFinance Beta
So by using the Lightning address you can buy Hive with bitcoin without using an exchange, and it goes straight to your Hive account?
Does it work in reverse? Say you send Hive to the Lightning node and receive satoshis?
This is pretty cool, I am curious how much it ends up getting used.
Is there a % cut from what is tipped outside of transaction fees?
I'm taking 200 sats + 0.8% per transaction. That's about as low as I think it should be. I'm taking rates from Coingeko.
Man....This is just awesome on so many levels!
Thank you for all the hard work you put into this community. Appreciate you sir!
Just voted for your proposal!
Posted Using LeoFinance Beta
Congratulations @brianoflondon! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out the last post from @hivebuzz:
$WINE
Congratulations, @theguruasia You Successfully Shared 0.300 WINEX With @brianoflondon.
You Earned 0.300 WINEX As Curation Reward.
You Utilized 3/3 Successful Calls.
Contact Us : WINEX Token Discord Channel
WINEX Current Market Price : 0.152
Swap Your Hive <=> Swap.Hive With Industry Lowest Fee (0.1%) : Click This Link
Read Latest Updates Or Contact Us
Wow, that's cool 😎
!BEER
View or trade
BEER
.Hey @brianoflondon, here is a little bit of
BEER
from @prinzvalium for you. Enjoy it!Learn how to earn FREE BEER each day by staking your
BEER
.Very cool. Send me some sats :-)
Hello Brian, there seems to be a bug in your code. I received multiple HIVE payments for a single lightning transmission.
Yes! Coingeko's API has broken and this has caused my code to malfunction. I've turned everything off right now and will try to work out what's going on. and fix.
I send you the Hive I received later
Thank you, i'm still trying to figure out what happened. Did you also send me (separately) a payment direct to me as lightning?
Yes, i sent you two Times 1000 sats.
Don't send me anything back yet, there was a huge problem at my end caused by @coingecko 's API not working (and me not anticipating that failure properly).
I'll work through all the problems and let you know. I think you probably got around $5 worth of Hive more than you should but it will take me a while to untangle this and Coingecko's price feed is still not working anyway.
5 years this has been happening to me, it started here, around people that are still here. Homeland security has done nothing at all, they are not here to protect us. Dont we pay them to stop shit like this? The NSA, CIA, FBI, Police and our Government has done nothing. Just like they did with the Havana Syndrome, nothing. Patriot Act my ass. The American government is completely incompetent. The NSA should be taken over by the military and contained Immediately for investigation. I bet we can get to the sources of V2K and RNM then. https://peakd.com/gangstalking/@acousticpulses/electronic-terrorism-and-gaslighting--if-you-downvote-this-post-you-are-part-of-the-problem
Awesome work, Brian! You've got my vote. I also like how Taskmaster put it: Bitcoin's Lightning Network - 2nd layer for Hive. :)
Posted Using LeoFinance Beta
Bro you deserve a whole storm for this, congratulations for your excellent work.
AHHHH this is awesome!!!!
holy crap this is so cool!
Supported, amazing stuff, well done
This is next level stuff… appreciate these tools man 🫡
Yay! 🤗
Your content has been boosted with Ecency Points, by @rmach.
Use Ecency daily to boost your growth on platform!
Support Ecency
Vote for new Proposal
Delegate HP and earn more
This is pretty cool!
Thank you for the great service. Now I can ask for tips easily 😉
Posted Using LeoFinance Beta
This is great news! Thanks for doing and sharing it!
Posted Using LeoFinance Beta
You're a freaking genius dude. This is exactly what Hive has needed for the longest time. Thank you, thank you, thank you.
This is too cool.
I used the lightning the other. Super fast.
Thanks for all your hard work on this project @brianoflondon :-)
I think this is a great feature that will help the community keep moving forward as more people adopt micro payments and tipping using the LN. Your proposal has a vote from me!
Congratulations 🙌
This is really amazing! Congratz! 💜
Greetings friend @brianoflondon pleased to say hello. I have been testing the lightning bridge, trying to send some satoshis to my wallet Tippin.me but there has been no way for the application to take the invoice. In the image you can see the message it gives me every time I try.
Now, I sent satoshis to my Hive account and this transaction was carried out without problems and very quickly. My question: what could be happening? Are there any restrictions with this wallet or something like that? Or am I doing it wrong? I know how to thank you very much for your support and help. Greetings.
You’re right my code has a problem with Tippin. I’ll look at this today and hopefully get it working. Thanks for finding this!
Fixed it and it should be working with Tippin now. I sent you 2000 sats :-)
Preety cool ah!! Congragulations!!
Posted Using LeoFinance Beta
Wondering what's your referral code for crypto.com?
Use my referral link https://crypto.com/app/wkva2kezch to sign up for Crypto.com and we both get $25 USD :)
Here you go.
Thanks! I hope I am doing it right this time.
@brianoflondon, huge respects for your continuous and tireless work!!
I've tried just now to send some BTC to Hive, from a "Chivo" wallet, and it seems to not be compatible with my v4v.app LN address (nor its QR code version). It does recognize the address - a green check shows up when I type it - but when pressing the "next" button, nothing happens, contrarily to when the recipient is a LN contact added through his phone number.
Have you received feedback from "Strike" users, indicating that it does work on that app?
Wow, this is some amazing work Brian. I'll keep tabs on this project, your work will be supported. Keep going mate!!!
This is absolutely amazing work! Thank you so much for your brilliant contribution to our glorious Hive Blockchain!
Show me normal and I'll give you a some HIVE.
Bit in awe of your abilities. Very cool! I'll follow along and learn some new things. 👍
😆 Yeah.
Found it. Very clever!
Posted Using LeoFinance Beta
What about doing it in the opposite direction, say Hive to BTC?
Done. V4v.app you send Hive to pay to Lightning.
This is amazing @brianoflondon! I can't imagine how tedious and how long it must have taken you to do all of the coding for this!