diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 879ba43..262b8ab 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -9,8 +9,7 @@ "version": "0.1.0-develop.3", "dependencies": { "@lumeweb/interface-relay": "^0.0.2-develop.3", - "@lumeweb/libs5": "^0.1.0-develop.14", - "@lumeweb/libs5-transport-hyper": "^0.1.0-develop.5", + "@lumeweb/libs5-transport-hyper": "^0.1.0-develop.8", "@types/streamx": "^2.9.1", "streamx": "^2.15.1" }, @@ -1818,9 +1817,9 @@ } }, "node_modules/@lumeweb/libs5": { - "version": "0.1.0-develop.14", - "resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.14.tgz", - "integrity": "sha512-nLRaDl3c355iDIUU40ES9P5FZvgPtpRJNnAymaJeOxQVjI9TlO+4aGiACB8Wv0uywjSfy6CHvYMS32UZNLhIHA==", + "version": "0.1.0-develop.15", + "resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.15.tgz", + "integrity": "sha512-am0t+jrepi42HyZzontQ5n0A4CJ70J8OlBgIKFroHQKwjKBD/ycbdyMf7lm1cKO1iou41PYulGnKIrb7w3xNJQ==", "dependencies": { "@noble/curves": "^1.1.0", "@noble/hashes": "^1.3.1", @@ -1832,11 +1831,11 @@ } }, "node_modules/@lumeweb/libs5-transport-hyper": { - "version": "0.1.0-develop.5", - "resolved": "https://registry.npmjs.org/@lumeweb/libs5-transport-hyper/-/libs5-transport-hyper-0.1.0-develop.5.tgz", - "integrity": "sha512-xLc7MhL9dIR7WkaLntkpU56XLNeko3FElB29Rm9q/IEG7xBiwD807ikjxPrBb8R/a/H7c7w1aUAlZVu4U26xxQ==", + "version": "0.1.0-develop.8", + "resolved": "https://registry.npmjs.org/@lumeweb/libs5-transport-hyper/-/libs5-transport-hyper-0.1.0-develop.8.tgz", + "integrity": "sha512-TAmSuRq3e6z97xwI1v7cBM9bLWMUHYuECTBeZSsW4RCe8Zkh8XT9mx6vQbiGSBzgBPK8jpCSzXJtO3juVPG/PQ==", "dependencies": { - "@lumeweb/libs5": "^0.1.0-develop.13", + "@lumeweb/libs5": "^0.1.0-develop.15", "streamx": "^2.15.1" } }, diff --git a/package.json b/package.json index f5515b2..b14db5b 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,7 @@ }, "dependencies": { "@lumeweb/interface-relay": "^0.0.2-develop.3", - "@lumeweb/libs5": "^0.1.0-develop.14", - "@lumeweb/libs5-transport-hyper": "^0.1.0-develop.5", + "@lumeweb/libs5-transport-hyper": "^0.1.0-develop.8", "@types/streamx": "^2.9.1", "streamx": "^2.15.1" } diff --git a/src/index.ts b/src/index.ts index ebc5e66..0557a34 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,8 @@ import { NodeId, } 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"; import { PROTOCOL } from "./constants.js"; @@ -46,7 +48,9 @@ const plugin = { protocol: PROTOCOL, }); - s5peer.id = new NodeId(peer.remotePublicKey); + s5peer.id = new NodeId( + concatBytes(Uint8Array.from([mkeyEd25519], peer.remotePublicKey)), + ); await s5peer.init(); node.services.p2p.onNewPeer(s5peer, true);