NIP-XX: Improved event signing scheme #1258
Open
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.
Alright buckle up, here I come with a wacky idea that I found out through #225. When I saw it at the time I thought that it would break backwards compatibility but to my surprise I think it does not have to.
The basic idea is to have a new signing scheme that allows for arbitrary JSON fields, which IMO would make better use of the fact that nostr events are just JSON objects than using tags as is done now. The current signing scheme is still used but I propose adding a new field that holds the signature over all of the object's fields as done by Perkeep. Therefore, existing clients can continue to work the same.
I thought about doing the same thing for the Id field since it is currently also not aware of any other fields besides the ones described in NIP-01. However, I am unsure about the utility of this since it would increase the size at no clear advantage.
Please let me know your thoughts and concerns.