fix: convert the stored hex key to bytes before nip44 getConversationKey

nostr-tools 2.23 (noble-curves v2) no longer accepts hex strings, so every nip44.encrypt/decrypt failed with "expected Uint8Array, got type=string". Adds nip44 tests.
This commit is contained in:
2026-10-15 14:55:33 -05:00
parent 015faf9cf4
commit db6dad218e
2 changed files with 29 additions and 4 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ function getSharedSecret(sk, peer) {
let key = secretsCache.get(peer)
if (!key) {
key = nip44.v2.utils.getConversationKey(sk, peer)
key = nip44.v2.utils.getConversationKey(hexToBytes(sk), peer)
secretsCache.set(peer, key)
}