From 5d5e035edb24b16c59293ebc6e90c184d6917f47 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 23 Jun 2022 16:06:37 +1000 Subject: [PATCH] fix: use compress key `marshal` return the compress key, `bytes` returned the protobuf serialized key. --- src/lib/enr/keypair/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/enr/keypair/index.ts b/src/lib/enr/keypair/index.ts index 231e639d67..41e88652b5 100644 --- a/src/lib/enr/keypair/index.ts +++ b/src/lib/enr/keypair/index.ts @@ -82,5 +82,9 @@ export async function createKeypairFromPeerId( ? await unmarshalPrivateKey(peerId.privateKey) : undefined; - return createKeypair(keypairType, privateKey?.bytes, publicKey?.bytes); + return createKeypair( + keypairType, + privateKey?.marshal(), + publicKey?.marshal() + ); }