5143c - 20h
Is there an easy solution to connect #CLN node through #NWC to #nostr clients? #asknostr
David @mleku - 5mo
this pubkey-index compression scheme i cooked up has turned quite complicated i noticed that i had written a whole fresh new canonical event codec out of a new json parsing API i built a little while back as part of my beginning work on implementing an #NWC SDK for #golang this codec expects the pubkey field of the event to be in hex or it won't parse, so i can't substitute base 10 in there or it will mangle my index value... i have to do it with hex, and the only way this is possible with an unsigned 64 bit integer in the Go stdlib is using ParseUint/FormatUint - the conversions done by the fmt library, for instance, don't like that extra bit difference between int64 and uint64 (tested with the math.MaxUint64) haha i was already going to use these functions, just with base 10 but then i realised, oh, they can be base 16 and then the hex decoder will return a compactly encoded binary value from it, max length of the index field is then 16 characters in the canonical encoding, still a lot better than 64, and the first 4 billion npubs in teh database only need max 8 characters, and because of how these functions work, it can be odd numbers of hex characters, which will break the hex codec turning them into raw bytes as expected in the pubkey field so i also have to pop a zero in front of odd length strings (on the left) this is ok though, whatever has to be done i guess, i don't want to redo the codec and this repurposes its encoding to work with shorter hex strings which are valid but in this compact indexed encoding scheme represent a monotonic serial number, instead of raw bytes argh... all because of expecting hex in the pubkey field but then hex is better than decimal anyway
David @mleku - 7mo
unfortunately i need it to be in Go as it's for payment rails for a relay that is written in Go... i will be working on what amounts to a #golang SDK for #NWC for the next few days, i will probably bump to a minor version v1.3.0 when it's working the key idea is minimising the need for interfaces when usable ones exist already... in this case, the relay will have an identity that when you zap it, by the extension/app noting your NPUB into the zap message and payment memo it can automatically append your subscription expiry and then send you a DM to let you know when its expiring, like nostr.wine does, but making it so this can all be done inside any standard nostr client with zaps enabled
so, it seems that nobody has yet made a #nostr #NWC client library for #golang they made servers, but no clients you wannan client? go rust yourself, or typescript your retarded melted object brain so, ok, i'm reading the damn protocol now i understand well enough how the connection strings work, it's pretty transparent, and it's just ephemeral nostr events but really, who the fuck is even building stuff that uses NWC? dis you mikedilger? i'm kinda shocked that fiatjaf has done no work on this too, but ok
jespada @jespada - 10mo
It works !! #cashu #minibits #nwc #nostr
Bitcoin Signal @BitcoinSignal - 10mo
Nostr Wallet Connect is badass! I can use cashu.me with my mint and zap using my own funds! #cashu #bitcoin #nwc
deleted @deleted - 11mo
when will we see the first embedded node lightning wallet that can do nwc payments? i know mutiny has nwc capability but its a terrible user experience so does not count in current form. im talking one tap zaps from my blixt wallet running in persistent mode...as an example 😃 #bitcoin #lightning #nwc
jespada @jespada - 1y
On Mutiny+ under "request" you can add nwc
₿itcoin⚡️₿enito 13% @₿itcoin⚡️₿enito 13% - 1y
There was an update just 2 days ago. After the update you can go to settings / wallet and turn off the in app wallet. After that it gives you the option to connect via #NWC
Niel Liesmons @nielliesmons - 1y
Where did the #NWC go in the new nostr:npub1mutnyacc9uc4t5mmxvpprwsauj5p2qxq95v4a9j0jxl8wnkfvuyque23vg Plus?
The Zap Master ™ @The Zap Master ™ - 1y
Why is WebLN/NWC so slow to pay? #nostr #webln #nwc
freecritter @freecritter - 1y
Anyone having issues with #nwc on #damus 🙋♂️ Sending #zaps doesn’t seem to be completing. Already disconnected and reconnected but still having an issue 🤔
Dan @Dan - 1y
"venmo request me" is a super useful UX flow. Any wallets looking to implement that flow using NWC? Or I guess could NWC even theoretically be used for this? #asknostr #nwc #lightning
gudnuf @gudnuf - 2y
I'm stoked to be a part of this project. It all started with BOLT 12 prisms as a CLN plugin, and now I'm making nostr $prisms. Stay tuned for more features in the coming days! #nostr #prisms #lightning #nwc nostr:nevent1qqsw7lcpjzpy0mdtpjq3hvhxmn0k9jqfgncpv0yx6auzepapdvg244cpzpmhxue69uhkummnw3ezuamfdejsz9rhwden5te0wfjkccte9ejxzmt4wvhxjmcpzemhxue69uhhyetvv9ujumn0wd68ytnzv9hxgqgkwaehxw309aex2mrp0yh8qunfd4skctnwv46qzrthwden5te0dehhxtnvdakqz9thwden5te0v4jx2m3wdehhxarj9ekxzmnyqy8hwumn8ghj7efwdehhxtnvdakqz9nhwden5te0dehhxarj9enkcet90fjjucm0d5q3samnwvaz7tmjv4kxz7fwwdhx7un59eek7cmfv9kqzxnhwden5te0dehhxarj9ehhyctwvajhq6tvdshxgetkhzryk6
Dan @Dan - 2y
One-tap, self custodial zaps Brought to you by: #nwc with #amethyst and #mutinywallet https://v.nostr.build/9VzX.mp4
Jakk Goodday @Jakk Goodday - 2y
## 1-Tap Zap ด้วย NWC (NIP-47) กดทีสองทีก็ Zap ได้เลย https://video.nostr.build/532776ce839809674e11be95e7c9159ba6511e7a3cf5b59915161a12db8959d5.mp4 ## NIP-47 และ NIP-07 ในบทความเดียว! ก่อนหน้านี้หลายท่านใช้ #Amethyst เวลาจะ Zap ต้องกดปุ่มสายฟ้า > เลือกจำนวนที่ต้องการ Zap > รอระบบโหลด > มีหน้าต่างเด้งมาให้เลือก LN Wallet > สลับจอไปโหลดหน้าแอป Wallet > กดยืนยันธุรกรรม > สลับจิกลับมาที่แอป Amethyst อูยยย.. หลายขั้นตอนจัง... แต่ด้วยโปรโตคอล NWC (Nostr Wallet Connect) หรือ NIP-47 ร่วมกับ nostr:npub1getal6ykt05fsz5nqu4uld09nfj3y3qxmv8crys4aeut53unfvlqr80nfm ตามคลิปที่เห็น เรากดทีสองทีก็ Zap ได้แล้ว!! เจ๋งเป็นบ้า!! ## NWC คืออะไร? https://image.nostr.build/e24b4518f1027d101ded19aa923df63074d58ec30780169ddc42e44839bab6da.jpg ตอนที่คุณ nostr:npub1zk6u7mxlflguqteghn8q7xtu47hyerruv6379c36l8lxzzr4x90q0gl6ef พูดถึง NWC ในงาน #BTC2023 เชื่อว่าหลายท่านก็น่าจะยังนึกไม่ออกว่ายูสเคสของมันจะหน้าตาเป็นยังไง? https://image.nostr.build/dea34e596e9c49f781350cc03bd41f44fab136f9d23863e9bd66babd7cf499f7.png ขอเริ่มจาก Nostr Implementation Possibilities (NIPs) กันก่อน ซึ่งก็คือโปรโตคอลพื้นฐานในการสื่อสาร สำหรับการพัฒนาไคลเอนต์และแอปพลิเคชันต่างๆ บน #Nostr นั่นเอง และ NWC ก็เป็น NIP หนึ่งในนั้น.. NIP-47 (NWC) เป็นโปรโตคอลที่ช่วยให้ไคลเอนต์ Nostr สื่อสารกับ Lightning Node ได้โดยตรงครับ ทำให้เราสามารถทำธุรกรรม LN หรือทำการ Zap ผ่านมือถือได้โดยไม่ต้องมากขั้นตอน หรือไม่ต้องคอยมากดอนุมัติธุรกรรม รวมทั้งไม่ต้องคอยสลับแอปไปมาด้วย (สะดวกมากเหมือนคลิปด้านบน) สายหัวบวมศึกษา NIP-47 เพิ่มเติมได้ที่นี่ https://github.com/nostr-protocol/nips/blob/master/47.md ## อยากลองใช้ NWC แล้ว Getalby คือ LN wallet เจ้าแรกๆ ที่พัฒนา NWC มาอำนวยความสะดวกให้กับผู้ใช้งาน (อีกเจ้าที่ผมพอนึกออกตอนนี้ คือ nostr:npub1mutnyacc9uc4t5mmxvpprwsauj5p2qxq95v4a9j0jxl8wnkfvuyque23vg ไม่แน่ใจว่ามีเจ้าไหนอีกบ้าง..) ### วันนี้เราจะมาลองเชื่อมต่อ Alby NWC เข้ากับแอป Amethyst ของเรากันครับ โดยที่ใต้ Note ใดๆ ในแอป Amethyst เมื่อเรากดค้างที่ปุ่มสายฟ้า ⚡มันจะเด้งหน้าต่างให้เราสามารถกำหนดได้ว่าจะตั้งค่าการ Zap จำนวนเท่าไหร่บ้าง (กำหนดได้หลายค่า) และด้านล่างได้มีการเพิ่มระบบ NWC มาให้ด้วย ดังในภาพ https://image.nostr.build/00a9b94716bdd11dbd3f4652e2dba55379eff51b33b266cf0f6f73a855949488.jpg เราสามารถกดที่รูป QR code เพื่อแสกนการตั้งค่า NWC ที่เคยทำไว้มาได้เลย (กรณีที่เราไปทำ NWC ไว้ด้วย Browser ใน PC) หรือกดที่รูป 'ผึ้งน้อย' ไอคอน Alby ที่จะพาเราไปสู่การตั้งค่าด้วยเบราเซอร์มือถือในหน้านี้... https://image.nostr.build/7d675e06c65088c51a4e13fa7fcc7989cfd11573fc3a8d1a9909fcac28fa47cd.jpg หรือจะเข้าหน้า Alby NWC ด้วยตัวเองผ่านคอมพิวเตอร์หรือมือถือก็ได้ โดยไปที่นี่ https://nwc.getalby.com จากนั้น Alby จะขอให้เราล็อกอินด้วย Alby account เพื่อเข้าใช้งาน คราวนี้แหละที่เราต้องหัวบวมเพิ่ม ถ้าคิดจะทำบนมือถือ.. เพราะมือถือแอนดรอยด์ในตอนนี้ ยังไม่ค่อยมีเบราเซอร์ที่รองรับการล็อกอิน Alby ด้วย NIP-07 (Browser Extension) ด้วยเหตุนี้เราจึงจำเป็นต้องไปใช้ 'Kiwi browser' ครับ https://image.nostr.build/77db1552c2f0b8b65707a546d1adcd30dd2bda85f0bf1f68f4877cb963987bdb.jpg และเมื่อติดตั้ง Kiwi browser เรียบร้อยแล้ว เราต้องทำการติดตั้ง Extension ที่ชื่อว่า Flamingo 🦩 ด้วย โดยกดปุ่ม 3 จุดที่ด้านบน Kiwi เลือก Extension แล้วค้นหา Flamingo (เหมือนการติดตั้ง Extension ใน Google Chrome) เมื่อเสร็จแล้วก็เปิดใช้งานมันด้วยนะ https://image.nostr.build/52965cb65ea516ce31b8aef163d9d12921142a829fe42c1350f5c2836f63a742.jpg จากนั้นกด 3 จุดอีกครั้ง เลื่อนลงมาล่างสุดเพื่อเลือกเจ้านก Flamingo ที่เราพึ่งติดตั้งไป เราจะทำการตั้งค่ามันให้เรียบร้อย https://image.nostr.build/e8ea56d13b517a00a568282fe97767d66eae0bcad5227cf451a07203b17e4573.jpg ## ทำไมต้องใช้ Browser Extension (NIP-07) เพราะการจะเซ็นต์ Digital signature เพื่อกระทำสิ่งใดบน Nostr เราจำเป็นต้องใช้ Private key ของเรา หรือ รหัสที่ขึ้นต้นด้วย 'nsec1' เราไม่ควรนำ nsec มากรอกลงไปในเว็บเบราเซอร์ตรงๆ เพราะมีโอกาสสูงที่ Private key ของเราจะไม่ปลอดภัย เนื่องจากการแทร็คหรือแฮ็คข้อมูลส่วนตัวบนเบราว์เซอร์นั้นทำได้ง่าย เช่น ล้วงเอาจากหน่วยความจำของเบราเซอร์, จากคุ้กกี้ ฯลฯ ดังนั้นจึงได้มีการพัฒนา NIP-07 ขึ้นมา เพื่อให้เราสามารถเปิดเผย Private key (nsec) ของเราเฉพาะกับเซอร์วิซเจ้าเดียวอย่าง Browser Extension ได้นั่นเอง.. เมื่อเราจะล็อกอินเข้าใช้งานเว็บไหน หรือไคลเอนต์เจ้าไหน เราก็เพียงแค่นำรหัสที่เก็บไว้ใน Extension (NIP-07) นี้มา sign ได้เลย โดยไม่จำเป็นต้องกรอก nsec หรือเปิดเผยมันบ่อยๆ ตัวอย่างเซอร์วิซนี้ก็เช่น Alby Extention บน PC หรือ Flamingo บนมือถือนั่นเอง (บน iOS มี Nostore) ## มาทำกันต่อ.. เอาล่ะ.. เมื่อเราตั้งค่าการล็อกอินใน Flamingo เรียบร้อยแล้ว คราวนี้เราจะสามารถล็อกอินเข้าใช้งาน Alby บนมือถือเพื่อตั้งค่า NWC ได้ซะที (ที่ nwc.getalby.com) เมื่อล็อกอินเข้าสู่ Getalby NWC แล้วเราก็กดสร้างการเชื่อมต่อใหม่ (+ New connection) ได้เลย https://image.nostr.build/cd6b6294cadec1c5ce447d1f677fa60efbaeb5d9ae1b158cbbf0846190930417.jpg เราจะเข้าสู่หน้านี้ เพื่อตั้งชื่อให้กับการเชื่อมต่อรายการนี้ (เราสร้างได้มากกว่า 1 รายการ) และเราสามารถกำหนดวันหมดอายุของมัน หรือตั้งเพดานงบในการใช้จ่ายของรายการนี้ได้ด้วย https://image.nostr.build/7d895d650850375cf8729e481d903fd0207d6866dcc6b4be4a9f843a53cfc08f.jpg สำหรับ Amethyst เรายังสามารถเลือกตั้งค่าความเป็นส่วนตัวในการ Zap ได้ด้วย มีแบบเปิดเผย Public (เปิดชื่อให้ทุกคนเห็นว่าเรา Zap), Private (เปิดชื่อให้เฉพาะคนที่ได้รับ sats เห็นเท่านั้น) และ Anonymous (ไม่เปิดเผยชื่อให้ใครเห็น) นอกจากนี้ยังมีแบบที่เป็นส่วนตัวสุดๆ คือ Non-zap ที่ Nostr ไคลเอนต์ก็ไม่รู้ว่าเรา Zap ไปให้ใครยังไง เพราะเราทำและเปิดเผยธุรกรรมแค่บน LN เท่านั้น https://image.nostr.build/5467f191a011313578555fa4e371f5fd3877e76c89b0e80bda72417bc47c3ac3.jpg จากนั้นเราจะได้รหัสสำคัญสำหรับ NIP-47 จำนวน 3 รายการ ได้แก่ - Wallet Connect Pubkey - Wallet Connect Relay - Wallet Connect Secret ที่ต้องเอาไปกรอกเพื่อให้ Amethyst สามารถทำงานร่วมกับกระเป๋า Alby ของเราผ่านการใช้งาน One-Tap Zap ได้นั่นเอง https://image.nostr.build/00a9b94716bdd11dbd3f4652e2dba55379eff51b33b266cf0f6f73a855949488.jpg 3 ค่านี้เราจะเอาไปกรอกใน Amethyst หลังจากเรากดค้างที่รูป ⚡(ต้องขออภัยจริงๆ ครับ เพราะผมจำไม่ได้แล้วว่ามันเอาไปกรอกให้ออโต้ หรือต้องก้อปไปกรอกเอง) หลังจากนั้นเราก็สามารถทำอย่างในคลิปนี้ได้ละครับ https://video.nostr.build/532776ce839809674e11be95e7c9159ba6511e7a3cf5b59915161a12db8959d5.mp4 ## NWC ปลอดภัยมากแค่ไหน?? แม้จะเหมือนว่ากดไม่กี่ที เงินของเราก็พุ่งไปแล้ว แต่จริงๆ แล้ว เราก็สามารถกำหนดปริมาณ sats ที่เราจะจ่ายเอาไว้ก่อนได้ และเลือกได้ก่อนการ Zap แต่ละครั้งว่าจะจ่ายเท่าไหร่ครับ ดังนั้นโอกาสเงินรั่วก็ขึ้นกับความไม่ระวังของเราเอง เราฝาก Private key ไว้ให้ Alby, Flamingo ดูแล ซึ่งทั้งสองเจ้าเคลมว่าเขาไม่มีทางรู้คีย์ของเราได้ (ผมไม่แน่ใจว่ามันเก็บแบบไหนในทางเทคนิค) แต่มันก็เป็น trade-off ที่เราต้องเลือกเชื่อใจในตัวกลางให้น้อยที่สุด แทนที่จะเปิดเผยคีย์ในทุกที่ เราก็เปิดเผยแค่ที่เดียวที่รับประกันว่าจะไม่ล้วงคีย์เราไป มันก็ปลอดภัยกว่าแน่นอน ปลอดภัยที่สุด คือ ไม่เปิดเผยคีย์ที่ไหนเลย (แต่เราก็ยังต้องกรอกตอนเข้าใช้งานไคลเอนต์อย่าง Amethyst หรือ Damus อยู่ดีไหม?) โดยใช้วิธีเดิมคือยอมทำหลายขั้นตอนแล้วอนุมัติธุรกรรมเองดีกว่า ทั้งนี้ ความสะดวกสบายมักจะไม่ได้มาพร้อมกับความปลอดภัย แต่ถ้าเราเข้าใจเบื้องหลังของตัวเทคโนโลยีหรือโปรโตคอลดีพอ (แนะนำให้ทำการศึกษาเพิ่มเติม) เราก็สามารถตัดสินใจได้เองว่าจะเลือกใช้ความเชื่อใจของเราอย่างไร ## "Don't trust, verify!" #Nostr101 #Siamstr #nwc #alby
Boog @BlokchainB - 2y
I figured out why my #NWC went down my node was failing. After almost 3.5 years running my #umbrel raspi I am sunsetting it for good. While I gave up on being a routing node and closed all the channels and opened one big private channel to wallet of Satoshi it become much more stable. I was using it for zaps and other small ln purchases/donations but today my node randomly went down. After power cycling asking for help on telegram (and getting ignored) I reflashed the SD card and it came back. But I’m over this node being unstable. So time to close the last channel and sweep the funds. This was my first successful node and I feel sad moving on from it but after today now it is time. I’ll retire and store it away with my other bitcoin hardware. My casa node My nodl And my Coinmine 😂 Now maybe I’ll get the purposely built umbrel node. I love that I can self host NWC and use tailscale with nostr:npub1xnf02f60r9v0e5kty33a404dm79zr7z2eepyrk5gsq3m7pwvsz2sazlpr5 That alone makes me want to stay with umbrel.
I think my #NWC is broken! I can’t zap anymore. Today will be a sad day
4c32e - 2y
#BlockstreamJade https://nostr.build/i/eedcbfdeb429890afa63086e811da04ae0ec5c45fd24404f4d0bf98773c2e5fe.jpg
Alby 🐝 @Alby - 2y
Schedule Value 4 Value payments to a lightning address to support your favorite content creator Allow ZapPlanner to send payments on your behalf, that you have control to cancel whenever you wish ZapPlanner is a showcase and just one example of the possibilities that #NWC enables https://blog.getalby.com/zapplanner-periodic-payments-in-bitcoin/