damus-io / damus

iOS nostr client
GNU General Public License v3.0
2k stars 288 forks source link

BOLT12 Wallet Support #683

Open alltheseas opened 1 year ago

alltheseas commented 1 year ago

User Story

As a Damus user who wants to maximize enjoyment of nostr & LN, I want Damus wallet to support BOLT12, so that I do not have to have a LN node, code, server, domain, and TLS certificate in order to receive non-custodial zaps.

Acceptance Criteria

  1. Damus wallet supports BOLT12 non-custodial zaps by adding BOLT-12 field in profile
  2. If both BOLT12, and LNURL exist in profile, try BOLT12 first for zaps.

Reference https://bolt12.org/ Bolt12 spec https://github.com/lightning/bolts/pull/798 Bolt12 has Blockstream Core LN & eclair support + experimental C-Lightning support

Origin: @wtogami respoding to @benthecarman "If you're annoyed by WoS being down, you can always just use your own lightning node."

"It's so easy. You only need a LN node, integration code, web server, domain name, and a TLS certificate. BOLT12 makes all of that unnecessary. Users should demand it."

https://damus.io/note1xg5hnnvfxa99n0wsug7fav8gd4a98j2duepd6mxyh40cmp24jj6sk0m43y https://damus.io/note1wdsj58z2lq93s54te32lag0h5w2yrf2mh7ly88llu2dh0ph2s03qley2tz

Blocked by In app wallet #627 Relates to competing spec in LN AMP support #542

alltheseas commented 1 year ago

@wtogami notes:

"Given most nodes can't do BOLT12 the best we can do is to specify both in your profile and indicate which you want to be tried before the other."

Adding to acceptance criteria: -Add BOLT12 field in profile -If there is both BOLT12 and LNURL specified, always try BOLT12 first.

alltheseas commented 1 year ago

Clams implementation core LN of Bolt-12: https://github.com/clams-tech/browser-app/releases/tag/1.6.0

alltheseas commented 1 year ago

LDK adding Bolt12 support 2Q23

https://lightningdevkit.org/blog/ldk-roadmap/

https://lightningdevkit.org/assets/img/ldk-roadmap.08c2e5db.png

alltheseas commented 1 year ago

Update from Steve:

CLN and Eclair support it and LDK will in 1-2 months. The LNDK project will enable LND users to send to BOLT 12 offers. So wallets will be able to begin integrating this summer.

alltheseas commented 4 months ago

Phoenix wallet now supports bolt12

image

image

image

@robagreda see how a "new" feature is labeled

image

Claims doesnt need to be online 🤔. Claims route blinding.

Is this the solution for non-custodial zaps?

@jb55 what would damus need to implement bolt 12 CC @danieldaquino -bolt12 NIP? -new profile field analagous to bolt11, but for bolt12? -??

alltheseas commented 4 months ago

image

alltheseas commented 4 months ago

image

alltheseas commented 4 months ago

@jb55 on decoding a bolt12 offer

When i try to decode that in cln i get:

Offer does not contain a description, invalid token

https://damus.io/nevent1qqs0a964ketcnh7pkat6xa6hager2j676sdj42q2mut3g3x27yjfl0gpz3mhxue69uhhyetvv9ujumn0wd68ytnzvuq3gamnwvaz7tmwdaehgu3wdau8gu3wv3jhvqg0waehxw309ahx7um5wghx6mmdqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueq8nvksw

Yep, spec changed recently, but the change isn't in CLN yet.

Embarrassing, but the arguments for the change were quite compelling*. And it's the reason the final spec has not been merged.

*It also happens to reduce the size of the minimal BOLT12 tattoo! Why? Um, no reason...