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;