fix nip-17 (#305)

* NIP-59 stuff

* nip-17 ios to androing works, android to ios still wip

* fix impl

* ios compat

* default relays for DMs

* delivery ack works

* delivery ack

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
shroominic
2025-08-24 19:06:29 +02:00
committed by GitHub
co-authored by callebtc
parent 23c397fe7b
commit 47c40fb9f3
11 changed files with 308 additions and 158 deletions
@@ -122,9 +122,13 @@ class NostrTestManager(private val context: Context) {
val (recipientPrivate, recipientPublic) = NostrCrypto.generateKeyPair()
val plaintext = "Hello, Nostr world! This is a test message."
val encrypted = NostrCrypto.encryptNIP44(plaintext, recipientPublic, privateKey)
val encrypted = NostrCrypto.encryptNIP44(
plaintext,
recipientPublic,
privateKey
)
require(encrypted.isNotEmpty()) { "Encryption failed" }
val decrypted = NostrCrypto.decryptNIP44(encrypted, publicKey, recipientPrivate)
require(decrypted == plaintext) { "Decryption failed: expected '$plaintext', got '$decrypted'" }