moar wallet attachmentsmoar wallet attachments
sending with NWC and LNBitssending with NWC and LNBits
You can attach wallets for sending now via @ekzyis. To start we support attaching Nostr Wallet Connect and LNBits. @ekzyis did a lot of work to make the UX as close to familiar as possible and I think it's stellar.
Note: The credentials are stored in the browser, so please set a budget on them. @ekzyis took a lot of care making the browser as safe as we can for storing these, but you'll want to be extra careful anyway.
autowithdraw to LNDautowithdraw to LND
In addition to autowithdrawing to a lightning address, you can now autowithdraw to LND. We support connecting to your node over Tor so you should be able to push out funds to your home node even if it doesn't have a public IP.
If you attach LND in addition to a lightning address, you can set a default and if it fails we attempt your other method.
expect more methods soonexpect more methods soon
There are a lot of wallets and ways to connect them, but we plan to support any method that makes sense as time goes on. We'll likely be adding CLN and Zebedee next.
NSFW territory labelsNSFW territory labels
🚨 first time contributor alert
Territories can now be labelled NSFW and are visible on an opt-in basis unless visited directly via @mz.
improvements to domain searchingimprovements to domain searching
🚨 first time contributor alert
When you search with a url:example.com filter you should see less strict results via @btcbagehot.
bug fixesbug fixes
what's nextwhat's next
- we have a nearly done nostr crossposting PR via @bitcoinplebdev that allows you to crosspost all post types and will likely be merged soon
- a variety of territory enhancements
- @mz is working on a
topfor territories - @byoungdale has a draft going for crossposting
- I'll work on changing the territory billing period here shortly then sub-territories (unless someone beats me to either)
- @mz is working on a
- more thorough bolt11 deletion via @dillon will be merged soon
- lots of random stuff I'm sure
Happy Valentine's!
NWC! LFG. Will set that up with Mutiny tonight to see how it goes. Very nice work!
A few of them have gone through but hard to tell if it's being slow on the SN side or on the Mutiny side. Perhaps someone with alby or lnbits could test out too to see how it goes.
The comments are kind of painful to sit there and wait for. I wish it could just act like it went through but have some pending UI for it.
It could b because we poll on the client for the invoice being paid which probably adds 500ms of latency on average.
Great feedback.
Unfortunately doesn't work for both self-custodial NWC app and Alby hosted NWC
It's meant to work. We probably have a bug.
What errors are you getting in your console?
Uncaught (in promise) EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules'".
at bakeCollection (content.7f229555.js:2064:98610) at Object.u (content.7f229555.js:2064:93234) at Object.g [as call] (content.7f229555.js:2064:93437) at es.o [as emit] (content.7f229555.js:2064:85238) at es.stop (content.7f229555.js:17:30157) at es.eoseReceived (content.7f229555.js:17:31755) at content.7f229555.js:17:8787 at Array.forEach (<anonymous>) at T.eoseReceived (content.7f229555.js:17:8754) at content.7f229555.js:17:11970@ekzyis looks like the nostr library violates CSP
Mhh, interesting, I tested NWC when we launched and I could generate NWC requests 🤔
I think it might be that the library uses wasm, some browsers probably don't support it, and we allow unsafe-eval-wasm but not unsafe-eval
We poll every second if the invoice was paid, so some slowness is definitely on our side.
What do you mean? You should see toasts that show if payments are pending.
update: Oh, you mean the toasts in the right bottom corner with comments?no, Tony didn't.Tested with LNbits: https://files.ekzyis.com/public/sn/lnbits_zap.mp4
This could use a short video with a demo!
It's hard to understand what is NWC and how does it relate to SN.
I agree! We'll probably need docs for all of this. When I shared our plans for the wallet, @moneyball astutely noted how overwhelming it would be to the average person.
So we'll also want a "wizard" like experience at some point, eg "do you know the difference between custodial and non-custodial?" if yes then "do you run a node?" then "does it have a public IP address?" and so on.
Regardless, we can't expect the average person to stand for that kind of torture so we have a lower friction onramp planned where an attached wallet isn't necessary.
Oh, great idea! I'll do one with Mutiny and share it here.[1]
We also thought about having specific cards for wallets which link to the same setup page if they use the same protocol (like NWC here) but include specific setup guides for these wallets. We could add videos together with some screenshots then there, too :)
Great use case for pinned comments? 👀 ↩
I'll do one with Alby and Mutiny when we deployed this fix: Fix NWC support detection
deployed
Created one now in #428781
Great updates, auto-withdraw to LND and adding NWC is pretty wild.......
Great work guys, you're shipping awesome features! I intend to attach my LND and my LNBits. Wondering why it is "non-custodialish"...
If it's non-custodial depends on what LNbits or NWC provider you use.
You could be using https://legend.lnbits.com for example or Alby with NWC but in a custodial way.
It's just possible to use it non-custodial.
Oh, I get it. I'll be using it from my Umbrel node.
Mine is stuck on this red light
NWC? I don't think we validate the string yet (PR pending). Console say anything interesting?
Yeah for nwc, console didn't have any logs
This video demonstrates how to connect your Mutiny or Alby wallet via NWC with SN:
https://files.ekzyis.com/public/sn/sn_nwc_tutorial.mp4
It should work with any wallet that supports NWC though. Paste the connection string that starts with
nostr+walletconnect://into the NWC input here and you should be good to go!Super cool! Yeah, I'd say it would be better to switch to optimistic UX - just make it look like it's been zapped immediately and only pop up any dialog when the payment actually fails (it could also just be a SN notification).
We're going to house an abort button on the toast eventually, but should probably make it lower contrast than it currently is.
I guess my question is why is the toast even needed in the success case? Why should user care?
In the nostr apps that use NWC the status of the lightning icon just updates...
If anyone wants to learn about NWC, add it to your website or contribute, there's a fresh website: https://nwc.dev/
We also started a Discord for builders integrating NWC (apps and wallets). Join us here: https://discord.gg/PS7EhpyF
Can yall build NWC into LNbits though. That is the question 😅
Why am i seeing a red status indicator. I'm using NWC on Start9
Mind checking your console for errors and sharing which browser you're using?
Some browsers don't like some of the security settings we are asking it to enforce.
iOS 17.3.1 - Safari (PWA). Not sure if my string is good:
nostr+walletconnect://<long-alphanumeric-string>?relay=wss://relay.getalby.com/v1&secret=<secretstring>The string might be bad. We don't validate it to check. I'll run some more tests in all the problem browsers tomorrow and see if I can fix it.
Going to add the validation tomorrow.
However, there should be a toast with some error message if the credentials are no good[1]:
https://m.stacker.news/16088
The form also shouldn't close if the info event wasn't found. And if it was found, the wallet indicator should turn green.
But maybe the error is CSP + browser combination again which throws an error at a location which isn't toasted.
That check only verifies everything up to but not including the secret since a correct secret is not required to receive the info event unfortunately. ↩
CSP?
Oh, sorry, I mean Content Security Policy. This is supposed to tell your browser what code is good to run and which should get blocked. It might be blocking too much depending on the browser.
Gotcha. Also, shouldn't it say "detach" instead of "unattach"? It's your app, but feels more natural
Is there a way to see console data on ios without connecting to a mac/xcode?
No it has to be connected to a Mac afaik.
Very cool! How come some options are either send OR receive? Couldn't LNbits or LND Accounts (over LNC) be both?
Yes! We just need to tease apart permissions so we’re not storing spending perms on the server (without them being encrypted) but still have perms to generate invoices on the server.
We’ll iterate to these “duplex” permissions eventually.
👀
gj ek
Why does attaching LND need
addressandonchainpermission macaroons?https://github.com/stackernews/stacker.news/blob/master/lib/macaroon.js#L61
Shouldn't
invoice:writebe sufficient for auto withdrawls?It doesn't need them, but I didn't anticipate people baking their own macaroons with granular perms. I assumed people would use the default macaroons.
If you wouldn't mind opening an issue I can narrow the perm check.
https://github.com/stackernews/stacker.news/issues/827
i am trying to link up my lnd node running on start9.. i keep getting "invalid input" for my cert.. im copying it from node properties page and have successfully used it for linking up with alby, so i am pretty sure i have the cert right. seems to just not be accepting the cert.. anyone else ran into this issue?
We also allow 50 MB free images per stacker per day now. Before, it was 10 MB per day.
/cc @Natalia 👀
oh let me test it 👀
Oops, I guess I did a soft reveal of the new contributors the other day. Welcome to the club!
Erm what’s a Nostr Wallet Connect?
https://nwc.getalby.com/about
Howdy @k00b @ek I am having some issue attaching my CLN node via Tor and getting the following error:
------ start of logs ------ 1s [cln] ERROR could not connect to CLN: request to https:/xxx.onion:2100/v1/invoice failed, reason: getaddrinfo ENOTFOUND xxx.onion 1s [cln] ERROR failed to attach walletLook's by default is looking to https connection. I tried to use
http://when inserting the rest host and port without success. There's any configuration I need to set in my node to enable HTTPS connection via tor? or can I somehow enable the connection via http?It's a known bug. We're enforcing HTTPS even for Tor in the backend but this breaks how our Tor name resolution works. I'll fix it today.
@ek, have noticed the issues 1107, 1136 and 1133 have been merged but still getting the same error. Anything I need to do differently?
They haven't been deployed yet. I'll deploy them tomorrow.
If you're ever curious what version we're on you can click the
running XXXXXXin the footer.Not sure why it still give me error:
could not connect to CLN: invalid json response body at http://xxx.onion:2100/v1/invoice reason: Unexpected token < in JSON at position 0 failed to attach walletI also tried to use the one in position
0and the input validation obviously give backrune must be restricted to method=invoice onlyanything else I could try?
That error is pretty vague sadly so I can’t tell what’s wrong. I’ll put up an issue on GitHub
Look's is looking only at the rune in position
0in the JSON. There's maybe a way to define the rune position in the form? Or maybe having the script to look at all runes in the file for a match? Just ideas...amazing, thanks for the update. I'll try again tomorrow.
Thanks much appreciated
Cant get nwc to work with my start9 nwc connection FYI.. shows red light
What browser?
I tried with vanadium and Mozilla on graphene OS
any update on improvements on connecting things like ln address or lnd node over tor to receive auto withdrawals? happy to help test when you need it 🤙
Learn how to attach LNBits wallet to SN #697132
a cool feature,btw would be to set withdrawals to your node happen randomly for random intervals of sats and maybe randomly in time...make it hard to papertrail sats you are zapped on here and where they go.. just a cool idea obviously not needed.
for example set so a third of my stacker news wallet gets withdrawn at a random time every 7 days to my lnd node.
Can someone explain what NWC is and how it works?
See my answer to the comment above from cryotosensei