mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-22 21:41:33 +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')
|
||||
|
Reference in New Issue
Block a user