-
Notifications
You must be signed in to change notification settings - Fork 1
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
im-adithya
wants to merge
7
commits into
master
Choose a base branch
from
task-nip05
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: add nip-05 #15
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9624792
feat: add nip-05
im-adithya bb22c24
chore: move well-known links to folder
im-adithya e3db3a1
chore: verify nostr pubkey before user creation
im-adithya b194335
Merge branch 'master' into task-nip05
im-adithya aa631a8
chore: add payerdata and nostr info to lnurlp well known
im-adithya 6ac2eb0
fix: do not allow user creation without nostr pubkey
im-adithya 11c67a4
chore: end file with new line
im-adithya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE "users" ADD COLUMN "nostr_pubkey" text;--> statement-breakpoint | ||
ALTER TABLE "users" ADD CONSTRAINT "users_nostr_pubkey_unique" UNIQUE("nostr_pubkey"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
{ | ||
"id": "0158a5e2-5076-4051-8e8d-2d382552344d", | ||
"prevId": "52607bd8-7a1a-4a34-ad27-91b78733e85c", | ||
"version": "7", | ||
"dialect": "postgresql", | ||
"tables": { | ||
"public.invoices": { | ||
"name": "invoices", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"user_id": { | ||
"name": "user_id", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"amount": { | ||
"name": "amount", | ||
"type": "bigint", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"description": { | ||
"name": "description", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"payment_request": { | ||
"name": "payment_request", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"payment_hash": { | ||
"name": "payment_hash", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"preimage": { | ||
"name": "preimage", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"metadata": { | ||
"name": "metadata", | ||
"type": "jsonb", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"settled_at": { | ||
"name": "settled_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "now()" | ||
} | ||
}, | ||
"indexes": { | ||
"user_id_idx": { | ||
"name": "user_id_idx", | ||
"columns": [ | ||
{ | ||
"expression": "user_id", | ||
"isExpression": false, | ||
"asc": true, | ||
"nulls": "last" | ||
} | ||
], | ||
"isUnique": false, | ||
"concurrently": false, | ||
"method": "btree", | ||
"with": {} | ||
}, | ||
"user_payment_hash_idx": { | ||
"name": "user_payment_hash_idx", | ||
"columns": [ | ||
{ | ||
"expression": "user_id", | ||
"isExpression": false, | ||
"asc": true, | ||
"nulls": "last" | ||
}, | ||
{ | ||
"expression": "payment_hash", | ||
"isExpression": false, | ||
"asc": true, | ||
"nulls": "last" | ||
} | ||
], | ||
"isUnique": false, | ||
"concurrently": false, | ||
"method": "btree", | ||
"with": {} | ||
} | ||
}, | ||
"foreignKeys": { | ||
"invoices_user_id_users_id_fk": { | ||
"name": "invoices_user_id_users_id_fk", | ||
"tableFrom": "invoices", | ||
"tableTo": "users", | ||
"columnsFrom": [ | ||
"user_id" | ||
], | ||
"columnsTo": [ | ||
"id" | ||
], | ||
"onDelete": "cascade", | ||
"onUpdate": "no action" | ||
} | ||
}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": { | ||
"invoices_payment_request_unique": { | ||
"name": "invoices_payment_request_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"payment_request" | ||
] | ||
}, | ||
"invoices_payment_hash_unique": { | ||
"name": "invoices_payment_hash_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"payment_hash" | ||
] | ||
} | ||
} | ||
}, | ||
"public.users": { | ||
"name": "users", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"connection_secret": { | ||
"name": "connection_secret", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"username": { | ||
"name": "username", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"nostr_pubkey": { | ||
"name": "nostr_pubkey", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "now()" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": { | ||
"users_username_unique": { | ||
"name": "users_username_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"username" | ||
] | ||
}, | ||
"users_nostr_pubkey_unique": { | ||
"name": "users_nostr_pubkey_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"nostr_pubkey" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"enums": {}, | ||
"schemas": {}, | ||
"sequences": {}, | ||
"_meta": { | ||
"columns": {}, | ||
"schemas": {}, | ||
"tables": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.