Nostr. Event. HttpAuth
(Nostr Lib v0.2.1)
(event)
(nip98)
View Source
HTTP authentication events (kind 27235).
Implements NIP-98: https://github.com/nostr-protocol/nips/blob/master/98.md
Required tags:
u- absolute request URLmethod- HTTP method
Optional tags:
payload- request payload SHA256 hash (hex)
Summary
Types
@type t() :: %Nostr.Event.HttpAuth{ event: Nostr.Event.t(), method: String.t() | nil, payload: String.t() | nil, url: String.t() | nil }
Functions
Creates a new HTTP auth event.
Options
:payload- raw request body to hash into apayloadtag:payload_hash- precomputed SHA256 hex for thepayloadtag:pubkey- event pubkey (optional):created_at- event timestamp (optional):tags- additional tags to append (optional):content- event content (defaults to empty string)
@spec parse(Nostr.Event.t()) :: t() | {:error, String.t(), Nostr.Event.t()}
Parses a kind 27235 event into an HttpAuth struct.