From 2cdcd567bb33d82f88ff2321982b17a829857a5d Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Tue, 5 Aug 2025 11:42:08 +0530 Subject: [PATCH] fix: sha512 access --- src/lib/identity/signatures/key-delegation.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/identity/signatures/key-delegation.ts b/src/lib/identity/signatures/key-delegation.ts index daa1393..e7dd93e 100644 --- a/src/lib/identity/signatures/key-delegation.ts +++ b/src/lib/identity/signatures/key-delegation.ts @@ -6,10 +6,13 @@ */ import * as ed from '@noble/ed25519'; +import { sha512 } from '@noble/hashes/sha512'; import { bytesToHex, hexToBytes } from '@/lib/utils'; import { LOCAL_STORAGE_KEYS } from '@/lib/waku/constants'; import { DelegationInfo } from './types'; +ed.etc.sha512Sync = (...m) => sha512(ed.etc.concatBytes(...m)); + export class KeyDelegation { private static readonly DEFAULT_EXPIRY_HOURS = 24;