mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-13 01:01:23 +00:00
fix: remove ipfs dependency and upgrade multiaddr (#1387)
- Upgrades @multiformats/multiaddr to 11.0.0 - Removes ipfs-http-client and delegate router dependencies - Test delegation using interface stubs instead of implementations
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import { Multiaddr } from '@multiformats/multiaddr'
|
||||
import { multiaddr } from '@multiformats/multiaddr'
|
||||
import { createLibp2p } from './libp2p.js'
|
||||
import { stdinToStream, streamToConsole } from './stream.js'
|
||||
import { createFromJSON } from '@libp2p/peer-id-factory'
|
||||
@ -31,7 +31,7 @@ async function run () {
|
||||
})
|
||||
|
||||
// Dial to the remote peer (the "listener")
|
||||
const listenerMa = new Multiaddr(`/ip4/127.0.0.1/tcp/10333/p2p/${idListener.toString()}`)
|
||||
const listenerMa = multiaddr(`/ip4/127.0.0.1/tcp/10333/p2p/${idListener.toString()}`)
|
||||
const stream = await nodeDialer.dialProtocol(listenerMa, '/chat/1.0.0')
|
||||
|
||||
console.log('Dialer dialed to listener on protocol: /chat/1.0.0')
|
||||
|
@ -3,15 +3,15 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "^8.0.0",
|
||||
"@chainsafe/libp2p-noise": "^8.0.1",
|
||||
"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.1",
|
||||
"@libp2p/webrtc-star": "^3.0.0",
|
||||
"@libp2p/websockets": "^3.0.0",
|
||||
"@libp2p/mplex": "^5.2.3",
|
||||
"@libp2p/webrtc-star": "^3.0.3",
|
||||
"@libp2p/websockets": "^3.0.4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-scripts": "5.0.0"
|
||||
|
@ -9,11 +9,11 @@
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "^8.0.0",
|
||||
"@libp2p/bootstrap": "^2.0.0",
|
||||
"@libp2p/mplex": "^5.2.1",
|
||||
"@libp2p/webrtc-star": "^3.0.0",
|
||||
"@libp2p/websockets": "^3.0.0",
|
||||
"@chainsafe/libp2p-noise": "^8.0.1",
|
||||
"@libp2p/bootstrap": "^2.0.1",
|
||||
"@libp2p/mplex": "^5.2.3",
|
||||
"@libp2p/webrtc-star": "^3.0.3",
|
||||
"@libp2p/websockets": "^3.0.4",
|
||||
"libp2p": "../../"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -10,9 +10,9 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@libp2p/webrtc-direct": "^2.0.0",
|
||||
"@chainsafe/libp2p-noise": "^8.0.0",
|
||||
"@libp2p/bootstrap": "^2.0.0",
|
||||
"@libp2p/mplex": "^5.2.1",
|
||||
"@chainsafe/libp2p-noise": "^8.0.1",
|
||||
"@libp2p/bootstrap": "^2.0.1",
|
||||
"@libp2p/mplex": "^5.2.3",
|
||||
"libp2p": "../../",
|
||||
"wrtc": "^0.4.7"
|
||||
},
|
||||
|
Reference in New Issue
Block a user