-
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
Add username registration and lightning address handling #7
base: main
Are you sure you want to change the base?
Conversation
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.
Looking good. Some comments just to show I've reviewed.
persist/pg.go
Outdated
func (s *PgStore) getPubkeyUsername(ctx context.Context, pubkey []byte) (*PubkeyUsername, error) { | ||
rows, err := s.pool.Query( | ||
ctx, | ||
`SELECT encode(pubkey, 'hex') pubkey, username |
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.
Don't have to select the pubkey 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.
LGTM
bdd6517
to
03b7b4a
Compare
03b7b4a
to
077f74f
Compare
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.
LGTM
This PR adds the option to register a username along with the pubkey. Registration of the username enables
<username>@<lnurl.domain>
type requests to be handled by the service.Registration of a username is optional and if included needs to be signed with the request. The username must be unique in that it is not already registered by another pubkey. Registration of another username to the same pubkey will overwrite the existing username. The usernames are stored in a separate table to insure they are not removed during cleaning.