View Source Nostr.Tag (Nostr Lib v0.1.1)
Nostr Event tag
Summary
Types
Functions
Create new Nostr tag
Each tag needs to have type and at least one data field. If tag requires more then one data field supply them as third argument (list of strings)
Example:
iex> Nostr.Tag.create(:e, "event-id", ["wss://relay.example.com"])
%Nostr.Tag{type: :e, data: "event-id", info: ["wss://relay.example.com"]}
iex> Nostr.Tag.create(:p, "pubkey")
%Nostr.Tag{type: :p, data: "pubkey", info: []}
@spec parse(tag :: nonempty_maybe_improper_list()) :: t()
Parse JSON list into Elixir struct