lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

feat: add lawallet extension support

Open agustinkassis opened this issue 1 year ago • 15 comments

Describe the changes you have made in this PR

Adding LaWallet.io extension. Full support with NIP-05 and LUD-16.

Added nostr-tools as lawallet stack requires nostr websocket connection.

Type of change

  • feat: New feature (non-breaking change which adds functionality)

How has this been tested?

You can generate a random private key and test if for yourself.

  • Create Account
  • Receive funds (Generate Invoice)
  • Notify transaction (Zap)
  • Pay Invoice
  • Retrieve Lightning address

Checklist

  • [x] Self-review of changed code
  • [x] Manual testing

agustinkassis avatar Dec 14 '23 20:12 agustinkassis

Please 🫶🏻

unllamas avatar Dec 19 '23 22:12 unllamas

Interesting contribution on lightning.

Braianalvez avatar Dec 19 '23 22:12 Braianalvez

Please consider this PR

LaWallet is a Custodial Bitcon comparable to WoS but linking all the entries up to Nostr in a smart way to provide a good UX and remain secure.

Fierillo avatar Dec 19 '23 22:12 Fierillo

I need LaWallet in Alby please🤩

rapax00 avatar Dec 20 '23 15:12 rapax00

Hi @bumi @pavanjoshi914 , could you take a look at this?

LaWallet.ar is a custody wallet that we are developing 🫶🏻

unllamas avatar Jan 04 '24 12:01 unllamas

@agustinkassis thanks for the PR!! @unllamas we're on it and it's on the list. It would probably be nice to tell users where they can signup for the wallet.

bumi avatar Jan 04 '24 12:01 bumi

For testing:

  1. Create account at https://app.btcpp.ar/

  2. Copy private key from https://app.btcpp.ar/settings/recovery/

  3. Set identity endpoint to https://btcpp.ar

Receiving, sending, transaction list look great. Lightning address works fine.

Things I noticed:

  • In the connector setup it says "Connect to your LaWallet Stack" - maybe just "Connect to LaWallet" (less technical)?
  • When first connecting the balance shows 0. But afterwards the balance is ok. Maybe this should be fixed? otherwise users will think there is an issue with their account.
  • Having to set the identity endpoint was not obvious - I luckily saw you do it in the demo. Will everyone have to do this?
    • If so, can you give instructions on how the user can connect?
    • If you don't have an account or the identity endpoint is wrong, the setup just spins and doesn't show any error

rolznz avatar Mar 08 '24 04:03 rolznz

Does Lawallet support re-connecting to the relay? the connector became unresponsive and I had to restart my browser to re-connect.

Also, my balance then showed 0 again and took a while to update.

rolznz avatar Mar 08 '24 04:03 rolznz

Just tested it and works quite great! :rocket: However I noticed some problems during testing:

  1. Memos for invoices

When I create an invoice and enter a memo the memo seems not to be added to the invoice and won't show up in the payment screen as well as the transaction list.

  1. The WebLN integration also seems to have some problems currently:
  • the preimage isn't returned for webln.sendPayment() calls
  • the payment_hash field seems to contain the invoice
  • the alias seems to contain the username (while that should be something to identify the node, e.g. lacrypta-villanueva)

reneaaron avatar Mar 08 '24 07:03 reneaaron

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

socket-security[bot] avatar Mar 10 '24 14:03 socket-security[bot]

Thank you very for your help on this. I'm working to fix any details you provide.

I resolved the zero balance bug and the relay reconnection issue by transitioning the getBalance and getTransactions functions from WebSocket to REST.

In regards with

  • Having to set the identity endpoint was not obvious - I luckily saw you do it in the demo. Will everyone have to do this?

I've made adjustments to prioritize and highlight its importance, akin to that of the private key. Additionally, I plan to incorporate an error notification for incorrect identity API inputs, guiding users to verify this setting carefully.

I am continuing to refine a few more aspects and will integrate the preimage, payment_hash and alias shortly.

agustinkassis avatar Mar 10 '24 14:03 agustinkassis

Done with every requirement, please let me know if you have any more suggestions.

agustinkassis avatar Mar 14 '24 16:03 agustinkassis

@agustinkassis from where i can generate random private key? on btcapp.ar I only see login option which asks me for private key or from where I can create account for lawallet

pavanjoshi914 avatar Apr 18 '24 08:04 pavanjoshi914

Hey pavan, lawallet.io is a stack, so everyone has a different policy on signing up for a walias (lightning address). You can get one from https://app.lawallet.ar/signup

A new private key is generated https://github.com/lawalletio/la-wallet-monorepo/blob/8bcc6dc58bfc58882f2a699b49f152a7c701696f/packages/utils/src/interceptors/identity.ts#L16

agustinkassis avatar Apr 24 '24 03:04 agustinkassis

@agustinkassis any updates here?

pavanjoshi914 avatar May 01 '24 09:05 pavanjoshi914

@agustinkassis any updates here?

Done with all the comments. Everything is up to as requested.

agustinkassis avatar May 09 '24 19:05 agustinkassis

I addressed all the mentioned issues. You can always add customization or optimizations to infinity. The PR has been delayed for months already. Let's merge it as we agreed before and we can then add more resources for future tweaks.

agustinkassis avatar May 14 '24 18:05 agustinkassis

Thanks for the PR @agustinkassis works great! merging it :rocket:

pavanjoshi914 avatar May 15 '24 08:05 pavanjoshi914

AMAZING!!! I'm very happy. Thanks @pavanjoshi914 and Alby🐝

rapax00 avatar May 15 '24 18:05 rapax00