WIP: Add NIP-26 delegation tag support #4
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nostr/nostr-types!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "delegation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Add support for complete NIP-26 delegation tags: create a delegation tag, validate a delegation tag.
Checklists
Notes
delegation::DelegationError) could be consolidated into mainErrorstruct.First off, thanks for doing this. That's quite a lot of code.
I'd like to integrate this more closely with the rest of how nostr-types works. A delegation tag should be an enum variant within
Taginsrc/types/tag.rs. It needs to serialize/deserialize as aTag. Otherwise we will not recognize these tags when they come in, they will beTag::Other.Thanks for checking.
The
Tag::Delegationtag already exists; I will rework starting from that.I will also leave out some of the code, and leave only what's needed for #4 (condition parsing is only needed when validating a delegation of a message).
I mostly took code from https://github.com/rust-nostr/nostr/pull/46 and hacked into nostr-types, but not all is needed.
It turned out #4 only needs delegation tag parsing&serialization, which is already present in
nostr-types.Closing this PR.
Signature validation, and condition parsing and validation could be added here later.
Pull request closed