From 90f38c3a588f86e6ea19fa8385f4dc2af60f0084 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 1 Jan 2026 12:22:20 -0500 Subject: [PATCH] adds a isRegular filter for the Kind alias --- .../kotlin/com/vitorpamplona/quartz/nip01Core/core/Kind.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/core/Kind.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/core/Kind.kt index 0aea6ba6f..7bf8cefb3 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/core/Kind.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/core/Kind.kt @@ -25,6 +25,8 @@ import com.vitorpamplona.quartz.nip02FollowList.ContactListEvent typealias Kind = Int +fun Kind.isRegular() = this > 0 && this != ContactListEvent.KIND && this < 10_000 + fun Kind.isEphemeral() = this >= 20_000 && this < 30_000 fun Kind.isReplaceable() = this == MetadataEvent.KIND || this == ContactListEvent.KIND || (this >= 10_000 && this < 20_000)