diff --git a/package.json b/package.json index e1e14b6..aeb4880 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "docs": "aegir docs" }, "dependencies": { - "@libp2p/interface": "^1.1.3", + "@libp2p/interface": "^1.5.0", "@libp2p/utils": "^5.2.5", "get-iterator": "^2.0.1", "it-foreach": "^2.0.6", diff --git a/src/muxer.ts b/src/muxer.ts index df4e792..944ce08 100644 --- a/src/muxer.ts +++ b/src/muxer.ts @@ -1,4 +1,4 @@ -import { CodeError, setMaxListeners } from '@libp2p/interface' +import { CodeError, serviceCapabilities, setMaxListeners } from '@libp2p/interface' import { getIterator } from 'get-iterator' import { pushable, type Pushable } from 'it-pushable' import { Uint8ArrayList } from 'uint8arraylist' @@ -28,6 +28,12 @@ export class Yamux implements StreamMuxerFactory { this._init = init } + readonly [Symbol.toStringTag] = '@chainsafe/libp2p-yamux' + + readonly [serviceCapabilities]: string[] = [ + '@libp2p/stream-multiplexing' + ] + createStreamMuxer (init?: YamuxMuxerInit): YamuxMuxer { return new YamuxMuxer(this._components, { ...this._init,