Skip to main content

Module nostr_embed

Module nostr_embed 

Source
Expand description

Nostr content referenced from a chat message (a post, an article, a video), fetched from relays and shaped for an inline card.

A reference is a note1/nevent1/naddr1 entity, bare, as a nostr: URI, or as the last path segment of a web link. The web site itself is never contacted: the event comes from relays and is verified before it is shown.

Structs§

Embed
One referenced event, shaped for its card.
EmbedMedia
A playable or viewable file a post or video carries.
ReplyTo
A comment’s parent: a Nostr event, or a scope outside Nostr (NIP-73).

Enums§

EmbedRef
What a reference points at, as decoded from its bech32.

Constants§

KIND_ARTICLE
KIND_COMMENT
NIP-22: a plaintext reply scoped to what it answers, outside kind 1’s own threads.
KIND_GENERIC_REPOST
KIND_POST
KIND_REPOST
KIND_SHORT
KIND_SHORT_ADDRESSABLE
KIND_VIDEO
KIND_VIDEO_ADDRESSABLE

Functions§

fetch
Fetch and shape the event reference (a bare entity, a nostr: URI, or a web link ending in one). Repeated asks within a session are answered from memory.