View Source NostrBasics.Models.Delete (NostrBasics v0.1.5)
Delete event struct and manipulation functions
Link to this section Summary
Functions
Convert a delete model to a nostr event
Link to this section Types
Link to this section Functions
@spec to_event(t(), NostrBasics.Keys.PublicKey.id()) :: {:ok, NostrBasics.Event.t()} | {:error, String.t()}
Convert a delete model to a nostr event
examples
Examples
iex> %NostrBasics.Models.Delete{
...> event_ids: ["note1ufw7j6w60xaq04qvwxs2002jt5d8uwe5el7tw2fkfskvnl8f9d7sp9xfah"],
...> note: "these posts were published by accident"
...> }
...> |> NostrBasics.Models.Delete.to_event(<<0x5ab9f2efb1fda6bc32696f6f3fd715e156346175b93b6382099d23627693c3f2::256>>)
{
:ok,
%NostrBasics.Event{
pubkey: <<0x5ab9f2efb1fda6bc32696f6f3fd715e156346175b93b6382099d23627693c3f2::256>>,
kind: 5,
tags: [
["e", "e25de969da79ba07d40c71a0a7bd525d1a7e3b34cffcb729364c2cc9fce92b7d"],
],
content: "these posts were published by accident"
}
}