Documentation
¶
Overview ¶
Package nip26 implements NIP-26: Delegated Event Signing, letting an issuer authorize a delegate pubkey to sign events on its behalf within caller-defined conditions (event kind, creation-time window).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidPubkey = errors.New("nip26: invalid pubkey") ErrInvalidSignature = errors.New("nip26: invalid delegation signature") ErrInvalidCondition = errors.New("nip26: malformed condition") ErrConditionNotMet = errors.New("nip26: event does not satisfy delegation condition") )
Failure modes for VerifyDelegationToken/ValidateConditions, for callers that need to distinguish them (e.g. via errors.Is) rather than match on message text.
Functions ¶
func SignDelegationToken ¶ added in v0.2.2
SignDelegationToken signs a delegation token for a delegate pubkey and conditions. privkey: Issuer's private key (hex) delegatePubkey: Delegate's public key (hex) conditions: Delegation conditions (e.g., "kind=25521")
func ValidateConditions ¶
ValidateConditions checks if an event satisfies the delegation conditions.
func VerifyDelegationToken ¶
VerifyDelegationToken verifies a delegation token signature.
Types ¶
This section is empty.