Skip to content

Commit

Permalink
deps: bump libp2p 2.0.2 (#171)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
d-roak and dependabot[bot] authored Sep 24, 2024
1 parent b2a720c commit 9e6b8a5
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 413 deletions.
107 changes: 54 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
{
"name": "ts-topology",
"description": "The official TypeScript implementation of Topology Protocol",
"version": "0.2.0",
"license": "MIT",
"homepage": "https://topology.gg/",
"repository": {
"type": "git",
"url": "git+https://github.com/topology-foundation/ts-topology.git"
},
"bugs": {
"url": "https://github.com/topology-foundation/ts-topology/issues"
},
"workspaces": [
"packages/*",
"examples/*"
],
"scripts": {
"bench": "vitest bench",
"biome-check": "biome check",
"docs": "typedoc",
"postinstall": "pnpm --filter '@topology-foundation/*' build",
"proto-gen": "buf generate",
"release": "release-it",
"test": "vitest"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@release-it-plugins/workspaces": "^4.2.0",
"@types/node": "^22.5.4",
"assemblyscript": "^0.27.29",
"release-it": "^17.6.0",
"ts-proto": "^2.0.3",
"typedoc": "^0.26.6",
"typescript": "^5.5.4",
"vite": "^5.4.3",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5"
},
"private": true,
"release-it": {
"plugins": {
"@release-it-plugins/workspaces": {
"publish": false
}
},
"npm": false,
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
}
"name": "ts-topology",
"description": "The official TypeScript implementation of Topology Protocol",
"version": "0.2.0",
"license": "MIT",
"homepage": "https://topology.gg/",
"repository": {
"type": "git",
"url": "git+https://github.com/topology-foundation/ts-topology.git"
},
"bugs": {
"url": "https://github.com/topology-foundation/ts-topology/issues"
},
"workspaces": [
"packages/*",
"examples/*"
],
"scripts": {
"bench": "vitest bench",
"biome-check": "biome check",
"clean": "pnpm --filter '@topology-foundation/*' clean",
"docs": "typedoc",
"postinstall": "pnpm --filter '@topology-foundation/*' build",
"proto-gen": "buf generate",
"release": "release-it",
"test": "vitest"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@release-it-plugins/workspaces": "^4.2.0",
"@types/node": "^22.5.4",
"assemblyscript": "^0.27.29",
"release-it": "^17.6.0",
"ts-proto": "^2.0.3",
"typedoc": "^0.26.6",
"typescript": "^5.5.4",
"vite": "^5.4.3",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5"
},
"private": true,
"release-it": {
"plugins": {
"@release-it-plugins/workspaces": {
"publish": false
}
},
"npm": false,
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
}
}
37 changes: 18 additions & 19 deletions packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,32 @@
"test": "vitest"
},
"devDependencies": {
"@libp2p/interface": "^1.7.0",
"@libp2p/interface": "^2.1.0",
"react-native-webrtc": "^124.0.3"
},
"dependencies": {
"@bufbuild/protobuf": "^2.0.0",
"@chainsafe/libp2p-gossipsub": "^13.1.0",
"@chainsafe/libp2p-noise": "^15.1.2",
"@chainsafe/libp2p-yamux": "^6.0.2",
"@libp2p/autonat": "^1.1.4",
"@libp2p/bootstrap": "^10.1.4",
"@libp2p/circuit-relay-v2": "^1.1.4",
"@libp2p/crypto": "^4.1.9",
"@libp2p/dcutr": "^1.1.4",
"@libp2p/devtools-metrics": "^0.2.5",
"@libp2p/identify": "^2.1.4",
"@libp2p/interface-pubsub": "^4.0.1",
"@libp2p/mdns": "^10.1.3",
"@libp2p/peer-id-factory": "^4.2.4",
"@libp2p/pubsub-peer-discovery": "^10.0.2",
"@libp2p/webrtc": "^4.1.8",
"@libp2p/websockets": "^8.1.2",
"@libp2p/webtransport": "^4.1.9",
"@chainsafe/libp2p-gossipsub": "^14.1.0",
"@chainsafe/libp2p-noise": "^16.0.0",
"@chainsafe/libp2p-yamux": "^7.0.0",
"@libp2p/autonat": "^2.0.2",
"@libp2p/bootstrap": "^11.0.2",
"@libp2p/circuit-relay-v2": "^2.0.2",
"@libp2p/crypto": "^5.0.2",
"@libp2p/dcutr": "^2.0.2",
"@libp2p/devtools-metrics": "^1.1.0",
"@libp2p/identify": "^3.0.2",
"@libp2p/mdns": "^11.0.1",
"@libp2p/peer-id": "^5.0.2",
"@libp2p/pubsub-peer-discovery": "^11.0.0",
"@libp2p/webrtc": "^5.0.4",
"@libp2p/websockets": "^9.0.2",
"@libp2p/webtransport": "^5.0.4",
"@multiformats/multiaddr": "^12.3.1",
"it-length-prefixed": "^9.1.0",
"it-map": "^3.1.1",
"it-pipe": "^3.0.1",
"libp2p": "^1.9.4",
"libp2p": "^2.1.0",
"ts-proto": "^2.0.3",
"uint8arrays": "^5.1.0"
}
Expand Down
30 changes: 15 additions & 15 deletions packages/network/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ import { generateKeyPairFromSeed } from "@libp2p/crypto/keys";
import { dcutr } from "@libp2p/dcutr";
import { devToolsMetrics } from "@libp2p/devtools-metrics";
import { identify } from "@libp2p/identify";
import type { PrivateKey } from "@libp2p/interface";
import {
type EventCallback,
EventHandler,
type PubSub,
type Stream,
type StreamHandler,
import type {
Ed25519PeerId,
EventCallback,
PrivateKey,
PubSub,
RSAPeerId,
Secp256k1PeerId,
Stream,
StreamHandler,
URLPeerId,
} from "@libp2p/interface";
import { createFromPrivKey } from "@libp2p/peer-id-factory";
import { peerIdFromString } from "@libp2p/peer-id";
import { pubsubPeerDiscovery } from "@libp2p/pubsub-peer-discovery";
import { webRTC, webRTCDirect } from "@libp2p/webrtc";
import { webSockets } from "@libp2p/websockets";
import { webTransport } from "@libp2p/webtransport";
import { multiaddr } from "@multiformats/multiaddr";
import * as lp from "it-length-prefixed";
import { type Libp2p, createLibp2p } from "libp2p";
import { fromString as uint8ArrayFromString } from "uint8arrays/from-string";
import { Message } from "./proto/messages_pb.js";
Expand Down Expand Up @@ -57,7 +59,7 @@ export class TopologyNetworkNode {
}

async start() {
let privateKey: PrivateKey | undefined = undefined;
let privateKey = undefined;
if (this._config?.private_key_seed) {
const tmp = this._config.private_key_seed.padEnd(32, "0");
privateKey = await generateKeyPairFromSeed(
Expand All @@ -67,11 +69,11 @@ export class TopologyNetworkNode {
}

this._node = await createLibp2p({
peerId: privateKey ? await createFromPrivKey(privateKey) : undefined,
privateKey,
addresses: {
listen: this._config?.addresses ? this._config.addresses : ["/webrtc"],
},
connectionEncryption: [noise()],
connectionEncrypters: [noise()],
connectionGater: {
denyDialMultiaddr: () => {
return false;
Expand All @@ -95,9 +97,7 @@ export class TopologyNetworkNode {
autonat: autoNAT(),
dcutr: dcutr(),
identify: identify(),
pubsub: gossipsub({
allowPublishToZeroTopicPeers: true,
}),
pubsub: gossipsub(),
},
streamMuxers: [yamux()],
transports: [
Expand Down
7 changes: 3 additions & 4 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
"vitest": "^2.0.5"
},
"dependencies": {
"@chainsafe/libp2p-gossipsub": "^13.1.0",
"@libp2p/interface": "^1.7.0",
"@chainsafe/libp2p-gossipsub": "^14.1.0",
"@libp2p/interface": "^2.1.0",
"@topology-foundation/blueprints": "0.2.0",
"@topology-foundation/network": "0.2.0",
"@topology-foundation/object": "0.2.0",
"commander": "^12.1.0",
"it-length-prefixed": "^9.1.0"
"commander": "^12.1.0"
}
}
Loading

0 comments on commit 9e6b8a5

Please sign in to comment.