libp2p 1.5.2-8214dcfb0 → 1.5.2-a3e8beabd
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 +1 -1
- package/dist/src/upgrader.js +2 -2
- package/dist/src/upgrader.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +28 -28
- package/src/upgrader.ts +2 -2
- package/src/version.ts +1 -1
package/dist/index.min.js
CHANGED
|
@@ -17,7 +17,7 @@ ${e.join(`
|
|
|
17
17
|
`),t),t.log.trace('handle: responded with "%s" for "%s"',o,o),{stream:n.unwrap(),protocol:o};if(o==="ls"){let s=new be(...e.map(i=>$i.single(D(`${i}
|
|
18
18
|
`))),D(`
|
|
19
19
|
`));t.log.trace('handle: respond with "%s" for %s',e,o),await Ur(n,s,t),t.log.trace('handle: responded with "%s" for %s',e,o);continue}t.log('handle: respond with "na" for "%s"',o),await Ur(n,D(`na
|
|
20
|
-
`),t),t.log('handle: responded with "na" for "%s"',o)}}var ow=500,Bl=class{id;remoteAddr;remotePeer;direction;timeline;multiplexer;encryption;status;transient;log;tags;_newStream;_close;_abort;_getStreams;constructor(e){let{remoteAddr:t,remotePeer:n,newStream:o,close:s,abort:i,getStreams:a}=e;this.id=`${parseInt(String(Math.random()*1e9)).toString(36)}${Date.now()}`,this.remoteAddr=t,this.remotePeer=n,this.direction=e.direction,this.status="open",this.timeline=e.timeline,this.multiplexer=e.multiplexer,this.encryption=e.encryption,this.transient=e.transient??!1,this.log=e.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";[Fl]=!0;get streams(){return this._getStreams()}async newStream(e,t){if(this.status==="closing")throw new y("the connection is being closed","ERR_CONNECTION_BEING_CLOSED");if(this.status==="closed")throw new y("the connection is closed","ERR_CONNECTION_CLOSED");if(Array.isArray(e)||(e=[e]),this.transient&&t?.runOnTransientConnection!==!0)throw new y("Cannot open protocol stream on transient connection","ERR_TRANSIENT_CONNECTION");let n=await this._newStream(e,t);return n.direction="outbound",n}async close(e={}){if(!(this.status==="closed"||this.status==="closing")){if(this.log("closing connection to %a",this.remoteAddr),this.status="closing",e.signal==null){let t=AbortSignal.timeout(ow);ue(1/0,t),e={...e,signal:t}}try{this.log.trace("closing all streams"),await Promise.all(this.streams.map(async t=>t.close(e))),this.log.trace("closing underlying transport"),await this._close(e),this.log.trace("updating timeline with close time"),this.status="closed",this.timeline.close=Date.now()}catch(t){this.log.error("error encountered during graceful close of connection to %a",this.remoteAddr,t),this.abort(t)}}}abort(e){this.log.error("aborting connection to %a due to error",this.remoteAddr,e),this.status="closing",this.streams.forEach(t=>{t.abort(e)}),this.log.error("all streams aborted",this.streams.length),this._abort(e),this.timeline.close=Date.now(),this.status="closed"}};function Cd(r){return new Bl(r)}var sw=3e4;function iw(r,e){try{let{options:t}=e.getHandler(r);return t.maxInboundStreams}catch(t){if(t.code!==B.ERR_NO_HANDLER_FOR_PROTOCOL)throw t}return El}function aw(r,e,t={}){try{let{options:n}=e.getHandler(r);if(n.maxOutboundStreams!=null)return n.maxOutboundStreams}catch(n){if(n.code!==B.ERR_NO_HANDLER_FOR_PROTOCOL)throw n}return t.maxOutboundStreams??xl}function Nd(r,e,t){let n=0;return t.streams.forEach(o=>{o.direction===e&&o.protocol===r&&n++}),n}var qi=class{components;connectionEncryption;muxers;inboundUpgradeTimeout;events;constructor(e,t){this.components=e,this.connectionEncryption=new Map,t.connectionEncryption.forEach(n=>{this.connectionEncryption.set(n.protocol,n)}),this.muxers=new Map,t.muxers.forEach(n=>{this.muxers.set(n.protocol,n)}),this.inboundUpgradeTimeout=t.inboundUpgradeTimeout??2e3,this.events=e.events}async shouldBlockConnection(e,t,n){let o=this.components.connectionGater[n];if(o!==void 0&&await o(e,t))throw new y(`The multiaddr connection is blocked by gater.${n}`,B.ERR_CONNECTION_INTERCEPTED)}async upgradeInbound(e,t){if(!await this.components.connectionManager.acceptIncomingConnection(e))throw new y("connection denied",B.ERR_CONNECTION_DENIED);let o,s,i,a,c,u=AbortSignal.timeout(this.inboundUpgradeTimeout),f=()=>{e.abort(new y("inbound upgrade timeout",So))};u.addEventListener("abort",f,{once:!0}),ue(1/0,u);try{if(await this.components.connectionGater.denyInboundConnection?.(e)===!0)throw new y("The multiaddr connection is blocked by gater.acceptConnection",B.ERR_CONNECTION_INTERCEPTED);this.components.metrics?.trackMultiaddrConnection(e),e.log("starting the inbound connection upgrade");let l=e;if(t?.skipProtection!==!0){let h=this.components.connectionProtector;h!=null&&(e.log("protecting the inbound connection"),l=await h.protect(e))}try{if(o=l,t?.skipEncryption!==!0){({conn:o,remotePeer:s,protocol:c}=await this._encryptInbound(l));let h={...l,...o};await this.shouldBlockConnection(s,h,"denyInboundEncryptedConnection")}else{let h=e.remoteAddr.getPeerId();if(h==null)throw new y("inbound connection that skipped encryption must have a peer id",B.ERR_INVALID_MULTIADDR);let g=we(h);c="native",s=g}if(i=o,t?.muxerFactory!=null)a=t.muxerFactory;else if(this.muxers.size>0){let h=await this._multiplexInbound({...l,...o},this.muxers);a=h.muxerFactory,i=h.stream}}catch(h){throw e.log.error("failed to upgrade inbound connection",h),h}return await this.shouldBlockConnection(s,e,"denyInboundUpgradedConnection"),e.log("successfully upgraded inbound connection"),this._createConnection({cryptoProtocol:c,direction:"inbound",maConn:e,upgradedConn:i,muxerFactory:a,remotePeer:s,transient:t?.transient})}finally{u.removeEventListener("abort",f),this.components.connectionManager.afterUpgradeInbound()}}async upgradeOutbound(e,t){let n=e.remoteAddr.getPeerId(),o;n!=null&&(o=we(n),await this.shouldBlockConnection(o,e,"denyOutboundConnection"));let s,i,a,c,u;this.components.metrics?.trackMultiaddrConnection(e),e.log("starting the outbound connection upgrade");let f=e;if(t?.skipProtection!==!0){let l=this.components.connectionProtector;l!=null&&(f=await l.protect(e))}try{if(s=f,t?.skipEncryption!==!0){({conn:s,remotePeer:i,protocol:c}=await this._encryptOutbound(f,o));let l={...f,...s};await this.shouldBlockConnection(i,l,"denyOutboundEncryptedConnection")}else{if(o==null)throw new y("Encryption was skipped but no peer id was passed",B.ERR_INVALID_PEER);c="native",i=o}if(a=s,t?.muxerFactory!=null)u=t.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 e.log.error("failed to upgrade outbound connection",l),await e.close(l),l}return await this.shouldBlockConnection(i,e,"denyOutboundUpgradedConnection"),e.log("successfully upgraded outbound connection"),this._createConnection({cryptoProtocol:c,direction:"outbound",maConn:e,upgradedConn:a,muxerFactory:u,remotePeer:i,transient:t?.transient})}_createConnection(e){let{cryptoProtocol:t,direction:n,maConn:o,upgradedConn:s,remotePeer:i,muxerFactory:a,transient:c}=e,u,f,l;a!=null&&(u=a.createStreamMuxer({direction:n,onIncomingStream:d=>{l!=null&&Promise.resolve().then(async()=>{let p=this.components.registrar.getProtocols(),{stream:m,protocol:w}=await vo(d,p,{log:d.log,yieldBytes:!1});if(l==null)return;l.log("incoming stream opened on %s",w);let x=iw(w,this.components.registrar);if(Nd(w,"inbound",l)===x){let A=new y(`Too many inbound protocol streams for protocol "${w}" - limit ${x}`,B.ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS);throw d.abort(A),A}d.source=m.source,d.sink=m.sink,d.protocol=w,m.closeWrite!=null&&(d.closeWrite=m.closeWrite),m.closeRead!=null&&(d.closeRead=m.closeRead),m.close!=null&&(d.close=m.close),await this.components.peerStore.merge(i,{protocols:[w]}),this.components.metrics?.trackProtocolStream(d,l),this._onStream({connection:l,stream:d,protocol:w})}).catch(async p=>{l.log.error("error handling incoming stream id %s",d.id,p.message,p.code,p.stack),d.timeline.close==null&&await d.close()})}}),f=async(d,p={})=>{if(u==null)throw new y("Stream is not multiplexed",B.ERR_MUXER_UNAVAILABLE);l.log("starting new stream for protocols %s",d);let m=await u.newStream();l.log.trace("started new stream %s for protocols %s",m.id,d);try{if(p.signal==null){m.log("no abort signal was passed while trying to negotiate protocols %s falling back to default timeout",d);let v=AbortSignal.timeout(sw);ue(1/0,v),p={...p,signal:v}}m.log.trace("selecting protocol from protocols %s",d);let{stream:w,protocol:x}=await xo(m,d,{...p,log:m.log,yieldBytes:!0});m.log("selected protocol %s",x);let b=aw(x,this.components.registrar,p),A=Nd(x,"outbound",l);if(A>=b){let v=new y(`Too many outbound protocol streams for protocol "${x}" - ${A}/${b}`,B.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS);throw m.abort(v),v}return await this.components.peerStore.merge(i,{protocols:[x]}),m.source=w.source,m.sink=w.sink,m.protocol=x,w.closeWrite!=null&&(m.closeWrite=w.closeWrite),w.closeRead!=null&&(m.closeRead=w.closeRead),w.close!=null&&(m.close=w.close),this.components.metrics?.trackProtocolStream(m,l),m}catch(w){throw l.log.error("could not create new stream for protocols %s",d,w),m.timeline.close==null&&m.abort(w),w.code!=null?w:new y(String(w),B.ERR_UNSUPPORTED_PROTOCOL)}},Promise.all([u.sink(s.source),s.sink(u.source)]).catch(d=>{l.log.error("error piping data through muxer",d)}));let h=o.timeline;o.timeline=new Proxy(h,{set:(...d)=>(l!=null&&d[1]==="close"&&d[2]!=null&&h.close==null&&(async()=>{try{l.status==="open"&&await l.close()}catch(p){l.log.error("error closing connection after timeline close",p)}finally{this.events.safeDispatchEvent("connection:close",{detail:l})}})().catch(p=>{l.log.error("error thrown while dispatching connection:close event",p)}),Reflect.set(...d))}),o.timeline.upgraded=Date.now();let g=()=>{throw new y("connection is not multiplexed",B.ERR_CONNECTION_NOT_MULTIPLEXED)};return l=Cd({remoteAddr:o.remoteAddr,remotePeer:i,status:"open",direction:n,timeline:o.timeline,multiplexer:u?.protocol,encryption:t,transient:c,logger:this.components.logger,newStream:f??g,getStreams:()=>u!=null?u.streams:[],close:async d=>{u!=null&&(l.log.trace("close muxer"),await u.close(d)),l.log.trace("close maconn"),await o.close(d),l.log.trace("closed maconn")},abort:d=>{o.abort(d),u?.abort(d)}}),this.events.safeDispatchEvent("connection:open",{detail:l}),l}_onStream(e){let{connection:t,stream:n,protocol:o}=e,{handler:s,options:i}=this.components.registrar.getHandler(o);if(t.transient&&i.runOnTransientConnection!==!0)throw new y("Cannot open protocol stream on transient connection","ERR_TRANSIENT_CONNECTION");s({connection:t,stream:n})}async _encryptInbound(e){let t=Array.from(this.connectionEncryption.keys());e.log("handling inbound crypto protocol selection",t);try{let{stream:n,protocol:o}=await vo(e,t,{log:e.log}),s=this.connectionEncryption.get(o);if(s==null)throw new Error(`no crypto module found for ${o}`);return e.log("encrypting inbound connection using",o),{...await s.secureInbound(this.components.peerId,n),protocol:o}}catch(n){throw e.log.error("encrypting inbound connection to %p failed",n),new y(n.message,B.ERR_ENCRYPTION_FAILED)}}async _encryptOutbound(e,t){let n=Array.from(this.connectionEncryption.keys());e.log("selecting outbound crypto protocol",n);try{e.log.trace("selecting encrypter from %s",n);let{stream:o,protocol:s}=await xo(e,n,{log:e.log,yieldBytes:!0}),i=this.connectionEncryption.get(s);if(i==null)throw new Error(`no crypto module found for ${s}`);return e.log("encrypting outbound connection to %p using %s",t,i),{...await i.secureOutbound(this.components.peerId,o,t),protocol:s}}catch(o){throw e.log.error("encrypting outbound connection to %p failed",o),new y(o.message,B.ERR_ENCRYPTION_FAILED)}}async _multiplexOutbound(e,t){let n=Array.from(t.keys());e.log("outbound selecting muxer %s",n);try{e.log.trace("selecting stream muxer from %s",n);let{stream:o,protocol:s}=await xo(e,n,{log:e.log,yieldBytes:!0});e.log("selected %s as muxer protocol",s);let i=t.get(s);return{stream:o,muxerFactory:i}}catch(o){throw e.log.error("error multiplexing outbound connection",o),new y(String(o),B.ERR_MUXER_UNAVAILABLE)}}async _multiplexInbound(e,t){let n=Array.from(t.keys());e.log("inbound handling muxers %s",n);try{let{stream:o,protocol:s}=await vo(e,n,{log:e.log}),i=t.get(s);return{stream:o,muxerFactory:i}}catch(o){throw e.log.error("error multiplexing inbound connection",o),new y(String(o),B.ERR_MUXER_UNAVAILABLE)}}};var Ld="1.5.2-8214dcfb0",kd="libp2p";var Tl=class extends At{peerId;peerStore;contentRouting;peerRouting;metrics;services;logger;status;components;log;constructor(e){super(),this.status="stopped";let t=new At,n=t.dispatchEvent.bind(t);t.dispatchEvent=a=>{let c=n(a),u=this.dispatchEvent(new Zi(a.type,{detail:a.detail}));return c||u},ue(1/0,t),this.peerId=e.peerId,this.logger=e.logger??Ms(),this.log=this.logger.forComponent("libp2p"),this.services={};let o=this.components=zh({peerId:e.peerId,privateKey:e.privateKey,nodeInfo:e.nodeInfo??{name:kd,version:Ld},logger:this.logger,events:t,datastore:e.datastore??new ei,connectionGater:jh(e.connectionGater),dns:e.dns});this.peerStore=this.configureComponent("peerStore",new Qs(o,{addressFilter:this.components.connectionGater.filterMultiaddrForPeer,...e.peerStore})),e.metrics!=null&&(this.metrics=this.configureComponent("metrics",e.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})}}),e.connectionProtector!=null&&this.configureComponent("connectionProtector",e.connectionProtector(o)),this.components.upgrader=new qi(this.components,{connectionEncryption:(e.connectionEncryption??[]).map((a,c)=>this.configureComponent(`connection-encryption-${c}`,a(this.components))),muxers:(e.streamMuxers??[]).map((a,c)=>this.configureComponent(`stream-muxers-${c}`,a(this.components))),inboundUpgradeTimeout:e.connectionManager.inboundUpgradeTimeout}),this.configureComponent("transportManager",new Mi(this.components,e.transportManager)),this.configureComponent("connectionManager",new Li(this.components,e.connectionManager)),this.configureComponent("registrar",new Ui(this.components)),this.configureComponent("addressManager",new ti(this.components,e.addresses));let s=(e.peerRouters??[]).map((a,c)=>this.configureComponent(`peer-router-${c}`,a(this.components)));this.peerRouting=this.components.peerRouting=this.configureComponent("peerRouting",new Pi(this.components,{routers:s}));let i=(e.contentRouters??[]).map((a,c)=>this.configureComponent(`content-router-${c}`,a(this.components)));if(this.contentRouting=this.components.contentRouting=this.configureComponent("contentRouting",new ki(this.components,{routers:i})),this.configureComponent("randomWalk",new Oi(this.components)),(e.peerDiscovery??[]).forEach((a,c)=>{this.configureComponent(`peer-discovery-${c}`,a(this.components)).addEventListener("peer",f=>{this.#e(f)})}),e.transports?.forEach((a,c)=>{this.components.transportManager.add(this.configureComponent(`transport-${c}`,a(this.components)))}),e.services!=null)for(let a of Object.keys(e.services)){let c=e.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[zi]!=null&&(this.log("registering service %s for content routing",a),i.push(u[zi])),u[ji]!=null&&(this.log("registering service %s for peer routing",a),s.push(u[ji])),u[Yi]!=null&&(this.log("registering service %s for peer discovery",a),u[Yi].addEventListener?.("peer",f=>{this.#e(f)}))}}configureComponent(e,t){return t==null&&this.log.error("component %s was null or undefined",e),this.components[e]=t,t}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(e){throw this.log.error("An error occurred starting libp2p",e),this.status="started",await this.stop(),e}}}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(e){return this.components.connectionManager.getConnections(e)}getDialQueue(){return this.components.connectionManager.getDialQueue()}getPeers(){let e=new ft;for(let t of this.components.connectionManager.getConnections())e.add(t.remotePeer);return Array.from(e)}async dial(e,t={}){return this.components.connectionManager.openConnection(e,{priority:75,...t})}async dialProtocol(e,t,n={}){if(t==null)throw new y("no protocols were provided to open a stream",B.ERR_INVALID_PROTOCOLS_FOR_STREAM);if(t=Array.isArray(t)?t:[t],t.length===0)throw new y("no protocols were provided to open a stream",B.ERR_INVALID_PROTOCOLS_FOR_STREAM);return(await this.dial(e,n)).newStream(t,n)}getMultiaddrs(){return this.components.addressManager.getAddresses()}getProtocols(){return this.components.registrar.getProtocols()}async hangUp(e,t={}){cr(e)&&(e=we(e.getPeerId()??"")),await this.components.connectionManager.closeConnections(e,t)}async getPublicKey(e,t={}){if(this.log("getPublicKey %p",e),e.publicKey!=null)return e.publicKey;try{let s=await this.peerStore.get(e);if(s.id.publicKey!=null)return s.id.publicKey}catch(s){if(s.code!==B.ERR_NOT_FOUND)throw s}let n=_e([D("/pk/"),e.multihash.digest]),o=await this.contentRouting.get(n,t);return ro(o),await this.peerStore.patch(e,{publicKey:o}),o}async handle(e,t,n){Array.isArray(e)||(e=[e]),await Promise.all(e.map(async o=>{await this.components.registrar.handle(o,t,n)}))}async unhandle(e){Array.isArray(e)||(e=[e]),await Promise.all(e.map(async t=>{await this.components.registrar.unhandle(t)}))}async register(e,t){return this.components.registrar.register(e,t)}unregister(e){this.components.registrar.unregister(e)}async isDialable(e,t={}){return this.components.connectionManager.isDialable(e,t)}#e(e){let{detail:t}=e;if(t.id.toString()===this.peerId.toString()){this.log.error(new Error(B.ERR_DISCOVERED_SELF));return}this.components.peerStore.merge(t.id,{multiaddrs:t.multiaddrs}).catch(n=>{this.log.error(n)})}};async function Dd(r={}){let e=r.peerId??=await ch();if(e.privateKey==null)throw new y("peer id was missing private key","ERR_MISSING_PRIVATE_KEY");return r.privateKey??=await no(e.privateKey),new Tl(await bd(r))}async function lw(r={}){let e=await Dd(r);return r.start!==!1&&await e.start(),e}return Wd(uw);})();
|
|
20
|
+
`),t),t.log('handle: responded with "na" for "%s"',o)}}var ow=500,Bl=class{id;remoteAddr;remotePeer;direction;timeline;multiplexer;encryption;status;transient;log;tags;_newStream;_close;_abort;_getStreams;constructor(e){let{remoteAddr:t,remotePeer:n,newStream:o,close:s,abort:i,getStreams:a}=e;this.id=`${parseInt(String(Math.random()*1e9)).toString(36)}${Date.now()}`,this.remoteAddr=t,this.remotePeer=n,this.direction=e.direction,this.status="open",this.timeline=e.timeline,this.multiplexer=e.multiplexer,this.encryption=e.encryption,this.transient=e.transient??!1,this.log=e.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";[Fl]=!0;get streams(){return this._getStreams()}async newStream(e,t){if(this.status==="closing")throw new y("the connection is being closed","ERR_CONNECTION_BEING_CLOSED");if(this.status==="closed")throw new y("the connection is closed","ERR_CONNECTION_CLOSED");if(Array.isArray(e)||(e=[e]),this.transient&&t?.runOnTransientConnection!==!0)throw new y("Cannot open protocol stream on transient connection","ERR_TRANSIENT_CONNECTION");let n=await this._newStream(e,t);return n.direction="outbound",n}async close(e={}){if(!(this.status==="closed"||this.status==="closing")){if(this.log("closing connection to %a",this.remoteAddr),this.status="closing",e.signal==null){let t=AbortSignal.timeout(ow);ue(1/0,t),e={...e,signal:t}}try{this.log.trace("closing all streams"),await Promise.all(this.streams.map(async t=>t.close(e))),this.log.trace("closing underlying transport"),await this._close(e),this.log.trace("updating timeline with close time"),this.status="closed",this.timeline.close=Date.now()}catch(t){this.log.error("error encountered during graceful close of connection to %a",this.remoteAddr,t),this.abort(t)}}}abort(e){this.log.error("aborting connection to %a due to error",this.remoteAddr,e),this.status="closing",this.streams.forEach(t=>{t.abort(e)}),this.log.error("all streams aborted",this.streams.length),this._abort(e),this.timeline.close=Date.now(),this.status="closed"}};function Cd(r){return new Bl(r)}var sw=3e4;function iw(r,e){try{let{options:t}=e.getHandler(r);return t.maxInboundStreams}catch(t){if(t.code!==B.ERR_NO_HANDLER_FOR_PROTOCOL)throw t}return El}function aw(r,e,t={}){try{let{options:n}=e.getHandler(r);if(n.maxOutboundStreams!=null)return n.maxOutboundStreams}catch(n){if(n.code!==B.ERR_NO_HANDLER_FOR_PROTOCOL)throw n}return t.maxOutboundStreams??xl}function Nd(r,e,t){let n=0;return t.streams.forEach(o=>{o.direction===e&&o.protocol===r&&n++}),n}var qi=class{components;connectionEncryption;muxers;inboundUpgradeTimeout;events;constructor(e,t){this.components=e,this.connectionEncryption=new Map,t.connectionEncryption.forEach(n=>{this.connectionEncryption.set(n.protocol,n)}),this.muxers=new Map,t.muxers.forEach(n=>{this.muxers.set(n.protocol,n)}),this.inboundUpgradeTimeout=t.inboundUpgradeTimeout??2e3,this.events=e.events}async shouldBlockConnection(e,t,n){let o=this.components.connectionGater[n];if(o!==void 0&&await o(e,t))throw new y(`The multiaddr connection is blocked by gater.${n}`,B.ERR_CONNECTION_INTERCEPTED)}async upgradeInbound(e,t){if(!await this.components.connectionManager.acceptIncomingConnection(e))throw new y("connection denied",B.ERR_CONNECTION_DENIED);let o,s,i,a,c,u=AbortSignal.timeout(this.inboundUpgradeTimeout),f=()=>{e.abort(new y("inbound upgrade timeout",So))};u.addEventListener("abort",f,{once:!0}),ue(1/0,u);try{if(await this.components.connectionGater.denyInboundConnection?.(e)===!0)throw new y("The multiaddr connection is blocked by gater.acceptConnection",B.ERR_CONNECTION_INTERCEPTED);this.components.metrics?.trackMultiaddrConnection(e),e.log("starting the inbound connection upgrade");let l=e;if(t?.skipProtection!==!0){let h=this.components.connectionProtector;h!=null&&(e.log("protecting the inbound connection"),l=await h.protect(e))}try{if(o=l,t?.skipEncryption!==!0){({conn:o,remotePeer:s,protocol:c}=await this._encryptInbound(l));let h={...l,...o};await this.shouldBlockConnection(s,h,"denyInboundEncryptedConnection")}else{let h=e.remoteAddr.getPeerId();if(h==null)throw new y("inbound connection that skipped encryption must have a peer id",B.ERR_INVALID_MULTIADDR);let g=we(h);c="native",s=g}if(i=o,t?.muxerFactory!=null)a=t.muxerFactory;else if(this.muxers.size>0){let h=await this._multiplexInbound({...l,...o},this.muxers);a=h.muxerFactory,i=h.stream}}catch(h){throw e.log.error("failed to upgrade inbound connection",h),h}return await this.shouldBlockConnection(s,e,"denyInboundUpgradedConnection"),e.log("successfully upgraded inbound connection"),this._createConnection({cryptoProtocol:c,direction:"inbound",maConn:e,upgradedConn:i,muxerFactory:a,remotePeer:s,transient:t?.transient})}finally{u.removeEventListener("abort",f),this.components.connectionManager.afterUpgradeInbound()}}async upgradeOutbound(e,t){let n=e.remoteAddr.getPeerId(),o;n!=null&&(o=we(n),await this.shouldBlockConnection(o,e,"denyOutboundConnection"));let s,i,a,c,u;this.components.metrics?.trackMultiaddrConnection(e),e.log("starting the outbound connection upgrade");let f=e;if(t?.skipProtection!==!0){let l=this.components.connectionProtector;l!=null&&(f=await l.protect(e))}try{if(s=f,t?.skipEncryption!==!0){({conn:s,remotePeer:i,protocol:c}=await this._encryptOutbound(f,o));let l={...f,...s};await this.shouldBlockConnection(i,l,"denyOutboundEncryptedConnection")}else{if(o==null)throw new y("Encryption was skipped but no peer id was passed",B.ERR_INVALID_PEER);c="native",i=o}if(a=s,t?.muxerFactory!=null)u=t.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 e.log.error("failed to upgrade outbound connection",l),await e.close(l),l}return await this.shouldBlockConnection(i,e,"denyOutboundUpgradedConnection"),e.log("successfully upgraded outbound connection"),this._createConnection({cryptoProtocol:c,direction:"outbound",maConn:e,upgradedConn:a,muxerFactory:u,remotePeer:i,transient:t?.transient})}_createConnection(e){let{cryptoProtocol:t,direction:n,maConn:o,upgradedConn:s,remotePeer:i,muxerFactory:a,transient:c}=e,u,f,l;a!=null&&(u=a.createStreamMuxer({direction:n,onIncomingStream:d=>{l!=null&&Promise.resolve().then(async()=>{let p=this.components.registrar.getProtocols(),{stream:m,protocol:w}=await vo(d,p,{log:d.log,yieldBytes:!1});if(l==null)return;l.log("incoming stream opened on %s",w);let x=iw(w,this.components.registrar);if(Nd(w,"inbound",l)===x){let A=new y(`Too many inbound protocol streams for protocol "${w}" - limit ${x}`,B.ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS);throw d.abort(A),A}d.source=m.source,d.sink=m.sink,d.protocol=w,m.closeWrite!=null&&(d.closeWrite=m.closeWrite),m.closeRead!=null&&(d.closeRead=m.closeRead),m.close!=null&&(d.close=m.close),await this.components.peerStore.merge(i,{protocols:[w]}),this.components.metrics?.trackProtocolStream(d,l),this._onStream({connection:l,stream:d,protocol:w})}).catch(async p=>{l.log.error("error handling incoming stream id %s",d.id,p.message,p.code,p.stack),d.timeline.close==null&&await d.close()})}}),f=async(d,p={})=>{if(u==null)throw new y("Stream is not multiplexed",B.ERR_MUXER_UNAVAILABLE);l.log("starting new stream for protocols %s",d);let m=await u.newStream();l.log.trace("started new stream %s for protocols %s",m.id,d);try{if(p.signal==null){m.log("no abort signal was passed while trying to negotiate protocols %s falling back to default timeout",d);let v=AbortSignal.timeout(sw);ue(1/0,v),p={...p,signal:v}}m.log.trace("selecting protocol from protocols %s",d);let{stream:w,protocol:x}=await xo(m,d,{...p,log:m.log,yieldBytes:!0});m.log("selected protocol %s",x);let b=aw(x,this.components.registrar,p),A=Nd(x,"outbound",l);if(A>=b){let v=new y(`Too many outbound protocol streams for protocol "${x}" - ${A}/${b}`,B.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS);throw m.abort(v),v}return await this.components.peerStore.merge(i,{protocols:[x]}),m.source=w.source,m.sink=w.sink,m.protocol=x,w.closeWrite!=null&&(m.closeWrite=w.closeWrite),w.closeRead!=null&&(m.closeRead=w.closeRead),w.close!=null&&(m.close=w.close),this.components.metrics?.trackProtocolStream(m,l),m}catch(w){throw l.log.error("could not create new stream for protocols %s",d,w),m.timeline.close==null&&m.abort(w),w.code!=null?w:new y(String(w),B.ERR_UNSUPPORTED_PROTOCOL)}},Promise.all([u.sink(s.source),s.sink(u.source)]).catch(d=>{l.log.error("error piping data through muxer",d)}));let h=o.timeline;o.timeline=new Proxy(h,{set:(...d)=>(l!=null&&d[1]==="close"&&d[2]!=null&&h.close==null&&(async()=>{try{l.status==="open"&&await l.close()}catch(p){l.log.error("error closing connection after timeline close",p)}finally{this.events.safeDispatchEvent("connection:close",{detail:l})}})().catch(p=>{l.log.error("error thrown while dispatching connection:close event",p)}),Reflect.set(...d))}),o.timeline.upgraded=Date.now();let g=()=>{throw new y("connection is not multiplexed",B.ERR_CONNECTION_NOT_MULTIPLEXED)};return l=Cd({remoteAddr:o.remoteAddr,remotePeer:i,status:"open",direction:n,timeline:o.timeline,multiplexer:u?.protocol,encryption:t,transient:c,logger:this.components.logger,newStream:f??g,getStreams:()=>u!=null?u.streams:[],close:async d=>{u!=null&&(l.log.trace("close muxer"),await u.close(d)),l.log.trace("close maconn"),await o.close(d),l.log.trace("closed maconn")},abort:d=>{o.abort(d),u?.abort(d)}}),this.events.safeDispatchEvent("connection:open",{detail:l}),l}_onStream(e){let{connection:t,stream:n,protocol:o}=e,{handler:s,options:i}=this.components.registrar.getHandler(o);if(t.transient&&i.runOnTransientConnection!==!0)throw new y("Cannot open protocol stream on transient connection","ERR_TRANSIENT_CONNECTION");s({connection:t,stream:n})}async _encryptInbound(e){let t=Array.from(this.connectionEncryption.keys());e.log("handling inbound crypto protocol selection",t);try{let{stream:n,protocol:o}=await vo(e,t,{log:e.log}),s=this.connectionEncryption.get(o);if(s==null)throw new Error(`no crypto module found for ${o}`);return e.log("encrypting inbound connection using",o),{...await s.secureInbound(this.components.peerId,n),protocol:o}}catch(n){throw e.log.error("encrypting inbound connection failed",n),new y(n.message,B.ERR_ENCRYPTION_FAILED)}}async _encryptOutbound(e,t){let n=Array.from(this.connectionEncryption.keys());e.log("selecting outbound crypto protocol",n);try{e.log.trace("selecting encrypter from %s",n);let{stream:o,protocol:s}=await xo(e,n,{log:e.log,yieldBytes:!0}),i=this.connectionEncryption.get(s);if(i==null)throw new Error(`no crypto module found for ${s}`);return e.log("encrypting outbound connection to %p using %s",t,i),{...await i.secureOutbound(this.components.peerId,o,t),protocol:s}}catch(o){throw e.log.error("encrypting outbound connection to %p failed",t,o),new y(o.message,B.ERR_ENCRYPTION_FAILED)}}async _multiplexOutbound(e,t){let n=Array.from(t.keys());e.log("outbound selecting muxer %s",n);try{e.log.trace("selecting stream muxer from %s",n);let{stream:o,protocol:s}=await xo(e,n,{log:e.log,yieldBytes:!0});e.log("selected %s as muxer protocol",s);let i=t.get(s);return{stream:o,muxerFactory:i}}catch(o){throw e.log.error("error multiplexing outbound connection",o),new y(String(o),B.ERR_MUXER_UNAVAILABLE)}}async _multiplexInbound(e,t){let n=Array.from(t.keys());e.log("inbound handling muxers %s",n);try{let{stream:o,protocol:s}=await vo(e,n,{log:e.log}),i=t.get(s);return{stream:o,muxerFactory:i}}catch(o){throw e.log.error("error multiplexing inbound connection",o),new y(String(o),B.ERR_MUXER_UNAVAILABLE)}}};var Ld="1.5.2-a3e8beabd",kd="libp2p";var Tl=class extends At{peerId;peerStore;contentRouting;peerRouting;metrics;services;logger;status;components;log;constructor(e){super(),this.status="stopped";let t=new At,n=t.dispatchEvent.bind(t);t.dispatchEvent=a=>{let c=n(a),u=this.dispatchEvent(new Zi(a.type,{detail:a.detail}));return c||u},ue(1/0,t),this.peerId=e.peerId,this.logger=e.logger??Ms(),this.log=this.logger.forComponent("libp2p"),this.services={};let o=this.components=zh({peerId:e.peerId,privateKey:e.privateKey,nodeInfo:e.nodeInfo??{name:kd,version:Ld},logger:this.logger,events:t,datastore:e.datastore??new ei,connectionGater:jh(e.connectionGater),dns:e.dns});this.peerStore=this.configureComponent("peerStore",new Qs(o,{addressFilter:this.components.connectionGater.filterMultiaddrForPeer,...e.peerStore})),e.metrics!=null&&(this.metrics=this.configureComponent("metrics",e.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})}}),e.connectionProtector!=null&&this.configureComponent("connectionProtector",e.connectionProtector(o)),this.components.upgrader=new qi(this.components,{connectionEncryption:(e.connectionEncryption??[]).map((a,c)=>this.configureComponent(`connection-encryption-${c}`,a(this.components))),muxers:(e.streamMuxers??[]).map((a,c)=>this.configureComponent(`stream-muxers-${c}`,a(this.components))),inboundUpgradeTimeout:e.connectionManager.inboundUpgradeTimeout}),this.configureComponent("transportManager",new Mi(this.components,e.transportManager)),this.configureComponent("connectionManager",new Li(this.components,e.connectionManager)),this.configureComponent("registrar",new Ui(this.components)),this.configureComponent("addressManager",new ti(this.components,e.addresses));let s=(e.peerRouters??[]).map((a,c)=>this.configureComponent(`peer-router-${c}`,a(this.components)));this.peerRouting=this.components.peerRouting=this.configureComponent("peerRouting",new Pi(this.components,{routers:s}));let i=(e.contentRouters??[]).map((a,c)=>this.configureComponent(`content-router-${c}`,a(this.components)));if(this.contentRouting=this.components.contentRouting=this.configureComponent("contentRouting",new ki(this.components,{routers:i})),this.configureComponent("randomWalk",new Oi(this.components)),(e.peerDiscovery??[]).forEach((a,c)=>{this.configureComponent(`peer-discovery-${c}`,a(this.components)).addEventListener("peer",f=>{this.#e(f)})}),e.transports?.forEach((a,c)=>{this.components.transportManager.add(this.configureComponent(`transport-${c}`,a(this.components)))}),e.services!=null)for(let a of Object.keys(e.services)){let c=e.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[zi]!=null&&(this.log("registering service %s for content routing",a),i.push(u[zi])),u[ji]!=null&&(this.log("registering service %s for peer routing",a),s.push(u[ji])),u[Yi]!=null&&(this.log("registering service %s for peer discovery",a),u[Yi].addEventListener?.("peer",f=>{this.#e(f)}))}}configureComponent(e,t){return t==null&&this.log.error("component %s was null or undefined",e),this.components[e]=t,t}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(e){throw this.log.error("An error occurred starting libp2p",e),this.status="started",await this.stop(),e}}}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(e){return this.components.connectionManager.getConnections(e)}getDialQueue(){return this.components.connectionManager.getDialQueue()}getPeers(){let e=new ft;for(let t of this.components.connectionManager.getConnections())e.add(t.remotePeer);return Array.from(e)}async dial(e,t={}){return this.components.connectionManager.openConnection(e,{priority:75,...t})}async dialProtocol(e,t,n={}){if(t==null)throw new y("no protocols were provided to open a stream",B.ERR_INVALID_PROTOCOLS_FOR_STREAM);if(t=Array.isArray(t)?t:[t],t.length===0)throw new y("no protocols were provided to open a stream",B.ERR_INVALID_PROTOCOLS_FOR_STREAM);return(await this.dial(e,n)).newStream(t,n)}getMultiaddrs(){return this.components.addressManager.getAddresses()}getProtocols(){return this.components.registrar.getProtocols()}async hangUp(e,t={}){cr(e)&&(e=we(e.getPeerId()??"")),await this.components.connectionManager.closeConnections(e,t)}async getPublicKey(e,t={}){if(this.log("getPublicKey %p",e),e.publicKey!=null)return e.publicKey;try{let s=await this.peerStore.get(e);if(s.id.publicKey!=null)return s.id.publicKey}catch(s){if(s.code!==B.ERR_NOT_FOUND)throw s}let n=_e([D("/pk/"),e.multihash.digest]),o=await this.contentRouting.get(n,t);return ro(o),await this.peerStore.patch(e,{publicKey:o}),o}async handle(e,t,n){Array.isArray(e)||(e=[e]),await Promise.all(e.map(async o=>{await this.components.registrar.handle(o,t,n)}))}async unhandle(e){Array.isArray(e)||(e=[e]),await Promise.all(e.map(async t=>{await this.components.registrar.unhandle(t)}))}async register(e,t){return this.components.registrar.register(e,t)}unregister(e){this.components.registrar.unregister(e)}async isDialable(e,t={}){return this.components.connectionManager.isDialable(e,t)}#e(e){let{detail:t}=e;if(t.id.toString()===this.peerId.toString()){this.log.error(new Error(B.ERR_DISCOVERED_SELF));return}this.components.peerStore.merge(t.id,{multiaddrs:t.multiaddrs}).catch(n=>{this.log.error(n)})}};async function Dd(r={}){let e=r.peerId??=await ch();if(e.privateKey==null)throw new y("peer id was missing private key","ERR_MISSING_PRIVATE_KEY");return r.privateKey??=await no(e.privateKey),new Tl(await bd(r))}async function lw(r={}){let e=await Dd(r);return r.start!==!1&&await e.start(),e}return Wd(uw);})();
|
|
21
21
|
/*! Bundled license information:
|
|
22
22
|
|
|
23
23
|
pvtsutils/build/index.js:
|
package/dist/src/upgrader.js
CHANGED
|
@@ -488,7 +488,7 @@ export class DefaultUpgrader {
|
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
490
|
catch (err) {
|
|
491
|
-
connection.log.error('encrypting inbound connection
|
|
491
|
+
connection.log.error('encrypting inbound connection failed', err);
|
|
492
492
|
throw new CodeError(err.message, codes.ERR_ENCRYPTION_FAILED);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
@@ -516,7 +516,7 @@ export class DefaultUpgrader {
|
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
catch (err) {
|
|
519
|
-
connection.log.error('encrypting outbound connection to %p failed', err);
|
|
519
|
+
connection.log.error('encrypting outbound connection to %p failed', remotePeerId, err);
|
|
520
520
|
throw new CodeError(err.message, codes.ERR_ENCRYPTION_FAILED);
|
|
521
521
|
}
|
|
522
522
|
}
|
package/dist/src/upgrader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrader.js","sourceRoot":"","sources":["../../src/upgrader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAA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,CAAA;QAC/D,CAAC;IACH,CAAC;CACF"}
|
package/dist/src/version.d.ts
CHANGED
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libp2p",
|
|
3
|
-
"version": "1.5.2-
|
|
3
|
+
"version": "1.5.2-a3e8beabd",
|
|
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,50 +85,50 @@
|
|
|
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.1-
|
|
89
|
-
"@libp2p/interface": "1.3.1-
|
|
90
|
-
"@libp2p/interface-internal": "1.2.1-
|
|
91
|
-
"@libp2p/logger": "4.0.12-
|
|
92
|
-
"@libp2p/multistream-select": "5.1.9-
|
|
93
|
-
"@libp2p/peer-collections": "5.2.1-
|
|
94
|
-
"@libp2p/peer-id": "4.1.1-
|
|
95
|
-
"@libp2p/peer-id-factory": "4.1.1-
|
|
96
|
-
"@libp2p/peer-store": "10.0.18-
|
|
97
|
-
"@libp2p/utils": "5.4.1-
|
|
98
|
-
"@multiformats/dns": "^1.0.
|
|
99
|
-
"@multiformats/multiaddr": "^12.2.
|
|
100
|
-
"@multiformats/multiaddr-matcher": "^1.2.
|
|
88
|
+
"@libp2p/crypto": "4.1.1-a3e8beabd",
|
|
89
|
+
"@libp2p/interface": "1.3.1-a3e8beabd",
|
|
90
|
+
"@libp2p/interface-internal": "1.2.1-a3e8beabd",
|
|
91
|
+
"@libp2p/logger": "4.0.12-a3e8beabd",
|
|
92
|
+
"@libp2p/multistream-select": "5.1.9-a3e8beabd",
|
|
93
|
+
"@libp2p/peer-collections": "5.2.1-a3e8beabd",
|
|
94
|
+
"@libp2p/peer-id": "4.1.1-a3e8beabd",
|
|
95
|
+
"@libp2p/peer-id-factory": "4.1.1-a3e8beabd",
|
|
96
|
+
"@libp2p/peer-store": "10.0.18-a3e8beabd",
|
|
97
|
+
"@libp2p/utils": "5.4.1-a3e8beabd",
|
|
98
|
+
"@multiformats/dns": "^1.0.6",
|
|
99
|
+
"@multiformats/multiaddr": "^12.2.3",
|
|
100
|
+
"@multiformats/multiaddr-matcher": "^1.2.1",
|
|
101
101
|
"any-signal": "^4.1.1",
|
|
102
102
|
"datastore-core": "^9.2.9",
|
|
103
103
|
"interface-datastore": "^8.2.11",
|
|
104
|
-
"it-merge": "^3.0.
|
|
105
|
-
"it-parallel": "^3.0.
|
|
104
|
+
"it-merge": "^3.0.5",
|
|
105
|
+
"it-parallel": "^3.0.7",
|
|
106
106
|
"merge-options": "^3.0.4",
|
|
107
107
|
"multiformats": "^13.1.0",
|
|
108
108
|
"p-defer": "^4.0.1",
|
|
109
109
|
"race-event": "^1.3.0",
|
|
110
110
|
"race-signal": "^1.0.2",
|
|
111
|
-
"uint8arrays": "^5.0
|
|
111
|
+
"uint8arrays": "^5.1.0"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@chainsafe/libp2p-yamux": "^6.0.2",
|
|
115
|
-
"@libp2p/circuit-relay-v2": "1.0.23-
|
|
116
|
-
"@libp2p/identify": "2.0.1-
|
|
117
|
-
"@libp2p/interface-compliance-tests": "5.4.4-
|
|
118
|
-
"@libp2p/mplex": "10.0.23-
|
|
119
|
-
"@libp2p/plaintext": "1.0.23-
|
|
120
|
-
"@libp2p/tcp": "9.0.25-
|
|
121
|
-
"@libp2p/websockets": "8.0.23-
|
|
115
|
+
"@libp2p/circuit-relay-v2": "1.0.23-a3e8beabd",
|
|
116
|
+
"@libp2p/identify": "2.0.1-a3e8beabd",
|
|
117
|
+
"@libp2p/interface-compliance-tests": "5.4.4-a3e8beabd",
|
|
118
|
+
"@libp2p/mplex": "10.0.23-a3e8beabd",
|
|
119
|
+
"@libp2p/plaintext": "1.0.23-a3e8beabd",
|
|
120
|
+
"@libp2p/tcp": "9.0.25-a3e8beabd",
|
|
121
|
+
"@libp2p/websockets": "8.0.23-a3e8beabd",
|
|
122
122
|
"@multiformats/mafmt": "^12.1.6",
|
|
123
|
-
"aegir": "^42.2.
|
|
123
|
+
"aegir": "^42.2.11",
|
|
124
124
|
"delay": "^6.0.0",
|
|
125
|
-
"it-all": "^3.0.
|
|
126
|
-
"it-drain": "^3.0.
|
|
125
|
+
"it-all": "^3.0.6",
|
|
126
|
+
"it-drain": "^3.0.7",
|
|
127
127
|
"it-map": "^3.1.0",
|
|
128
128
|
"it-pipe": "^3.0.1",
|
|
129
129
|
"it-pushable": "^3.2.3",
|
|
130
130
|
"it-stream-types": "^2.0.1",
|
|
131
|
-
"it-take": "^3.0.
|
|
131
|
+
"it-take": "^3.0.5",
|
|
132
132
|
"p-event": "^6.0.1",
|
|
133
133
|
"p-wait-for": "^5.0.2",
|
|
134
134
|
"sinon": "^18.0.0",
|
package/src/upgrader.ts
CHANGED
|
@@ -641,7 +641,7 @@ export class DefaultUpgrader implements Upgrader {
|
|
|
641
641
|
protocol
|
|
642
642
|
}
|
|
643
643
|
} catch (err: any) {
|
|
644
|
-
connection.log.error('encrypting inbound connection
|
|
644
|
+
connection.log.error('encrypting inbound connection failed', err)
|
|
645
645
|
throw new CodeError(err.message, codes.ERR_ENCRYPTION_FAILED)
|
|
646
646
|
}
|
|
647
647
|
}
|
|
@@ -678,7 +678,7 @@ export class DefaultUpgrader implements Upgrader {
|
|
|
678
678
|
protocol
|
|
679
679
|
}
|
|
680
680
|
} catch (err: any) {
|
|
681
|
-
connection.log.error('encrypting outbound connection to %p failed', err)
|
|
681
|
+
connection.log.error('encrypting outbound connection to %p failed', remotePeerId, err)
|
|
682
682
|
throw new CodeError(err.message, codes.ERR_ENCRYPTION_FAILED)
|
|
683
683
|
}
|
|
684
684
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.5.2-
|
|
1
|
+
export const version = '1.5.2-a3e8beabd'
|
|
2
2
|
export const name = 'libp2p'
|