View Source Nostr.Event.Signer (Nostr v0.1.2)

Link to this section Summary

Functions

Applies the schnorr signatures to an event and adds signature to it if successful

Link to this section Functions

Link to this function

sign_event(event, privkey)

View Source
@spec sign_event(
  %Nostr.Event{
    content: term(),
    created_at: term(),
    id: term(),
    kind: term(),
    pubkey: term(),
    sig: term(),
    tags: term()
  },
  K256.Schnorr.signing_key()
) ::
  {:ok,
   %Nostr.Event{
     content: term(),
     created_at: term(),
     id: term(),
     kind: term(),
     pubkey: term(),
     sig: term(),
     tags: term()
   }}
  | {:error, binary()}

Applies the schnorr signatures to an event and adds signature to it if successful