Implement NIP-86 signevent

Adds the signevent capability from nostr-protocol/nips#2389: a relay admin can
ask the relay to sign an unsigned event template with the relay's own (self) key
and get back the full signed event. Useful for minting NIP-43 relay-level role
events on behalf of the relay.

- ManagementStore.SignEvent signs the template via Config.Sign (relay self key).
- Wired to instance.Relay.ManagementAPI.SignEvent; admin-gated by the existing
  OnAPICall middleware, and auto-advertised via supportedmethods.
- Bumps the nostrlib replace to the signevent branch which adds the nip86 decode
  case + khatru dispatch hook.

NOTE: go.sum still needs `go mod tidy` to record the new nostrlib pseudo-version
hash (no Go toolchain was available in this environment to run it). Not built or
tested here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsMjvv7krpZeHK1Njeneru
This commit is contained in:
2026-06-20 15:07:59 +00:00
parent e992b84f4f
commit 42435b38ad
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -132,4 +132,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)
replace fiatjaf.com/nostr => gitea.coracle.social/Coracle/nostrlib v0.0.0-20260505183642-fefc85d50080
replace fiatjaf.com/nostr => gitea.coracle.social/Coracle/nostrlib v0.0.0-20260620150617-d1bc98d0f85b