notedeck
notedeck copied to clipboard
LN Wallet Tracker
user story
As someone who has just completed onboarding to notedeck, I want to be able to send zaps & receive zaps, so that I can experience the full experience of private property rights, freedom of speech, and freedom of association on nostr immediately.
acceptance criteria
Immediately upon onboarding,
- user automagically has a LN address generated,
- user is notified of this address, and where they can find it,
- user can receive zaps (sats) to this address,
- user can send zaps (sats) from this wallet,
- user can see balance (in sats),
- user is notified of received zaps (timestamp, amount, type, and sender; e.g. could be a toast)),
- user is notified of sent zaps (timestamp, amount, type, recipient; e.g. could be a toast)
- user has a history of zap sends & zap receipts,
- one tap zaps are possible,
- wallets are associated with a single account. if user logs out of said account, wallet connection no longer remains available for use until user logs back-in to said account (i.e. wallet NWC connection is stored in memory by notedeck)
- there is a method to manually associate (e.g. via #237 ) a keypair with an existing wallet,
- there is a zap sound that can be toggled off
@kernelkind @jb55
Suggestion from someone who worked at lightning labs:
If I may offer my 2 sats worth: having built the reference wallet at Lightning Labs in 2018/2019 and observing other apps in the ecosystem try to tame the self-custodial lightning complexity beast since then... I suspect a wise move might be to integrate a custodial ecash-only wallet in v1. Then add the self-custodial part using LDK in v2. That will allow Damus to ship quickly to compete with Primal’s custodial wallet and offer a security upgrade in v2. I suspect many users will only keep a few pocket sats in their Damus wallet for zaps initially anyway. I do like prospects of self-custody and using this as my primary mobile wallet longterm. After a certain threshold of sats the fedimint wallet could splice into the self-custody LDK wallet and allow Damus users to hold medium sized amounts.
I will break this larger ticket down into smaller chunks.
@robagreda how migt we delight the newly onboarded user with wallet onboarding?
A few example objectives: I. Before receiving first zap -communicate user has a LN wallet -show their address -encourage them to post wholesome, useful content, so that they can receive zaps -advanced settings: point user to CoinOS website
II. After receiving first zap -show user how to zap notes, zap profiles -educate on different types of zaps
NWC seems like the way to go for Notedeck. It works quite well in Alby browser extension, Snort, Amethyst, and others. We'd like to help with the NWC implementation where possible. I think one of the most complete and easy-to-understand public code bases which implements NWC in the way that NoteDeck should likely implement it... is Snort.. see the code here: https://github.com/v0l/snort/blob/3c4fe85694d1407bd932922c3164bd6f0a973fc9/packages/wallet/src/NostrWalletConnect.ts#L80
NWC seems like the way to go for Notedeck. It works quite well in Alby browser extension, Snort, Amethyst, and others. We'd like to help with the NWC implementation where possible. I think one of the most complete and easy-to-understand public code bases which implements NWC in the way that NoteDeck should likely implement it... is Snort.. see the code here: https://github.com/v0l/snort/blob/3c4fe85694d1407bd932922c3164bd6f0a973fc9/packages/wallet/src/NostrWalletConnect.ts#L80
https://github.com/damus-io/notedeck/issues/237