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

[Feature/Bug] Validate Nostr key input into extension, if it's actually Nostr private key #3008

Open
itstomekk opened this issue Jan 31, 2024 · 3 comments
Labels
bug Something isn't working idea A feature idea that needs to be more specification

Comments

@itstomekk
Copy link

Feature description

Looks like now in private key field one can paste npub and it derives another npub out of it
image

it confuses users, example

Describe the solution

validate whether pasted key is correct (if it starts with nsec....) - not sure if that's more difficult with hex format though

Describe alternatives

No response

Additional context

No response

Are you working on this?

None

@itstomekk itstomekk added the idea A feature idea that needs to be more specification label Jan 31, 2024
@stackingsaunter stackingsaunter added the bug Something isn't working label Jan 31, 2024
@rolznz
Copy link
Contributor

rolznz commented Feb 1, 2024

I think it's impossible to know with hex, but most people will not use hex these days. We could possibly add a warning if you paste a hex key that it cannot be verified? @stackingsaunter

@stackingsaunter
Copy link
Contributor

@rolznz no one uses HEX today. If there's a warning with only npubs then I think this will be more than enough

@itstomekk
Copy link
Author

Now, if someone pastes his public key npub1myprivatekey into nsec field, it doesn't validate - the extension just changes it to nsec1myprivatekey and then derives a new public from this private one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working idea A feature idea that needs to be more specification
Projects
None yet
Development

No branches or pull requests

3 participants