libp2p 1.9.4-a142bb642 → 1.9.4-c010d575c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -16,7 +16,7 @@ ${t.join(`
16
16
  `),e),e.log.trace('handle: responded with "%s" for "%s"',o,o),{stream:n.unwrap(),protocol:o};if(o==="ls"){let s=new wt(...t.map(i=>Sa.single(P(`${i}
17
17
  `))),P(`
18
18
  `));e.log.trace('handle: respond with "%s" for %s',t,o),await Tr(n,s,e),e.log.trace('handle: responded with "%s" for %s',t,o);continue}e.log('handle: respond with "na" for "%s"',o),await Tr(n,P(`na
19
- `),e),e.log('handle: responded with "na" for "%s"',o)}}var cb=500,_u=class{id;remoteAddr;remotePeer;direction;timeline;multiplexer;encryption;status;limits;log;tags;_newStream;_close;_abort;_getStreams;constructor(t){let{remoteAddr:e,remotePeer:n,newStream:o,close:s,abort:i,getStreams:a}=t;this.id=`${parseInt(String(Math.random()*1e9)).toString(36)}${Date.now()}`,this.remoteAddr=e,this.remotePeer=n,this.direction=t.direction,this.status="open",this.timeline=t.timeline,this.multiplexer=t.multiplexer,this.encryption=t.encryption,this.limits=t.limits,this.log=t.logger.forComponent(`libp2p:connection:${this.direction}:${this.id}`),this.remoteAddr.getPeerId()==null&&(this.remoteAddr=this.remoteAddr.encapsulate(`/p2p/${this.remotePeer}`)),this._newStream=o,this._close=s,this._abort=i,this._getStreams=a,this.tags=[]}[Symbol.toStringTag]="Connection";[Ru]=!0;get streams(){return this._getStreams()}async newStream(t,e){if(this.status==="closing")throw new Ro("the connection is being closed");if(this.status==="closed")throw new Do("the connection is closed");if(Array.isArray(t)||(t=[t]),this.limits!=null&&e?.runOnLimitedConnection!==!0)throw new Mr("Cannot open protocol stream on limited connection");let n=await this._newStream(t,e);return n.direction="outbound",n}async close(t={}){if(!(this.status==="closed"||this.status==="closing")){if(this.log("closing connection to %a",this.remoteAddr),this.status="closing",t.signal==null){let e=AbortSignal.timeout(cb);tt(1/0,e),t={...t,signal:e}}try{this.log.trace("closing all streams"),await Promise.all(this.streams.map(async e=>e.close(t))),this.log.trace("closing underlying transport"),await this._close(t),this.log.trace("updating timeline with close time"),this.status="closed",this.timeline.close=Date.now()}catch(e){this.log.error("error encountered during graceful close of connection to %a",this.remoteAddr,e),this.abort(e)}}}abort(t){this.log.error("aborting connection to %a due to error",this.remoteAddr,t),this.status="closing",this.streams.forEach(e=>{e.abort(t)}),this.log.error("all streams aborted",this.streams.length),this._abort(t),this.timeline.close=Date.now(),this.status="closed"}};function Np(r){return new _u(r)}var lb=3e4;function ub(r,t){try{let{options:e}=t.getHandler(r);return e.maxInboundStreams}catch(e){if(e.name!=="UnhandledProtocolError")throw e}return bu}function fb(r,t,e={}){try{let{options:n}=t.getHandler(r);if(n.maxOutboundStreams!=null)return n.maxOutboundStreams}catch(n){if(n.name!=="UnhandledProtocolError")throw n}return e.maxOutboundStreams??xu}function Pp(r,t,e){let n=0;return e.streams.forEach(o=>{o.direction===t&&o.protocol===r&&n++}),n}var ka=class{components;connectionEncryption;muxers;inboundUpgradeTimeout;events;constructor(t,e){this.components=t,this.connectionEncryption=new Map,e.connectionEncryption.forEach(n=>{this.connectionEncryption.set(n.protocol,n)}),this.muxers=new Map,e.muxers.forEach(n=>{this.muxers.set(n.protocol,n)}),this.inboundUpgradeTimeout=e.inboundUpgradeTimeout??2e3,this.events=t.events}[Symbol.toStringTag]="@libp2p/upgrader";async shouldBlockConnection(t,e,n){let o=this.components.connectionGater[n];if(o!==void 0&&await o(t,e))throw new Ao(`The multiaddr connection is blocked by gater.${n}`)}async upgradeInbound(t,e){if(!await this.components.connectionManager.acceptIncomingConnection(t))throw new zi("connection denied");let o,s,i,a,c,u=AbortSignal.timeout(this.inboundUpgradeTimeout),f=()=>{t.abort(new Rr("inbound upgrade timeout"))};u.addEventListener("abort",f,{once:!0}),tt(1/0,u);try{if(await this.components.connectionGater.denyInboundConnection?.(t)===!0)throw new Ao("The multiaddr connection is blocked by gater.acceptConnection");this.components.metrics?.trackMultiaddrConnection(t),t.log("starting the inbound connection upgrade");let l=t;if(e?.skipProtection!==!0){let d=this.components.connectionProtector;d!=null&&(t.log("protecting the inbound connection"),l=await d.protect(t))}try{if(o=l,e?.skipEncryption!==!0){e?.onProgress?.(new ft("upgrader:encrypt-inbound-connection")),{conn:o,remotePeer:s,protocol:c}=await this._encryptInbound(l);let d={...l,...o};await this.shouldBlockConnection(s,d,"denyInboundEncryptedConnection")}else{let d=t.remoteAddr.getPeerId();if(d==null)throw new Pr("inbound connection that skipped encryption must have a peer id");let h=ge(d);c="native",s=h}if(i=o,e?.muxerFactory!=null)a=e.muxerFactory;else if(this.muxers.size>0){e?.onProgress?.(new ft("upgrader:multiplex-inbound-connection"));let d=await this._multiplexInbound({...l,...o},this.muxers);a=d.muxerFactory,i=d.stream}}catch(d){throw t.log.error("failed to upgrade inbound connection",d),d}return await this.shouldBlockConnection(s,t,"denyInboundUpgradedConnection"),t.log("successfully upgraded inbound connection"),this._createConnection({cryptoProtocol:c,direction:"inbound",maConn:t,upgradedConn:i,muxerFactory:a,remotePeer:s,limits:e?.limits})}finally{u.removeEventListener("abort",f),this.components.connectionManager.afterUpgradeInbound()}}async upgradeOutbound(t,e){let n=t.remoteAddr.getPeerId(),o;n!=null&&(o=ge(n),await this.shouldBlockConnection(o,t,"denyOutboundConnection"));let s,i,a,c,u;this.components.metrics?.trackMultiaddrConnection(t),t.log("starting the outbound connection upgrade");let f=t;if(e?.skipProtection!==!0){let l=this.components.connectionProtector;l!=null&&(f=await l.protect(t))}try{if(s=f,e?.skipEncryption!==!0){({conn:s,remotePeer:i,protocol:c}=await this._encryptOutbound(f,{...e,remotePeer:o}));let l={...f,...s};await this.shouldBlockConnection(i,l,"denyOutboundEncryptedConnection")}else{if(o==null)throw new Uo("Encryption was skipped but no peer id was passed");c="native",i=o}if(a=s,e?.muxerFactory!=null)u=e.muxerFactory;else if(this.muxers.size>0){let l=await this._multiplexOutbound({...f,...s},this.muxers);u=l.muxerFactory,a=l.stream}}catch(l){throw t.log.error("failed to upgrade outbound connection",l),await t.close(l),l}return await this.shouldBlockConnection(i,t,"denyOutboundUpgradedConnection"),t.log("successfully upgraded outbound connection"),this._createConnection({cryptoProtocol:c,direction:"outbound",maConn:t,upgradedConn:a,muxerFactory:u,remotePeer:i,limits:e?.limits})}_createConnection(t){let{cryptoProtocol:e,direction:n,maConn:o,upgradedConn:s,remotePeer:i,muxerFactory:a,limits:c}=t,u,f,l;a!=null&&(u=a.createStreamMuxer({direction:n,onIncomingStream:p=>{l!=null&&Promise.resolve().then(async()=>{let m=this.components.registrar.getProtocols(),{stream:g,protocol:y}=await To(p,m,{log:p.log,yieldBytes:!1});if(l==null)return;l.log("incoming stream opened on %s",y);let b=ub(y,this.components.registrar);if(Pp(y,"inbound",l)===b){let x=new Ho(`Too many inbound protocol streams for protocol "${y}" - limit ${b}`);throw p.abort(x),x}p.source=g.source,p.sink=g.sink,p.protocol=y,g.closeWrite!=null&&(p.closeWrite=g.closeWrite),g.closeRead!=null&&(p.closeRead=g.closeRead),g.close!=null&&(p.close=g.close),await this.components.peerStore.merge(i,{protocols:[y]}),this.components.metrics?.trackProtocolStream(p,l),this._onStream({connection:l,stream:p,protocol:y})}).catch(async m=>{l.log.error("error handling incoming stream id %s",p.id,m.message,m.code,m.stack),p.timeline.close==null&&await p.close()})}}),f=async(p,m={})=>{if(u==null)throw new Ir("Connection is not multiplexed");l.log("starting new stream for protocols %s",p);let g=await u.newStream();l.log.trace("started new stream %s for protocols %s",g.id,p);try{if(m.signal==null){g.log("no abort signal was passed while trying to negotiate protocols %s falling back to default timeout",p);let A=AbortSignal.timeout(lb);tt(1/0,A),m={...m,signal:A}}g.log.trace("selecting protocol from protocols %s",p);let{stream:y,protocol:b}=await ko(g,p,{...m,log:g.log,yieldBytes:!0});g.log("selected protocol %s",b);let w=fb(b,this.components.registrar,m),x=Pp(b,"outbound",l);if(x>=w){let A=new $o(`Too many outbound protocol streams for protocol "${b}" - ${x}/${w}`);throw g.abort(A),A}return await this.components.peerStore.merge(i,{protocols:[b]}),g.source=y.source,g.sink=y.sink,g.protocol=b,y.closeWrite!=null&&(g.closeWrite=y.closeWrite),y.closeRead!=null&&(g.closeRead=y.closeRead),y.close!=null&&(g.close=y.close),this.components.metrics?.trackProtocolStream(g,l),g}catch(y){throw l.log.error("could not create new stream for protocols %s",p,y),g.timeline.close==null&&g.abort(y),y}},Promise.all([u.sink(s.source),s.sink(u.source)]).catch(p=>{l.log.error("error piping data through muxer",p)}));let d=o.timeline;o.timeline=new Proxy(d,{set:(...p)=>(l!=null&&p[1]==="close"&&p[2]!=null&&d.close==null&&(async()=>{try{l.status==="open"&&await l.close()}catch(m){l.log.error("error closing connection after timeline close",m)}finally{this.events.safeDispatchEvent("connection:close",{detail:l})}})().catch(m=>{l.log.error("error thrown while dispatching connection:close event",m)}),Reflect.set(...p))}),o.timeline.upgraded=Date.now();let h=()=>{throw new Ir("Connection is not multiplexed")};return l=Np({remoteAddr:o.remoteAddr,remotePeer:i,status:"open",direction:n,timeline:o.timeline,multiplexer:u?.protocol,encryption:e,limits:c,logger:this.components.logger,newStream:f??h,getStreams:()=>u!=null?u.streams:[],close:async p=>{u!=null&&(l.log.trace("close muxer"),await u.close(p)),l.log.trace("close maconn"),await o.close(p),l.log.trace("closed maconn")},abort:p=>{o.abort(p),u?.abort(p)}}),this.events.safeDispatchEvent("connection:open",{detail:l}),l}_onStream(t){let{connection:e,stream:n,protocol:o}=t,{handler:s,options:i}=this.components.registrar.getHandler(o);if(e.limits!=null&&i.runOnLimitedConnection!==!0)throw new Mr("Cannot open protocol stream on limited connection");s({connection:e,stream:n})}async _encryptInbound(t,e){let n=Array.from(this.connectionEncryption.keys());t.log("handling inbound crypto protocol selection",n);try{let{stream:o,protocol:s}=await To(t,n,{log:t.log}),i=this.connectionEncryption.get(s);if(i==null)throw new Error(`no crypto module found for ${s}`);return t.log("encrypting inbound connection using",s),{...await i.secureInbound(o,e),protocol:s}}catch(o){throw t.log.error("encrypting inbound connection failed",o),new So(o.message)}}async _encryptOutbound(t,e){let n=Array.from(this.connectionEncryption.keys());t.log("selecting outbound crypto protocol",n);try{t.log.trace("selecting encrypter from %s",n);let{stream:o,protocol:s}=await ko(t,n,{log:t.log,yieldBytes:!0}),i=this.connectionEncryption.get(s);if(i==null)throw new Error(`no crypto module found for ${s}`);return t.log("encrypting outbound connection to %p using %s",e?.remotePeer,i),{...await i.secureOutbound(o,e),protocol:s}}catch(o){throw t.log.error("encrypting outbound connection to %p failed",e?.remotePeer,o),new So(o.message)}}async _multiplexOutbound(t,e){let n=Array.from(e.keys());t.log("outbound selecting muxer %s",n);try{t.log.trace("selecting stream muxer from %s",n);let{stream:o,protocol:s}=await ko(t,n,{log:t.log,yieldBytes:!0});t.log("selected %s as muxer protocol",s);let i=e.get(s);return{stream:o,muxerFactory:i}}catch(o){throw t.log.error("error multiplexing outbound connection",o),new Ir(String(o))}}async _multiplexInbound(t,e){let n=Array.from(e.keys());t.log("inbound handling muxers %s",n);try{let{stream:o,protocol:s}=await To(t,n,{log:t.log}),i=e.get(s);return{stream:o,muxerFactory:i}}catch(o){throw t.log.error("error multiplexing inbound connection",o),new Ir(String(o))}}};var Rp="1.9.4-a142bb642",Dp="libp2p";var Ca=class extends ve{peerId;peerStore;contentRouting;peerRouting;metrics;services;logger;status;components;log;constructor(t){super(),this.status="stopped";let e=new ve,n=e.dispatchEvent.bind(e);e.dispatchEvent=a=>{let c=n(a),u=this.dispatchEvent(new CustomEvent(a.type,{detail:a.detail}));return c||u},tt(1/0,e),this.peerId=t.peerId,this.logger=t.logger??Ei(),this.log=this.logger.forComponent("libp2p"),this.services={};let o=this.components=up({peerId:t.peerId,privateKey:t.privateKey,nodeInfo:t.nodeInfo??{name:Dp,version:Rp},logger:this.logger,events:e,datastore:t.datastore??new Oi,connectionGater:hp(t.connectionGater),dns:t.dns});this.peerStore=this.configureComponent("peerStore",new Di(o,{addressFilter:this.components.connectionGater.filterMultiaddrForPeer,...t.peerStore})),t.metrics!=null&&(this.metrics=this.configureComponent("metrics",t.metrics(this.components))),o.events.addEventListener("peer:update",a=>{if(a.detail.previous==null){let c={id:a.detail.peer.id,multiaddrs:a.detail.peer.addresses.map(u=>u.multiaddr)};o.events.safeDispatchEvent("peer:discovery",{detail:c})}}),t.connectionProtector!=null&&this.configureComponent("connectionProtector",t.connectionProtector(o)),this.components.upgrader=new ka(this.components,{connectionEncryption:(t.connectionEncryption??[]).map((a,c)=>this.configureComponent(`connection-encryption-${c}`,a(this.components))),muxers:(t.streamMuxers??[]).map((a,c)=>this.configureComponent(`stream-muxers-${c}`,a(this.components))),inboundUpgradeTimeout:t.connectionManager?.inboundUpgradeTimeout}),this.configureComponent("transportManager",new wa(this.components,t.transportManager)),this.configureComponent("connectionManager",new ca(this.components,t.connectionManager)),t.connectionMonitor?.enabled!==!1&&this.configureComponent("connectionMonitor",new ha(this.components,t.connectionMonitor)),this.configureComponent("registrar",new ya(this.components)),this.configureComponent("addressManager",new Fi(this.components,t.addresses));let s=(t.peerRouters??[]).map((a,c)=>this.configureComponent(`peer-router-${c}`,a(this.components)));this.peerRouting=this.components.peerRouting=this.configureComponent("peerRouting",new ma(this.components,{routers:s}));let i=(t.contentRouters??[]).map((a,c)=>this.configureComponent(`content-router-${c}`,a(this.components)));if(this.contentRouting=this.components.contentRouting=this.configureComponent("contentRouting",new da(this.components,{routers:i})),this.configureComponent("randomWalk",new ga(this.components)),(t.peerDiscovery??[]).forEach((a,c)=>{this.configureComponent(`peer-discovery-${c}`,a(this.components)).addEventListener("peer",f=>{this.#t(f)})}),t.transports?.forEach((a,c)=>{this.components.transportManager.add(this.configureComponent(`transport-${c}`,a(this.components)))}),t.services!=null)for(let a of Object.keys(t.services)){let c=t.services[a],u=c(this.components);if(u==null){this.log.error("service factory %s returned null or undefined instance",a);continue}this.services[a]=u,this.configureComponent(a,u),u[La]!=null&&(this.log("registering service %s for content routing",a),i.push(u[La])),u[Pa]!=null&&(this.log("registering service %s for peer routing",a),s.push(u[Pa])),u[Na]!=null&&(this.log("registering service %s for peer discovery",a),u[Na].addEventListener?.("peer",f=>{this.#t(f)}))}fp(o)}configureComponent(t,e){return e==null&&this.log.error("component %s was null or undefined",t),this.components[t]=e,e}async start(){if(this.status==="stopped"){this.status="starting",this.log("libp2p is starting");try{await this.components.beforeStart?.(),await this.components.start(),await this.components.afterStart?.(),this.status="started",this.safeDispatchEvent("start",{detail:this}),this.log("libp2p has started")}catch(t){throw this.log.error("An error occurred starting libp2p",t),this.status="started",await this.stop(),t}}}async stop(){this.status==="started"&&(this.log("libp2p is stopping"),this.status="stopping",await this.components.beforeStop?.(),await this.components.stop(),await this.components.afterStop?.(),this.status="stopped",this.safeDispatchEvent("stop",{detail:this}),this.log("libp2p has stopped"))}getConnections(t){return this.components.connectionManager.getConnections(t)}getDialQueue(){return this.components.connectionManager.getDialQueue()}getPeers(){let t=new br;for(let e of this.components.connectionManager.getConnections())t.add(e.remotePeer);return Array.from(t)}async dial(t,e={}){return this.components.connectionManager.openConnection(t,{priority:75,...e})}async dialProtocol(t,e,n={}){if(e==null)throw new D("no protocols were provided to open a stream");if(e=Array.isArray(e)?e:[e],e.length===0)throw new D("no protocols were provided to open a stream");return(await this.dial(t,n)).newStream(e,n)}getMultiaddrs(){return this.components.addressManager.getAddresses()}getProtocols(){return this.components.registrar.getProtocols()}async hangUp(t,e={}){Qe(t)&&(t=ge(t.getPeerId()??"")),await this.components.connectionManager.closeConnections(t,e)}async getPublicKey(t,e={}){if(this.log("getPublicKey %p",t),t.publicKey!=null)return t.publicKey;try{let i=await this.peerStore.get(t);if(i.id.publicKey!=null)return i.id.publicKey}catch(i){if(i.name!=="NotFoundError")throw i}let n=Ft([P("/pk/"),t.toMultihash().bytes]),o=await this.contentRouting.get(n,e),s=nn(o);return await this.peerStore.patch(t,{publicKey:s}),s}async handle(t,e,n){Array.isArray(t)||(t=[t]),await Promise.all(t.map(async o=>{await this.components.registrar.handle(o,e,n)}))}async unhandle(t){Array.isArray(t)||(t=[t]),await Promise.all(t.map(async e=>{await this.components.registrar.unhandle(e)}))}async register(t,e){return this.components.registrar.register(t,e)}unregister(t){this.components.registrar.unregister(t)}async isDialable(t,e={}){return this.components.connectionManager.isDialable(t,e)}#t(t){let{detail:e}=t;if(e.id.toString()===this.peerId.toString()){this.log.error("peer discovery mechanism discovered self");return}this.components.peerStore.merge(e.id,{multiaddrs:e.multiaddrs}).catch(n=>{this.log.error(n)})}};async function db(r={}){r.privateKey??=await Wh("Ed25519");let t=new Ca({...await Od(r),peerId:Yh(r.privateKey)});return r.start!==!1&&await t.start(),t}return Zp(pb);})();
19
+ `),e),e.log('handle: responded with "na" for "%s"',o)}}var cb=500,_u=class{id;remoteAddr;remotePeer;direction;timeline;multiplexer;encryption;status;limits;log;tags;_newStream;_close;_abort;_getStreams;constructor(t){let{remoteAddr:e,remotePeer:n,newStream:o,close:s,abort:i,getStreams:a}=t;this.id=`${parseInt(String(Math.random()*1e9)).toString(36)}${Date.now()}`,this.remoteAddr=e,this.remotePeer=n,this.direction=t.direction,this.status="open",this.timeline=t.timeline,this.multiplexer=t.multiplexer,this.encryption=t.encryption,this.limits=t.limits,this.log=t.logger.forComponent(`libp2p:connection:${this.direction}:${this.id}`),this.remoteAddr.getPeerId()==null&&(this.remoteAddr=this.remoteAddr.encapsulate(`/p2p/${this.remotePeer}`)),this._newStream=o,this._close=s,this._abort=i,this._getStreams=a,this.tags=[]}[Symbol.toStringTag]="Connection";[Ru]=!0;get streams(){return this._getStreams()}async newStream(t,e){if(this.status==="closing")throw new Ro("the connection is being closed");if(this.status==="closed")throw new Do("the connection is closed");if(Array.isArray(t)||(t=[t]),this.limits!=null&&e?.runOnLimitedConnection!==!0)throw new Mr("Cannot open protocol stream on limited connection");let n=await this._newStream(t,e);return n.direction="outbound",n}async close(t={}){if(!(this.status==="closed"||this.status==="closing")){if(this.log("closing connection to %a",this.remoteAddr),this.status="closing",t.signal==null){let e=AbortSignal.timeout(cb);tt(1/0,e),t={...t,signal:e}}try{this.log.trace("closing all streams"),await Promise.all(this.streams.map(async e=>e.close(t))),this.log.trace("closing underlying transport"),await this._close(t),this.log.trace("updating timeline with close time"),this.status="closed",this.timeline.close=Date.now()}catch(e){this.log.error("error encountered during graceful close of connection to %a",this.remoteAddr,e),this.abort(e)}}}abort(t){this.log.error("aborting connection to %a due to error",this.remoteAddr,t),this.status="closing",this.streams.forEach(e=>{e.abort(t)}),this.log.error("all streams aborted",this.streams.length),this._abort(t),this.timeline.close=Date.now(),this.status="closed"}};function Np(r){return new _u(r)}var lb=3e4;function ub(r,t){try{let{options:e}=t.getHandler(r);return e.maxInboundStreams}catch(e){if(e.name!=="UnhandledProtocolError")throw e}return bu}function fb(r,t,e={}){try{let{options:n}=t.getHandler(r);if(n.maxOutboundStreams!=null)return n.maxOutboundStreams}catch(n){if(n.name!=="UnhandledProtocolError")throw n}return e.maxOutboundStreams??xu}function Pp(r,t,e){let n=0;return e.streams.forEach(o=>{o.direction===t&&o.protocol===r&&n++}),n}var ka=class{components;connectionEncrypters;streamMuxers;inboundUpgradeTimeout;events;constructor(t,e){this.components=t,this.connectionEncrypters=new Map,e.connectionEncrypters.forEach(n=>{this.connectionEncrypters.set(n.protocol,n)}),this.streamMuxers=new Map,e.streamMuxers.forEach(n=>{this.streamMuxers.set(n.protocol,n)}),this.inboundUpgradeTimeout=e.inboundUpgradeTimeout??2e3,this.events=t.events}[Symbol.toStringTag]="@libp2p/upgrader";async shouldBlockConnection(t,e,n){let o=this.components.connectionGater[n];if(o!==void 0&&await o(t,e))throw new Ao(`The multiaddr connection is blocked by gater.${n}`)}async upgradeInbound(t,e){if(!await this.components.connectionManager.acceptIncomingConnection(t))throw new zi("connection denied");let o,s,i,a,c,u=AbortSignal.timeout(this.inboundUpgradeTimeout),f=()=>{t.abort(new Rr("inbound upgrade timeout"))};u.addEventListener("abort",f,{once:!0}),tt(1/0,u);try{if(await this.components.connectionGater.denyInboundConnection?.(t)===!0)throw new Ao("The multiaddr connection is blocked by gater.acceptConnection");this.components.metrics?.trackMultiaddrConnection(t),t.log("starting the inbound connection upgrade");let l=t;if(e?.skipProtection!==!0){let d=this.components.connectionProtector;d!=null&&(t.log("protecting the inbound connection"),l=await d.protect(t))}try{if(o=l,e?.skipEncryption!==!0){e?.onProgress?.(new ft("upgrader:encrypt-inbound-connection")),{conn:o,remotePeer:s,protocol:c}=await this._encryptInbound(l);let d={...l,...o};await this.shouldBlockConnection(s,d,"denyInboundEncryptedConnection")}else{let d=t.remoteAddr.getPeerId();if(d==null)throw new Pr("inbound connection that skipped encryption must have a peer id");let h=ge(d);c="native",s=h}if(i=o,e?.muxerFactory!=null)a=e.muxerFactory;else if(this.streamMuxers.size>0){e?.onProgress?.(new ft("upgrader:multiplex-inbound-connection"));let d=await this._multiplexInbound({...l,...o},this.streamMuxers);a=d.muxerFactory,i=d.stream}}catch(d){throw t.log.error("failed to upgrade inbound connection",d),d}return await this.shouldBlockConnection(s,t,"denyInboundUpgradedConnection"),t.log("successfully upgraded inbound connection"),this._createConnection({cryptoProtocol:c,direction:"inbound",maConn:t,upgradedConn:i,muxerFactory:a,remotePeer:s,limits:e?.limits})}finally{u.removeEventListener("abort",f),this.components.connectionManager.afterUpgradeInbound()}}async upgradeOutbound(t,e){let n=t.remoteAddr.getPeerId(),o;n!=null&&(o=ge(n),await this.shouldBlockConnection(o,t,"denyOutboundConnection"));let s,i,a,c,u;this.components.metrics?.trackMultiaddrConnection(t),t.log("starting the outbound connection upgrade");let f=t;if(e?.skipProtection!==!0){let l=this.components.connectionProtector;l!=null&&(f=await l.protect(t))}try{if(s=f,e?.skipEncryption!==!0){({conn:s,remotePeer:i,protocol:c}=await this._encryptOutbound(f,{...e,remotePeer:o}));let l={...f,...s};await this.shouldBlockConnection(i,l,"denyOutboundEncryptedConnection")}else{if(o==null)throw new Uo("Encryption was skipped but no peer id was passed");c="native",i=o}if(a=s,e?.muxerFactory!=null)u=e.muxerFactory;else if(this.streamMuxers.size>0){let l=await this._multiplexOutbound({...f,...s},this.streamMuxers);u=l.muxerFactory,a=l.stream}}catch(l){throw t.log.error("failed to upgrade outbound connection",l),await t.close(l),l}return await this.shouldBlockConnection(i,t,"denyOutboundUpgradedConnection"),t.log("successfully upgraded outbound connection"),this._createConnection({cryptoProtocol:c,direction:"outbound",maConn:t,upgradedConn:a,muxerFactory:u,remotePeer:i,limits:e?.limits})}_createConnection(t){let{cryptoProtocol:e,direction:n,maConn:o,upgradedConn:s,remotePeer:i,muxerFactory:a,limits:c}=t,u,f,l;a!=null&&(u=a.createStreamMuxer({direction:n,onIncomingStream:p=>{l!=null&&Promise.resolve().then(async()=>{let m=this.components.registrar.getProtocols(),{stream:g,protocol:y}=await To(p,m,{log:p.log,yieldBytes:!1});if(l==null)return;l.log("incoming stream opened on %s",y);let b=ub(y,this.components.registrar);if(Pp(y,"inbound",l)===b){let x=new Ho(`Too many inbound protocol streams for protocol "${y}" - limit ${b}`);throw p.abort(x),x}p.source=g.source,p.sink=g.sink,p.protocol=y,g.closeWrite!=null&&(p.closeWrite=g.closeWrite),g.closeRead!=null&&(p.closeRead=g.closeRead),g.close!=null&&(p.close=g.close),await this.components.peerStore.merge(i,{protocols:[y]}),this.components.metrics?.trackProtocolStream(p,l),this._onStream({connection:l,stream:p,protocol:y})}).catch(async m=>{l.log.error("error handling incoming stream id %s",p.id,m.message,m.code,m.stack),p.timeline.close==null&&await p.close()})}}),f=async(p,m={})=>{if(u==null)throw new Ir("Connection is not multiplexed");l.log("starting new stream for protocols %s",p);let g=await u.newStream();l.log.trace("started new stream %s for protocols %s",g.id,p);try{if(m.signal==null){g.log("no abort signal was passed while trying to negotiate protocols %s falling back to default timeout",p);let A=AbortSignal.timeout(lb);tt(1/0,A),m={...m,signal:A}}g.log.trace("selecting protocol from protocols %s",p);let{stream:y,protocol:b}=await ko(g,p,{...m,log:g.log,yieldBytes:!0});g.log("selected protocol %s",b);let w=fb(b,this.components.registrar,m),x=Pp(b,"outbound",l);if(x>=w){let A=new $o(`Too many outbound protocol streams for protocol "${b}" - ${x}/${w}`);throw g.abort(A),A}return await this.components.peerStore.merge(i,{protocols:[b]}),g.source=y.source,g.sink=y.sink,g.protocol=b,y.closeWrite!=null&&(g.closeWrite=y.closeWrite),y.closeRead!=null&&(g.closeRead=y.closeRead),y.close!=null&&(g.close=y.close),this.components.metrics?.trackProtocolStream(g,l),g}catch(y){throw l.log.error("could not create new stream for protocols %s",p,y),g.timeline.close==null&&g.abort(y),y}},Promise.all([u.sink(s.source),s.sink(u.source)]).catch(p=>{l.log.error("error piping data through muxer",p)}));let d=o.timeline;o.timeline=new Proxy(d,{set:(...p)=>(l!=null&&p[1]==="close"&&p[2]!=null&&d.close==null&&(async()=>{try{l.status==="open"&&await l.close()}catch(m){l.log.error("error closing connection after timeline close",m)}finally{this.events.safeDispatchEvent("connection:close",{detail:l})}})().catch(m=>{l.log.error("error thrown while dispatching connection:close event",m)}),Reflect.set(...p))}),o.timeline.upgraded=Date.now();let h=()=>{throw new Ir("Connection is not multiplexed")};return l=Np({remoteAddr:o.remoteAddr,remotePeer:i,status:"open",direction:n,timeline:o.timeline,multiplexer:u?.protocol,encryption:e,limits:c,logger:this.components.logger,newStream:f??h,getStreams:()=>u!=null?u.streams:[],close:async p=>{u!=null&&(l.log.trace("close muxer"),await u.close(p)),l.log.trace("close maconn"),await o.close(p),l.log.trace("closed maconn")},abort:p=>{o.abort(p),u?.abort(p)}}),this.events.safeDispatchEvent("connection:open",{detail:l}),l}_onStream(t){let{connection:e,stream:n,protocol:o}=t,{handler:s,options:i}=this.components.registrar.getHandler(o);if(e.limits!=null&&i.runOnLimitedConnection!==!0)throw new Mr("Cannot open protocol stream on limited connection");s({connection:e,stream:n})}async _encryptInbound(t,e){let n=Array.from(this.connectionEncrypters.keys());t.log("handling inbound crypto protocol selection",n);try{let{stream:o,protocol:s}=await To(t,n,{log:t.log}),i=this.connectionEncrypters.get(s);if(i==null)throw new Error(`no crypto module found for ${s}`);return t.log("encrypting inbound connection using",s),{...await i.secureInbound(o,e),protocol:s}}catch(o){throw t.log.error("encrypting inbound connection failed",o),new So(o.message)}}async _encryptOutbound(t,e){let n=Array.from(this.connectionEncrypters.keys());t.log("selecting outbound crypto protocol",n);try{t.log.trace("selecting encrypter from %s",n);let{stream:o,protocol:s}=await ko(t,n,{log:t.log,yieldBytes:!0}),i=this.connectionEncrypters.get(s);if(i==null)throw new Error(`no crypto module found for ${s}`);return t.log("encrypting outbound connection to %p using %s",e?.remotePeer,i),{...await i.secureOutbound(o,e),protocol:s}}catch(o){throw t.log.error("encrypting outbound connection to %p failed",e?.remotePeer,o),new So(o.message)}}async _multiplexOutbound(t,e){let n=Array.from(e.keys());t.log("outbound selecting muxer %s",n);try{t.log.trace("selecting stream muxer from %s",n);let{stream:o,protocol:s}=await ko(t,n,{log:t.log,yieldBytes:!0});t.log("selected %s as muxer protocol",s);let i=e.get(s);return{stream:o,muxerFactory:i}}catch(o){throw t.log.error("error multiplexing outbound connection",o),new Ir(String(o))}}async _multiplexInbound(t,e){let n=Array.from(e.keys());t.log("inbound handling muxers %s",n);try{let{stream:o,protocol:s}=await To(t,n,{log:t.log}),i=e.get(s);return{stream:o,muxerFactory:i}}catch(o){throw t.log.error("error multiplexing inbound connection",o),new Ir(String(o))}}};var Rp="1.9.4-c010d575c",Dp="libp2p";var Ca=class extends ve{peerId;peerStore;contentRouting;peerRouting;metrics;services;logger;status;components;log;constructor(t){super(),this.status="stopped";let e=new ve,n=e.dispatchEvent.bind(e);e.dispatchEvent=a=>{let c=n(a),u=this.dispatchEvent(new CustomEvent(a.type,{detail:a.detail}));return c||u},tt(1/0,e),this.peerId=t.peerId,this.logger=t.logger??Ei(),this.log=this.logger.forComponent("libp2p"),this.services={};let o=this.components=up({peerId:t.peerId,privateKey:t.privateKey,nodeInfo:t.nodeInfo??{name:Dp,version:Rp},logger:this.logger,events:e,datastore:t.datastore??new Oi,connectionGater:hp(t.connectionGater),dns:t.dns});this.peerStore=this.configureComponent("peerStore",new Di(o,{addressFilter:this.components.connectionGater.filterMultiaddrForPeer,...t.peerStore})),t.metrics!=null&&(this.metrics=this.configureComponent("metrics",t.metrics(this.components))),o.events.addEventListener("peer:update",a=>{if(a.detail.previous==null){let c={id:a.detail.peer.id,multiaddrs:a.detail.peer.addresses.map(u=>u.multiaddr)};o.events.safeDispatchEvent("peer:discovery",{detail:c})}}),t.connectionProtector!=null&&this.configureComponent("connectionProtector",t.connectionProtector(o)),this.components.upgrader=new ka(this.components,{connectionEncrypters:(t.connectionEncrypters??[]).map((a,c)=>this.configureComponent(`connection-encryption-${c}`,a(this.components))),streamMuxers:(t.streamMuxers??[]).map((a,c)=>this.configureComponent(`stream-muxers-${c}`,a(this.components))),inboundUpgradeTimeout:t.connectionManager?.inboundUpgradeTimeout}),this.configureComponent("transportManager",new wa(this.components,t.transportManager)),this.configureComponent("connectionManager",new ca(this.components,t.connectionManager)),t.connectionMonitor?.enabled!==!1&&this.configureComponent("connectionMonitor",new ha(this.components,t.connectionMonitor)),this.configureComponent("registrar",new ya(this.components)),this.configureComponent("addressManager",new Fi(this.components,t.addresses));let s=(t.peerRouters??[]).map((a,c)=>this.configureComponent(`peer-router-${c}`,a(this.components)));this.peerRouting=this.components.peerRouting=this.configureComponent("peerRouting",new ma(this.components,{routers:s}));let i=(t.contentRouters??[]).map((a,c)=>this.configureComponent(`content-router-${c}`,a(this.components)));if(this.contentRouting=this.components.contentRouting=this.configureComponent("contentRouting",new da(this.components,{routers:i})),this.configureComponent("randomWalk",new ga(this.components)),(t.peerDiscovery??[]).forEach((a,c)=>{this.configureComponent(`peer-discovery-${c}`,a(this.components)).addEventListener("peer",f=>{this.#t(f)})}),t.transports?.forEach((a,c)=>{this.components.transportManager.add(this.configureComponent(`transport-${c}`,a(this.components)))}),t.services!=null)for(let a of Object.keys(t.services)){let c=t.services[a],u=c(this.components);if(u==null){this.log.error("service factory %s returned null or undefined instance",a);continue}this.services[a]=u,this.configureComponent(a,u),u[La]!=null&&(this.log("registering service %s for content routing",a),i.push(u[La])),u[Pa]!=null&&(this.log("registering service %s for peer routing",a),s.push(u[Pa])),u[Na]!=null&&(this.log("registering service %s for peer discovery",a),u[Na].addEventListener?.("peer",f=>{this.#t(f)}))}fp(o)}configureComponent(t,e){return e==null&&this.log.error("component %s was null or undefined",t),this.components[t]=e,e}async start(){if(this.status==="stopped"){this.status="starting",this.log("libp2p is starting");try{await this.components.beforeStart?.(),await this.components.start(),await this.components.afterStart?.(),this.status="started",this.safeDispatchEvent("start",{detail:this}),this.log("libp2p has started")}catch(t){throw this.log.error("An error occurred starting libp2p",t),this.status="started",await this.stop(),t}}}async stop(){this.status==="started"&&(this.log("libp2p is stopping"),this.status="stopping",await this.components.beforeStop?.(),await this.components.stop(),await this.components.afterStop?.(),this.status="stopped",this.safeDispatchEvent("stop",{detail:this}),this.log("libp2p has stopped"))}getConnections(t){return this.components.connectionManager.getConnections(t)}getDialQueue(){return this.components.connectionManager.getDialQueue()}getPeers(){let t=new br;for(let e of this.components.connectionManager.getConnections())t.add(e.remotePeer);return Array.from(t)}async dial(t,e={}){return this.components.connectionManager.openConnection(t,{priority:75,...e})}async dialProtocol(t,e,n={}){if(e==null)throw new D("no protocols were provided to open a stream");if(e=Array.isArray(e)?e:[e],e.length===0)throw new D("no protocols were provided to open a stream");return(await this.dial(t,n)).newStream(e,n)}getMultiaddrs(){return this.components.addressManager.getAddresses()}getProtocols(){return this.components.registrar.getProtocols()}async hangUp(t,e={}){Qe(t)&&(t=ge(t.getPeerId()??"")),await this.components.connectionManager.closeConnections(t,e)}async getPublicKey(t,e={}){if(this.log("getPublicKey %p",t),t.publicKey!=null)return t.publicKey;try{let i=await this.peerStore.get(t);if(i.id.publicKey!=null)return i.id.publicKey}catch(i){if(i.name!=="NotFoundError")throw i}let n=Ft([P("/pk/"),t.toMultihash().bytes]),o=await this.contentRouting.get(n,e),s=nn(o);return await this.peerStore.patch(t,{publicKey:s}),s}async handle(t,e,n){Array.isArray(t)||(t=[t]),await Promise.all(t.map(async o=>{await this.components.registrar.handle(o,e,n)}))}async unhandle(t){Array.isArray(t)||(t=[t]),await Promise.all(t.map(async e=>{await this.components.registrar.unhandle(e)}))}async register(t,e){return this.components.registrar.register(t,e)}unregister(t){this.components.registrar.unregister(t)}async isDialable(t,e={}){return this.components.connectionManager.isDialable(t,e)}#t(t){let{detail:e}=t;if(e.id.toString()===this.peerId.toString()){this.log.error("peer discovery mechanism discovered self");return}this.components.peerStore.merge(e.id,{multiaddrs:e.multiaddrs}).catch(n=>{this.log.error(n)})}};async function db(r={}){r.privateKey??=await Wh("Ed25519");let t=new Ca({...await Od(r),peerId:Yh(r.privateKey)});return r.start!==!1&&await t.start(),t}return Zp(pb);})();
20
20
  /*! Bundled license information:
21
21
 
22
22
  pvtsutils/build/index.js:
@@ -85,7 +85,7 @@ export interface Libp2pInit<T extends ServiceMap = ServiceMap> {
85
85
  * eavesdropped on, and that the remote peer posesses the private key that
86
86
  * corresponds to the public key that it's Peer ID is derived from.
87
87
  */
88
- connectionEncryption?: Array<(components: Components) => ConnectionEncrypter>;
88
+ connectionEncrypters?: Array<(components: Components) => ConnectionEncrypter>;
89
89
  /**
90
90
  * Peer discovery mechanisms allow finding peers on the network
91
91
  */
@@ -160,7 +160,7 @@ export type Libp2pOptions<T extends ServiceMap = ServiceMap> = Libp2pInit<T> & {
160
160
  * const options = {
161
161
  * transports: [tcp()],
162
162
  * streamMuxers: [yamux(), mplex()],
163
- * connectionEncryption: [noise()]
163
+ * connectionEncrypters: [noise()]
164
164
  * }
165
165
  *
166
166
  * // create libp2p
package/dist/src/index.js CHANGED
@@ -36,7 +36,7 @@ import { Libp2p as Libp2pClass } from './libp2p.js';
36
36
  * const options = {
37
37
  * transports: [tcp()],
38
38
  * streamMuxers: [yamux(), mplex()],
39
- * connectionEncryption: [noise()]
39
+ * connectionEncrypters: [noise()]
40
40
  * }
41
41
  *
42
42
  * // create libp2p
@@ -88,8 +88,8 @@ export class Libp2p extends TypedEventEmitter {
88
88
  }
89
89
  // Set up the Upgrader
90
90
  this.components.upgrader = new DefaultUpgrader(this.components, {
91
- connectionEncryption: (init.connectionEncryption ?? []).map((fn, index) => this.configureComponent(`connection-encryption-${index}`, fn(this.components))),
92
- muxers: (init.streamMuxers ?? []).map((fn, index) => this.configureComponent(`stream-muxers-${index}`, fn(this.components))),
91
+ connectionEncrypters: (init.connectionEncrypters ?? []).map((fn, index) => this.configureComponent(`connection-encryption-${index}`, fn(this.components))),
92
+ streamMuxers: (init.streamMuxers ?? []).map((fn, index) => this.configureComponent(`stream-muxers-${index}`, fn(this.components))),
93
93
  inboundUpgradeTimeout: init.connectionManager?.inboundUpgradeTimeout
94
94
  });
95
95
  // Setup the transport manager
@@ -1 +1 @@
1
- {"version":3,"file":"libp2p.js","sourceRoot":"","sources":["../../src/libp2p.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC5J,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAkB,MAAM,yBAAyB,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,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O,CAAC,CAAA;IACzE,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAE,GAA0B;QAC1C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;QAE5B,IAAI,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAA;YAC1D,OAAM;QACR,CAAC;QAED,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE;YAC5C,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;aACC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF"}
@@ -18,8 +18,8 @@ export interface CryptoResult extends SecuredConnection<MultiaddrConnection> {
18
18
  protocol: string;
19
19
  }
20
20
  export interface UpgraderInit {
21
- connectionEncryption: ConnectionEncrypter[];
22
- muxers: StreamMuxerFactory[];
21
+ connectionEncrypters: ConnectionEncrypter[];
22
+ streamMuxers: StreamMuxerFactory[];
23
23
  /**
24
24
  * An amount of ms by which an inbound connection upgrade
25
25
  * must complete
@@ -40,8 +40,8 @@ export interface DefaultUpgraderComponents {
40
40
  type ConnectionDeniedType = keyof Pick<ConnectionGater, 'denyOutboundConnection' | 'denyInboundEncryptedConnection' | 'denyOutboundEncryptedConnection' | 'denyInboundUpgradedConnection' | 'denyOutboundUpgradedConnection'>;
41
41
  export declare class DefaultUpgrader implements Upgrader {
42
42
  private readonly components;
43
- private readonly connectionEncryption;
44
- private readonly muxers;
43
+ private readonly connectionEncrypters;
44
+ private readonly streamMuxers;
45
45
  private readonly inboundUpgradeTimeout;
46
46
  private readonly events;
47
47
  constructor(components: DefaultUpgraderComponents, init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Y,CAAC,EAAE,kBAAkB,CAAA;KAAE,CAAC;CAehL"}
@@ -44,19 +44,19 @@ function countStreams(protocol, direction, connection) {
44
44
  }
45
45
  export class DefaultUpgrader {
46
46
  components;
47
- connectionEncryption;
48
- muxers;
47
+ connectionEncrypters;
48
+ streamMuxers;
49
49
  inboundUpgradeTimeout;
50
50
  events;
51
51
  constructor(components, init) {
52
52
  this.components = components;
53
- this.connectionEncryption = new Map();
54
- init.connectionEncryption.forEach(encrypter => {
55
- this.connectionEncryption.set(encrypter.protocol, encrypter);
53
+ this.connectionEncrypters = new Map();
54
+ init.connectionEncrypters.forEach(encrypter => {
55
+ this.connectionEncrypters.set(encrypter.protocol, encrypter);
56
56
  });
57
- this.muxers = new Map();
58
- init.muxers.forEach(muxer => {
59
- this.muxers.set(muxer.protocol, muxer);
57
+ this.streamMuxers = new Map();
58
+ init.streamMuxers.forEach(muxer => {
59
+ this.streamMuxers.set(muxer.protocol, muxer);
60
60
  });
61
61
  this.inboundUpgradeTimeout = init.inboundUpgradeTimeout ?? INBOUND_UPGRADE_TIMEOUT;
62
62
  this.events = components.events;
@@ -133,13 +133,13 @@ export class DefaultUpgrader {
133
133
  if (opts?.muxerFactory != null) {
134
134
  muxerFactory = opts.muxerFactory;
135
135
  }
136
- else if (this.muxers.size > 0) {
136
+ else if (this.streamMuxers.size > 0) {
137
137
  opts?.onProgress?.(new CustomProgressEvent('upgrader:multiplex-inbound-connection'));
138
138
  // Multiplex the connection
139
139
  const multiplexed = await this._multiplexInbound({
140
140
  ...protectedConn,
141
141
  ...encryptedConn
142
- }, this.muxers);
142
+ }, this.streamMuxers);
143
143
  muxerFactory = multiplexed.muxerFactory;
144
144
  upgradedConn = multiplexed.stream;
145
145
  }
@@ -221,12 +221,12 @@ export class DefaultUpgrader {
221
221
  if (opts?.muxerFactory != null) {
222
222
  muxerFactory = opts.muxerFactory;
223
223
  }
224
- else if (this.muxers.size > 0) {
224
+ else if (this.streamMuxers.size > 0) {
225
225
  // Multiplex the connection
226
226
  const multiplexed = await this._multiplexOutbound({
227
227
  ...protectedConn,
228
228
  ...encryptedConn
229
- }, this.muxers);
229
+ }, this.streamMuxers);
230
230
  muxerFactory = multiplexed.muxerFactory;
231
231
  upgradedConn = multiplexed.stream;
232
232
  }
@@ -475,13 +475,13 @@ export class DefaultUpgrader {
475
475
  * Attempts to encrypt the incoming `connection` with the provided `cryptos`
476
476
  */
477
477
  async _encryptInbound(connection, options) {
478
- const protocols = Array.from(this.connectionEncryption.keys());
478
+ const protocols = Array.from(this.connectionEncrypters.keys());
479
479
  connection.log('handling inbound crypto protocol selection', protocols);
480
480
  try {
481
481
  const { stream, protocol } = await mss.handle(connection, protocols, {
482
482
  log: connection.log
483
483
  });
484
- const encrypter = this.connectionEncryption.get(protocol);
484
+ const encrypter = this.connectionEncrypters.get(protocol);
485
485
  if (encrypter == null) {
486
486
  throw new Error(`no crypto module found for ${protocol}`);
487
487
  }
@@ -501,7 +501,7 @@ export class DefaultUpgrader {
501
501
  * The first `ConnectionEncrypter` module to succeed will be used
502
502
  */
503
503
  async _encryptOutbound(connection, options) {
504
- const protocols = Array.from(this.connectionEncryption.keys());
504
+ const protocols = Array.from(this.connectionEncrypters.keys());
505
505
  connection.log('selecting outbound crypto protocol', protocols);
506
506
  try {
507
507
  connection.log.trace('selecting encrypter from %s', protocols);
@@ -509,7 +509,7 @@ export class DefaultUpgrader {
509
509
  log: connection.log,
510
510
  yieldBytes: true
511
511
  });
512
- const encrypter = this.connectionEncryption.get(protocol);
512
+ const encrypter = this.connectionEncrypters.get(protocol);
513
513
  if (encrypter == null) {
514
514
  throw new Error(`no crypto module found for ${protocol}`);
515
515
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgrader.js","sourceRoot":"","sources":["../../src/upgrader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kCAAkC,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,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1
+ export declare const version = "1.9.4-c010d575c";
2
2
  export declare const name = "libp2p";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
- export const version = '1.9.4-a142bb642';
1
+ export const version = '1.9.4-c010d575c';
2
2
  export const name = 'libp2p';
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libp2p",
3
- "version": "1.9.4-a142bb642",
3
+ "version": "1.9.4-c010d575c",
4
4
  "description": "JavaScript implementation of libp2p, a modular peer to peer network stack",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/libp2p#readme",
@@ -85,15 +85,15 @@
85
85
  "test:webkit": "aegir test -t browser -f \"./dist/test/**/*.spec.js\" -- --browser webkit"
86
86
  },
87
87
  "dependencies": {
88
- "@libp2p/crypto": "4.1.9-a142bb642",
89
- "@libp2p/interface": "1.7.0-a142bb642",
90
- "@libp2p/interface-internal": "1.3.4-a142bb642",
91
- "@libp2p/logger": "4.0.20-a142bb642",
92
- "@libp2p/multistream-select": "5.1.17-a142bb642",
93
- "@libp2p/peer-collections": "5.2.9-a142bb642",
94
- "@libp2p/peer-id": "4.2.4-a142bb642",
95
- "@libp2p/peer-store": "10.1.5-a142bb642",
96
- "@libp2p/utils": "5.4.9-a142bb642",
88
+ "@libp2p/crypto": "4.1.9-c010d575c",
89
+ "@libp2p/interface": "1.7.0-c010d575c",
90
+ "@libp2p/interface-internal": "1.3.4-c010d575c",
91
+ "@libp2p/logger": "4.0.20-c010d575c",
92
+ "@libp2p/multistream-select": "5.1.17-c010d575c",
93
+ "@libp2p/peer-collections": "5.2.9-c010d575c",
94
+ "@libp2p/peer-id": "4.2.4-c010d575c",
95
+ "@libp2p/peer-store": "10.1.5-c010d575c",
96
+ "@libp2p/utils": "5.4.9-c010d575c",
97
97
  "@multiformats/dns": "^1.0.6",
98
98
  "@multiformats/multiaddr": "^12.2.3",
99
99
  "@multiformats/multiaddr-matcher": "^1.2.1",
@@ -114,13 +114,13 @@
114
114
  },
115
115
  "devDependencies": {
116
116
  "@chainsafe/libp2p-yamux": "^6.0.2",
117
- "@libp2p/circuit-relay-v2": "1.1.5-a142bb642",
118
- "@libp2p/identify": "2.1.5-a142bb642",
119
- "@libp2p/interface-compliance-tests": "5.4.12-a142bb642",
120
- "@libp2p/mplex": "10.1.5-a142bb642",
121
- "@libp2p/plaintext": "1.1.6-a142bb642",
122
- "@libp2p/tcp": "9.1.6-a142bb642",
123
- "@libp2p/websockets": "8.2.0-a142bb642",
117
+ "@libp2p/circuit-relay-v2": "1.1.5-c010d575c",
118
+ "@libp2p/identify": "2.1.5-c010d575c",
119
+ "@libp2p/interface-compliance-tests": "5.4.12-c010d575c",
120
+ "@libp2p/mplex": "10.1.5-c010d575c",
121
+ "@libp2p/plaintext": "1.1.6-c010d575c",
122
+ "@libp2p/tcp": "9.1.6-c010d575c",
123
+ "@libp2p/websockets": "8.2.0-c010d575c",
124
124
  "@multiformats/mafmt": "^12.1.6",
125
125
  "aegir": "^44.0.1",
126
126
  "delay": "^6.0.0",
package/src/index.ts CHANGED
@@ -103,7 +103,7 @@ export interface Libp2pInit<T extends ServiceMap = ServiceMap> {
103
103
  * eavesdropped on, and that the remote peer posesses the private key that
104
104
  * corresponds to the public key that it's Peer ID is derived from.
105
105
  */
106
- connectionEncryption?: Array<(components: Components) => ConnectionEncrypter>
106
+ connectionEncrypters?: Array<(components: Components) => ConnectionEncrypter>
107
107
 
108
108
  /**
109
109
  * Peer discovery mechanisms allow finding peers on the network
@@ -187,7 +187,7 @@ export type Libp2pOptions<T extends ServiceMap = ServiceMap> = Libp2pInit<T> & {
187
187
  * const options = {
188
188
  * transports: [tcp()],
189
189
  * streamMuxers: [yamux(), mplex()],
190
- * connectionEncryption: [noise()]
190
+ * connectionEncrypters: [noise()]
191
191
  * }
192
192
  *
193
193
  * // create libp2p
package/src/libp2p.ts CHANGED
@@ -108,8 +108,8 @@ export class Libp2p<T extends ServiceMap = ServiceMap> extends TypedEventEmitter
108
108
 
109
109
  // Set up the Upgrader
110
110
  this.components.upgrader = new DefaultUpgrader(this.components, {
111
- connectionEncryption: (init.connectionEncryption ?? []).map((fn, index) => this.configureComponent(`connection-encryption-${index}`, fn(this.components))),
112
- muxers: (init.streamMuxers ?? []).map((fn, index) => this.configureComponent(`stream-muxers-${index}`, fn(this.components))),
111
+ connectionEncrypters: (init.connectionEncrypters ?? []).map((fn, index) => this.configureComponent(`connection-encryption-${index}`, fn(this.components))),
112
+ streamMuxers: (init.streamMuxers ?? []).map((fn, index) => this.configureComponent(`stream-muxers-${index}`, fn(this.components))),
113
113
  inboundUpgradeTimeout: init.connectionManager?.inboundUpgradeTimeout
114
114
  })
115
115
 
package/src/upgrader.ts CHANGED
@@ -32,8 +32,8 @@ export interface CryptoResult extends SecuredConnection<MultiaddrConnection> {
32
32
  }
33
33
 
34
34
  export interface UpgraderInit {
35
- connectionEncryption: ConnectionEncrypter[]
36
- muxers: StreamMuxerFactory[]
35
+ connectionEncrypters: ConnectionEncrypter[]
36
+ streamMuxers: StreamMuxerFactory[]
37
37
 
38
38
  /**
39
39
  * An amount of ms by which an inbound connection upgrade
@@ -100,23 +100,23 @@ type ConnectionDeniedType = keyof Pick<ConnectionGater, 'denyOutboundConnection'
100
100
 
101
101
  export class DefaultUpgrader implements Upgrader {
102
102
  private readonly components: DefaultUpgraderComponents
103
- private readonly connectionEncryption: Map<string, ConnectionEncrypter>
104
- private readonly muxers: Map<string, StreamMuxerFactory>
103
+ private readonly connectionEncrypters: Map<string, ConnectionEncrypter>
104
+ private readonly streamMuxers: Map<string, StreamMuxerFactory>
105
105
  private readonly inboundUpgradeTimeout: number
106
106
  private readonly events: TypedEventTarget<Libp2pEvents>
107
107
 
108
108
  constructor (components: DefaultUpgraderComponents, init: UpgraderInit) {
109
109
  this.components = components
110
- this.connectionEncryption = new Map()
110
+ this.connectionEncrypters = new Map()
111
111
 
112
- init.connectionEncryption.forEach(encrypter => {
113
- this.connectionEncryption.set(encrypter.protocol, encrypter)
112
+ init.connectionEncrypters.forEach(encrypter => {
113
+ this.connectionEncrypters.set(encrypter.protocol, encrypter)
114
114
  })
115
115
 
116
- this.muxers = new Map()
116
+ this.streamMuxers = new Map()
117
117
 
118
- init.muxers.forEach(muxer => {
119
- this.muxers.set(muxer.protocol, muxer)
118
+ init.streamMuxers.forEach(muxer => {
119
+ this.streamMuxers.set(muxer.protocol, muxer)
120
120
  })
121
121
 
122
122
  this.inboundUpgradeTimeout = init.inboundUpgradeTimeout ?? INBOUND_UPGRADE_TIMEOUT
@@ -216,14 +216,14 @@ export class DefaultUpgrader implements Upgrader {
216
216
  upgradedConn = encryptedConn
217
217
  if (opts?.muxerFactory != null) {
218
218
  muxerFactory = opts.muxerFactory
219
- } else if (this.muxers.size > 0) {
219
+ } else if (this.streamMuxers.size > 0) {
220
220
  opts?.onProgress?.(new CustomProgressEvent('upgrader:multiplex-inbound-connection'))
221
221
 
222
222
  // Multiplex the connection
223
223
  const multiplexed = await this._multiplexInbound({
224
224
  ...protectedConn,
225
225
  ...encryptedConn
226
- }, this.muxers)
226
+ }, this.streamMuxers)
227
227
  muxerFactory = multiplexed.muxerFactory
228
228
  upgradedConn = multiplexed.stream
229
229
  }
@@ -319,12 +319,12 @@ export class DefaultUpgrader implements Upgrader {
319
319
  upgradedConn = encryptedConn
320
320
  if (opts?.muxerFactory != null) {
321
321
  muxerFactory = opts.muxerFactory
322
- } else if (this.muxers.size > 0) {
322
+ } else if (this.streamMuxers.size > 0) {
323
323
  // Multiplex the connection
324
324
  const multiplexed = await this._multiplexOutbound({
325
325
  ...protectedConn,
326
326
  ...encryptedConn
327
- }, this.muxers)
327
+ }, this.streamMuxers)
328
328
  muxerFactory = multiplexed.muxerFactory
329
329
  upgradedConn = multiplexed.stream
330
330
  }
@@ -627,14 +627,14 @@ export class DefaultUpgrader implements Upgrader {
627
627
  * Attempts to encrypt the incoming `connection` with the provided `cryptos`
628
628
  */
629
629
  async _encryptInbound (connection: MultiaddrConnection, options?: AbortOptions): Promise<CryptoResult> {
630
- const protocols = Array.from(this.connectionEncryption.keys())
630
+ const protocols = Array.from(this.connectionEncrypters.keys())
631
631
  connection.log('handling inbound crypto protocol selection', protocols)
632
632
 
633
633
  try {
634
634
  const { stream, protocol } = await mss.handle(connection, protocols, {
635
635
  log: connection.log
636
636
  })
637
- const encrypter = this.connectionEncryption.get(protocol)
637
+ const encrypter = this.connectionEncrypters.get(protocol)
638
638
 
639
639
  if (encrypter == null) {
640
640
  throw new Error(`no crypto module found for ${protocol}`)
@@ -657,7 +657,7 @@ export class DefaultUpgrader implements Upgrader {
657
657
  * The first `ConnectionEncrypter` module to succeed will be used
658
658
  */
659
659
  async _encryptOutbound (connection: MultiaddrConnection, options?: SecureConnectionOptions): Promise<CryptoResult> {
660
- const protocols = Array.from(this.connectionEncryption.keys())
660
+ const protocols = Array.from(this.connectionEncrypters.keys())
661
661
  connection.log('selecting outbound crypto protocol', protocols)
662
662
 
663
663
  try {
@@ -671,7 +671,7 @@ export class DefaultUpgrader implements Upgrader {
671
671
  yieldBytes: true
672
672
  })
673
673
 
674
- const encrypter = this.connectionEncryption.get(protocol)
674
+ const encrypter = this.connectionEncrypters.get(protocol)
675
675
 
676
676
  if (encrypter == null) {
677
677
  throw new Error(`no crypto module found for ${protocol}`)
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '1.9.4-a142bb642'
1
+ export const version = '1.9.4-c010d575c'
2
2
  export const name = 'libp2p'