module

Nostr::Delegation

NIP-26: Delegated Event Signing

An event may carry a tag ["delegation", <delegator pubkey>, <conditions>, <signature>] where <signature> is a Schnorr signature by the delegator over sha256("nostr:delegation:<delegatee pubkey>:<conditions>").

Instance methods

valid?(pubkey : String, kind : Int32, created_at : Int64, tags : Array(Array(String))) : Bool

Returns true when the event carries no delegation tag, or when the delegation tag is well formed, its conditions are satisfied and its signature is valid.

Source