View Source Nex.Messages.Event (Nex v0.1.0-beta.1)
Nostr Event schema.
See NIP-01.
Link to this section Summary
Functions
Calculates the ID for the given event. Returns a hex-encoded ID.
Returns a changeset from the given params.
Returns the ID preimage for the given event. Clients will sign this value.
Returns a changeset from the given params.
Link to this section Types
Link to this section Functions
@spec calc_id(Ecto.Schema.t()) :: String.t()
Calculates the ID for the given event. Returns a hex-encoded ID.
@spec changeset(Ecto.Schema.t(), map()) :: Ecto.Changeset.t()
Returns a changeset from the given params.
This base changeset validates the presents and format of all fields, but does not verify the event ID or signature.
@spec id_preimage(Ecto.Schema.t()) :: String.t()
Returns the ID preimage for the given event. Clients will sign this value.
@spec verify_changeset(Ecto.Schema.t(), map()) :: Ecto.Changeset.t()
Returns a changeset from the given params.
As f:changeset/2
but also verifies the event ID and signature.