@libp2p/daemon-protocol 5.0.0 → 5.0.1

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/README.md CHANGED
@@ -1,5 +1,3 @@
1
- # @libp2p/daemon-protocol <!-- omit in toc -->
2
-
3
1
  [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
4
2
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
5
3
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
@@ -7,25 +5,23 @@
7
5
 
8
6
  > Communication protocol between libp2p daemons and clients
9
7
 
10
- ## Table of contents <!-- omit in toc -->
11
-
12
- - [Install](#install)
13
- - [License](#license)
14
- - [Contribution](#contribution)
15
-
16
- ## Install
8
+ # Install
17
9
 
18
10
  ```console
19
11
  $ npm i @libp2p/daemon-protocol
20
12
  ```
21
13
 
22
- ## License
14
+ # API Docs
15
+
16
+ - <https://libp2p.github.io/js-libp2p-daemon/modules/_libp2p_daemon_protocol.html>
17
+
18
+ # License
23
19
 
24
20
  Licensed under either of
25
21
 
26
22
  - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
27
23
  - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
28
24
 
29
- ## Contribution
25
+ # Contribution
30
26
 
31
27
  Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
package/dist/index.min.js CHANGED
@@ -1,3 +1,3 @@
1
1
  (function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PDaemonProtocol = factory()}(typeof self !== 'undefined' ? self : this, function () {
2
- "use strict";var Libp2PDaemonProtocol=(()=>{var pe=Object.create;var q=Object.defineProperty;var Ee=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var ge=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty;var m=(i,n)=>()=>(n||i((n={exports:{}}).exports,n),n.exports),ke=(i,n)=>{for(var e in n)q(i,e,{get:n[e],enumerable:!0})},At=(i,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of ye(n))!me.call(i,t)&&t!==e&&q(i,t,{get:()=>n[t],enumerable:!(r=Ee(n,t))||r.enumerable});return i};var F=(i,n,e)=>(e=i!=null?pe(ge(i)):{},At(n||!i||!i.__esModule?q(e,"default",{value:i,enumerable:!0}):e,i)),_e=i=>At(q({},"__esModule",{value:!0}),i);var It=m((Ce,Bt)=>{"use strict";Bt.exports=Ne;function Ne(i,n){for(var e=new Array(arguments.length-1),r=0,t=2,o=!0;t<arguments.length;)e[r++]=arguments[t++];return new Promise(function(s,u){e[r]=function(h){if(o)if(o=!1,h)u(h);else{for(var k=new Array(arguments.length-1),O=0;O<k.length;)k[O++]=arguments[O];s.apply(null,k)}};try{i.apply(n||null,e)}catch(l){o&&(o=!1,u(l))}})}});var Ot=m(Lt=>{"use strict";var j=Lt;j.length=function(n){var e=n.length;if(!e)return 0;for(var r=0;--e%4>1&&n.charAt(e)==="=";)++r;return Math.ceil(n.length*3)/4-r};var U=new Array(64),Dt=new Array(123);for(N=0;N<64;)Dt[U[N]=N<26?N+65:N<52?N+71:N<62?N-4:N-59|43]=N++;var N;j.encode=function(n,e,r){for(var t=null,o=[],c=0,s=0,u;e<r;){var l=n[e++];switch(s){case 0:o[c++]=U[l>>2],u=(l&3)<<4,s=1;break;case 1:o[c++]=U[u|l>>4],u=(l&15)<<2,s=2;break;case 2:o[c++]=U[u|l>>6],o[c++]=U[l&63],s=0;break}c>8191&&((t||(t=[])).push(String.fromCharCode.apply(String,o)),c=0)}return s&&(o[c++]=U[u],o[c++]=61,s===1&&(o[c++]=61)),t?(c&&t.push(String.fromCharCode.apply(String,o.slice(0,c))),t.join("")):String.fromCharCode.apply(String,o.slice(0,c))};var St="invalid encoding";j.decode=function(n,e,r){for(var t=r,o=0,c,s=0;s<n.length;){var u=n.charCodeAt(s++);if(u===61&&o>1)break;if((u=Dt[u])===void 0)throw Error(St);switch(o){case 0:c=u,o=1;break;case 1:e[r++]=c<<2|(u&48)>>4,c=u,o=2;break;case 2:e[r++]=(c&15)<<4|(u&60)>>2,c=u,o=3;break;case 3:e[r++]=(c&3)<<6|u,o=0;break}}if(o===1)throw Error(St);return r-t};j.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var xt=m((Pe,Tt)=>{"use strict";Tt.exports=tt;function tt(){this._listeners={}}tt.prototype.on=function(n,e,r){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:e,ctx:r||this}),this};tt.prototype.off=function(n,e){if(n===void 0)this._listeners={};else if(e===void 0)this._listeners[n]=[];else for(var r=this._listeners[n],t=0;t<r.length;)r[t].fn===e?r.splice(t,1):++t;return this};tt.prototype.emit=function(n){var e=this._listeners[n];if(e){for(var r=[],t=1;t<arguments.length;)r.push(arguments[t++]);for(t=0;t<e.length;)e[t].fn.apply(e[t++].ctx,r)}return this}});var Mt=m((Ge,Gt)=>{"use strict";Gt.exports=vt(vt);function vt(i){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),e=new Uint8Array(n.buffer),r=e[3]===128;function t(u,l,h){n[0]=u,l[h]=e[0],l[h+1]=e[1],l[h+2]=e[2],l[h+3]=e[3]}function o(u,l,h){n[0]=u,l[h]=e[3],l[h+1]=e[2],l[h+2]=e[1],l[h+3]=e[0]}i.writeFloatLE=r?t:o,i.writeFloatBE=r?o:t;function c(u,l){return e[0]=u[l],e[1]=u[l+1],e[2]=u[l+2],e[3]=u[l+3],n[0]}function s(u,l){return e[3]=u[l],e[2]=u[l+1],e[1]=u[l+2],e[0]=u[l+3],n[0]}i.readFloatLE=r?c:s,i.readFloatBE=r?s:c}():function(){function n(r,t,o,c){var s=t<0?1:0;if(s&&(t=-t),t===0)r(1/t>0?0:2147483648,o,c);else if(isNaN(t))r(2143289344,o,c);else if(t>34028234663852886e22)r((s<<31|2139095040)>>>0,o,c);else if(t<11754943508222875e-54)r((s<<31|Math.round(t/1401298464324817e-60))>>>0,o,c);else{var u=Math.floor(Math.log(t)/Math.LN2),l=Math.round(t*Math.pow(2,-u)*8388608)&8388607;r((s<<31|u+127<<23|l)>>>0,o,c)}}i.writeFloatLE=n.bind(null,Ut),i.writeFloatBE=n.bind(null,Ct);function e(r,t,o){var c=r(t,o),s=(c>>31)*2+1,u=c>>>23&255,l=c&8388607;return u===255?l?NaN:s*(1/0):u===0?s*1401298464324817e-60*l:s*Math.pow(2,u-150)*(l+8388608)}i.readFloatLE=e.bind(null,Ft),i.readFloatBE=e.bind(null,Pt)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),e=new Uint8Array(n.buffer),r=e[7]===128;function t(u,l,h){n[0]=u,l[h]=e[0],l[h+1]=e[1],l[h+2]=e[2],l[h+3]=e[3],l[h+4]=e[4],l[h+5]=e[5],l[h+6]=e[6],l[h+7]=e[7]}function o(u,l,h){n[0]=u,l[h]=e[7],l[h+1]=e[6],l[h+2]=e[5],l[h+3]=e[4],l[h+4]=e[3],l[h+5]=e[2],l[h+6]=e[1],l[h+7]=e[0]}i.writeDoubleLE=r?t:o,i.writeDoubleBE=r?o:t;function c(u,l){return e[0]=u[l],e[1]=u[l+1],e[2]=u[l+2],e[3]=u[l+3],e[4]=u[l+4],e[5]=u[l+5],e[6]=u[l+6],e[7]=u[l+7],n[0]}function s(u,l){return e[7]=u[l],e[6]=u[l+1],e[5]=u[l+2],e[4]=u[l+3],e[3]=u[l+4],e[2]=u[l+5],e[1]=u[l+6],e[0]=u[l+7],n[0]}i.readDoubleLE=r?c:s,i.readDoubleBE=r?s:c}():function(){function n(r,t,o,c,s,u){var l=c<0?1:0;if(l&&(c=-c),c===0)r(0,s,u+t),r(1/c>0?0:2147483648,s,u+o);else if(isNaN(c))r(0,s,u+t),r(2146959360,s,u+o);else if(c>17976931348623157e292)r(0,s,u+t),r((l<<31|2146435072)>>>0,s,u+o);else{var h;if(c<22250738585072014e-324)h=c/5e-324,r(h>>>0,s,u+t),r((l<<31|h/4294967296)>>>0,s,u+o);else{var k=Math.floor(Math.log(c)/Math.LN2);k===1024&&(k=1023),h=c*Math.pow(2,-k),r(h*4503599627370496>>>0,s,u+t),r((l<<31|k+1023<<20|h*1048576&1048575)>>>0,s,u+o)}}}i.writeDoubleLE=n.bind(null,Ut,0,4),i.writeDoubleBE=n.bind(null,Ct,4,0);function e(r,t,o,c,s){var u=r(c,s+t),l=r(c,s+o),h=(l>>31)*2+1,k=l>>>20&2047,O=4294967296*(l&1048575)+u;return k===2047?O?NaN:h*(1/0):k===0?h*5e-324*O:h*Math.pow(2,k-1075)*(O+4503599627370496)}i.readDoubleLE=e.bind(null,Ft,0,4),i.readDoubleBE=e.bind(null,Pt,4,0)}(),i}function Ut(i,n,e){n[e]=i&255,n[e+1]=i>>>8&255,n[e+2]=i>>>16&255,n[e+3]=i>>>24}function Ct(i,n,e){n[e]=i>>>24,n[e+1]=i>>>16&255,n[e+2]=i>>>8&255,n[e+3]=i&255}function Ft(i,n){return(i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24)>>>0}function Pt(i,n){return(i[n]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3])>>>0}});var Rt=m((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(i){}return null}});var zt=m(wt=>{"use strict";var rt=wt;rt.length=function(n){for(var e=0,r=0,t=0;t<n.length;++t)r=n.charCodeAt(t),r<128?e+=1:r<2048?e+=2:(r&64512)===55296&&(n.charCodeAt(t+1)&64512)===56320?(++t,e+=4):e+=3;return e};rt.read=function(n,e,r){var t=r-e;if(t<1)return"";for(var o=null,c=[],s=0,u;e<r;)u=n[e++],u<128?c[s++]=u:u>191&&u<224?c[s++]=(u&31)<<6|n[e++]&63:u>239&&u<365?(u=((u&7)<<18|(n[e++]&63)<<12|(n[e++]&63)<<6|n[e++]&63)-65536,c[s++]=55296+(u>>10),c[s++]=56320+(u&1023)):c[s++]=(u&15)<<12|(n[e++]&63)<<6|n[e++]&63,s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,c)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,c.slice(0,s))),o.join("")):String.fromCharCode.apply(String,c.slice(0,s))};rt.write=function(n,e,r){for(var t=r,o,c,s=0;s<n.length;++s)o=n.charCodeAt(s),o<128?e[r++]=o:o<2048?(e[r++]=o>>6|192,e[r++]=o&63|128):(o&64512)===55296&&((c=n.charCodeAt(s+1))&64512)===56320?(o=65536+((o&1023)<<10)+(c&1023),++s,e[r++]=o>>18|240,e[r++]=o>>12&63|128,e[r++]=o>>6&63|128,e[r++]=o&63|128):(e[r++]=o>>12|224,e[r++]=o>>6&63|128,e[r++]=o&63|128);return r-t}});var Wt=m((Re,Ht)=>{"use strict";Ht.exports=be;function be(i,n,e){var r=e||8192,t=r>>>1,o=null,c=r;return function(u){if(u<1||u>t)return i(u);c+u>r&&(o=i(r),c=0);var l=n.call(o,c,c+=u);return c&7&&(c=(c|7)+1),l}}});var Zt=m((we,Kt)=>{"use strict";Kt.exports=g;var P=x();function g(i,n){this.lo=i>>>0,this.hi=n>>>0}var T=g.zero=new g(0,0);T.toNumber=function(){return 0};T.zzEncode=T.zzDecode=function(){return this};T.length=function(){return 1};var Ae=g.zeroHash="\0\0\0\0\0\0\0\0";g.fromNumber=function(n){if(n===0)return T;var e=n<0;e&&(n=-n);var r=n>>>0,t=(n-r)/4294967296>>>0;return e&&(t=~t>>>0,r=~r>>>0,++r>4294967295&&(r=0,++t>4294967295&&(t=0))),new g(r,t)};g.from=function(n){if(typeof n=="number")return g.fromNumber(n);if(P.isString(n))if(P.Long)n=P.Long.fromString(n);else return g.fromNumber(parseInt(n,10));return n.low||n.high?new g(n.low>>>0,n.high>>>0):T};g.prototype.toNumber=function(n){if(!n&&this.hi>>>31){var e=~this.lo+1>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+r*4294967296)}return this.lo+this.hi*4294967296};g.prototype.toLong=function(n){return P.Long?new P.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var D=String.prototype.charCodeAt;g.fromHash=function(n){return n===Ae?T:new g((D.call(n,0)|D.call(n,1)<<8|D.call(n,2)<<16|D.call(n,3)<<24)>>>0,(D.call(n,4)|D.call(n,5)<<8|D.call(n,6)<<16|D.call(n,7)<<24)>>>0)};g.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};g.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};g.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};g.prototype.length=function(){var n=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?e===0?n<16384?n<128?1:2:n<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}});var x=m(ot=>{"use strict";var f=ot;f.asPromise=It();f.base64=Ot();f.EventEmitter=xt();f.float=Mt();f.inquire=Rt();f.utf8=zt();f.pool=Wt();f.LongBits=Zt();f.isNode=!!(typeof globalThis<"u"&&globalThis&&globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);f.global=f.isNode&&globalThis||typeof window<"u"&&window||typeof self<"u"&&self||ot;f.emptyArray=Object.freeze?Object.freeze([]):[];f.emptyObject=Object.freeze?Object.freeze({}):{};f.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};f.isString=function(n){return typeof n=="string"||n instanceof String};f.isObject=function(n){return n&&typeof n=="object"};f.isset=f.isSet=function(n,e){var r=n[e];return r!=null&&n.hasOwnProperty(e)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)>0:!1};f.Buffer=function(){try{var i=f.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();f._Buffer_from=null;f._Buffer_allocUnsafe=null;f.newBuffer=function(n){return typeof n=="number"?f.Buffer?f._Buffer_allocUnsafe(n):new f.Array(n):f.Buffer?f._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};f.Array=typeof Uint8Array<"u"?Uint8Array:Array;f.Long=f.global.dcodeIO&&f.global.dcodeIO.Long||f.global.Long||f.inquire("long");f.key2Re=/^true|false|0|1$/;f.key32Re=/^-?(?:0|[1-9][0-9]*)$/;f.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;f.longToHash=function(n){return n?f.LongBits.from(n).toHash():f.LongBits.zeroHash};f.longFromHash=function(n,e){var r=f.LongBits.fromHash(n);return f.Long?f.Long.fromBits(r.lo,r.hi,e):r.toNumber(!!e)};function $t(i,n,e){for(var r=Object.keys(n),t=0;t<r.length;++t)(i[r[t]]===void 0||!e)&&(i[r[t]]=n[r[t]]);return i}f.merge=$t;f.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function Jt(i){function n(e,r){if(!(this instanceof n))return new n(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&&$t(this,r)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}f.newError=Jt;f.ProtocolError=Jt("ProtocolError");f.oneOfGetter=function(n){for(var e={},r=0;r<n.length;++r)e[n[r]]=1;return function(){for(var t=Object.keys(this),o=t.length-1;o>-1;--o)if(e[t[o]]===1&&this[t[o]]!==void 0&&this[t[o]]!==null)return t[o]}};f.oneOfSetter=function(n){return function(e){for(var r=0;r<n.length;++r)n[r]!==e&&delete this[n[r]]}};f.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};f._configure=function(){var i=f.Buffer;if(!i){f._Buffer_from=f._Buffer_allocUnsafe=null;return}f._Buffer_from=i.from!==Uint8Array.from&&i.from||function(e,r){return new i(e,r)},f._Buffer_allocUnsafe=i.allocUnsafe||function(e){return new i(e)}}});var lt=m((He,qt)=>{"use strict";qt.exports=d;var A=x(),ut,Yt=A.LongBits,Be=A.utf8;function b(i,n){return RangeError("index out of range: "+i.pos+" + "+(n||1)+" > "+i.len)}function d(i){this.buf=i,this.pos=0,this.len=i.length}var Xt=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new d(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new d(n);throw Error("illegal buffer")},Vt=function(){return A.Buffer?function(e){return(d.create=function(t){return A.Buffer.isBuffer(t)?new ut(t):Xt(t)})(e)}:Xt};d.create=Vt();d.prototype._slice=A.Array.prototype.subarray||A.Array.prototype.slice;d.prototype.uint32=function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,b(this,10);return n}}();d.prototype.int32=function(){return this.uint32()|0};d.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function ct(){var i=new Yt(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw b(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,i}if(this.len-this.pos>4){for(;n<5;++n)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;n<5;++n){if(this.pos>=this.len)throw b(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}d.prototype.bool=function(){return this.uint32()!==0};function et(i,n){return(i[n-4]|i[n-3]<<8|i[n-2]<<16|i[n-1]<<24)>>>0}d.prototype.fixed32=function(){if(this.pos+4>this.len)throw b(this,4);return et(this.buf,this.pos+=4)};d.prototype.sfixed32=function(){if(this.pos+4>this.len)throw b(this,4);return et(this.buf,this.pos+=4)|0};function Qt(){if(this.pos+8>this.len)throw b(this,8);return new Yt(et(this.buf,this.pos+=4),et(this.buf,this.pos+=4))}d.prototype.float=function(){if(this.pos+4>this.len)throw b(this,4);var n=A.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};d.prototype.double=function(){if(this.pos+8>this.len)throw b(this,4);var n=A.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};d.prototype.bytes=function(){var n=this.uint32(),e=this.pos,r=this.pos+n;if(r>this.len)throw b(this,n);return this.pos+=n,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)};d.prototype.string=function(){var n=this.bytes();return Be.read(n,0,n.length)};d.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw b(this,n);this.pos+=n}else do if(this.pos>=this.len)throw b(this);while(this.buf[this.pos++]&128);return this};d.prototype.skipType=function(i){switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(i=this.uint32()&7)!==4;)this.skipType(i);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};d._configure=function(i){ut=i,d.create=Vt(),ut._configure();var n=A.Long?"toLong":"toNumber";A.merge(d.prototype,{int64:function(){return ct.call(this)[n](!1)},uint64:function(){return ct.call(this)[n](!0)},sint64:function(){return ct.call(this).zzDecode()[n](!1)},fixed64:function(){return Qt.call(this)[n](!0)},sfixed64:function(){return Qt.call(this)[n](!1)}})}});var ne=m((We,ee)=>{"use strict";ee.exports=v;var te=lt();(v.prototype=Object.create(te.prototype)).constructor=v;var jt=x();function v(i){te.call(this,i)}v._configure=function(){jt.Buffer&&(v.prototype._slice=jt.Buffer.prototype.slice)};v.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};v._configure()});var Et=m((Ke,ce)=>{"use strict";ce.exports=a;var _=x(),st,nt=_.LongBits,ie=_.base64,re=_.utf8;function G(i,n,e){this.fn=i,this.len=n,this.next=void 0,this.val=e}function ht(){}function Ie(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function a(){this.len=0,this.head=new G(ht,0,0),this.tail=this.head,this.states=null}var oe=function(){return _.Buffer?function(){return(a.create=function(){return new st})()}:function(){return new a}};a.create=oe();a.alloc=function(n){return new _.Array(n)};_.Array!==Array&&(a.alloc=_.pool(a.alloc,_.Array.prototype.subarray));a.prototype._push=function(n,e,r){return this.tail=this.tail.next=new G(n,e,r),this.len+=e,this};function at(i,n,e){n[e]=i&255}function Se(i,n,e){for(;i>127;)n[e++]=i&127|128,i>>>=7;n[e]=i}function dt(i,n){this.len=i,this.next=void 0,this.val=n}dt.prototype=Object.create(G.prototype);dt.prototype.fn=Se;a.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new dt((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};a.prototype.int32=function(n){return n<0?this._push(pt,10,nt.fromNumber(n)):this.uint32(n)};a.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function pt(i,n,e){for(;i.hi;)n[e++]=i.lo&127|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;for(;i.lo>127;)n[e++]=i.lo&127|128,i.lo=i.lo>>>7;n[e++]=i.lo}a.prototype.uint64=function(n){var e=nt.from(n);return this._push(pt,e.length(),e)};a.prototype.int64=a.prototype.uint64;a.prototype.sint64=function(n){var e=nt.from(n).zzEncode();return this._push(pt,e.length(),e)};a.prototype.bool=function(n){return this._push(at,1,n?1:0)};function ft(i,n,e){n[e]=i&255,n[e+1]=i>>>8&255,n[e+2]=i>>>16&255,n[e+3]=i>>>24}a.prototype.fixed32=function(n){return this._push(ft,4,n>>>0)};a.prototype.sfixed32=a.prototype.fixed32;a.prototype.fixed64=function(n){var e=nt.from(n);return this._push(ft,4,e.lo)._push(ft,4,e.hi)};a.prototype.sfixed64=a.prototype.fixed64;a.prototype.float=function(n){return this._push(_.float.writeFloatLE,4,n)};a.prototype.double=function(n){return this._push(_.float.writeDoubleLE,8,n)};var De=_.Array.prototype.set?function(n,e,r){e.set(n,r)}:function(n,e,r){for(var t=0;t<n.length;++t)e[r+t]=n[t]};a.prototype.bytes=function(n){var e=n.length>>>0;if(!e)return this._push(at,1,0);if(_.isString(n)){var r=a.alloc(e=ie.length(n));ie.decode(n,r,0),n=r}return this.uint32(e)._push(De,e,n)};a.prototype.string=function(n){var e=re.length(n);return e?this.uint32(e)._push(re.write,e,n):this._push(at,1,0)};a.prototype.fork=function(){return this.states=new Ie(this),this.head=this.tail=new G(ht,0,0),this.len=0,this};a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new G(ht,0,0),this.len=0),this};a.prototype.ldelim=function(){var n=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=n.next,this.tail=e,this.len+=r),this};a.prototype.finish=function(){for(var n=this.head.next,e=this.constructor.alloc(this.len),r=0;n;)n.fn(n.val,e,r),r+=n.len,n=n.next;return e};a._configure=function(i){st=i,a.create=oe(),st._configure()}});var se=m((Ze,le)=>{"use strict";le.exports=B;var ue=Et();(B.prototype=Object.create(ue.prototype)).constructor=B;var L=x();function B(){ue.call(this)}B._configure=function(){B.alloc=L._Buffer_allocUnsafe,B.writeBytesBuffer=L.Buffer&&L.Buffer.prototype instanceof Uint8Array&&L.Buffer.prototype.set.name==="set"?function(n,e,r){e.set(n,r)}:function(n,e,r){if(n.copy)n.copy(e,r,0,n.length);else for(var t=0;t<n.length;)e[r++]=n[t++]}};B.prototype.bytes=function(n){L.isString(n)&&(n=L._Buffer_from(n,"base64"));var e=n.length>>>0;return this.uint32(e),e&&this._push(B.writeBytesBuffer,e,n),this};function Le(i,n,e){i.length<40?L.utf8.write(i,n,e):n.utf8Write?n.utf8Write(i,e):n.write(i,e)}B.prototype.string=function(n){var e=L.Buffer.byteLength(n);return this.uint32(e),e&&this._push(Le,e,n),this};B._configure()});var ve={};ke(ve,{ConnManagerRequest:()=>$,ConnectRequest:()=>R,DHTRequest:()=>K,DHTResponse:()=>Z,DisconnectRequest:()=>J,ErrorResponse:()=>H,IdentifyResponse:()=>M,PSMessage:()=>bt,PSRequest:()=>X,PSResponse:()=>Q,PeerInfo:()=>S,PeerstoreRequest:()=>Y,PeerstoreResponse:()=>V,Request:()=>_t,Response:()=>Nt,StreamHandlerRequest:()=>z,StreamInfo:()=>W,StreamOpenRequest:()=>w});var yt=F(lt(),1),fe=F(ne(),1),he=F(x(),1),gt=F(Et(),1),ae=F(se(),1);function Oe(){he.default._configure(),yt.default._configure(fe.default),gt.default._configure(ae.default)}Oe();var de=["uint64","int64","sint64","fixed64","sfixed64"];function Te(i){for(let n of de){if(i[n]==null)continue;let e=i[n];i[n]=function(){return BigInt(e.call(this).toString())}}return i}function mt(i){return Te(new yt.default(i))}function xe(i){for(let n of de){if(i[n]==null)continue;let e=i[n];i[n]=function(r){return e.call(this,r.toString())}}return i}function kt(){return xe(gt.default.create())}function p(i,n){let e=mt(i instanceof Uint8Array?i:i.subarray());return n.decode(e)}function E(i,n){let e=kt();return n.encode(i,e,{lengthDelimited:!1}),e.finish()}var C;(function(i){i[i.VARINT=0]="VARINT",i[i.BIT64=1]="BIT64",i[i.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",i[i.START_GROUP=3]="START_GROUP",i[i.END_GROUP=4]="END_GROUP",i[i.BIT32=5]="BIT32"})(C||(C={}));function it(i,n,e,r){return{name:i,type:n,encode:e,decode:r}}function I(i){function n(t){if(i[t.toString()]==null)throw new Error("Invalid enum value");return i[t]}let e=function(o,c){let s=n(o);c.int32(s)},r=function(o){let c=o.int32();return n(c)};return it("enum",C.VARINT,e,r)}function y(i,n){return it("message",C.LENGTH_DELIMITED,i,n)}var _t;(function(i){let n;(function(t){t.IDENTIFY="IDENTIFY",t.CONNECT="CONNECT",t.STREAM_OPEN="STREAM_OPEN",t.STREAM_HANDLER="STREAM_HANDLER",t.DHT="DHT",t.LIST_PEERS="LIST_PEERS",t.CONNMANAGER="CONNMANAGER",t.DISCONNECT="DISCONNECT",t.PUBSUB="PUBSUB",t.PEERSTORE="PEERSTORE"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.IDENTIFY=0]="IDENTIFY",t[t.CONNECT=1]="CONNECT",t[t.STREAM_OPEN=2]="STREAM_OPEN",t[t.STREAM_HANDLER=3]="STREAM_HANDLER",t[t.DHT=4]="DHT",t[t.LIST_PEERS=5]="LIST_PEERS",t[t.CONNMANAGER=6]="CONNMANAGER",t[t.DISCONNECT=7]="DISCONNECT",t[t.PUBSUB=8]="PUBSUB",t[t.PEERSTORE=9]="PEERSTORE"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.connect!=null&&(o.uint32(18),R.codec().encode(t.connect,o)),t.streamOpen!=null&&(o.uint32(26),w.codec().encode(t.streamOpen,o)),t.streamHandler!=null&&(o.uint32(34),z.codec().encode(t.streamHandler,o)),t.dht!=null&&(o.uint32(42),K.codec().encode(t.dht,o)),t.connManager!=null&&(o.uint32(50),$.codec().encode(t.connManager,o)),t.disconnect!=null&&(o.uint32(58),J.codec().encode(t.disconnect,o)),t.pubsub!=null&&(o.uint32(66),X.codec().encode(t.pubsub,o)),t.peerStore!=null&&(o.uint32(74),Y.codec().encode(t.peerStore,o)),c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.connect=R.codec().decode(t,t.uint32());break;case 3:c.streamOpen=w.codec().decode(t,t.uint32());break;case 4:c.streamHandler=z.codec().decode(t,t.uint32());break;case 5:c.dht=K.codec().decode(t,t.uint32());break;case 6:c.connManager=$.codec().decode(t,t.uint32());break;case 7:c.disconnect=J.codec().decode(t,t.uint32());break;case 8:c.pubsub=X.codec().decode(t,t.uint32());break;case 9:c.peerStore=Y.codec().decode(t,t.uint32());break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})(_t||(_t={}));var Nt;(function(i){let n;(function(t){t.OK="OK",t.ERROR="ERROR"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.OK=0]="OK",t[t.ERROR=1]="ERROR"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{if(c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.error!=null&&(o.uint32(18),H.codec().encode(t.error,o)),t.streamInfo!=null&&(o.uint32(26),W.codec().encode(t.streamInfo,o)),t.identify!=null&&(o.uint32(34),M.codec().encode(t.identify,o)),t.dht!=null&&(o.uint32(42),Z.codec().encode(t.dht,o)),t.peers!=null)for(let s of t.peers)o.uint32(50),S.codec().encode(s,o);t.pubsub!=null&&(o.uint32(58),Q.codec().encode(t.pubsub,o)),t.peerStore!=null&&(o.uint32(66),V.codec().encode(t.peerStore,o)),c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={peers:[]},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.error=H.codec().decode(t,t.uint32());break;case 3:c.streamInfo=W.codec().decode(t,t.uint32());break;case 4:c.identify=M.codec().decode(t,t.uint32());break;case 5:c.dht=Z.codec().decode(t,t.uint32());break;case 6:c.peers.push(S.codec().decode(t,t.uint32()));break;case 7:c.pubsub=Q.codec().decode(t,t.uint32());break;case 8:c.peerStore=V.codec().decode(t,t.uint32());break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})(Nt||(Nt={}));var M;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.id!=null&&e.id.byteLength>0&&(r.uint32(10),r.bytes(e.id)),e.addrs!=null)for(let o of e.addrs)r.uint32(18),r.bytes(o);t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={id:new Uint8Array(0),addrs:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.id=e.bytes();break;case 2:t.addrs.push(e.bytes());break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(M||(M={}));var R;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.peer!=null&&e.peer.byteLength>0&&(r.uint32(10),r.bytes(e.peer)),e.addrs!=null)for(let o of e.addrs)r.uint32(18),r.bytes(o);e.timeout!=null&&(r.uint32(24),r.int64(e.timeout)),t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={peer:new Uint8Array(0),addrs:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.peer=e.bytes();break;case 2:t.addrs.push(e.bytes());break;case 3:t.timeout=e.int64();break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(R||(R={}));var w;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.peer!=null&&e.peer.byteLength>0&&(r.uint32(10),r.bytes(e.peer)),e.proto!=null)for(let o of e.proto)r.uint32(18),r.string(o);e.timeout!=null&&(r.uint32(24),r.int64(e.timeout)),t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={peer:new Uint8Array(0),proto:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.peer=e.bytes();break;case 2:t.proto.push(e.string());break;case 3:t.timeout=e.int64();break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(w||(w={}));var z;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.addr!=null&&e.addr.byteLength>0&&(r.uint32(10),r.bytes(e.addr)),e.proto!=null)for(let o of e.proto)r.uint32(18),r.string(o);t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={addr:new Uint8Array(0),proto:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.addr=e.bytes();break;case 2:t.proto.push(e.string());break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(z||(z={}));var H;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{t.lengthDelimited!==!1&&r.fork(),e.msg!=null&&e.msg!==""&&(r.uint32(10),r.string(e.msg)),t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={msg:""},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.msg=e.string();break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(H||(H={}));var W;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{t.lengthDelimited!==!1&&r.fork(),e.peer!=null&&e.peer.byteLength>0&&(r.uint32(10),r.bytes(e.peer)),e.addr!=null&&e.addr.byteLength>0&&(r.uint32(18),r.bytes(e.addr)),e.proto!=null&&e.proto!==""&&(r.uint32(26),r.string(e.proto)),t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={peer:new Uint8Array(0),addr:new Uint8Array(0),proto:""},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.peer=e.bytes();break;case 2:t.addr=e.bytes();break;case 3:t.proto=e.string();break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(W||(W={}));var K;(function(i){let n;(function(t){t.FIND_PEER="FIND_PEER",t.FIND_PEERS_CONNECTED_TO_PEER="FIND_PEERS_CONNECTED_TO_PEER",t.FIND_PROVIDERS="FIND_PROVIDERS",t.GET_CLOSEST_PEERS="GET_CLOSEST_PEERS",t.GET_PUBLIC_KEY="GET_PUBLIC_KEY",t.GET_VALUE="GET_VALUE",t.SEARCH_VALUE="SEARCH_VALUE",t.PUT_VALUE="PUT_VALUE",t.PROVIDE="PROVIDE"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.FIND_PEER=0]="FIND_PEER",t[t.FIND_PEERS_CONNECTED_TO_PEER=1]="FIND_PEERS_CONNECTED_TO_PEER",t[t.FIND_PROVIDERS=2]="FIND_PROVIDERS",t[t.GET_CLOSEST_PEERS=3]="GET_CLOSEST_PEERS",t[t.GET_PUBLIC_KEY=4]="GET_PUBLIC_KEY",t[t.GET_VALUE=5]="GET_VALUE",t[t.SEARCH_VALUE=6]="SEARCH_VALUE",t[t.PUT_VALUE=7]="PUT_VALUE",t[t.PROVIDE=8]="PROVIDE"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.peer!=null&&(o.uint32(18),o.bytes(t.peer)),t.cid!=null&&(o.uint32(26),o.bytes(t.cid)),t.key!=null&&(o.uint32(34),o.bytes(t.key)),t.value!=null&&(o.uint32(42),o.bytes(t.value)),t.count!=null&&(o.uint32(48),o.int32(t.count)),t.timeout!=null&&(o.uint32(56),o.int64(t.timeout)),c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.peer=t.bytes();break;case 3:c.cid=t.bytes();break;case 4:c.key=t.bytes();break;case 5:c.value=t.bytes();break;case 6:c.count=t.int32();break;case 7:c.timeout=t.int64();break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})(K||(K={}));var Z;(function(i){let n;(function(t){t.BEGIN="BEGIN",t.VALUE="VALUE",t.END="END"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.BEGIN=0]="BEGIN",t[t.VALUE=1]="VALUE",t[t.END=2]="END"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.peer!=null&&(o.uint32(18),S.codec().encode(t.peer,o)),t.value!=null&&(o.uint32(26),o.bytes(t.value)),c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.peer=S.codec().decode(t,t.uint32());break;case 3:c.value=t.bytes();break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})(Z||(Z={}));var S;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.id!=null&&e.id.byteLength>0&&(r.uint32(10),r.bytes(e.id)),e.addrs!=null)for(let o of e.addrs)r.uint32(18),r.bytes(o);t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={id:new Uint8Array(0),addrs:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.id=e.bytes();break;case 2:t.addrs.push(e.bytes());break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(S||(S={}));var $;(function(i){let n;(function(t){t.TAG_PEER="TAG_PEER",t.UNTAG_PEER="UNTAG_PEER",t.TRIM="TRIM"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.TAG_PEER=0]="TAG_PEER",t[t.UNTAG_PEER=1]="UNTAG_PEER",t[t.TRIM=2]="TRIM"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.peer!=null&&(o.uint32(18),o.bytes(t.peer)),t.tag!=null&&(o.uint32(26),o.string(t.tag)),t.weight!=null&&(o.uint32(32),o.int64(t.weight)),c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.peer=t.bytes();break;case 3:c.tag=t.string();break;case 4:c.weight=t.int64();break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})($||($={}));var J;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{t.lengthDelimited!==!1&&r.fork(),e.peer!=null&&e.peer.byteLength>0&&(r.uint32(10),r.bytes(e.peer)),t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={peer:new Uint8Array(0)},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.peer=e.bytes();break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(J||(J={}));var X;(function(i){let n;(function(t){t.GET_TOPICS="GET_TOPICS",t.LIST_PEERS="LIST_PEERS",t.PUBLISH="PUBLISH",t.SUBSCRIBE="SUBSCRIBE"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.GET_TOPICS=0]="GET_TOPICS",t[t.LIST_PEERS=1]="LIST_PEERS",t[t.PUBLISH=2]="PUBLISH",t[t.SUBSCRIBE=3]="SUBSCRIBE"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.topic!=null&&(o.uint32(18),o.string(t.topic)),t.data!=null&&(o.uint32(26),o.bytes(t.data)),c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.topic=t.string();break;case 3:c.data=t.bytes();break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})(X||(X={}));var bt;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.from!=null&&(r.uint32(10),r.bytes(e.from)),e.data!=null&&(r.uint32(18),r.bytes(e.data)),e.seqno!=null&&(r.uint32(26),r.bytes(e.seqno)),e.topicIDs!=null)for(let o of e.topicIDs)r.uint32(34),r.string(o);e.signature!=null&&(r.uint32(42),r.bytes(e.signature)),e.key!=null&&(r.uint32(50),r.bytes(e.key)),t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={topicIDs:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.from=e.bytes();break;case 2:t.data=e.bytes();break;case 3:t.seqno=e.bytes();break;case 4:t.topicIDs.push(e.string());break;case 5:t.signature=e.bytes();break;case 6:t.key=e.bytes();break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(bt||(bt={}));var Q;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.topics!=null)for(let o of e.topics)r.uint32(10),r.string(o);if(e.peerIDs!=null)for(let o of e.peerIDs)r.uint32(18),r.bytes(o);t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={topics:[],peerIDs:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.topics.push(e.string());break;case 2:t.peerIDs.push(e.bytes());break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(Q||(Q={}));var Y;(function(i){let n;(function(t){t.UNSPECIFIED="UNSPECIFIED",t.GET_PROTOCOLS="GET_PROTOCOLS",t.GET_PEER_INFO="GET_PEER_INFO"})(n=i.Type||(i.Type={}));let e;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.GET_PROTOCOLS=1]="GET_PROTOCOLS",t[t.GET_PEER_INFO=2]="GET_PEER_INFO"})(e||(e={})),function(t){t.codec=()=>I(e)}(n=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=y((t,o,c={})=>{if(c.lengthDelimited!==!1&&o.fork(),t.type!=null&&(o.uint32(8),i.Type.codec().encode(t.type,o)),t.id!=null&&(o.uint32(18),o.bytes(t.id)),t.protos!=null)for(let s of t.protos)o.uint32(26),o.string(s);c.lengthDelimited!==!1&&o.ldelim()},(t,o)=>{let c={protos:[]},s=o==null?t.len:t.pos+o;for(;t.pos<s;){let u=t.uint32();switch(u>>>3){case 1:c.type=i.Type.codec().decode(t);break;case 2:c.id=t.bytes();break;case 3:c.protos.push(t.string());break;default:t.skipType(u&7);break}}return c})),r),i.encode=t=>E(t,i.codec()),i.decode=t=>p(t,i.codec())})(Y||(Y={}));var V;(function(i){let n;i.codec=()=>(n==null&&(n=y((e,r,t={})=>{if(t.lengthDelimited!==!1&&r.fork(),e.peer!=null&&(r.uint32(10),S.codec().encode(e.peer,r)),e.protos!=null)for(let o of e.protos)r.uint32(18),r.string(o);t.lengthDelimited!==!1&&r.ldelim()},(e,r)=>{let t={protos:[]},o=r==null?e.len:e.pos+r;for(;e.pos<o;){let c=e.uint32();switch(c>>>3){case 1:t.peer=S.codec().decode(e,e.uint32());break;case 2:t.protos.push(e.string());break;default:e.skipType(c&7);break}}return t})),n),i.encode=e=>E(e,i.codec()),i.decode=e=>p(e,i.codec())})(V||(V={}));return _e(ve);})();
2
+ "use strict";var Libp2PDaemonProtocol=(()=>{var It=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Me=Object.prototype.hasOwnProperty;var b=(i,e)=>{for(var t in e)It(i,t,{get:e[t],enumerable:!0})},ze=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ge(e))!Me.call(i,n)&&n!==t&&It(i,n,{get:()=>e[n],enumerable:!(r=Pe(e,n))||r.enumerable});return i};var Re=i=>ze(It({},"__esModule",{value:!0}),i);var ri={};b(ri,{ConnManagerRequest:()=>lt,ConnectRequest:()=>et,DHTRequest:()=>st,DHTResponse:()=>ct,DisconnectRequest:()=>ht,ErrorResponse:()=>rt,IdentifyResponse:()=>tt,PSMessage:()=>ie,PSRequest:()=>at,PSResponse:()=>ut,PeerInfo:()=>B,PeerstoreRequest:()=>ft,PeerstoreResponse:()=>dt,Request:()=>ee,Response:()=>ne,StreamHandlerRequest:()=>it,StreamInfo:()=>ot,StreamOpenRequest:()=>nt});var kt=new Float32Array([-0]),w=new Uint8Array(kt.buffer);function re(i,e,t){kt[0]=i,e[t]=w[0],e[t+1]=w[1],e[t+2]=w[2],e[t+3]=w[3]}function oe(i,e){return w[0]=i[e],w[1]=i[e+1],w[2]=i[e+2],w[3]=i[e+3],kt[0]}var Nt=new Float64Array([-0]),p=new Uint8Array(Nt.buffer);function se(i,e,t){Nt[0]=i,e[t]=p[0],e[t+1]=p[1],e[t+2]=p[2],e[t+3]=p[3],e[t+4]=p[4],e[t+5]=p[5],e[t+6]=p[6],e[t+7]=p[7]}function ce(i,e){return p[0]=i[e],p[1]=i[e+1],p[2]=i[e+2],p[3]=i[e+3],p[4]=i[e+4],p[5]=i[e+5],p[6]=i[e+6],p[7]=i[e+7],Nt[0]}var $e=BigInt(Number.MAX_SAFE_INTEGER),_e=BigInt(Number.MIN_SAFE_INTEGER),g=class i{lo;hi;constructor(e,t){this.lo=e|0,this.hi=t|0}toNumber(e=!1){if(!e&&this.hi>>>31>0){let t=~this.lo+1>>>0,r=~this.hi>>>0;return t===0&&(r=r+1>>>0),-(t+r*4294967296)}return this.lo+this.hi*4294967296}toBigInt(e=!1){if(e)return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n);if(this.hi>>>31){let t=~this.lo+1>>>0,r=~this.hi>>>0;return t===0&&(r=r+1>>>0),-(BigInt(t)+(BigInt(r)<<32n))}return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n)}toString(e=!1){return this.toBigInt(e).toString()}zzEncode(){let e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this}zzDecode(){let e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this}length(){let e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}static fromBigInt(e){if(e===0n)return F;if(e<$e&&e>_e)return this.fromNumber(Number(e));let t=e<0n;t&&(e=-e);let r=e>>32n,n=e-(r<<32n);return t&&(r=~r|0n,n=~n|0n,++n>le&&(n=0n,++r>le&&(r=0n))),new i(Number(n),Number(r))}static fromNumber(e){if(e===0)return F;let t=e<0;t&&(e=-e);let r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)}static from(e){return typeof e=="number"?i.fromNumber(e):typeof e=="bigint"?i.fromBigInt(e):typeof e=="string"?i.fromBigInt(BigInt(e)):e.low!=null||e.high!=null?new i(e.low>>>0,e.high>>>0):F}},F=new g(0,0);F.toBigInt=function(){return 0n};F.zzEncode=F.zzDecode=function(){return this};F.length=function(){return 1};var le=4294967296n;function he(i){let e=0,t=0;for(let r=0;r<i.length;++r)t=i.charCodeAt(r),t<128?e+=1:t<2048?e+=2:(t&64512)===55296&&(i.charCodeAt(r+1)&64512)===56320?(++r,e+=4):e+=3;return e}function ae(i,e,t){if(t-e<1)return"";let n,o=[],s=0,c;for(;e<t;)c=i[e++],c<128?o[s++]=c:c>191&&c<224?o[s++]=(c&31)<<6|i[e++]&63:c>239&&c<365?(c=((c&7)<<18|(i[e++]&63)<<12|(i[e++]&63)<<6|i[e++]&63)-65536,o[s++]=55296+(c>>10),o[s++]=56320+(c&1023)):o[s++]=(c&15)<<12|(i[e++]&63)<<6|i[e++]&63,s>8191&&((n??(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n!=null?(s>0&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))}function St(i,e,t){let r=t,n,o;for(let s=0;s<i.length;++s)n=i.charCodeAt(s),n<128?e[t++]=n:n<2048?(e[t++]=n>>6|192,e[t++]=n&63|128):(n&64512)===55296&&((o=i.charCodeAt(s+1))&64512)===56320?(n=65536+((n&1023)<<10)+(o&1023),++s,e[t++]=n>>18|240,e[t++]=n>>12&63|128,e[t++]=n>>6&63|128,e[t++]=n&63|128):(e[t++]=n>>12|224,e[t++]=n>>6&63|128,e[t++]=n&63|128);return t-r}function k(i,e){return RangeError(`index out of range: ${i.pos} + ${e??1} > ${i.len}`)}function gt(i,e){return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0}var At=class{buf;pos;len;_slice=Uint8Array.prototype.subarray;constructor(e){this.buf=e,this.pos=0,this.len=e.length}uint32(){let e=4294967295;if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,k(this,10);return e}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)|0}bool(){return this.uint32()!==0}fixed32(){if(this.pos+4>this.len)throw k(this,4);return gt(this.buf,this.pos+=4)}sfixed32(){if(this.pos+4>this.len)throw k(this,4);return gt(this.buf,this.pos+=4)|0}float(){if(this.pos+4>this.len)throw k(this,4);let e=oe(this.buf,this.pos);return this.pos+=4,e}double(){if(this.pos+8>this.len)throw k(this,4);let e=ce(this.buf,this.pos);return this.pos+=8,e}bytes(){let e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw k(this,e);return this.pos+=e,t===r?new Uint8Array(0):this.buf.subarray(t,r)}string(){let e=this.bytes();return ae(e,0,e.length)}skip(e){if(typeof e=="number"){if(this.pos+e>this.len)throw k(this,e);this.pos+=e}else do if(this.pos>=this.len)throw k(this);while(this.buf[this.pos++]&128);return this}skipType(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error(`invalid wire type ${e} at offset ${this.pos}`)}return this}readLongVarint(){let e=new g(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw k(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw k(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}readFixed64(){if(this.pos+8>this.len)throw k(this,8);let e=gt(this.buf,this.pos+=4),t=gt(this.buf,this.pos+=4);return new g(e,t)}int64(){return this.readLongVarint().toBigInt()}int64Number(){return this.readLongVarint().toNumber()}int64String(){return this.readLongVarint().toString()}uint64(){return this.readLongVarint().toBigInt(!0)}uint64Number(){return this.readLongVarint().toNumber(!0)}uint64String(){return this.readLongVarint().toString(!0)}sint64(){return this.readLongVarint().zzDecode().toBigInt()}sint64Number(){return this.readLongVarint().zzDecode().toNumber()}sint64String(){return this.readLongVarint().zzDecode().toString()}fixed64(){return this.readFixed64().toBigInt()}fixed64Number(){return this.readFixed64().toNumber()}fixed64String(){return this.readFixed64().toString()}sfixed64(){return this.readFixed64().toBigInt()}sfixed64Number(){return this.readFixed64().toNumber()}sfixed64String(){return this.readFixed64().toString()}};function Dt(i){return new At(i instanceof Uint8Array?i:i.subarray())}function u(i,e){let t=Dt(i);return e.decode(t)}function bt(i){return globalThis.Buffer!=null?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):i}function P(i=0){return globalThis.Buffer?.allocUnsafe!=null?bt(globalThis.Buffer.allocUnsafe(i)):new Uint8Array(i)}var Lt={};b(Lt,{base10:()=>Qe});function Ke(i,e){if(i.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<i.length;n++){var o=i.charAt(n),s=o.charCodeAt(0);if(t[s]!==255)throw new TypeError(o+" is ambiguous");t[s]=n}var c=i.length,l=i.charAt(0),z=Math.log(c)/Math.log(256),E=Math.log(256)/Math.log(c);function R(h){if(h instanceof Uint8Array||(ArrayBuffer.isView(h)?h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength):Array.isArray(h)&&(h=Uint8Array.from(h))),!(h instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(h.length===0)return"";for(var m=0,O=0,y=0,N=h.length;y!==N&&h[y]===0;)y++,m++;for(var S=(N-y)*E+1>>>0,x=new Uint8Array(S);y!==N;){for(var A=h[y],L=0,I=S-1;(A!==0||L<O)&&I!==-1;I--,L++)A+=256*x[I]>>>0,x[I]=A%c>>>0,A=A/c>>>0;if(A!==0)throw new Error("Non-zero carry");O=L,y++}for(var U=S-O;U!==S&&x[U]===0;)U++;for(var mt=l.repeat(m);U<S;++U)mt+=i.charAt(x[U]);return mt}function pt(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return new Uint8Array;var m=0;if(h[m]!==" "){for(var O=0,y=0;h[m]===l;)O++,m++;for(var N=(h.length-m)*z+1>>>0,S=new Uint8Array(N);h[m];){var x=t[h.charCodeAt(m)];if(x===255)return;for(var A=0,L=N-1;(x!==0||A<y)&&L!==-1;L--,A++)x+=c*S[L]>>>0,S[L]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");y=A,m++}if(h[m]!==" "){for(var I=N-y;I!==N&&S[I]===0;)I++;for(var U=new Uint8Array(O+(N-I)),mt=O;I!==N;)U[mt++]=S[I++];return U}}}function Fe(h){var m=pt(h);if(m)return m;throw new Error(`Non-${e} character`)}return{encode:R,decodeUnsafe:pt,decode:Fe}}var Je=Ke,Xe=Je,fe=Xe;var bi=new Uint8Array(0);var de=(i,e)=>{if(i===e)return!0;if(i.byteLength!==e.byteLength)return!1;for(let t=0;t<i.byteLength;t++)if(i[t]!==e[t])return!1;return!0},T=i=>{if(i instanceof Uint8Array&&i.constructor.name==="Uint8Array")return i;if(i instanceof ArrayBuffer)return new Uint8Array(i);if(ArrayBuffer.isView(i))return new Uint8Array(i.buffer,i.byteOffset,i.byteLength);throw new Error("Unknown type, must be binary type")};var pe=i=>new TextEncoder().encode(i),me=i=>new TextDecoder().decode(i);var Ut=class{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Tt=class{constructor(e,t,r){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return be(this,e)}},Ct=class{constructor(e){this.decoders=e}or(e){return be(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},be=(i,e)=>new Ct({...i.decoders||{[i.prefix]:i},...e.decoders||{[e.prefix]:e}}),Bt=class{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new Ut(e,t,r),this.decoder=new Tt(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},$=({name:i,prefix:e,encode:t,decode:r})=>new Bt(i,e,t,r),v=({prefix:i,name:e,alphabet:t})=>{let{encode:r,decode:n}=fe(t,e);return $({prefix:i,name:e,encode:r,decode:o=>T(n(o))})},We=(i,e,t,r)=>{let n={};for(let E=0;E<e.length;++E)n[e[E]]=E;let o=i.length;for(;i[o-1]==="=";)--o;let s=new Uint8Array(o*t/8|0),c=0,l=0,z=0;for(let E=0;E<o;++E){let R=n[i[E]];if(R===void 0)throw new SyntaxError(`Non-${r} character`);l=l<<t|R,c+=t,c>=8&&(c-=8,s[z++]=255&l>>c)}if(c>=t||255&l<<8-c)throw new SyntaxError("Unexpected end of data");return s},Ve=(i,e,t)=>{let r=e[e.length-1]==="=",n=(1<<t)-1,o="",s=0,c=0;for(let l=0;l<i.length;++l)for(c=c<<8|i[l],s+=8;s>t;)s-=t,o+=e[n&c>>s];if(s&&(o+=e[n&c<<t-s]),r)for(;o.length*t&7;)o+="=";return o},a=({name:i,prefix:e,bitsPerChar:t,alphabet:r})=>$({prefix:e,name:i,encode(n){return Ve(n,r,t)},decode(n){return We(n,r,t,i)}});var Qe=v({prefix:"9",name:"base10",alphabet:"0123456789"});var wt={};b(wt,{base16:()=>He,base16upper:()=>Ze});var He=a({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ze=a({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var vt={};b(vt,{base2:()=>Ye});var Ye=a({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Ot={};b(Ot,{base256emoji:()=>nn});var Ee=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),qe=Ee.reduce((i,e,t)=>(i[t]=e,i),[]),je=Ee.reduce((i,e,t)=>(i[e.codePointAt(0)]=t,i),[]);function tn(i){return i.reduce((e,t)=>(e+=qe[t],e),"")}function en(i){let e=[];for(let t of i){let r=je[t.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(r)}return new Uint8Array(e)}var nn=$({prefix:"\u{1F680}",name:"base256emoji",encode:tn,decode:en});var Ft={};b(Ft,{base32:()=>_,base32hex:()=>cn,base32hexpad:()=>hn,base32hexpadupper:()=>an,base32hexupper:()=>ln,base32pad:()=>on,base32padupper:()=>sn,base32upper:()=>rn,base32z:()=>un});var _=a({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),rn=a({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),on=a({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),sn=a({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),cn=a({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),ln=a({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),hn=a({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),an=a({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),un=a({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Pt={};b(Pt,{base36:()=>fn,base36upper:()=>dn});var fn=v({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),dn=v({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Gt={};b(Gt,{base58btc:()=>D,base58flickr:()=>pn});var D=v({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),pn=v({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Mt={};b(Mt,{base64:()=>mn,base64pad:()=>gn,base64url:()=>bn,base64urlpad:()=>En});var mn=a({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),gn=a({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),bn=a({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),En=a({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var zt={};b(zt,{base8:()=>xn});var xn=a({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Rt={};b(Rt,{identity:()=>yn});var yn=$({prefix:"\0",name:"identity",encode:i=>me(i),decode:i=>pe(i)});var wi=new TextEncoder,vi=new TextDecoder;var _t={};b(_t,{identity:()=>Kn});var Nn=Ie,xe=128,Sn=127,An=~Sn,Dn=Math.pow(2,31);function Ie(i,e,t){e=e||[],t=t||0;for(var r=t;i>=Dn;)e[t++]=i&255|xe,i/=128;for(;i&An;)e[t++]=i&255|xe,i>>>=7;return e[t]=i|0,Ie.bytes=t-r+1,e}var Un=$t,Tn=128,ye=127;function $t(i,r){var t=0,r=r||0,n=0,o=r,s,c=i.length;do{if(o>=c)throw $t.bytes=0,new RangeError("Could not decode varint");s=i[o++],t+=n<28?(s&ye)<<n:(s&ye)*Math.pow(2,n),n+=7}while(s>=Tn);return $t.bytes=o-r,t}var Cn=Math.pow(2,7),Bn=Math.pow(2,14),Ln=Math.pow(2,21),wn=Math.pow(2,28),vn=Math.pow(2,35),On=Math.pow(2,42),Fn=Math.pow(2,49),Pn=Math.pow(2,56),Gn=Math.pow(2,63),Mn=function(i){return i<Cn?1:i<Bn?2:i<Ln?3:i<wn?4:i<vn?5:i<On?6:i<Fn?7:i<Pn?8:i<Gn?9:10},zn={encode:Nn,decode:Un,encodingLength:Mn},Rn=zn,V=Rn;var Q=(i,e=0)=>[V.decode(i,e),V.decode.bytes],K=(i,e,t=0)=>(V.encode(i,e,t),e),J=i=>V.encodingLength(i);var G=(i,e)=>{let t=e.byteLength,r=J(i),n=r+J(t),o=new Uint8Array(n+t);return K(i,o,0),K(t,o,r),o.set(e,n),new X(i,t,e,o)},ke=i=>{let e=T(i),[t,r]=Q(e),[n,o]=Q(e.subarray(r)),s=e.subarray(r+o);if(s.byteLength!==n)throw new Error("Incorrect length");return new X(t,n,s,e)},Ne=(i,e)=>{if(i===e)return!0;{let t=e;return i.code===t.code&&i.size===t.size&&t.bytes instanceof Uint8Array&&de(i.bytes,t.bytes)}},X=class{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}};var Se=0,$n="identity",Ae=T,_n=i=>G(Se,Ae(i)),Kn={code:Se,name:$n,encode:Ae,digest:_n};var Xt={};b(Xt,{sha256:()=>Jn,sha512:()=>Xn});var Jt=({name:i,code:e,encode:t})=>new Kt(i,e,t),Kt=class{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?G(this.code,t):t.then(r=>G(this.code,r))}else throw Error("Unknown type, must be binary type")}};var Ue=i=>async e=>new Uint8Array(await crypto.subtle.digest(i,e)),Jn=Jt({name:"sha2-256",code:18,encode:Ue("SHA-256")}),Xn=Jt({name:"sha2-512",code:19,encode:Ue("SHA-512")});var Te=(i,e)=>{let{bytes:t,version:r}=i;switch(r){case 0:return Vn(t,Wt(i),e||D.encoder);default:return Qn(t,Wt(i),e||_.encoder)}};var Ce=new WeakMap,Wt=i=>{let e=Ce.get(i);if(e==null){let t=new Map;return Ce.set(i,t),t}return e},xt=class i{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this["/"]=n}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==Z)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==Hn)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return i.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,r=G(e,t);return i.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return i.equals(this,e)}static equals(e,t){let r=t;return r&&e.code===r.code&&e.version===r.version&&Ne(e.multihash,r.multihash)}toString(e){return Te(this,e)}toJSON(){return{"/":Te(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof i)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:r,code:n,multihash:o,bytes:s}=t;return new i(r,n,o,s||Be(r,n,o.bytes))}else if(t[Zn]===!0){let{version:r,multihash:n,code:o}=t,s=ke(n);return i.create(r,o,s)}else return null}static create(e,t,r){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==Z)throw new Error(`Version 0 CID must use dag-pb (code: ${Z}) block encoding`);return new i(e,t,r,r.bytes)}case 1:{let n=Be(e,t,r.bytes);return new i(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return i.create(0,Z,e)}static createV1(e,t){return i.create(1,e,t)}static decode(e){let[t,r]=i.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=i.inspectBytes(e),r=t.size-t.multihashSize,n=T(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");let o=n.subarray(t.multihashSize-t.digestSize),s=new X(t.multihashCode,t.digestSize,o,n);return[t.version===0?i.createV0(s):i.createV1(t.codec,s),e.subarray(t.size)]}static inspectBytes(e){let t=0,r=()=>{let[R,pt]=Q(e.subarray(t));return t+=pt,R},n=r(),o=Z;if(n===18?(n=0,t=0):o=r(),n!==0&&n!==1)throw new RangeError(`Invalid CID version ${n}`);let s=t,c=r(),l=r(),z=t+l,E=z-s;return{version:n,codec:o,multihashCode:c,digestSize:l,multihashSize:E,size:z}}static parse(e,t){let[r,n]=Wn(e,t),o=i.decode(n);if(o.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Wt(o).set(r,e),o}},Wn=(i,e)=>{switch(i[0]){case"Q":{let t=e||D;return[D.prefix,t.decode(`${D.prefix}${i}`)]}case D.prefix:{let t=e||D;return[D.prefix,t.decode(i)]}case _.prefix:{let t=e||_;return[_.prefix,t.decode(i)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[i[0],e.decode(i)]}}},Vn=(i,e,t)=>{let{prefix:r}=t;if(r!==D.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let n=e.get(r);if(n==null){let o=t.encode(i).slice(1);return e.set(r,o),o}else return n},Qn=(i,e,t)=>{let{prefix:r}=t,n=e.get(r);if(n==null){let o=t.encode(i);return e.set(r,o),o}else return n},Z=112,Hn=18,Be=(i,e,t)=>{let r=J(i),n=r+J(e),o=new Uint8Array(n+t.byteLength);return K(i,o,0),K(e,o,r),o.set(t,n),o},Zn=Symbol.for("@ipld/js-cid/CID");var Vt={...Rt,...vt,...zt,...Lt,...wt,...Ft,...Pt,...Gt,...Mt,...Ot},Hi={...Xt,..._t};function we(i,e,t,r){return{name:i,prefix:e,encoder:{name:i,prefix:e,encode:t},decoder:{decode:r}}}var Le=we("utf8","u",i=>"u"+new TextDecoder("utf8").decode(i),i=>new TextEncoder().encode(i.substring(1))),Qt=we("ascii","a",i=>{let e="a";for(let t=0;t<i.length;t++)e+=String.fromCharCode(i[t]);return e},i=>{i=i.substring(1);let e=P(i.length);for(let t=0;t<i.length;t++)e[t]=i.charCodeAt(t);return e}),Yn={utf8:Le,"utf-8":Le,hex:Vt.base16,latin1:Qt,ascii:Qt,binary:Qt,...Vt},ve=Yn;function Oe(i,e="utf8"){let t=ve[e];if(t==null)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?bt(globalThis.Buffer.from(i,"utf-8")):t.decoder.decode(`${t.prefix}${i}`)}function Ht(i){let e=i??8192,t=e>>>1,r,n=e;return function(s){if(s<1||s>t)return P(s);n+s>e&&(r=P(e),n=0);let c=r.subarray(n,n+=s);return n&7&&(n=(n|7)+1),c}}var M=class{fn;len;next;val;constructor(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}};function Zt(){}var qt=class{head;tail;len;next;constructor(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}},qn=Ht();function jn(i){return globalThis.Buffer!=null?P(i):qn(i)}var j=class{len;head;tail;states;constructor(){this.len=0,this.head=new M(Zt,0,0),this.tail=this.head,this.states=null}_push(e,t,r){return this.tail=this.tail.next=new M(e,t,r),this.len+=t,this}uint32(e){return this.len+=(this.tail=this.tail.next=new jt((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this}int32(e){return e<0?this._push(Y,10,g.fromNumber(e)):this.uint32(e)}sint32(e){return this.uint32((e<<1^e>>31)>>>0)}uint64(e){let t=g.fromBigInt(e);return this._push(Y,t.length(),t)}uint64Number(e){let t=g.fromNumber(e);return this._push(Y,t.length(),t)}uint64String(e){return this.uint64(BigInt(e))}int64(e){return this.uint64(e)}int64Number(e){return this.uint64Number(e)}int64String(e){return this.uint64String(e)}sint64(e){let t=g.fromBigInt(e).zzEncode();return this._push(Y,t.length(),t)}sint64Number(e){let t=g.fromNumber(e).zzEncode();return this._push(Y,t.length(),t)}sint64String(e){return this.sint64(BigInt(e))}bool(e){return this._push(Yt,1,e?1:0)}fixed32(e){return this._push(q,4,e>>>0)}sfixed32(e){return this.fixed32(e)}fixed64(e){let t=g.fromBigInt(e);return this._push(q,4,t.lo)._push(q,4,t.hi)}fixed64Number(e){let t=g.fromNumber(e);return this._push(q,4,t.lo)._push(q,4,t.hi)}fixed64String(e){return this.fixed64(BigInt(e))}sfixed64(e){return this.fixed64(e)}sfixed64Number(e){return this.fixed64Number(e)}sfixed64String(e){return this.fixed64String(e)}float(e){return this._push(re,4,e)}double(e){return this._push(se,8,e)}bytes(e){let t=e.length>>>0;return t===0?this._push(Yt,1,0):this.uint32(t)._push(ei,t,e)}string(e){let t=he(e);return t!==0?this.uint32(t)._push(St,t,e):this._push(Yt,1,0)}fork(){return this.states=new qt(this),this.head=this.tail=new M(Zt,0,0),this.len=0,this}reset(){return this.states!=null?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new M(Zt,0,0),this.len=0),this}ldelim(){let e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r!==0&&(this.tail.next=e.next,this.tail=t,this.len+=r),this}finish(){let e=this.head.next,t=jn(this.len),r=0;for(;e!=null;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}};function Yt(i,e,t){e[t]=i&255}function ti(i,e,t){for(;i>127;)e[t++]=i&127|128,i>>>=7;e[t]=i}var jt=class extends M{next;constructor(e,t){super(ti,e,t),this.next=void 0}};function Y(i,e,t){for(;i.hi!==0;)e[t++]=i.lo&127|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;for(;i.lo>127;)e[t++]=i.lo&127|128,i.lo=i.lo>>>7;e[t++]=i.lo}function q(i,e,t){e[t]=i&255,e[t+1]=i>>>8&255,e[t+2]=i>>>16&255,e[t+3]=i>>>24}function ei(i,e,t){e.set(i,t)}globalThis.Buffer!=null&&(j.prototype.bytes=function(i){let e=i.length>>>0;return this.uint32(e),e>0&&this._push(ni,e,i),this},j.prototype.string=function(i){let e=globalThis.Buffer.byteLength(i);return this.uint32(e),e>0&&this._push(ii,e,i),this});function ni(i,e,t){e.set(i,t)}function ii(i,e,t){i.length<40?St(i,e,t):e.utf8Write!=null?e.utf8Write(i,t):e.set(Oe(i),t)}function te(){return new j}function f(i,e){let t=te();return e.encode(i,t,{lengthDelimited:!1}),t.finish()}var W;(function(i){i[i.VARINT=0]="VARINT",i[i.BIT64=1]="BIT64",i[i.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",i[i.START_GROUP=3]="START_GROUP",i[i.END_GROUP=4]="END_GROUP",i[i.BIT32=5]="BIT32"})(W||(W={}));function yt(i,e,t,r){return{name:i,type:e,encode:t,decode:r}}function C(i){function e(n){if(i[n.toString()]==null)throw new Error("Invalid enum value");return i[n]}let t=function(o,s){let c=e(o);s.int32(c)},r=function(o){let s=o.int32();return e(s)};return yt("enum",W.VARINT,t,r)}function d(i,e){return yt("message",W.LENGTH_DELIMITED,i,e)}var ee;(function(i){let e;(function(n){n.IDENTIFY="IDENTIFY",n.CONNECT="CONNECT",n.STREAM_OPEN="STREAM_OPEN",n.STREAM_HANDLER="STREAM_HANDLER",n.DHT="DHT",n.LIST_PEERS="LIST_PEERS",n.CONNMANAGER="CONNMANAGER",n.DISCONNECT="DISCONNECT",n.PUBSUB="PUBSUB",n.PEERSTORE="PEERSTORE"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.IDENTIFY=0]="IDENTIFY",n[n.CONNECT=1]="CONNECT",n[n.STREAM_OPEN=2]="STREAM_OPEN",n[n.STREAM_HANDLER=3]="STREAM_HANDLER",n[n.DHT=4]="DHT",n[n.LIST_PEERS=5]="LIST_PEERS",n[n.CONNMANAGER=6]="CONNMANAGER",n[n.DISCONNECT=7]="DISCONNECT",n[n.PUBSUB=8]="PUBSUB",n[n.PEERSTORE=9]="PEERSTORE"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.connect!=null&&(o.uint32(18),et.codec().encode(n.connect,o)),n.streamOpen!=null&&(o.uint32(26),nt.codec().encode(n.streamOpen,o)),n.streamHandler!=null&&(o.uint32(34),it.codec().encode(n.streamHandler,o)),n.dht!=null&&(o.uint32(42),st.codec().encode(n.dht,o)),n.connManager!=null&&(o.uint32(50),lt.codec().encode(n.connManager,o)),n.disconnect!=null&&(o.uint32(58),ht.codec().encode(n.disconnect,o)),n.pubsub!=null&&(o.uint32(66),at.codec().encode(n.pubsub,o)),n.peerStore!=null&&(o.uint32(74),ft.codec().encode(n.peerStore,o)),s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.connect=et.codec().decode(n,n.uint32());break;case 3:s.streamOpen=nt.codec().decode(n,n.uint32());break;case 4:s.streamHandler=it.codec().decode(n,n.uint32());break;case 5:s.dht=st.codec().decode(n,n.uint32());break;case 6:s.connManager=lt.codec().decode(n,n.uint32());break;case 7:s.disconnect=ht.codec().decode(n,n.uint32());break;case 8:s.pubsub=at.codec().decode(n,n.uint32());break;case 9:s.peerStore=ft.codec().decode(n,n.uint32());break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(ee||(ee={}));var ne;(function(i){let e;(function(n){n.OK="OK",n.ERROR="ERROR"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.OK=0]="OK",n[n.ERROR=1]="ERROR"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{if(s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.error!=null&&(o.uint32(18),rt.codec().encode(n.error,o)),n.streamInfo!=null&&(o.uint32(26),ot.codec().encode(n.streamInfo,o)),n.identify!=null&&(o.uint32(34),tt.codec().encode(n.identify,o)),n.dht!=null&&(o.uint32(42),ct.codec().encode(n.dht,o)),n.peers!=null)for(let c of n.peers)o.uint32(50),B.codec().encode(c,o);n.pubsub!=null&&(o.uint32(58),ut.codec().encode(n.pubsub,o)),n.peerStore!=null&&(o.uint32(66),dt.codec().encode(n.peerStore,o)),s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={peers:[]},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.error=rt.codec().decode(n,n.uint32());break;case 3:s.streamInfo=ot.codec().decode(n,n.uint32());break;case 4:s.identify=tt.codec().decode(n,n.uint32());break;case 5:s.dht=ct.codec().decode(n,n.uint32());break;case 6:s.peers.push(B.codec().decode(n,n.uint32()));break;case 7:s.pubsub=ut.codec().decode(n,n.uint32());break;case 8:s.peerStore=dt.codec().decode(n,n.uint32());break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(ne||(ne={}));var tt;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.id!=null&&t.id.byteLength>0&&(r.uint32(10),r.bytes(t.id)),t.addrs!=null)for(let o of t.addrs)r.uint32(18),r.bytes(o);n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={id:new Uint8Array(0),addrs:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.id=t.bytes();break;case 2:n.addrs.push(t.bytes());break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(tt||(tt={}));var et;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.peer!=null&&t.peer.byteLength>0&&(r.uint32(10),r.bytes(t.peer)),t.addrs!=null)for(let o of t.addrs)r.uint32(18),r.bytes(o);t.timeout!=null&&(r.uint32(24),r.int64(t.timeout)),n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={peer:new Uint8Array(0),addrs:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.peer=t.bytes();break;case 2:n.addrs.push(t.bytes());break;case 3:n.timeout=t.int64();break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(et||(et={}));var nt;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.peer!=null&&t.peer.byteLength>0&&(r.uint32(10),r.bytes(t.peer)),t.proto!=null)for(let o of t.proto)r.uint32(18),r.string(o);t.timeout!=null&&(r.uint32(24),r.int64(t.timeout)),n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={peer:new Uint8Array(0),proto:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.peer=t.bytes();break;case 2:n.proto.push(t.string());break;case 3:n.timeout=t.int64();break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(nt||(nt={}));var it;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.addr!=null&&t.addr.byteLength>0&&(r.uint32(10),r.bytes(t.addr)),t.proto!=null)for(let o of t.proto)r.uint32(18),r.string(o);n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={addr:new Uint8Array(0),proto:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.addr=t.bytes();break;case 2:n.proto.push(t.string());break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(it||(it={}));var rt;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{n.lengthDelimited!==!1&&r.fork(),t.msg!=null&&t.msg!==""&&(r.uint32(10),r.string(t.msg)),n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={msg:""},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.msg=t.string();break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(rt||(rt={}));var ot;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{n.lengthDelimited!==!1&&r.fork(),t.peer!=null&&t.peer.byteLength>0&&(r.uint32(10),r.bytes(t.peer)),t.addr!=null&&t.addr.byteLength>0&&(r.uint32(18),r.bytes(t.addr)),t.proto!=null&&t.proto!==""&&(r.uint32(26),r.string(t.proto)),n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={peer:new Uint8Array(0),addr:new Uint8Array(0),proto:""},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.peer=t.bytes();break;case 2:n.addr=t.bytes();break;case 3:n.proto=t.string();break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(ot||(ot={}));var st;(function(i){let e;(function(n){n.FIND_PEER="FIND_PEER",n.FIND_PEERS_CONNECTED_TO_PEER="FIND_PEERS_CONNECTED_TO_PEER",n.FIND_PROVIDERS="FIND_PROVIDERS",n.GET_CLOSEST_PEERS="GET_CLOSEST_PEERS",n.GET_PUBLIC_KEY="GET_PUBLIC_KEY",n.GET_VALUE="GET_VALUE",n.SEARCH_VALUE="SEARCH_VALUE",n.PUT_VALUE="PUT_VALUE",n.PROVIDE="PROVIDE"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.FIND_PEER=0]="FIND_PEER",n[n.FIND_PEERS_CONNECTED_TO_PEER=1]="FIND_PEERS_CONNECTED_TO_PEER",n[n.FIND_PROVIDERS=2]="FIND_PROVIDERS",n[n.GET_CLOSEST_PEERS=3]="GET_CLOSEST_PEERS",n[n.GET_PUBLIC_KEY=4]="GET_PUBLIC_KEY",n[n.GET_VALUE=5]="GET_VALUE",n[n.SEARCH_VALUE=6]="SEARCH_VALUE",n[n.PUT_VALUE=7]="PUT_VALUE",n[n.PROVIDE=8]="PROVIDE"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.peer!=null&&(o.uint32(18),o.bytes(n.peer)),n.cid!=null&&(o.uint32(26),o.bytes(n.cid)),n.key!=null&&(o.uint32(34),o.bytes(n.key)),n.value!=null&&(o.uint32(42),o.bytes(n.value)),n.count!=null&&(o.uint32(48),o.int32(n.count)),n.timeout!=null&&(o.uint32(56),o.int64(n.timeout)),s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.peer=n.bytes();break;case 3:s.cid=n.bytes();break;case 4:s.key=n.bytes();break;case 5:s.value=n.bytes();break;case 6:s.count=n.int32();break;case 7:s.timeout=n.int64();break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(st||(st={}));var ct;(function(i){let e;(function(n){n.BEGIN="BEGIN",n.VALUE="VALUE",n.END="END"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.BEGIN=0]="BEGIN",n[n.VALUE=1]="VALUE",n[n.END=2]="END"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.peer!=null&&(o.uint32(18),B.codec().encode(n.peer,o)),n.value!=null&&(o.uint32(26),o.bytes(n.value)),s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.peer=B.codec().decode(n,n.uint32());break;case 3:s.value=n.bytes();break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(ct||(ct={}));var B;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.id!=null&&t.id.byteLength>0&&(r.uint32(10),r.bytes(t.id)),t.addrs!=null)for(let o of t.addrs)r.uint32(18),r.bytes(o);n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={id:new Uint8Array(0),addrs:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.id=t.bytes();break;case 2:n.addrs.push(t.bytes());break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(B||(B={}));var lt;(function(i){let e;(function(n){n.TAG_PEER="TAG_PEER",n.UNTAG_PEER="UNTAG_PEER",n.TRIM="TRIM"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.TAG_PEER=0]="TAG_PEER",n[n.UNTAG_PEER=1]="UNTAG_PEER",n[n.TRIM=2]="TRIM"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.peer!=null&&(o.uint32(18),o.bytes(n.peer)),n.tag!=null&&(o.uint32(26),o.string(n.tag)),n.weight!=null&&(o.uint32(32),o.int64(n.weight)),s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.peer=n.bytes();break;case 3:s.tag=n.string();break;case 4:s.weight=n.int64();break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(lt||(lt={}));var ht;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{n.lengthDelimited!==!1&&r.fork(),t.peer!=null&&t.peer.byteLength>0&&(r.uint32(10),r.bytes(t.peer)),n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={peer:new Uint8Array(0)},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.peer=t.bytes();break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(ht||(ht={}));var at;(function(i){let e;(function(n){n.GET_TOPICS="GET_TOPICS",n.LIST_PEERS="LIST_PEERS",n.PUBLISH="PUBLISH",n.SUBSCRIBE="SUBSCRIBE"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.GET_TOPICS=0]="GET_TOPICS",n[n.LIST_PEERS=1]="LIST_PEERS",n[n.PUBLISH=2]="PUBLISH",n[n.SUBSCRIBE=3]="SUBSCRIBE"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.topic!=null&&(o.uint32(18),o.string(n.topic)),n.data!=null&&(o.uint32(26),o.bytes(n.data)),s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.topic=n.string();break;case 3:s.data=n.bytes();break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(at||(at={}));var ie;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.from!=null&&(r.uint32(10),r.bytes(t.from)),t.data!=null&&(r.uint32(18),r.bytes(t.data)),t.seqno!=null&&(r.uint32(26),r.bytes(t.seqno)),t.topicIDs!=null)for(let o of t.topicIDs)r.uint32(34),r.string(o);t.signature!=null&&(r.uint32(42),r.bytes(t.signature)),t.key!=null&&(r.uint32(50),r.bytes(t.key)),n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={topicIDs:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.from=t.bytes();break;case 2:n.data=t.bytes();break;case 3:n.seqno=t.bytes();break;case 4:n.topicIDs.push(t.string());break;case 5:n.signature=t.bytes();break;case 6:n.key=t.bytes();break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(ie||(ie={}));var ut;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.topics!=null)for(let o of t.topics)r.uint32(10),r.string(o);if(t.peerIDs!=null)for(let o of t.peerIDs)r.uint32(18),r.bytes(o);n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={topics:[],peerIDs:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.topics.push(t.string());break;case 2:n.peerIDs.push(t.bytes());break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(ut||(ut={}));var ft;(function(i){let e;(function(n){n.UNSPECIFIED="UNSPECIFIED",n.GET_PROTOCOLS="GET_PROTOCOLS",n.GET_PEER_INFO="GET_PEER_INFO"})(e=i.Type||(i.Type={}));let t;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.GET_PROTOCOLS=1]="GET_PROTOCOLS",n[n.GET_PEER_INFO=2]="GET_PEER_INFO"})(t||(t={})),function(n){n.codec=()=>C(t)}(e=i.Type||(i.Type={}));let r;i.codec=()=>(r==null&&(r=d((n,o,s={})=>{if(s.lengthDelimited!==!1&&o.fork(),n.type!=null&&(o.uint32(8),i.Type.codec().encode(n.type,o)),n.id!=null&&(o.uint32(18),o.bytes(n.id)),n.protos!=null)for(let c of n.protos)o.uint32(26),o.string(c);s.lengthDelimited!==!1&&o.ldelim()},(n,o)=>{let s={protos:[]},c=o==null?n.len:n.pos+o;for(;n.pos<c;){let l=n.uint32();switch(l>>>3){case 1:s.type=i.Type.codec().decode(n);break;case 2:s.id=n.bytes();break;case 3:s.protos.push(n.string());break;default:n.skipType(l&7);break}}return s})),r),i.encode=n=>f(n,i.codec()),i.decode=n=>u(n,i.codec())})(ft||(ft={}));var dt;(function(i){let e;i.codec=()=>(e==null&&(e=d((t,r,n={})=>{if(n.lengthDelimited!==!1&&r.fork(),t.peer!=null&&(r.uint32(10),B.codec().encode(t.peer,r)),t.protos!=null)for(let o of t.protos)r.uint32(18),r.string(o);n.lengthDelimited!==!1&&r.ldelim()},(t,r)=>{let n={protos:[]},o=r==null?t.len:t.pos+r;for(;t.pos<o;){let s=t.uint32();switch(s>>>3){case 1:n.peer=B.codec().decode(t,t.uint32());break;case 2:n.protos.push(t.string());break;default:t.skipType(s&7);break}}return n})),e),i.encode=t=>f(t,i.codec()),i.decode=t=>u(t,i.codec())})(dt||(dt={}));return Re(ri);})();
3
3
  return Libp2PDaemonProtocol}));
@@ -1,27 +1,52 @@
1
1
  {
2
- "codec": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_client.unknown.ConnManagerRequest.Type.codec.html",
3
- "Type": "https://libp2p.github.io/js-libp2p-daemon/enums/_libp2p_daemon_client.unknown.ConnManagerRequest.Type-1.html",
4
- "decode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_client.unknown.ConnManagerRequest.decode.html",
5
- "encode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_client.unknown.ConnManagerRequest.encode.html",
6
- "StreamHandler": "https://libp2p.github.io/js-libp2p-daemon/classes/_libp2p_daemon_client.unknown.StreamHandler.html",
7
- "ConnManagerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.ConnManagerRequest-1.html",
8
- "ConnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.ConnectRequest-1.html",
9
- "DHTRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.DHTRequest-1.html",
10
- "DisconnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.DisconnectRequest-1.html",
11
- "PSMessage": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.PSMessage-1.html",
12
- "PSRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.PSRequest-1.html",
13
- "PeerstoreRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.PeerstoreRequest-1.html",
14
- "Request": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.Request-1.html",
15
- "StreamHandlerOptions": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.StreamHandlerOptions.html",
16
- "StreamHandlerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.StreamHandlerRequest-1.html",
17
- "StreamOpenRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.StreamOpenRequest-1.html",
2
+ "codec": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_protocol.index.ConnManagerRequest.Type.codec.html",
3
+ ".:codec": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_protocol.index.StreamOpenRequest.codec.html",
4
+ "Type": "https://libp2p.github.io/js-libp2p-daemon/enums/_libp2p_daemon_protocol.index.ConnManagerRequest.Type-1.html",
5
+ ".:Type": "https://libp2p.github.io/js-libp2p-daemon/enums/_libp2p_daemon_protocol.index.Response.Type-1.html",
6
+ "decode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_protocol.index.ConnManagerRequest.decode.html",
7
+ ".:decode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_protocol.index.StreamOpenRequest.decode.html",
8
+ "encode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_protocol.index.ConnManagerRequest.encode.html",
9
+ ".:encode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_protocol.index.StreamOpenRequest.encode.html",
10
+ "ConnManagerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ConnManagerRequest-1.html",
11
+ ".:ConnManagerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ConnManagerRequest-1.html",
12
+ "ConnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ConnectRequest-1.html",
13
+ ".:ConnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ConnectRequest-1.html",
14
+ "DHTRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DHTRequest-1.html",
15
+ ".:DHTRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DHTRequest-1.html",
18
16
  "DHTResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DHTResponse-1.html",
17
+ ".:DHTResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DHTResponse-1.html",
18
+ "DisconnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DisconnectRequest-1.html",
19
+ ".:DisconnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DisconnectRequest-1.html",
19
20
  "ErrorResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ErrorResponse-1.html",
21
+ ".:ErrorResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ErrorResponse-1.html",
20
22
  "IdentifyResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.IdentifyResponse-1.html",
23
+ ".:IdentifyResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.IdentifyResponse-1.html",
24
+ "PSMessage": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSMessage-1.html",
25
+ ".:PSMessage": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSMessage-1.html",
26
+ "PSRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSRequest-1.html",
27
+ ".:PSRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSRequest-1.html",
21
28
  "PSResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSResponse-1.html",
29
+ ".:PSResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSResponse-1.html",
22
30
  "PeerInfo": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerInfo-1.html",
31
+ ".:PeerInfo": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerInfo-1.html",
32
+ "PeerstoreRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerstoreRequest-1.html",
33
+ ".:PeerstoreRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerstoreRequest-1.html",
23
34
  "PeerstoreResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerstoreResponse-1.html",
35
+ ".:PeerstoreResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerstoreResponse-1.html",
36
+ "Request": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.Request-1.html",
37
+ ".:Request": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.Request-1.html",
24
38
  "Response": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.Response-1.html",
39
+ ".:Response": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.Response-1.html",
40
+ "StreamHandlerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamHandlerRequest-1.html",
41
+ ".:StreamHandlerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamHandlerRequest-1.html",
25
42
  "StreamInfo": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamInfo-1.html",
26
- "passThroughUpgrader": "https://libp2p.github.io/js-libp2p-daemon/variables/_libp2p_daemon_protocol.upgrader.passThroughUpgrader.html"
43
+ ".:StreamInfo": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamInfo-1.html",
44
+ "StreamOpenRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamOpenRequest-1.html",
45
+ ".:StreamOpenRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamOpenRequest-1.html",
46
+ "StreamHandler": "https://libp2p.github.io/js-libp2p-daemon/classes/_libp2p_daemon_protocol.stream_handler.StreamHandler.html",
47
+ "./stream-handler:StreamHandler": "https://libp2p.github.io/js-libp2p-daemon/classes/_libp2p_daemon_protocol.stream_handler.StreamHandler.html",
48
+ "StreamHandlerOptions": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.stream_handler.StreamHandlerOptions.html",
49
+ "./stream-handler:StreamHandlerOptions": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.stream_handler.StreamHandlerOptions.html",
50
+ "passThroughUpgrader": "https://libp2p.github.io/js-libp2p-daemon/variables/_libp2p_daemon_protocol.upgrader.passThroughUpgrader.html",
51
+ "./upgrader:passThroughUpgrader": "https://libp2p.github.io/js-libp2p-daemon/variables/_libp2p_daemon_protocol.upgrader.passThroughUpgrader.html"
27
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/daemon-protocol",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Communication protocol between libp2p daemons and clients",
5
5
  "author": "",
6
6
  "license": "Apache-2.0 OR MIT",
@@ -53,6 +53,7 @@
53
53
  "eslintConfig": {
54
54
  "extends": "ipfs",
55
55
  "parserOptions": {
56
+ "project": true,
56
57
  "sourceType": "module"
57
58
  },
58
59
  "ignorePatterns": [
@@ -160,7 +161,7 @@
160
161
  "uint8arraylist": "^2.4.3"
161
162
  },
162
163
  "devDependencies": {
163
- "aegir": "^40.0.1",
164
+ "aegir": "^41.1.6",
164
165
  "protons": "^7.0.2"
165
166
  }
166
167
  }