nip94: add missing tags to FileMetadata (ox, thumb, image, summary, alt)#1321
Closed
PrarthanaPurohit wants to merge 1 commit into
Closed
Conversation
Member
3 tasks
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
Apr 30, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
Apr 30, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 1, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
3 tasks
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 4, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 5, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 5, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 5, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 5, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 5, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 7, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 7, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 7, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc
added a commit
to yukibtc/nostr
that referenced
this pull request
May 12, 2026
Closes nostrdevkit#1320 Replaces nostrdevkit#1321 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Member
|
Replaced by #1347 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Completes the
FileMetadatastruct innostr::nips::nip94to match the full NIP-94 spec.The following tags were missing from the struct and are now supported:
oxoriginal_hashthumbthumbimageimagesummarysummaryaltaltfallbackfallbackChanges span three files:
event/tag/kind.rs— addsTagKind::Ox("ox") andTagKind::Fallback("fallback")event/tag/standard.rs— addsTagStandard::OriginalHash(Sha256Hash)andTagStandard::Fallback(Url)with parsing and serializationnips/nip94.rs— adds the six new fields toFileMetadata, builder methods for each, and updatesFrom<FileMetadata> for Vec<Tag>andTryFrom<Vec<Tag>> for FileMetadatafor full round-trip fidelity. Three new tests cover the added fields.Notes to the reviewers
oxis a two-character tag so it cannot useSingleLetterTag. A dedicatedTagKind::Oxvariant is added following the same pattern as other named kinds (e.g.TagKind::Blurhash,TagKind::Magnet).fallbackmaps to multiple tags (one per URL) rather than a single multi-value tag, matching the NIP-94 spec.FileMetadatastores them asVec<Url>andFromemits one["fallback", url]tag per entry;TryFromcollects all of them.thumbandimagealready existed asTagStandard::Thumb(Url, Option<ImageDimensions>)andTagStandard::Image(Url, Option<ImageDimensions>).FileMetadatastores only theUrl(NIP-94 does not specify dimensions for these) and serializes withNonefor the dimension slot.Checklist