From 87800422e3c419f81b0e623f1895648f01ab86bf Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Sep 2023 14:54:56 -0400 Subject: [PATCH] fix: switch mkeyEd25519 to CID_HASH_TYPES --- src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index c71de67..0216e3d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,9 +4,9 @@ import { createKeyPair, createNode, NodeId, + CID_HASH_TYPES, } from "@lumeweb/libs5"; import HyperTransportPeer from "@lumeweb/libs5-transport-hyper"; -import { mkeyEd25519 } from "@lumeweb/libs5"; import { concatBytes } from "@noble/curves/abstract/utils"; import { Level } from "level"; @@ -49,7 +49,10 @@ const plugin = { }); s5peer.id = new NodeId( - concatBytes(Uint8Array.from([mkeyEd25519]), peer.remotePublicKey), + concatBytes( + Uint8Array.from([CID_HASH_TYPES.ED25519]), + peer.remotePublicKey, + ), ); await s5peer.init();