From b6e16ad4707a3a7d0d857354cc58903354bf86c0 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 22:40:46 +0100 Subject: [PATCH 1/8] Create Nip19Test testing toInt32() --- .../amethyst/service/Nip19Test.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt diff --git a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt new file mode 100644 index 000000000..dd38517f2 --- /dev/null +++ b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt @@ -0,0 +1,23 @@ +package com.vitorpamplona.amethyst.service + +import org.junit.Assert +import org.junit.Test + +class Nip19Test { + + @Test(expected = IllegalArgumentException::class) + fun to_int_32_length_smaller_than_4() { + toInt32(ByteArray(3)) + } + + @Test(expected = IllegalArgumentException::class) + fun to_int_32_length_bigger_than_4() { + toInt32(ByteArray(5)) + } + + @Test() + fun to_int_32_length_4() { + val actual = toInt32(ByteArray(4)) + Assert.assertEquals(0, actual) + } +} From 47f3fe5cc62227727ba0f8f8a7131b99ba0b0149 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 22:46:15 +0100 Subject: [PATCH 2/8] refactor Nip19Test introduce byteArrayOfInts() --- .../com/vitorpamplona/amethyst/service/Nip19Test.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt index dd38517f2..02e6a5695 100644 --- a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt +++ b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt @@ -7,17 +7,19 @@ class Nip19Test { @Test(expected = IllegalArgumentException::class) fun to_int_32_length_smaller_than_4() { - toInt32(ByteArray(3)) + toInt32(byteArrayOfInts(1, 2, 3)) } @Test(expected = IllegalArgumentException::class) fun to_int_32_length_bigger_than_4() { - toInt32(ByteArray(5)) + toInt32(byteArrayOfInts(1, 2, 3, 4, 5)) } @Test() fun to_int_32_length_4() { - val actual = toInt32(ByteArray(4)) - Assert.assertEquals(0, actual) + val actual = toInt32(byteArrayOfInts(1, 2, 3, 4)) + Assert.assertEquals(16909060, actual) } + + private fun byteArrayOfInts(vararg ints: Int) = ByteArray(ints.size) { pos -> ints[pos].toByte() } } From bd3d7e1aa3b6a971d183596cda25935035161f01 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 22:58:24 +0100 Subject: [PATCH 3/8] Prepare test parse_TLV --- .../main/java/com/vitorpamplona/amethyst/service/Nip19.kt | 6 +++--- .../java/com/vitorpamplona/amethyst/service/Nip19Test.kt | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt index f4b551be1..d2d20b6df 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt @@ -78,7 +78,7 @@ fun toInt32(bytes: ByteArray): Int { } fun parseTLV(data: ByteArray): Map> { - var result = mutableMapOf>() + val result = mutableMapOf>() var rest = data while (rest.isNotEmpty()) { val t = rest[0] @@ -88,9 +88,9 @@ fun parseTLV(data: ByteArray): Map> { if (v.size < l) continue if (!result.containsKey(t)) { - result.put(t, mutableListOf()) + result[t] = mutableListOf() } - result.get(t)?.add(v) + result[t]?.add(v) } return result } diff --git a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt index 02e6a5695..414422dd3 100644 --- a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt +++ b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt @@ -1,6 +1,7 @@ package com.vitorpamplona.amethyst.service import org.junit.Assert +import org.junit.Ignore import org.junit.Test class Nip19Test { @@ -18,8 +19,15 @@ class Nip19Test { @Test() fun to_int_32_length_4() { val actual = toInt32(byteArrayOfInts(1, 2, 3, 4)) + Assert.assertEquals(16909060, actual) } + @Ignore("Not implemented yet") + @Test() + fun parse_TLV() { + // TODO + } + private fun byteArrayOfInts(vararg ints: Int) = ByteArray(ints.size) { pos -> ints[pos].toByte() } } From c1113f9df940a7ff3ea09260fbb31fe0128d70d3 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 23:19:05 +0100 Subject: [PATCH 4/8] Add test uri_to_route_npub --- .../amethyst/service/Nip19Test.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt index 414422dd3..68bfe38b8 100644 --- a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt +++ b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt @@ -6,6 +6,8 @@ import org.junit.Test class Nip19Test { + private val nip19 = Nip19(); + @Test(expected = IllegalArgumentException::class) fun to_int_32_length_smaller_than_4() { toInt32(byteArrayOfInts(1, 2, 3)) @@ -29,5 +31,27 @@ class Nip19Test { // TODO } + @Test() + fun uri_to_route_null() { + val actual = nip19.uriToRoute(null) + + Assert.assertEquals(null, actual) + } + + @Test() + fun uri_to_route_unknown() { + val actual = nip19.uriToRoute("nostr:unknown") + + Assert.assertEquals(null, actual) + } + + @Test() + fun uri_to_route_npub() { + val actual = nip19.uriToRoute("nostr:npub1hv7k2s755n697sptva8vkh9jz40lzfzklnwj6ekewfmxp5crwdjs27007y") + + Assert.assertEquals(Nip19.Type.USER, actual?.type) + Assert.assertEquals("bb3d6543d4a4f45f402b674ecb5cb2155ff12456fcdd2d66d9727660d3037365", actual?.hex) + } + private fun byteArrayOfInts(vararg ints: Int) = ByteArray(ints.size) { pos -> ints[pos].toByte() } } From b35a59372c4838ffbd7eb8184d3aa4df41839402 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 23:23:42 +0100 Subject: [PATCH 5/8] Prepare move unit tests for uri_to_route behaviour --- .../amethyst/service/Nip19Test.kt | 56 ++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt index 68bfe38b8..df6d5800f 100644 --- a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt +++ b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt @@ -47,10 +47,62 @@ class Nip19Test { @Test() fun uri_to_route_npub() { - val actual = nip19.uriToRoute("nostr:npub1hv7k2s755n697sptva8vkh9jz40lzfzklnwj6ekewfmxp5crwdjs27007y") + val actual = + nip19.uriToRoute("nostr:npub1hv7k2s755n697sptva8vkh9jz40lzfzklnwj6ekewfmxp5crwdjs27007y") Assert.assertEquals(Nip19.Type.USER, actual?.type) - Assert.assertEquals("bb3d6543d4a4f45f402b674ecb5cb2155ff12456fcdd2d66d9727660d3037365", actual?.hex) + Assert.assertEquals( + "bb3d6543d4a4f45f402b674ecb5cb2155ff12456fcdd2d66d9727660d3037365", + actual?.hex + ) + } + + @Test() + fun uri_to_route_note() { + val actual = + nip19.uriToRoute("nostr:note1stqea6wmwezg9x6yyr6qkukw95ewtdukyaztycws65l8wppjmtpscawevv") + + Assert.assertEquals(Nip19.Type.NOTE, actual?.type) + Assert.assertEquals( + "82c19ee9db7644829b4420f40b72ce2d32e5b7962744b261d0d53e770432dac3", + actual?.hex + ) + } + + @Ignore("Not implemented yet") + @Test() + fun uri_to_route_nprofile() { + val actual = nip19.uriToRoute("nostr:nprofile") + + Assert.assertEquals(Nip19.Type.USER, actual?.type) + Assert.assertEquals("*", actual?.hex) + } + + @Ignore("Not implemented yet") + @Test() + fun uri_to_route_nevent() { + val actual = nip19.uriToRoute("nostr:nevent") + + Assert.assertEquals(Nip19.Type.USER, actual?.type) + Assert.assertEquals("*", actual?.hex) + } + + @Ignore("Not implemented yet") + @Test() + fun uri_to_route_nrelay() { + val actual = nip19.uriToRoute("nostr:nrelay") + + Assert.assertEquals(Nip19.Type.RELAY, actual?.type) + Assert.assertEquals("*", actual?.hex) + } + + @Ignore("Not implemented yet") + @Test() + fun uri_to_route_naddr() { + val actual = nip19.uriToRoute("nostr:naddr") + + Assert.assertEquals(Nip19.Type.ADDRESS, actual?.type) + Assert.assertEquals("*", actual?.hex) } private fun byteArrayOfInts(vararg ints: Int) = ByteArray(ints.size) { pos -> ints[pos].toByte() } From fd58da2a93b3bfa24b7b6a6c65b458b533fd55a8 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 23:26:35 +0100 Subject: [PATCH 6/8] Remove 1 indentation level from uriToRoute() --- .../vitorpamplona/amethyst/service/Nip19.kt | 73 +++++++++---------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt index d2d20b6df..db73fbc5f 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt @@ -14,47 +14,46 @@ class Nip19 { enum class Type { USER, NOTE, RELAY, ADDRESS } + data class Return(val type: Type, val hex: String) fun uriToRoute(uri: String?): Return? { try { - val key = uri?.removePrefix("nostr:") + val key = uri?.removePrefix("nostr:") ?: return null - if (key != null) { - val bytes = key.bechToBytes() - if (key.startsWith("npub")) { - return Return(Type.USER, bytes.toHexKey()) - } - if (key.startsWith("note")) { - return Return(Type.NOTE, bytes.toHexKey()) - } - if (key.startsWith("nprofile")) { - val tlv = parseTLV(bytes) - val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() - if (hex != null) - return Return(Type.USER, hex) - } - if (key.startsWith("nevent")) { - val tlv = parseTLV(bytes) - val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() - if (hex != null) - return Return(Type.USER, hex) - } - if (key.startsWith("nrelay")) { - val tlv = parseTLV(bytes) - val relayUrl = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) - if (relayUrl != null) - return Return(Type.RELAY, relayUrl) - } - if (key.startsWith("naddr")) { - val tlv = parseTLV(bytes) - val d = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) - val relay = tlv.get(NIP19TLVTypes.RELAY.id)?.get(0)?.toString(Charsets.UTF_8) - val author = tlv.get(NIP19TLVTypes.AUTHOR.id)?.get(0)?.toHexKey() - val kind = tlv.get(NIP19TLVTypes.KIND.id)?.get(0)?.let { toInt32(it) } - if (d != null) - return Return(Type.ADDRESS, "$kind:$author:$d") - } + val bytes = key.bechToBytes() + if (key.startsWith("npub")) { + return Return(Type.USER, bytes.toHexKey()) + } + if (key.startsWith("note")) { + return Return(Type.NOTE, bytes.toHexKey()) + } + if (key.startsWith("nprofile")) { + val tlv = parseTLV(bytes) + val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() + if (hex != null) + return Return(Type.USER, hex) + } + if (key.startsWith("nevent")) { + val tlv = parseTLV(bytes) + val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() + if (hex != null) + return Return(Type.USER, hex) + } + if (key.startsWith("nrelay")) { + val tlv = parseTLV(bytes) + val relayUrl = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) + if (relayUrl != null) + return Return(Type.RELAY, relayUrl) + } + if (key.startsWith("naddr")) { + val tlv = parseTLV(bytes) + val d = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) + val relay = tlv.get(NIP19TLVTypes.RELAY.id)?.get(0)?.toString(Charsets.UTF_8) + val author = tlv.get(NIP19TLVTypes.AUTHOR.id)?.get(0)?.toHexKey() + val kind = tlv.get(NIP19TLVTypes.KIND.id)?.get(0)?.let { toInt32(it) } + if (d != null) + return Return(Type.ADDRESS, "$kind:$author:$d") } } catch (e: Throwable) { println("Issue trying to Decode NIP19 ${uri}: ${e.message}") @@ -84,7 +83,7 @@ fun parseTLV(data: ByteArray): Map> { val t = rest[0] val l = rest[1] val v = rest.sliceArray(IntRange(2, (2 + l) - 1)) - rest = rest.sliceArray(IntRange(2 + l, rest.size-1)) + rest = rest.sliceArray(IntRange(2 + l, rest.size - 1)) if (v.size < l) continue if (!result.containsKey(t)) { From 91591abd140dd1c3fafd661ca5dbe19f2b4a9728 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 23:36:16 +0100 Subject: [PATCH 7/8] Extract method refactoring in Nip19::uriToRoute() --- .../vitorpamplona/amethyst/service/Nip19.kt | 85 ++++++++++++------- 1 file changed, 54 insertions(+), 31 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt index db73fbc5f..ee373c06f 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt @@ -23,37 +23,17 @@ class Nip19 { val bytes = key.bechToBytes() if (key.startsWith("npub")) { - return Return(Type.USER, bytes.toHexKey()) - } - if (key.startsWith("note")) { - return Return(Type.NOTE, bytes.toHexKey()) - } - if (key.startsWith("nprofile")) { - val tlv = parseTLV(bytes) - val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() - if (hex != null) - return Return(Type.USER, hex) - } - if (key.startsWith("nevent")) { - val tlv = parseTLV(bytes) - val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() - if (hex != null) - return Return(Type.USER, hex) - } - if (key.startsWith("nrelay")) { - val tlv = parseTLV(bytes) - val relayUrl = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) - if (relayUrl != null) - return Return(Type.RELAY, relayUrl) - } - if (key.startsWith("naddr")) { - val tlv = parseTLV(bytes) - val d = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) - val relay = tlv.get(NIP19TLVTypes.RELAY.id)?.get(0)?.toString(Charsets.UTF_8) - val author = tlv.get(NIP19TLVTypes.AUTHOR.id)?.get(0)?.toHexKey() - val kind = tlv.get(NIP19TLVTypes.KIND.id)?.get(0)?.let { toInt32(it) } - if (d != null) - return Return(Type.ADDRESS, "$kind:$author:$d") + return npub(bytes) + } else if (key.startsWith("note")) { + return note(bytes) + } else if (key.startsWith("nprofile")) { + return nprofile(bytes) + } else if (key.startsWith("nevent")) { + return nevent(bytes) + } else if (key.startsWith("nrelay")) { + return nrelay(bytes) + } else if (key.startsWith("naddr")) { + return naddr(bytes) } } catch (e: Throwable) { println("Issue trying to Decode NIP19 ${uri}: ${e.message}") @@ -62,6 +42,49 @@ class Nip19 { return null } + + private fun npub(bytes: ByteArray): Return { + return Return(Type.USER, bytes.toHexKey()) + } + + private fun note(bytes: ByteArray): Return { + return Return(Type.NOTE, bytes.toHexKey()); + } + + private fun nprofile(bytes: ByteArray): Return? { + val tlv = parseTLV(bytes) + val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() ?: return null + + return Return(Type.USER, hex) + } + + private fun nevent(bytes: ByteArray): Return? { + val hex = parseTLV(bytes) + .get(NIP19TLVTypes.SPECIAL.id) + ?.get(0) + ?.toHexKey() ?: return null + + return Return(Type.USER, hex) + } + + private fun nrelay(bytes: ByteArray): Return? { + val relayUrl = parseTLV(bytes) + .get(NIP19TLVTypes.SPECIAL.id) + ?.get(0) + ?.toString(Charsets.UTF_8) ?: return null + + return Return(Type.RELAY, relayUrl) + } + + private fun naddr(bytes: ByteArray): Return? { + val tlv = parseTLV(bytes) + val d = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) ?: return null + val relay = tlv.get(NIP19TLVTypes.RELAY.id)?.get(0)?.toString(Charsets.UTF_8) + val author = tlv.get(NIP19TLVTypes.AUTHOR.id)?.get(0)?.toHexKey() + val kind = tlv.get(NIP19TLVTypes.KIND.id)?.get(0)?.let { toInt32(it) } + + return Return(Type.ADDRESS, "$kind:$author:$d") + } } enum class NIP19TLVTypes(val id: Byte) { //classes should start with an uppercase letter in kotlin From 657f99a65a315b0a369876d9d5c2468b47e8ee4a Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Fri, 3 Mar 2023 23:36:37 +0100 Subject: [PATCH 8/8] Remove non-used imports in Nip19 --- .../vitorpamplona/amethyst/service/Nip19.kt | 36 ++++++++++++------- .../amethyst/service/Nip19Test.kt | 12 +++---- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt index ee373c06f..54d765940 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/Nip19.kt @@ -1,13 +1,9 @@ package com.vitorpamplona.amethyst.service -import com.vitorpamplona.amethyst.model.toByteArray import com.vitorpamplona.amethyst.model.toHexKey -import com.vitorpamplona.amethyst.service.model.ATag +import nostr.postr.bechToBytes import java.nio.ByteBuffer import java.nio.ByteOrder -import nostr.postr.Bech32 -import nostr.postr.bechToBytes -import nostr.postr.toByteArray class Nip19 { @@ -37,7 +33,6 @@ class Nip19 { } } catch (e: Throwable) { println("Issue trying to Decode NIP19 ${uri}: ${e.message}") - //e.printStackTrace() } return null @@ -52,8 +47,10 @@ class Nip19 { } private fun nprofile(bytes: ByteArray): Return? { - val tlv = parseTLV(bytes) - val hex = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toHexKey() ?: return null + val hex = parseTLV(bytes) + .get(NIP19TLVTypes.SPECIAL.id) + ?.get(0) + ?.toHexKey() ?: return null return Return(Type.USER, hex) } @@ -78,16 +75,29 @@ class Nip19 { private fun naddr(bytes: ByteArray): Return? { val tlv = parseTLV(bytes) - val d = tlv.get(NIP19TLVTypes.SPECIAL.id)?.get(0)?.toString(Charsets.UTF_8) ?: return null - val relay = tlv.get(NIP19TLVTypes.RELAY.id)?.get(0)?.toString(Charsets.UTF_8) - val author = tlv.get(NIP19TLVTypes.AUTHOR.id)?.get(0)?.toHexKey() - val kind = tlv.get(NIP19TLVTypes.KIND.id)?.get(0)?.let { toInt32(it) } + + val d = tlv.get(NIP19TLVTypes.SPECIAL.id) + ?.get(0) + ?.toString(Charsets.UTF_8) ?: return null + + val relay = tlv.get(NIP19TLVTypes.RELAY.id) + ?.get(0) + ?.toString(Charsets.UTF_8) + + val author = tlv.get(NIP19TLVTypes.AUTHOR.id) + ?.get(0) + ?.toHexKey() + + val kind = tlv.get(NIP19TLVTypes.KIND.id) + ?.get(0) + ?.let { toInt32(it) } return Return(Type.ADDRESS, "$kind:$author:$d") } } -enum class NIP19TLVTypes(val id: Byte) { //classes should start with an uppercase letter in kotlin +// Classes should start with an uppercase letter in kotlin +enum class NIP19TLVTypes(val id: Byte) { SPECIAL(0), RELAY(1), AUTHOR(2), diff --git a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt index df6d5800f..53de03970 100644 --- a/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt +++ b/app/src/test/java/com/vitorpamplona/amethyst/service/Nip19Test.kt @@ -25,10 +25,10 @@ class Nip19Test { Assert.assertEquals(16909060, actual) } - @Ignore("Not implemented yet") + @Ignore("Test not implemented yet") @Test() fun parse_TLV() { - // TODO + // TODO: I don't know how to test this (?) } @Test() @@ -69,7 +69,7 @@ class Nip19Test { ) } - @Ignore("Not implemented yet") + @Ignore("Test not implemented yet") @Test() fun uri_to_route_nprofile() { val actual = nip19.uriToRoute("nostr:nprofile") @@ -78,7 +78,7 @@ class Nip19Test { Assert.assertEquals("*", actual?.hex) } - @Ignore("Not implemented yet") + @Ignore("Test not implemented yet") @Test() fun uri_to_route_nevent() { val actual = nip19.uriToRoute("nostr:nevent") @@ -87,7 +87,7 @@ class Nip19Test { Assert.assertEquals("*", actual?.hex) } - @Ignore("Not implemented yet") + @Ignore("Test not implemented yet") @Test() fun uri_to_route_nrelay() { val actual = nip19.uriToRoute("nostr:nrelay") @@ -96,7 +96,7 @@ class Nip19Test { Assert.assertEquals("*", actual?.hex) } - @Ignore("Not implemented yet") + @Ignore("Test not implemented yet") @Test() fun uri_to_route_naddr() { val actual = nip19.uriToRoute("nostr:naddr")