Skip to content

Conversation

@robwoodgate
Copy link
Contributor

Adds optional signString() method specified in nostr-protocol/nips#1842
Fixes KeyPair.ts filename case that was causing build errors

@robwoodgate
Copy link
Contributor Author

Will close #13

@neilck
Copy link
Owner

neilck commented Mar 21, 2025

I like the fact that its signing a hash that it calculates. This is much safer than previous general signing proposals where people could pass in anything. I might put in some checking to ensure the message isn't a nostr event trying to bypass permission checks. I'll merge it in in the next couple of days.

@robwoodgate
Copy link
Contributor Author

Thanks - yes, I thought it was important the user has a chance to see what they are signing, rather than a random hash.

Also returning all the elements needed to verify what was signed and by whom.

I have used the same implementation I gave to nos2x, but the raw message string input also gives you scope to expand the method later to check the message string for a pubkey and sign using that user rather than selected user, as you have done for the signEvent()

@robwoodgate
Copy link
Contributor Author

Hey @neilck - I've added a string and validateEvent security check. If you want me to rebase into a single commit, let me know.

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.

2 participants