Files
nostr-connect/extension
chad.curtisandreya 67d6e26093 fix: convert the stored hex key to bytes before nip44 getConversationKey (#1)
Since 1.0.0 every `window.nostr.nip44.encrypt`/`decrypt` call fails with `expected Uint8Array, got type=string`, which breaks NIP-17 DMs and anything else using NIP-44 on sites that use the extension.

`private_key` is stored as hex, and nostr-tools 2.23 (noble-curves v2) no longer accepts hex strings in `getConversationKey`. `signEvent` and `getPublicKey` already convert with `hexToBytes(sk)`; this does the same in `getSharedSecret`.

Also adds NIP-44 tests (hex key rejected, converted key round-trips with a peer) in place of the note saying NIP-44 was only covered by the build. `vitest run` passes (50 tests), biome is clean, and a `build.js prod firefox` bundle encrypts where the published 1.0.0 throws.

Reviewed-on: #1
Co-authored-by: Chad Curtis <chad@chadwick.site>
2026-10-16 00:37:09 +00:00
..
2026-04-08 13:39:25 +07:00
2023-11-27 12:36:05 +07:00
2026-04-08 17:32:38 +07:00
2023-11-27 12:26:13 +07:00
2023-11-21 10:04:38 +07:00
2026-04-08 12:57:04 +07:00
2026-04-08 11:54:00 +07:00
2026-04-08 12:57:04 +07:00
2026-04-08 13:23:49 +07:00
2026-04-08 11:54:00 +07:00
2026-04-08 13:23:49 +07:00
2026-04-08 13:23:49 +07:00
2026-04-08 13:23:49 +07:00
2026-04-08 13:16:36 +07:00
2026-04-08 13:23:49 +07:00
2026-04-08 11:28:39 +07:00
2026-04-08 10:35:58 +07:00
2026-04-08 11:54:00 +07:00
2026-04-08 12:57:04 +07:00
2026-04-08 11:54:00 +07:00