From 107a2ee03337fca8f251100138ac7d78c6fdfd2b Mon Sep 17 00:00:00 2001 From: Lucas Barrena Date: Sat, 21 Oct 2023 23:25:36 -0300 Subject: [PATCH] Fix tunnel should decode z32 key --- bin/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/client.js b/bin/client.js index 7d5aefe..a6ba3b2 100755 --- a/bin/client.js +++ b/bin/client.js @@ -38,7 +38,7 @@ async function cmd (serverPublicKey, options = {}) { serverPublicKey = getKnownPeer(serverPublicKey) - const seed = HypercoreId.encode(fs.readFileSync(keyfile, 'utf8').trim()) + const seed = HypercoreId.decode(fs.readFileSync(keyfile, 'utf8').trim()) const keyPair = DHT.keyPair(seed) const node = new DHT({ bootstrap: options.testnet ? [{ host: '127.0.0.1', port: 40838 }] : undefined })