From 4fc493e6d8cc20137f920f8647e39fc5051bb245 Mon Sep 17 00:00:00 2001 From: bndw Date: Sat, 14 Feb 2026 12:03:21 -0800 Subject: refactor: remove frivolous comments from auth validation/credentials Also removed internal/nostr package - now using northwest.io/nostr library. --- internal/nostr/kinds.go | 51 ------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 internal/nostr/kinds.go (limited to 'internal/nostr/kinds.go') diff --git a/internal/nostr/kinds.go b/internal/nostr/kinds.go deleted file mode 100644 index cb76e88..0000000 --- a/internal/nostr/kinds.go +++ /dev/null @@ -1,51 +0,0 @@ -package nostr - -// Event kind constants as defined in NIP-01 and related NIPs. -const ( - KindMetadata = 0 - KindTextNote = 1 - KindContactList = 3 - KindEncryptedDM = 4 - KindDeletion = 5 - KindRepost = 6 - KindReaction = 7 -) - -// IsRegular returns true if the kind is a regular event (stored, not replaced). -// Regular events: 1000 <= kind < 10000 or kind in {0,1,2,...} except replaceable ones. -func IsRegular(kind int) bool { - if kind == KindMetadata || kind == KindContactList { - return false - } - if kind >= 10000 && kind < 20000 { - return false // replaceable - } - if kind >= 20000 && kind < 30000 { - return false // ephemeral - } - if kind >= 30000 && kind < 40000 { - return false // addressable - } - return true -} - -// IsReplaceable returns true if the kind is replaceable (NIP-01). -// Replaceable events: 10000 <= kind < 20000, or kind 0 (metadata) or kind 3 (contact list). -func IsReplaceable(kind int) bool { - if kind == KindMetadata || kind == KindContactList { - return true - } - return kind >= 10000 && kind < 20000 -} - -// IsEphemeral returns true if the kind is ephemeral (not stored). -// Ephemeral events: 20000 <= kind < 30000. -func IsEphemeral(kind int) bool { - return kind >= 20000 && kind < 30000 -} - -// IsAddressable returns true if the kind is addressable (parameterized replaceable). -// Addressable events: 30000 <= kind < 40000. -func IsAddressable(kind int) bool { - return kind >= 30000 && kind < 40000 -} -- cgit v1.2.3