One fix for types: function nip44Encrypt(rumor: Rumor | VerifiedEvent, privateKey: Uint8Array, publicKey: string): string { const key = nip44.v2.utils.getConversationKey(privateKey, publicKey) return nip44.v2.encrypt(JSON.stringify(rumor), key) } It does not have any impact, just cosmetics