Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nip-05 #15

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

feat: add nip-05 #15

wants to merge 7 commits into from

Conversation

im-adithya
Copy link
Member

Fixes #5

Also fixes the create users endpoint which returns server error when something goes wrong (no secret, same username and now same nostr pubkey etc)

@im-adithya im-adithya requested review from bumi and rolznz December 13, 2024 09:31
@im-adithya
Copy link
Member Author

im-adithya commented Dec 13, 2024

Is this a "must", because of #7? Currently this is optional

@rolznz
Copy link
Collaborator

rolznz commented Dec 17, 2024

Is this a "must", because of #7? Currently this is optional

Yes, I think so

@@ -4,6 +4,7 @@ export const users = pgTable("users", {
id: serial("id").primaryKey(),
encryptedConnectionSecret: text("connection_secret").notNull(),
username: text("username").unique().notNull(),
nostrPubkey: text("nostr_pubkey").unique(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be unique. It's a contact pubkey, and one person could create two or more lightning addresses

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In getalby.com you see this error message if you use an existing pubkey:

Screenshot 2024-12-17 at 4 51 09 PM

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bumi do you have any thoughts here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we make it not unique, it's not really protecting anything as discussed.

src/lnurlp.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support nostr pubkey / NIP-05
3 participants