diff --git a/examples/delegated-routing/package.json b/examples/delegated-routing/package.json index fc3cae70c8..a136e8433a 100644 --- a/examples/delegated-routing/package.json +++ b/examples/delegated-routing/package.json @@ -3,15 +3,15 @@ "version": "0.1.0", "private": true, "dependencies": { - "@chainsafe/libp2p-noise": "^8.0.2", + "@chainsafe/libp2p-noise": "^9.0.0", "ipfs-core": "^0.15.4", "libp2p": "../../", - "@libp2p/delegated-content-routing": "^2.0.1", - "@libp2p/delegated-peer-routing": "^2.0.1", - "@libp2p/kad-dht": "^3.0.0", - "@libp2p/mplex": "^5.2.3", - "@libp2p/webrtc-star": "^3.0.3", - "@libp2p/websockets": "^3.0.4", + "@libp2p/delegated-content-routing": "^2.0.2", + "@libp2p/delegated-peer-routing": "^2.0.2", + "@libp2p/kad-dht": "^4.0.0", + "@libp2p/mplex": "^6.0.2", + "@libp2p/webrtc-star": "^4.0.1", + "@libp2p/websockets": "^4.0.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "5.0.0" diff --git a/examples/libp2p-in-the-browser/package.json b/examples/libp2p-in-the-browser/package.json index 2abd84345f..3e24693520 100644 --- a/examples/libp2p-in-the-browser/package.json +++ b/examples/libp2p-in-the-browser/package.json @@ -9,10 +9,10 @@ }, "license": "ISC", "dependencies": { - "@chainsafe/libp2p-noise": "^8.0.2", - "@libp2p/bootstrap": "^2.0.1", - "@libp2p/mplex": "^5.2.3", - "@libp2p/webrtc-star": "^3.0.3", + "@chainsafe/libp2p-noise": "^9.0.0", + "@libp2p/bootstrap": "^4.0.0", + "@libp2p/mplex": "^6.0.2", + "@libp2p/webrtc-star": "^4.0.1", "@libp2p/websockets": "^3.0.4", "libp2p": "../../" }, diff --git a/examples/package.json b/examples/package.json index c3baa68c9d..a43e2a9df1 100644 --- a/examples/package.json +++ b/examples/package.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@libp2p/pubsub-peer-discovery": "^6.0.2", - "@libp2p/floodsub": "^3.0.3", + "@libp2p/floodsub": "^4.0.0", "@nodeutils/defaults-deep": "^1.1.0", "execa": "^6.1.0", "fs-extra": "^10.1.0", diff --git a/examples/webrtc-direct/package.json b/examples/webrtc-direct/package.json index 37c08976b2..b42ffa5d4a 100644 --- a/examples/webrtc-direct/package.json +++ b/examples/webrtc-direct/package.json @@ -9,10 +9,10 @@ }, "license": "ISC", "dependencies": { - "@libp2p/webrtc-direct": "^2.0.0", - "@chainsafe/libp2p-noise": "^8.0.2", - "@libp2p/bootstrap": "^2.0.1", - "@libp2p/mplex": "^5.2.3", + "@libp2p/webrtc-direct": "^2.0.3", + "@chainsafe/libp2p-noise": "^9.0.0", + "@libp2p/bootstrap": "^4.0.0", + "@libp2p/mplex": "^6.0.2", "libp2p": "../../", "wrtc": "^0.4.7" }, diff --git a/package.json b/package.json index 4ce25eeb36..af3986271c 100644 --- a/package.json +++ b/package.json @@ -98,10 +98,10 @@ }, "dependencies": { "@achingbrain/nat-port-mapper": "^1.0.3", - "@libp2p/components": "^2.1.0", + "@libp2p/components": "^3.0.0", "@libp2p/connection": "^4.0.2", "@libp2p/crypto": "^1.0.4", - "@libp2p/interface-address-manager": "^1.0.3", + "@libp2p/interface-address-manager": "^2.0.0", "@libp2p/interface-connection": "^3.0.2", "@libp2p/interface-connection-encrypter": "^3.0.1", "@libp2p/interface-connection-manager": "^1.1.1", @@ -115,8 +115,8 @@ "@libp2p/interface-peer-store": "^1.2.2", "@libp2p/interface-pubsub": "^2.1.0", "@libp2p/interface-registrar": "^2.0.3", - "@libp2p/interface-stream-muxer": "^2.0.2", - "@libp2p/interface-transport": "^1.0.4", + "@libp2p/interface-stream-muxer": "^3.0.0", + "@libp2p/interface-transport": "^2.0.0", "@libp2p/interfaces": "^3.0.3", "@libp2p/logger": "^2.0.1", "@libp2p/multistream-select": "^3.0.0", @@ -124,7 +124,7 @@ "@libp2p/peer-id": "^1.1.15", "@libp2p/peer-id-factory": "^1.0.18", "@libp2p/peer-record": "^4.0.3", - "@libp2p/peer-store": "^3.1.5", + "@libp2p/peer-store": "^4.0.0", "@libp2p/tracked-map": "^2.0.1", "@libp2p/utils": "^3.0.2", "@multiformats/mafmt": "^11.0.2", @@ -169,24 +169,24 @@ "xsalsa20": "^1.1.0" }, "devDependencies": { - "@chainsafe/libp2p-noise": "^8.0.2", - "@chainsafe/libp2p-yamux": "^1.0.0", - "@libp2p/bootstrap": "^3.0.0", + "@chainsafe/libp2p-noise": "^9.0.0", + "@chainsafe/libp2p-yamux": "^2.0.0", + "@libp2p/bootstrap": "^4.0.0", "@libp2p/daemon-client": "^3.0.1", "@libp2p/daemon-server": "^3.0.1", - "@libp2p/floodsub": "^3.0.0", + "@libp2p/floodsub": "^4.0.0", "@libp2p/interface-compliance-tests": "^3.0.2", "@libp2p/interface-connection-encrypter-compliance-tests": "^2.0.2", - "@libp2p/interface-mocks": "^5.1.0", + "@libp2p/interface-mocks": "^6.0.1", "@libp2p/interop": "^3.0.1", - "@libp2p/kad-dht": "^3.0.5", - "@libp2p/mdns": "^3.0.1", - "@libp2p/mplex": "^5.2.3", - "@libp2p/pubsub": "^3.1.3", - "@libp2p/tcp": "^3.1.1", + "@libp2p/kad-dht": "^4.0.0", + "@libp2p/mdns": "^4.0.0", + "@libp2p/mplex": "^6.0.2", + "@libp2p/pubsub": "^4.0.0", + "@libp2p/tcp": "^4.0.0", "@libp2p/topology": "^3.0.1", - "@libp2p/webrtc-star": "^3.0.3", - "@libp2p/websockets": "^3.0.4", + "@libp2p/webrtc-star": "^4.0.1", + "@libp2p/websockets": "^4.0.0", "@types/node-forge": "^1.0.0", "@types/p-fifo": "^1.0.0", "@types/varint": "^6.0.0", diff --git a/src/address-manager/index.ts b/src/address-manager/index.ts index b6726994c3..907f30a8c5 100644 --- a/src/address-manager/index.ts +++ b/src/address-manager/index.ts @@ -76,6 +76,23 @@ export class DefaultAddressManager extends EventEmitter { return Array.from(this.observed).map((a) => multiaddr(a)) } + /** + * Add peer observed addresses + * Signal that we have confidence an observed multiaddr is publicly dialable - + * this will make it appear in the output of getAddresses() + */ + confirmObservedAddr (addr: Multiaddr): void { + + } + + /** + * Signal that we do not have confidence an observed multiaddr is publicly dialable - + * this will remove it from the output of getObservedAddrs() + */ + removeObservedAddr (addr: Multiaddr): void { + + } + /** * Add peer observed addresses */ diff --git a/src/upgrader.ts b/src/upgrader.ts index 4057bd3117..46c3b82429 100644 --- a/src/upgrader.ts +++ b/src/upgrader.ts @@ -418,7 +418,7 @@ export class DefaultUpgrader extends EventEmitter implements Upg } log('%s: starting new stream on %s', direction, protocols) - const muxedStream = muxer.newStream() + const muxedStream = await muxer.newStream() const metrics = this.components.getMetrics() let controller: TimeoutController | undefined