nip19.decode() on an nsec returns a Uint8Array instead of a hex string. I submitted a pr for this, but it’s a quick fix regardless. https://github.com/nbd-wtf/nostr-tools/pull/328