Skip to content

Commit

Permalink
Nip46 auth with NDK (#1636)
Browse files Browse the repository at this point in the history
* ndk

* fix: remove duplicated zap note event template

* don't init Nip07 signer by default

* Update wallets/nwc/server.js

Co-authored-by: Copilot <[email protected]>

* nwc protocol parsing workaround

* WebSocket polyfill for worker

* increase nwc timeout

* remove NDKNip46Signer type

* fix type annotation

* move  eslint-disable camelcase to the top

* pass event args to the constructor

* fix error handling

* Update wallets/nwc/index.js

Co-authored-by: ekzyis <[email protected]>

* nip46 auth

* style tweak, remove unmaintained signers from the list

* don't use modal

* workaround url parsing

* use kind 27235

* add kind 27235 metadata

* show suggestion after a timeout

* Update lib/nostr.js

Co-authored-by: ekzyis <[email protected]>

* Update components/nostr-auth.js

Co-authored-by: ekzyis <[email protected]>

* fix unrelated lnauth crash when closing ext prompt

* make ui consistent ...

* give buttons spacing

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: ekzyis <[email protected]>
Co-authored-by: Keyan <[email protected]>
Co-authored-by: k00b <[email protected]>
  • Loading branch information
5 people authored Dec 14, 2024
1 parent 2852038 commit bdd2413
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ SLACK_BOT_TOKEN=
SLACK_CHANNEL_ID=

# lnurl ... you'll need a tunnel to localhost:3000 for these
LNAUTH_URL=
LNWITH_URL=
LNAUTH_URL=http://localhost:3000/api/lnauth
LNWITH_URL=http://localhost:3000/api/lnwith

########################################
# SNDEV STUFF WE PRESET #
Expand Down
2 changes: 1 addition & 1 deletion components/lightning-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function QrAuth ({ k1, encodedUrl, callbackUrl, multiAuth }) {
await window.webln.enable()
await window.webln.lnurl(encodedUrl)
}
effect()
effect().catch(console.error)
}, [encodedUrl])

// output pubkey and k1
Expand Down
Loading

0 comments on commit bdd2413

Please sign in to comment.