From 879e5fc52cc96830b1b4b77ac2f2b2ab567a8edd Mon Sep 17 00:00:00 2001 From: KotlinGeekDev Date: Fri, 26 Sep 2025 15:53:18 +0100 Subject: [PATCH 1/2] Fix doc for RelayMessage. --- .../commonMain/kotlin/rhodium/nostr/relay/RelayMessage.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rhodium-core/src/commonMain/kotlin/rhodium/nostr/relay/RelayMessage.kt b/rhodium-core/src/commonMain/kotlin/rhodium/nostr/relay/RelayMessage.kt index f65bd51..1be9b09 100644 --- a/rhodium-core/src/commonMain/kotlin/rhodium/nostr/relay/RelayMessage.kt +++ b/rhodium-core/src/commonMain/kotlin/rhodium/nostr/relay/RelayMessage.kt @@ -15,10 +15,14 @@ import kotlinx.serialization.json.* /** * The model that represents the data sent from a relay. * It is a base class for all specific relay message types. - * Currently, there are two types of relay messages, represented by the tags EVENT and NOTICE. - * You can see their corresponding representations, RelayEventMessage and RelayNotice. + * Currently, there are six supported types of relay messages. + * You can see their corresponding representations in this file. * @see RelayEventMessage * @see RelayNotice + * @see RelayAuthMessage + * @see CountResponse + * @see EventStatus + * @see CloseMessage */ @Serializable(with = RelayMessage.RelayMessageSerializer::class) sealed class RelayMessage(){ From c1dadb49dc30659c394b6c8a3d6889553f8f4cf6 Mon Sep 17 00:00:00 2001 From: KotlinGeekDev Date: Fri, 26 Sep 2025 17:04:23 +0100 Subject: [PATCH 2/2] Update relay info used for RelayInfoTests. --- .../rhodium/nostr/relay/RelayInfoTests.kt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/rhodium-core/src/commonTest/kotlin/rhodium/nostr/relay/RelayInfoTests.kt b/rhodium-core/src/commonTest/kotlin/rhodium/nostr/relay/RelayInfoTests.kt index 318ad72..3087375 100644 --- a/rhodium-core/src/commonTest/kotlin/rhodium/nostr/relay/RelayInfoTests.kt +++ b/rhodium-core/src/commonTest/kotlin/rhodium/nostr/relay/RelayInfoTests.kt @@ -38,14 +38,15 @@ class RelayInfoTests { @Test fun generatedAndManualRelayInfoAreTheSame() = runTest { val edenNostrLandInfo = Relay.Info( - description = "[✨ NFDB] nostr.land family of relays (fi-01 [tiger])", - name = "[✨ NFDB] nostr.land", - icon = "https://i.nostr.build/b3thno790aodH8lE.jpg", + description = "✨ the leading Nostr relay powered by NFDB\n\uD83C\uDF10 connected to fi-transitory-01", + name = "✨ nostr.land", + contact = "", + icon = "https://i.nostr.build/j6xguiCQRrdk6MsL.jpg", pubkey = "52b4a076bcbbbdc3a1aefa3735816cf74993b1b8db202b01c883c58be7fad8bd", relaySoftware = "NFDB", - softwareVersion = "1.0.0", + softwareVersion = "2.0 γ5", termsOfService = "https://nostr.land/terms", - supportedNips = intArrayOf(1, 2, 4, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 42, 44, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 65, 68, 69, 71, 72, 73, 75, 78, 84, 88, 89, 90, 92, 99), + supportedNips = intArrayOf(), limits = RelayLimits( maxMessageLength = 65535, maxEventTagNumber = 2000, @@ -54,11 +55,7 @@ class RelayInfoTests { isPaymentRequired = true, ), paymentUrl = "https://nostr.land", - paymentInfo = Payments( - subscriptionFees = arrayOf( - PaymentInfo(amount = 4000000, unit = "msats", durationInSeconds = 2592000) - ) - ) + paymentInfo = null ) val obtainedAndParsedInfo = Relay.fetchInfoFor("wss://eden.nostr.land")