From 787baef9a049f83546b892e9b08ef1cf702977f8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 31 Dec 2022 14:55:19 -0500 Subject: [PATCH] *sha512Sync has to be manually created --- src/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index f5a3c4c..9d49d76 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,9 @@ import { SignedRegistryEntry } from "./types.js"; import * as ed from "@noble/ed25519"; import b4a from "b4a"; +import { sha512 } from "@noble/hashes/sha512"; + +ed.utils.sha512Sync = (...m) => sha512(ed.utils.concatBytes(...m)); export function verifyEntry(entry: SignedRegistryEntry) { return ed.sync.verify(entry.signature, createSignatureData(entry), entry.pk);