0.0 Intro:0.0 Intro:
Nostr Wallet Connect (NWC) look's like being, lately, the most requested and used option to connect your node to SN! And SN to your node... In this guide, we will go through a few simple steps to leverage the nostr protocol to move sats around wallets: SN wallet and your (ideally NON-custodial) wallet. NWC.dev is the open protocol to connect lightning wallets to apps. Pretty damn powerful, considering its level of censorship resistance and privacy.
There are still not many options that have NWC integrated and working, providing the capability to generate public keys and secret keys to connect wallets and apps through nostr relays. @Alby Hub is the latest one, and THE one we gonna use in this guide. Ready?
1.0 Requirements1.0 Requirements
- 1 public or private Lighting node
- 1 AlbyHub app installed and running
- 1 SN account (Last but not least important!)
- 2 NWC connection keys
Yes, we'll need two different keys! One for sending and another different connection key for receiving.
2.0 Creating the NWC connection keys on AlbyHub2.0 Creating the NWC connection keys on AlbyHub
If you are still learning and or evaluating options for your Lightning node, I highly suggest you starting from @Darthcoin guides, forever available on github and substack in many languages.
At this point, I'll assume you have your LN node running and some channels already opened with some perfectly balanced liquidity (sats). It's an absolutely vital detail we cannot miss! You ca also check the health status of your node after installing AlbyHub. 👇
The cool stuff about AlbyHub is that allow, not only to check your node and channel status, but most essential for this scenario, it gives much better management capabilities of the permissions you want to assign to specific NWC keys. If you care about your privacy, and to mitigate future issues, it's important to give each key the right authorization access. If you want to learn more about AlbyHub you can open guides.getalby.com in another window to read more later ;)
2.1 Select "stacker news" from the App Store2.1 Select "stacker news" from the App Store
I'll start from the AlbyHub App Store because in this way our Connection will be later featured in the AlbyHub connections page with the beautiful SN icon instead of being a just generic one.
2.2 Creating the Connection keys2.2 Creating the Connection keys
Let's click on the stacker news [🔌 Connect] button, and we'll see that by default, the Connection is set to give Full Access to the app, you can keep it this way if you like.
My suggestion is to set the permission at a minimum to define exactly what access each Connection key to do just what it supposed to do with your wallet! Check the settings below respectively for sending NWC connection key and another different one for receiving:
| connection key for sending | connection key for receiving |
In the Connection key for sending you also have the option to set a badget, in the example below, the connection will be allowed to take from your node until a max of 100k sats a month.
Indeed, if you are really control freak, you could set an expiration date for both connections keys independently.
Note: you'll be able to edit all the connection keys parameters after you create it.
2.3 T̲e̲m̲p̲o̲r̲a̲r̲i̲l̲y̲, save the keys somewhere2.3 T̲e̲m̲p̲o̲r̲a̲r̲i̲l̲y̲, save the keys somewhere
Each time you create a Connection, you'll see this screen. Note that after leaving this screen you'll be not able to retrieve the Connection keys provided, and if you close it accidentally just delete the Connection and create a new one.
- 2.3.1 Click the [Copy pairing secret] button, it will keep the Connection keys in your clipboard.
- 2.3.2 Paste them in a text file for a moment, don't save the file, just keep them there for a sec! You could also go back and forward between AlbyHub and SN to do one at a time, whatever is easier for you.
3.0 Connecting your node to SN via NWC3.0 Connecting your node to SN via NWC
Now that we have both connection keys, for sending and for receiving, let's open our SN wallet > attach wallet > NWC also accessible directly from the url https://stacker.news/settings/wallets/nwc.
Make sure you respectively paste the right key in the right input field
We are nearly there... just make sure to set:
- desired balance =
0, - max fee to a min of
1%and... - . ... click on the yellow [ attach ] button.
4.0 Congratulations, stackers!4.0 Congratulations, stackers!
You just did your first step into bitcoin sovereignty! Your sats now should be landing directly in your Lightning node. Two NWC keys, One Connection, Zero stress... Happy stacking!
Not convinced about this? Let's attach SN to your...
One more suggestion - open a channel to @sn.
Node > open channel > advanced options > channel peer (dropdown) select custom > in peer text box, copy paste the pubkey at the bottom of @sn and remove "@52.5.194.83:9735" > click next > follow instructions for funding the channel.
Enjoy minimum fees when sending/receiving with sn and your alby hub.
When you created your channel, did you need to provide a host:port? Do we just use the @ info that we removed for the pubkey?
Just the pubkey. ip:port arent necessary. The connect textbox/copy string at the bottom of @sn includes the ip address and port and those should be removed.
When you first copy/paste the string it will reveal another text box for ip:port because it cant automatically parse the string in the pubkey field, but this disappears once the pubkey field is only a recognized pubkey.
I must be doing something wrong, then. Not only does my Hub (ver. 1.9.0) want me to provide that port, but it keeps spinning when I do try to open a channel. Any channel, not just w/ @sn.
Thank you, though. I'll keep digging.
EDIT: Figured it out. My Pihole was blocking mempool.space from one of the blocklists I have configured. Unblocked that and all is well with the world.
The guys at alby are pretty helpful in their discord channel. Hit them up if you want their support
I'll 100% hop in if I get stuck (I might be already and just don't remember tbh lol). But yeah, this time it was DNS. It's always DNS.
is
@52also a bug?Another great guide.
You are single handedly saving SN some major misery. Shame they aren’t rewarding you for it.
Who know maybe they are... Anyway for me is a learning experience, and I'm testing all this connection so it's great! Thanks for all your support and feedback, just that is an incentive for me to write and share more.
That's a positive way of looking at it. Don't mind me I am just grouchy about a few things relating to SN lately. I said last week I was just going to mind my own business and here I am a few days later breaking my own rules. For shame grayruby, for shame.
🤣 that's love 🧡⚡️
Haha 😅 You achieve greatness when you break the rules.
I raised it the day before and got a simple innocent answer, we haven't put up the bounty yet.
Ok but not putting up the bounty yet doesn’t preclude from rewarding the people doing the work.
Yes, definitely. But what can we do except zapping the post with whatever we can.
The bounties will be helpfull to get some directions on what to write about. I was feeling stackers were not using this amazing feature, so I thought it could be worth to write about the "attach wallet" functionality. It could also help SN to achieve its goal to be a non-custodial platform.
Excellent guide!
meanwhile gov agents reading this post 😂😂😂
🤣 your creative and generative meme skills are impressive!
I've learned how to use it with amethyst recently, just press and hold the lightning button, then you simply paste the credentials, and the fields bellow get filled.
Seem easily done with amethyst! Thanks for sharing, do you mind sharing some screenshots about the process?
Great write-up! The need for different keys tripped me up initially, but you pointing out I just create two apps within Alby Hub was really an "I should have figured that out" moment.
Indeed isn't that intuitive and SN Ui does not tell until one make the mistake. For those knowing the technology is probably obvious, for newbies like us not! Thanks for highlighting this detail for others.
Yup, I 100% get that. But hey, this is all emerging tech and new ways to interact with social media, news, and more, so there are going to be growing pains.
Oh don't get me wrong, pain helps to grow stronger! I like the game.
Excellent! Can you please tell if Alby Hub charges any fee for zapping on SN?
...
They don’t and can’t since you run your own node
And what if we don't run our own node and we use their node. Or, which node we connect.
They don't provide a node, only LSPs but they are optional. The LSPs might charge a fee but you can open your own channels since you run your own node.
The only option without running your own node is to use a cashu mint and afaik, cashu mints don't charge you.
is SN planning to implement ecash and run a SN mint?
No, that would defeat the purpose of going non-custodial.
But we plan to implement NIP-60 which stores cashu token in nostr relays. Then you only need your nostr private keys to access your ecash.
true, I did not think about that when writing.
Wow that will be amazing!
Thanks 🙏 I asked it because I think a lot of Stackers who don't run their own node, might be irritated for every time they see minimum 1 sat deducted, even if they zap 1 0 or 20 sats to someone. Thanks about cashu, it may be a very good option with low amounts.
In any case, you will pay network fees unless you run your own node and open a (private) channel to SN.
And we require a big amount of sats for creating a node? Do we?
You don't pay for "creating a node", you pay to open channels since it's a bitcoin transaction. The channel can be as big or low as you want, but it will determine how much you can spend and receive. Anything between 100k-1m channel should probably be fine. You can also use that channel to pay for other things.
In this case is pretty obvious, if you're using any other custodial service you'll be paying a fee. The more convenient I've found from this perspective is Coinos with a 0.1% that is 10x less compared with the 1% market standard.
Excellent post!! I’ll set mine up shortly! 🚀💯
Thank you. Share your experience following the steps or issues, in case any!
After you hit Save on SN and paste all the connection strings (x2), I had a small error regarding failing to send a test connection, but it allowed me to bypass it. When I went back inside the NWC config on SN to view some details, it only showed my sending greyed out. My receiving has been cleared out. Yours as well? Can you check? Here's mine..
This means that the receive connection failed. Did you try again? Can it create invoices? That’s what it’s trying to do during save and will fail if it can’t.
Perfect timing. I am setting up my node right now and plan on using alby hub. Thank you.
Greaaat! Make me feel these guides are worth writing! Thanks. Which node you chose?
Right now I am in the process of downloading and syncing the main chain on my umbrel pi 4. I have a lot to learn about the later steps still.
Thanks for showing process and steps
Thank you, let us know how you go with the setup
Thank you for that guide! Sending you deserved sats :)
Let us know if you have any questions!
Thanks, and glad you jump into the discussion. The only questions I have are related to privacy and centralization here.
When creating connection keys, the relay used is the one provided by the platform offering the service, in this case AlbyHub use obviously only GetAlby nostr relay.
Do you see in the future implementing a more decentralized way to broadcast transactions? Maybe relaying on the relays the npub/nsec has already chosen and connected to instead the one provided by the provider?
Has anyone manage to connect to AlbyHub for receiving? It only timeouts after I add my connection string for receiving... And after 5 minutes the connection is deleted from my Alby hub dashboard. 😕
All good for sending...
The connection is deled from the Hub? I didn't see that one yet.
You just create NWC string, can be full access, maybe remove paying invoices permission, and should work?
QQ, my LN node gets an invoice for auto withdrawal from SN... is that normal?
Great guide!
The future is here!!!!!!!!
This is an amazing guide, nice work!
Could I please get a referral to Alby? The getalby website says that I need a invite code.
happy to invite you if you send me your email with a DM via SN from here https://stacker.news/wallet?type=lnaddr-withdraw
I think I figured it out. The bottom part didn’t show until after I filled in the top part. Please let me know if you don’t get the “DM”.
Sent!
Thank you! 🙏🏻
Thought on NWC and Privacy. Tell me what you know!