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

Nostr integration

Open reneaaron opened this issue 3 years ago • 5 comments
trafficstars

Describe the changes you have made in this PR

Closes #1233

Type of change (Remove other not matching type)

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

reneaaron avatar Sep 13 '22 20:09 reneaaron

Socket Security Report

👍 No new dependency issues detected in pull request

Socket.dev scan summary
Issue Status
Did you mean? ✅ no new possible package typos
Install scripts ✅ no new install scripts
Telemetry ✅ no new telemetry
Troll package ✅ no new troll packages
Malware ✅ no new malware
Native code ✅ no new native modules
Bin Script Confusion ✅ no new bin script confusions
Bin script shell injection ✅ no new bin script shell injection
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] [email protected]

⚠️ Please accept the latest app permissions to ensure bot commands work properly. Accept the new permissions here.

Powered by socket.dev

socket-security[bot] avatar Sep 13 '22 20:09 socket-security[bot]

🚀 Thanks for the pull request!

Here are the current build files for testing:

Download and unzip the file for your browser. Refer to the readme for detailed install instructions.


This build is brought to you by: Adam Fiscor (who recently dropped 1337 sats):

The future is bright. We just have a lot of work to do.

Want to sponsor the next build? send some sats to ⚡️[email protected] (don't forget to provide your name)

Don't forget: keep earning sats!

github-actions[bot] avatar Sep 13 '22 20:09 github-actions[bot]

Implemented a first working version.

Some notes:

  • nip04.encrypt / nip04.decrypt will be added in a separate step (maybe it makes sense to create some more generic confirm pages that can be reused across the application)
  • We might want to add a "remember" function sooner than later to prevent popups for every action on the site
  • Blocking functionality is also implemented for nostr (if you block a site it's blocked extension-wide)
  • Do we need separate keys on an account level? (currently they are on a global level which means you can have only one private key for all of your accounts)

reneaaron avatar Oct 02 '22 17:10 reneaaron

Review

  • [x] Save private key in encrypted storage (saveEncryptedSetting)
  • [x] Check for window.postMessage()
  • [x] Check handling for multiple calls in parallel (while still a window is open)
  • [x] Prefix webln actions
  • [x] Check if nostr-tools are necessary
  • [x] Scope public calls to postMessage

reneaaron avatar Oct 03 '22 10:10 reneaaron

nit: button color on dark-mode looks off:
image

Following your video, using this branch and Chromium I get: image Do I need to user another browser? Copying & pasting the key manually successfully creates an account for me though.

escapedcat avatar Oct 05 '22 07:10 escapedcat

When I have my extension locked and go to nostr.chat I get this error: Uploading image.png…

bumi avatar Oct 17 '22 16:10 bumi