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 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 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 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 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 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 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!
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!