Compare commits

..

3 Commits

Author SHA1 Message Date
semantic-release-bot d4761a26d6 chore(release): 0.1.0-develop.5 [skip ci]
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-09-01)

### Bug Fixes

* need to ensure we prefix the node id with the key type identifier ([a19c515](a19c515dda))
2023-09-01 07:23:43 +00:00
Derrick Hammer 2f40a56c34
Merge remote-tracking branch 'origin/develop' into develop 2023-09-01 03:22:51 -04:00
Derrick Hammer a19c515dda
fix: need to ensure we prefix the node id with the key type identifier 2023-09-01 03:22:46 -04:00
4 changed files with 24 additions and 15 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-09-01)
### Bug Fixes
* need to ensure we prefix the node id with the key type identifier ([a19c515](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/commit/a19c515dda5f533901d35a3c6ffdd39a82a1fa30))
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-08-31) # [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-08-31)
# [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-08-31) # [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/relay-plugin-s5/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-08-31)

21
npm-shrinkwrap.json generated
View File

@ -1,16 +1,15 @@
{ {
"name": "@lumeweb/relay-plugin-s5", "name": "@lumeweb/relay-plugin-s5",
"version": "0.1.0-develop.4", "version": "0.1.0-develop.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/relay-plugin-s5", "name": "@lumeweb/relay-plugin-s5",
"version": "0.1.0-develop.4", "version": "0.1.0-develop.5",
"dependencies": { "dependencies": {
"@lumeweb/interface-relay": "^0.0.2-develop.3", "@lumeweb/interface-relay": "^0.0.2-develop.3",
"@lumeweb/libs5": "^0.1.0-develop.14", "@lumeweb/libs5-transport-hyper": "^0.1.0-develop.8",
"@lumeweb/libs5-transport-hyper": "^0.1.0-develop.5",
"@types/streamx": "^2.9.1", "@types/streamx": "^2.9.1",
"streamx": "^2.15.1" "streamx": "^2.15.1"
}, },
@ -1818,9 +1817,9 @@
} }
}, },
"node_modules/@lumeweb/libs5": { "node_modules/@lumeweb/libs5": {
"version": "0.1.0-develop.14", "version": "0.1.0-develop.15",
"resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.14.tgz", "resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.15.tgz",
"integrity": "sha512-nLRaDl3c355iDIUU40ES9P5FZvgPtpRJNnAymaJeOxQVjI9TlO+4aGiACB8Wv0uywjSfy6CHvYMS32UZNLhIHA==", "integrity": "sha512-am0t+jrepi42HyZzontQ5n0A4CJ70J8OlBgIKFroHQKwjKBD/ycbdyMf7lm1cKO1iou41PYulGnKIrb7w3xNJQ==",
"dependencies": { "dependencies": {
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",
@ -1832,11 +1831,11 @@
} }
}, },
"node_modules/@lumeweb/libs5-transport-hyper": { "node_modules/@lumeweb/libs5-transport-hyper": {
"version": "0.1.0-develop.5", "version": "0.1.0-develop.8",
"resolved": "https://registry.npmjs.org/@lumeweb/libs5-transport-hyper/-/libs5-transport-hyper-0.1.0-develop.5.tgz", "resolved": "https://registry.npmjs.org/@lumeweb/libs5-transport-hyper/-/libs5-transport-hyper-0.1.0-develop.8.tgz",
"integrity": "sha512-xLc7MhL9dIR7WkaLntkpU56XLNeko3FElB29Rm9q/IEG7xBiwD807ikjxPrBb8R/a/H7c7w1aUAlZVu4U26xxQ==", "integrity": "sha512-TAmSuRq3e6z97xwI1v7cBM9bLWMUHYuECTBeZSsW4RCe8Zkh8XT9mx6vQbiGSBzgBPK8jpCSzXJtO3juVPG/PQ==",
"dependencies": { "dependencies": {
"@lumeweb/libs5": "^0.1.0-develop.13", "@lumeweb/libs5": "^0.1.0-develop.15",
"streamx": "^2.15.1" "streamx": "^2.15.1"
} }
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/relay-plugin-s5", "name": "@lumeweb/relay-plugin-s5",
"version": "0.1.0-develop.4", "version": "0.1.0-develop.5",
"type": "module", "type": "module",
"repository": { "repository": {
"type": "git", "type": "git",
@ -19,8 +19,7 @@
}, },
"dependencies": { "dependencies": {
"@lumeweb/interface-relay": "^0.0.2-develop.3", "@lumeweb/interface-relay": "^0.0.2-develop.3",
"@lumeweb/libs5": "^0.1.0-develop.14", "@lumeweb/libs5-transport-hyper": "^0.1.0-develop.8",
"@lumeweb/libs5-transport-hyper": "^0.1.0-develop.5",
"@types/streamx": "^2.9.1", "@types/streamx": "^2.9.1",
"streamx": "^2.15.1" "streamx": "^2.15.1"
} }

View File

@ -6,6 +6,8 @@ import {
NodeId, NodeId,
} from "@lumeweb/libs5"; } from "@lumeweb/libs5";
import HyperTransportPeer from "@lumeweb/libs5-transport-hyper"; import HyperTransportPeer from "@lumeweb/libs5-transport-hyper";
import { mkeyEd25519 } from "@lumeweb/libs5";
import { concatBytes } from "@noble/curves/abstract/utils";
import { Level } from "level"; import { Level } from "level";
import { PROTOCOL } from "./constants.js"; import { PROTOCOL } from "./constants.js";
@ -46,7 +48,9 @@ const plugin = {
protocol: PROTOCOL, protocol: PROTOCOL,
}); });
s5peer.id = new NodeId(peer.remotePublicKey); s5peer.id = new NodeId(
concatBytes(Uint8Array.from([mkeyEd25519], peer.remotePublicKey)),
);
await s5peer.init(); await s5peer.init();
node.services.p2p.onNewPeer(s5peer, true); node.services.p2p.onNewPeer(s5peer, true);