Socket
Socket
Sign inDemoInstall

multicodec

Package Overview
Dependencies
1
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.5 to 0.5.6

dist/index.min.js.LICENSE

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="0.5.6"></a>
## [0.5.6](https://github.com/multiformats/js-multicodec/compare/v0.5.5...v0.5.6) (2019-12-05)
### Features
* reduce bundle size by 1/3 ([#49](https://github.com/multiformats/js-multicodec/issues/49)) ([2422b09](https://github.com/multiformats/js-multicodec/commit/2422b09))
<a name="0.5.4"></a>

@@ -2,0 +12,0 @@ ## [0.5.4](https://github.com/multiformats/js-multicodec/compare/v0.5.3...v0.5.4) (2019-07-16)

3

dist/index.min.js

@@ -1,2 +0,3 @@

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Multicodec=r():e.Multicodec=r()}(window,function(){return function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=4)}([function(e,r,n){"use strict";(function(e){var t=n(7),o=n(8),i=n(9);function s(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(e,r){if(s()<r)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r)).__proto__=h.prototype:(null===e&&(e=new h(r)),e.length=r),e}function h(e,r,n){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return k(this,e)}return b(this,e,r,n)}function b(e,r,n,t){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(e,r,n,t){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(t||0))throw new RangeError("'length' is out of bounds");r=void 0===n&&void 0===t?new Uint8Array(r):void 0===t?new Uint8Array(r,n):new Uint8Array(r,n,t);h.TYPED_ARRAY_SUPPORT?(e=r).__proto__=h.prototype:e=u(e,r);return e}(e,r,n,t):"string"==typeof r?function(e,r,n){"string"==typeof n&&""!==n||(n="utf8");if(!h.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var t=0|m(r,n),o=(e=f(e,t)).write(r,n);o!==t&&(e=e.slice(0,o));return e}(e,r,n):function(e,r){if(h.isBuffer(r)){var n=0|l(r.length);return 0===(e=f(e,n)).length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(t=r.length)!=t?f(e,0):u(e,r);if("Buffer"===r.type&&i(r.data))return u(e,r.data)}var t;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,r)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function k(e,r){if(a(r),e=f(e,r<0?0:0|l(r)),!h.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function u(e,r){var n=r.length<0?0:0|l(r.length);e=f(e,n);for(var t=0;t<n;t+=1)e[t]=255&r[t];return e}function l(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function m(e,r){if(h.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var t=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(t)return Y(e).length;r=(""+r).toLowerCase(),t=!0}}function c(e,r,n){var t=e[r];e[r]=e[n],e[n]=t}function x(e,r,n,t,o){if(0===e.length)return-1;if("string"==typeof n?(t=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=h.from(r,t)),h.isBuffer(r))return 0===r.length?-1:_(e,r,n,t,o);if("number"==typeof r)return r&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):_(e,[r],n,t,o);throw new TypeError("val must be string, number or Buffer")}function _(e,r,n,t,o){var i,s=1,f=e.length,h=r.length;if(void 0!==t&&("ucs2"===(t=String(t).toLowerCase())||"ucs-2"===t||"utf16le"===t||"utf-16le"===t)){if(e.length<2||r.length<2)return-1;s=2,f/=2,h/=2,n/=2}function b(e,r){return 1===s?e[r]:e.readUInt16BE(r*s)}if(o){var a=-1;for(i=n;i<f;i++)if(b(e,i)===b(r,-1===a?0:i-a)){if(-1===a&&(a=i),i-a+1===h)return a*s}else-1!==a&&(i-=i-a),a=-1}else for(n+h>f&&(n=f-h),i=n;i>=0;i--){for(var k=!0,u=0;u<h;u++)if(b(e,i+u)!==b(r,u)){k=!1;break}if(k)return i}return-1}function E(e,r,n,t){n=Number(n)||0;var o=e.length-n;t?(t=Number(t))>o&&(t=o):t=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");t>i/2&&(t=i/2);for(var s=0;s<t;++s){var f=parseInt(r.substr(2*s,2),16);if(isNaN(f))return s;e[n+s]=f}return s}function p(e,r,n,t){return j(Y(r,e.length-n),e,n,t)}function S(e,r,n,t){return j(function(e){for(var r=[],n=0;n<e.length;++n)r.push(255&e.charCodeAt(n));return r}(r),e,n,t)}function K(e,r,n,t){return S(e,r,n,t)}function d(e,r,n,t){return j(H(r),e,n,t)}function I(e,r,n,t){return j(function(e,r){for(var n,t,o,i=[],s=0;s<e.length&&!((r-=2)<0);++s)n=e.charCodeAt(s),t=n>>8,o=n%256,i.push(o),i.push(t);return i}(r,e.length-n),e,n,t)}function N(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function g(e,r,n){n=Math.min(e.length,n);for(var t=[],o=r;o<n;){var i,s,f,h,b=e[o],a=null,k=b>239?4:b>223?3:b>191?2:1;if(o+k<=n)switch(k){case 1:b<128&&(a=b);break;case 2:128==(192&(i=e[o+1]))&&(h=(31&b)<<6|63&i)>127&&(a=h);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(h=(15&b)<<12|(63&i)<<6|63&s)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:i=e[o+1],s=e[o+2],f=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&f)&&(h=(15&b)<<18|(63&i)<<12|(63&s)<<6|63&f)>65535&&h<1114112&&(a=h)}null===a?(a=65533,k=1):a>65535&&(a-=65536,t.push(a>>>10&1023|55296),a=56320|1023&a),t.push(a),o+=k}return function(e){var r=e.length;if(r<=B)return String.fromCharCode.apply(String,e);var n="",t=0;for(;t<r;)n+=String.fromCharCode.apply(String,e.slice(t,t+=B));return n}(t)}r.Buffer=h,r.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},r.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}(),r.kMaxLength=s(),h.poolSize=8192,h._augment=function(e){return e.__proto__=h.prototype,e},h.from=function(e,r,n){return b(null,e,r,n)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(e,r,n){return function(e,r,n,t){return a(r),r<=0?f(e,r):void 0!==n?"string"==typeof t?f(e,r).fill(n,t):f(e,r).fill(n):f(e,r)}(null,e,r,n)},h.allocUnsafe=function(e){return k(null,e)},h.allocUnsafeSlow=function(e){return k(null,e)},h.isBuffer=function(e){return!(null==e||!e._isBuffer)},h.compare=function(e,r){if(!h.isBuffer(e)||!h.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,t=r.length,o=0,i=Math.min(n,t);o<i;++o)if(e[o]!==r[o]){n=e[o],t=r[o];break}return n<t?-1:t<n?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,r){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var t=h.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!h.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(t,o),o+=s.length}return t},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)c(this,r,r+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)c(this,r,r+3),c(this,r+1,r+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)c(this,r,r+7),c(this,r+1,r+6),c(this,r+2,r+5),c(this,r+3,r+4);return this},h.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?g(this,0,e):function(e,r,n){var t=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,r,n);case"utf8":case"utf-8":return g(this,r,n);case"ascii":return A(this,r,n);case"latin1":case"binary":return y(this,r,n);case"base64":return N(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,r,n);default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}}.apply(this,arguments)},h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){var e="",n=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},h.prototype.compare=function(e,r,n,t,o){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===t&&(t=0),void 0===o&&(o=this.length),r<0||n>e.length||t<0||o>this.length)throw new RangeError("out of range index");if(t>=o&&r>=n)return 0;if(t>=o)return-1;if(r>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(t>>>=0),s=(n>>>=0)-(r>>>=0),f=Math.min(i,s),b=this.slice(t,o),a=e.slice(r,n),k=0;k<f;++k)if(b[k]!==a[k]){i=b[k],s=a[k];break}return i<s?-1:s<i?1:0},h.prototype.includes=function(e,r,n){return-1!==this.indexOf(e,r,n)},h.prototype.indexOf=function(e,r,n){return x(this,e,r,n,!0)},h.prototype.lastIndexOf=function(e,r,n){return x(this,e,r,n,!1)},h.prototype.write=function(e,r,n,t){if(void 0===r)t="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)t=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(n)?(n|=0,void 0===t&&(t="utf8")):(t=n,n=void 0)}var o=this.length-r;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");t||(t="utf8");for(var i=!1;;)switch(t){case"hex":return E(this,e,r,n);case"utf8":case"utf-8":return p(this,e,r,n);case"ascii":return S(this,e,r,n);case"latin1":case"binary":return K(this,e,r,n);case"base64":return d(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(""+t).toLowerCase(),i=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function A(e,r,n){var t="";n=Math.min(e.length,n);for(var o=r;o<n;++o)t+=String.fromCharCode(127&e[o]);return t}function y(e,r,n){var t="";n=Math.min(e.length,n);for(var o=r;o<n;++o)t+=String.fromCharCode(e[o]);return t}function w(e,r,n){var t=e.length;(!r||r<0)&&(r=0),(!n||n<0||n>t)&&(n=t);for(var o="",i=r;i<n;++i)o+=D(e[i]);return o}function v(e,r,n){for(var t=e.slice(r,n),o="",i=0;i<t.length;i+=2)o+=String.fromCharCode(t[i]+256*t[i+1]);return o}function L(e,r,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+r>n)throw new RangeError("Trying to access beyond buffer length")}function T(e,r,n,t,o,i){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(n+t>e.length)throw new RangeError("Index out of range")}function R(e,r,n,t){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(r&255<<8*(t?o:1-o))>>>8*(t?o:1-o)}function P(e,r,n,t){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=r>>>8*(t?o:3-o)&255}function C(e,r,n,t,o,i){if(n+t>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,r,n,t,i){return i||C(e,0,n,4),o.write(e,r,n,t,23,4),n+4}function U(e,r,n,t,i){return i||C(e,0,n,8),o.write(e,r,n,t,52,8),n+8}h.prototype.slice=function(e,r){var n,t=this.length;if((e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(r=void 0===r?t:~~r)<0?(r+=t)<0&&(r=0):r>t&&(r=t),r<e&&(r=e),h.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,r)).__proto__=h.prototype;else{var o=r-e;n=new h(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},h.prototype.readUIntLE=function(e,r,n){e|=0,r|=0,n||L(e,r,this.length);for(var t=this[e],o=1,i=0;++i<r&&(o*=256);)t+=this[e+i]*o;return t},h.prototype.readUIntBE=function(e,r,n){e|=0,r|=0,n||L(e,r,this.length);for(var t=this[e+--r],o=1;r>0&&(o*=256);)t+=this[e+--r]*o;return t},h.prototype.readUInt8=function(e,r){return r||L(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,r){return r||L(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,r){return r||L(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,r){return r||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,r){return r||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,r,n){e|=0,r|=0,n||L(e,r,this.length);for(var t=this[e],o=1,i=0;++i<r&&(o*=256);)t+=this[e+i]*o;return t>=(o*=128)&&(t-=Math.pow(2,8*r)),t},h.prototype.readIntBE=function(e,r,n){e|=0,r|=0,n||L(e,r,this.length);for(var t=r,o=1,i=this[e+--t];t>0&&(o*=256);)i+=this[e+--t]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},h.prototype.readInt8=function(e,r){return r||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,r){r||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(e,r){r||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(e,r){return r||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,r){return r||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,r){return r||L(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,r){return r||L(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,r){return r||L(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,r){return r||L(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,r,n,t){(e=+e,r|=0,n|=0,t)||T(this,e,r,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[r]=255&e;++i<n&&(o*=256);)this[r+i]=e/o&255;return r+n},h.prototype.writeUIntBE=function(e,r,n,t){(e=+e,r|=0,n|=0,t)||T(this,e,r,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[r+o]=255&e;--o>=0&&(i*=256);)this[r+o]=e/i&255;return r+n},h.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},h.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},h.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},h.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):P(this,e,r,!0),r+4},h.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):P(this,e,r,!1),r+4},h.prototype.writeIntLE=function(e,r,n,t){if(e=+e,r|=0,!t){var o=Math.pow(2,8*n-1);T(this,e,r,n,o-1,-o)}var i=0,s=1,f=0;for(this[r]=255&e;++i<n&&(s*=256);)e<0&&0===f&&0!==this[r+i-1]&&(f=1),this[r+i]=(e/s>>0)-f&255;return r+n},h.prototype.writeIntBE=function(e,r,n,t){if(e=+e,r|=0,!t){var o=Math.pow(2,8*n-1);T(this,e,r,n,o-1,-o)}var i=n-1,s=1,f=0;for(this[r+i]=255&e;--i>=0&&(s*=256);)e<0&&0===f&&0!==this[r+i+1]&&(f=1),this[r+i]=(e/s>>0)-f&255;return r+n},h.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},h.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):R(this,e,r,!0),r+2},h.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):R(this,e,r,!1),r+2},h.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):P(this,e,r,!0),r+4},h.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||T(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):P(this,e,r,!1),r+4},h.prototype.writeFloatLE=function(e,r,n){return O(this,e,r,!0,n)},h.prototype.writeFloatBE=function(e,r,n){return O(this,e,r,!1,n)},h.prototype.writeDoubleLE=function(e,r,n){return U(this,e,r,!0,n)},h.prototype.writeDoubleBE=function(e,r,n){return U(this,e,r,!1,n)},h.prototype.copy=function(e,r,n,t){if(n||(n=0),t||0===t||(t=this.length),r>=e.length&&(r=e.length),r||(r=0),t>0&&t<n&&(t=n),t===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(t<0)throw new RangeError("sourceEnd out of bounds");t>this.length&&(t=this.length),e.length-r<t-n&&(t=e.length-r+n);var o,i=t-n;if(this===e&&n<r&&r<t)for(o=i-1;o>=0;--o)e[o+r]=this[o+n];else if(i<1e3||!h.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i},h.prototype.fill=function(e,r,n,t){if("string"==typeof e){if("string"==typeof r?(t=r,r=0,n=this.length):"string"==typeof n&&(t=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==t&&"string"!=typeof t)throw new TypeError("encoding must be a string");if("string"==typeof t&&!h.isEncoding(t))throw new TypeError("Unknown encoding: "+t)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var i;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=r;i<n;++i)this[i]=e;else{var s=h.isBuffer(e)?e:Y(new h(e,t).toString()),f=s.length;for(i=0;i<n-r;++i)this[i+r]=s[i%f]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,r){var n;r=r||1/0;for(var t=e.length,o=null,i=[],s=0;s<t;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(s+1===t){(r-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(r-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((r-=1)<0)break;i.push(n)}else if(n<2048){if((r-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return t.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,r,n,t){for(var o=0;o<t&&!(o+n>=r.length||o>=e.length);++o)r[o+n]=e[o];return o}}).call(this,n(6))},function(e,r,n){"use strict";e.exports={encode:n(10),decode:n(11),encodingLength:n(12)}},function(e,r,n){"use strict";(function(e){r.protobuf=e.from("50","hex"),r.cbor=e.from("51","hex"),r.rlp=e.from("60","hex"),r.bencode=e.from("63","hex"),r.multicodec=e.from("30","hex"),r.multihash=e.from("31","hex"),r.multiaddr=e.from("32","hex"),r.multibase=e.from("33","hex"),r.identity=e.from("00","hex"),r.sha1=e.from("11","hex"),r["sha2-256"]=e.from("12","hex"),r["sha2-512"]=e.from("13","hex"),r["sha3-512"]=e.from("14","hex"),r["sha3-384"]=e.from("15","hex"),r["sha3-256"]=e.from("16","hex"),r["sha3-224"]=e.from("17","hex"),r["shake-128"]=e.from("18","hex"),r["shake-256"]=e.from("19","hex"),r["keccak-224"]=e.from("1a","hex"),r["keccak-256"]=e.from("1b","hex"),r["keccak-384"]=e.from("1c","hex"),r["keccak-512"]=e.from("1d","hex"),r["murmur3-128"]=e.from("22","hex"),r["murmur3-32"]=e.from("23","hex"),r["dbl-sha2-256"]=e.from("56","hex"),r.md4=e.from("d4","hex"),r.md5=e.from("d5","hex"),r.bmt=e.from("d6","hex"),r.x11=e.from("1100","hex"),r["blake2b-8"]=e.from("b201","hex"),r["blake2b-16"]=e.from("b202","hex"),r["blake2b-24"]=e.from("b203","hex"),r["blake2b-32"]=e.from("b204","hex"),r["blake2b-40"]=e.from("b205","hex"),r["blake2b-48"]=e.from("b206","hex"),r["blake2b-56"]=e.from("b207","hex"),r["blake2b-64"]=e.from("b208","hex"),r["blake2b-72"]=e.from("b209","hex"),r["blake2b-80"]=e.from("b20a","hex"),r["blake2b-88"]=e.from("b20b","hex"),r["blake2b-96"]=e.from("b20c","hex"),r["blake2b-104"]=e.from("b20d","hex"),r["blake2b-112"]=e.from("b20e","hex"),r["blake2b-120"]=e.from("b20f","hex"),r["blake2b-128"]=e.from("b210","hex"),r["blake2b-136"]=e.from("b211","hex"),r["blake2b-144"]=e.from("b212","hex"),r["blake2b-152"]=e.from("b213","hex"),r["blake2b-160"]=e.from("b214","hex"),r["blake2b-168"]=e.from("b215","hex"),r["blake2b-176"]=e.from("b216","hex"),r["blake2b-184"]=e.from("b217","hex"),r["blake2b-192"]=e.from("b218","hex"),r["blake2b-200"]=e.from("b219","hex"),r["blake2b-208"]=e.from("b21a","hex"),r["blake2b-216"]=e.from("b21b","hex"),r["blake2b-224"]=e.from("b21c","hex"),r["blake2b-232"]=e.from("b21d","hex"),r["blake2b-240"]=e.from("b21e","hex"),r["blake2b-248"]=e.from("b21f","hex"),r["blake2b-256"]=e.from("b220","hex"),r["blake2b-264"]=e.from("b221","hex"),r["blake2b-272"]=e.from("b222","hex"),r["blake2b-280"]=e.from("b223","hex"),r["blake2b-288"]=e.from("b224","hex"),r["blake2b-296"]=e.from("b225","hex"),r["blake2b-304"]=e.from("b226","hex"),r["blake2b-312"]=e.from("b227","hex"),r["blake2b-320"]=e.from("b228","hex"),r["blake2b-328"]=e.from("b229","hex"),r["blake2b-336"]=e.from("b22a","hex"),r["blake2b-344"]=e.from("b22b","hex"),r["blake2b-352"]=e.from("b22c","hex"),r["blake2b-360"]=e.from("b22d","hex"),r["blake2b-368"]=e.from("b22e","hex"),r["blake2b-376"]=e.from("b22f","hex"),r["blake2b-384"]=e.from("b230","hex"),r["blake2b-392"]=e.from("b231","hex"),r["blake2b-400"]=e.from("b232","hex"),r["blake2b-408"]=e.from("b233","hex"),r["blake2b-416"]=e.from("b234","hex"),r["blake2b-424"]=e.from("b235","hex"),r["blake2b-432"]=e.from("b236","hex"),r["blake2b-440"]=e.from("b237","hex"),r["blake2b-448"]=e.from("b238","hex"),r["blake2b-456"]=e.from("b239","hex"),r["blake2b-464"]=e.from("b23a","hex"),r["blake2b-472"]=e.from("b23b","hex"),r["blake2b-480"]=e.from("b23c","hex"),r["blake2b-488"]=e.from("b23d","hex"),r["blake2b-496"]=e.from("b23e","hex"),r["blake2b-504"]=e.from("b23f","hex"),r["blake2b-512"]=e.from("b240","hex"),r["blake2s-8"]=e.from("b241","hex"),r["blake2s-16"]=e.from("b242","hex"),r["blake2s-24"]=e.from("b243","hex"),r["blake2s-32"]=e.from("b244","hex"),r["blake2s-40"]=e.from("b245","hex"),r["blake2s-48"]=e.from("b246","hex"),r["blake2s-56"]=e.from("b247","hex"),r["blake2s-64"]=e.from("b248","hex"),r["blake2s-72"]=e.from("b249","hex"),r["blake2s-80"]=e.from("b24a","hex"),r["blake2s-88"]=e.from("b24b","hex"),r["blake2s-96"]=e.from("b24c","hex"),r["blake2s-104"]=e.from("b24d","hex"),r["blake2s-112"]=e.from("b24e","hex"),r["blake2s-120"]=e.from("b24f","hex"),r["blake2s-128"]=e.from("b250","hex"),r["blake2s-136"]=e.from("b251","hex"),r["blake2s-144"]=e.from("b252","hex"),r["blake2s-152"]=e.from("b253","hex"),r["blake2s-160"]=e.from("b254","hex"),r["blake2s-168"]=e.from("b255","hex"),r["blake2s-176"]=e.from("b256","hex"),r["blake2s-184"]=e.from("b257","hex"),r["blake2s-192"]=e.from("b258","hex"),r["blake2s-200"]=e.from("b259","hex"),r["blake2s-208"]=e.from("b25a","hex"),r["blake2s-216"]=e.from("b25b","hex"),r["blake2s-224"]=e.from("b25c","hex"),r["blake2s-232"]=e.from("b25d","hex"),r["blake2s-240"]=e.from("b25e","hex"),r["blake2s-248"]=e.from("b25f","hex"),r["blake2s-256"]=e.from("b260","hex"),r["skein256-8"]=e.from("b301","hex"),r["skein256-16"]=e.from("b302","hex"),r["skein256-24"]=e.from("b303","hex"),r["skein256-32"]=e.from("b304","hex"),r["skein256-40"]=e.from("b305","hex"),r["skein256-48"]=e.from("b306","hex"),r["skein256-56"]=e.from("b307","hex"),r["skein256-64"]=e.from("b308","hex"),r["skein256-72"]=e.from("b309","hex"),r["skein256-80"]=e.from("b30a","hex"),r["skein256-88"]=e.from("b30b","hex"),r["skein256-96"]=e.from("b30c","hex"),r["skein256-104"]=e.from("b30d","hex"),r["skein256-112"]=e.from("b30e","hex"),r["skein256-120"]=e.from("b30f","hex"),r["skein256-128"]=e.from("b310","hex"),r["skein256-136"]=e.from("b311","hex"),r["skein256-144"]=e.from("b312","hex"),r["skein256-152"]=e.from("b313","hex"),r["skein256-160"]=e.from("b314","hex"),r["skein256-168"]=e.from("b315","hex"),r["skein256-176"]=e.from("b316","hex"),r["skein256-184"]=e.from("b317","hex"),r["skein256-192"]=e.from("b318","hex"),r["skein256-200"]=e.from("b319","hex"),r["skein256-208"]=e.from("b31a","hex"),r["skein256-216"]=e.from("b31b","hex"),r["skein256-224"]=e.from("b31c","hex"),r["skein256-232"]=e.from("b31d","hex"),r["skein256-240"]=e.from("b31e","hex"),r["skein256-248"]=e.from("b31f","hex"),r["skein256-256"]=e.from("b320","hex"),r["skein512-8"]=e.from("b321","hex"),r["skein512-16"]=e.from("b322","hex"),r["skein512-24"]=e.from("b323","hex"),r["skein512-32"]=e.from("b324","hex"),r["skein512-40"]=e.from("b325","hex"),r["skein512-48"]=e.from("b326","hex"),r["skein512-56"]=e.from("b327","hex"),r["skein512-64"]=e.from("b328","hex"),r["skein512-72"]=e.from("b329","hex"),r["skein512-80"]=e.from("b32a","hex"),r["skein512-88"]=e.from("b32b","hex"),r["skein512-96"]=e.from("b32c","hex"),r["skein512-104"]=e.from("b32d","hex"),r["skein512-112"]=e.from("b32e","hex"),r["skein512-120"]=e.from("b32f","hex"),r["skein512-128"]=e.from("b330","hex"),r["skein512-136"]=e.from("b331","hex"),r["skein512-144"]=e.from("b332","hex"),r["skein512-152"]=e.from("b333","hex"),r["skein512-160"]=e.from("b334","hex"),r["skein512-168"]=e.from("b335","hex"),r["skein512-176"]=e.from("b336","hex"),r["skein512-184"]=e.from("b337","hex"),r["skein512-192"]=e.from("b338","hex"),r["skein512-200"]=e.from("b339","hex"),r["skein512-208"]=e.from("b33a","hex"),r["skein512-216"]=e.from("b33b","hex"),r["skein512-224"]=e.from("b33c","hex"),r["skein512-232"]=e.from("b33d","hex"),r["skein512-240"]=e.from("b33e","hex"),r["skein512-248"]=e.from("b33f","hex"),r["skein512-256"]=e.from("b340","hex"),r["skein512-264"]=e.from("b341","hex"),r["skein512-272"]=e.from("b342","hex"),r["skein512-280"]=e.from("b343","hex"),r["skein512-288"]=e.from("b344","hex"),r["skein512-296"]=e.from("b345","hex"),r["skein512-304"]=e.from("b346","hex"),r["skein512-312"]=e.from("b347","hex"),r["skein512-320"]=e.from("b348","hex"),r["skein512-328"]=e.from("b349","hex"),r["skein512-336"]=e.from("b34a","hex"),r["skein512-344"]=e.from("b34b","hex"),r["skein512-352"]=e.from("b34c","hex"),r["skein512-360"]=e.from("b34d","hex"),r["skein512-368"]=e.from("b34e","hex"),r["skein512-376"]=e.from("b34f","hex"),r["skein512-384"]=e.from("b350","hex"),r["skein512-392"]=e.from("b351","hex"),r["skein512-400"]=e.from("b352","hex"),r["skein512-408"]=e.from("b353","hex"),r["skein512-416"]=e.from("b354","hex"),r["skein512-424"]=e.from("b355","hex"),r["skein512-432"]=e.from("b356","hex"),r["skein512-440"]=e.from("b357","hex"),r["skein512-448"]=e.from("b358","hex"),r["skein512-456"]=e.from("b359","hex"),r["skein512-464"]=e.from("b35a","hex"),r["skein512-472"]=e.from("b35b","hex"),r["skein512-480"]=e.from("b35c","hex"),r["skein512-488"]=e.from("b35d","hex"),r["skein512-496"]=e.from("b35e","hex"),r["skein512-504"]=e.from("b35f","hex"),r["skein512-512"]=e.from("b360","hex"),r["skein1024-8"]=e.from("b361","hex"),r["skein1024-16"]=e.from("b362","hex"),r["skein1024-24"]=e.from("b363","hex"),r["skein1024-32"]=e.from("b364","hex"),r["skein1024-40"]=e.from("b365","hex"),r["skein1024-48"]=e.from("b366","hex"),r["skein1024-56"]=e.from("b367","hex"),r["skein1024-64"]=e.from("b368","hex"),r["skein1024-72"]=e.from("b369","hex"),r["skein1024-80"]=e.from("b36a","hex"),r["skein1024-88"]=e.from("b36b","hex"),r["skein1024-96"]=e.from("b36c","hex"),r["skein1024-104"]=e.from("b36d","hex"),r["skein1024-112"]=e.from("b36e","hex"),r["skein1024-120"]=e.from("b36f","hex"),r["skein1024-128"]=e.from("b370","hex"),r["skein1024-136"]=e.from("b371","hex"),r["skein1024-144"]=e.from("b372","hex"),r["skein1024-152"]=e.from("b373","hex"),r["skein1024-160"]=e.from("b374","hex"),r["skein1024-168"]=e.from("b375","hex"),r["skein1024-176"]=e.from("b376","hex"),r["skein1024-184"]=e.from("b377","hex"),r["skein1024-192"]=e.from("b378","hex"),r["skein1024-200"]=e.from("b379","hex"),r["skein1024-208"]=e.from("b37a","hex"),r["skein1024-216"]=e.from("b37b","hex"),r["skein1024-224"]=e.from("b37c","hex"),r["skein1024-232"]=e.from("b37d","hex"),r["skein1024-240"]=e.from("b37e","hex"),r["skein1024-248"]=e.from("b37f","hex"),r["skein1024-256"]=e.from("b380","hex"),r["skein1024-264"]=e.from("b381","hex"),r["skein1024-272"]=e.from("b382","hex"),r["skein1024-280"]=e.from("b383","hex"),r["skein1024-288"]=e.from("b384","hex"),r["skein1024-296"]=e.from("b385","hex"),r["skein1024-304"]=e.from("b386","hex"),r["skein1024-312"]=e.from("b387","hex"),r["skein1024-320"]=e.from("b388","hex"),r["skein1024-328"]=e.from("b389","hex"),r["skein1024-336"]=e.from("b38a","hex"),r["skein1024-344"]=e.from("b38b","hex"),r["skein1024-352"]=e.from("b38c","hex"),r["skein1024-360"]=e.from("b38d","hex"),r["skein1024-368"]=e.from("b38e","hex"),r["skein1024-376"]=e.from("b38f","hex"),r["skein1024-384"]=e.from("b390","hex"),r["skein1024-392"]=e.from("b391","hex"),r["skein1024-400"]=e.from("b392","hex"),r["skein1024-408"]=e.from("b393","hex"),r["skein1024-416"]=e.from("b394","hex"),r["skein1024-424"]=e.from("b395","hex"),r["skein1024-432"]=e.from("b396","hex"),r["skein1024-440"]=e.from("b397","hex"),r["skein1024-448"]=e.from("b398","hex"),r["skein1024-456"]=e.from("b399","hex"),r["skein1024-464"]=e.from("b39a","hex"),r["skein1024-472"]=e.from("b39b","hex"),r["skein1024-480"]=e.from("b39c","hex"),r["skein1024-488"]=e.from("b39d","hex"),r["skein1024-496"]=e.from("b39e","hex"),r["skein1024-504"]=e.from("b39f","hex"),r["skein1024-512"]=e.from("b3a0","hex"),r["skein1024-520"]=e.from("b3a1","hex"),r["skein1024-528"]=e.from("b3a2","hex"),r["skein1024-536"]=e.from("b3a3","hex"),r["skein1024-544"]=e.from("b3a4","hex"),r["skein1024-552"]=e.from("b3a5","hex"),r["skein1024-560"]=e.from("b3a6","hex"),r["skein1024-568"]=e.from("b3a7","hex"),r["skein1024-576"]=e.from("b3a8","hex"),r["skein1024-584"]=e.from("b3a9","hex"),r["skein1024-592"]=e.from("b3aa","hex"),r["skein1024-600"]=e.from("b3ab","hex"),r["skein1024-608"]=e.from("b3ac","hex"),r["skein1024-616"]=e.from("b3ad","hex"),r["skein1024-624"]=e.from("b3ae","hex"),r["skein1024-632"]=e.from("b3af","hex"),r["skein1024-640"]=e.from("b3b0","hex"),r["skein1024-648"]=e.from("b3b1","hex"),r["skein1024-656"]=e.from("b3b2","hex"),r["skein1024-664"]=e.from("b3b3","hex"),r["skein1024-672"]=e.from("b3b4","hex"),r["skein1024-680"]=e.from("b3b5","hex"),r["skein1024-688"]=e.from("b3b6","hex"),r["skein1024-696"]=e.from("b3b7","hex"),r["skein1024-704"]=e.from("b3b8","hex"),r["skein1024-712"]=e.from("b3b9","hex"),r["skein1024-720"]=e.from("b3ba","hex"),r["skein1024-728"]=e.from("b3bb","hex"),r["skein1024-736"]=e.from("b3bc","hex"),r["skein1024-744"]=e.from("b3bd","hex"),r["skein1024-752"]=e.from("b3be","hex"),r["skein1024-760"]=e.from("b3bf","hex"),r["skein1024-768"]=e.from("b3c0","hex"),r["skein1024-776"]=e.from("b3c1","hex"),r["skein1024-784"]=e.from("b3c2","hex"),r["skein1024-792"]=e.from("b3c3","hex"),r["skein1024-800"]=e.from("b3c4","hex"),r["skein1024-808"]=e.from("b3c5","hex"),r["skein1024-816"]=e.from("b3c6","hex"),r["skein1024-824"]=e.from("b3c7","hex"),r["skein1024-832"]=e.from("b3c8","hex"),r["skein1024-840"]=e.from("b3c9","hex"),r["skein1024-848"]=e.from("b3ca","hex"),r["skein1024-856"]=e.from("b3cb","hex"),r["skein1024-864"]=e.from("b3cc","hex"),r["skein1024-872"]=e.from("b3cd","hex"),r["skein1024-880"]=e.from("b3ce","hex"),r["skein1024-888"]=e.from("b3cf","hex"),r["skein1024-896"]=e.from("b3d0","hex"),r["skein1024-904"]=e.from("b3d1","hex"),r["skein1024-912"]=e.from("b3d2","hex"),r["skein1024-920"]=e.from("b3d3","hex"),r["skein1024-928"]=e.from("b3d4","hex"),r["skein1024-936"]=e.from("b3d5","hex"),r["skein1024-944"]=e.from("b3d6","hex"),r["skein1024-952"]=e.from("b3d7","hex"),r["skein1024-960"]=e.from("b3d8","hex"),r["skein1024-968"]=e.from("b3d9","hex"),r["skein1024-976"]=e.from("b3da","hex"),r["skein1024-984"]=e.from("b3db","hex"),r["skein1024-992"]=e.from("b3dc","hex"),r["skein1024-1000"]=e.from("b3dd","hex"),r["skein1024-1008"]=e.from("b3de","hex"),r["skein1024-1016"]=e.from("b3df","hex"),r["skein1024-1024"]=e.from("b3e0","hex"),r.ip4=e.from("04","hex"),r.tcp=e.from("06","hex"),r.dccp=e.from("21","hex"),r.ip6=e.from("29","hex"),r.ip6zone=e.from("2a","hex"),r.dns=e.from("35","hex"),r.dns4=e.from("36","hex"),r.dns6=e.from("37","hex"),r.dnsaddr=e.from("38","hex"),r.sctp=e.from("84","hex"),r.udp=e.from("0111","hex"),r["p2p-webrtc-star"]=e.from("0113","hex"),r["p2p-webrtc-direct"]=e.from("0114","hex"),r["p2p-stardust"]=e.from("0115","hex"),r["p2p-circuit"]=e.from("0122","hex"),r.udt=e.from("012d","hex"),r.utp=e.from("012e","hex"),r.unix=e.from("0190","hex"),r.p2p=e.from("01a5","hex"),r.ipfs=e.from("01a5","hex"),r.https=e.from("01bb","hex"),r.onion=e.from("01bc","hex"),r.onion3=e.from("01bd","hex"),r.garlic64=e.from("01be","hex"),r.garlic32=e.from("01bf","hex"),r.quic=e.from("01cc","hex"),r.ws=e.from("01dd","hex"),r.wss=e.from("01de","hex"),r["p2p-websocket-star"]=e.from("01df","hex"),r.http=e.from("01e0","hex"),r.raw=e.from("55","hex"),r["dag-pb"]=e.from("70","hex"),r["dag-cbor"]=e.from("71","hex"),r["libp2p-key"]=e.from("72","hex"),r["git-raw"]=e.from("78","hex"),r["torrent-info"]=e.from("7b","hex"),r["torrent-file"]=e.from("7c","hex"),r["leofcoin-block"]=e.from("81","hex"),r["leofcoin-tx"]=e.from("82","hex"),r["leofcoin-pr"]=e.from("83","hex"),r["eth-block"]=e.from("90","hex"),r["eth-block-list"]=e.from("91","hex"),r["eth-tx-trie"]=e.from("92","hex"),r["eth-tx"]=e.from("93","hex"),r["eth-tx-receipt-trie"]=e.from("94","hex"),r["eth-tx-receipt"]=e.from("95","hex"),r["eth-state-trie"]=e.from("96","hex"),r["eth-account-snapshot"]=e.from("97","hex"),r["eth-storage-trie"]=e.from("98","hex"),r["bitcoin-block"]=e.from("b0","hex"),r["bitcoin-tx"]=e.from("b1","hex"),r["zcash-block"]=e.from("c0","hex"),r["zcash-tx"]=e.from("c1","hex"),r["stellar-block"]=e.from("d0","hex"),r["stellar-tx"]=e.from("d1","hex"),r["decred-block"]=e.from("e0","hex"),r["decred-tx"]=e.from("e1","hex"),r["dash-block"]=e.from("f0","hex"),r["dash-tx"]=e.from("f1","hex"),r["swarm-manifest"]=e.from("fa","hex"),r["swarm-feed"]=e.from("fb","hex"),r["dag-json"]=e.from("0129","hex"),r.path=e.from("2f","hex"),r["ipld-ns"]=e.from("e2","hex"),r["ipfs-ns"]=e.from("e3","hex"),r["swarm-ns"]=e.from("e4","hex"),r["ipns-ns"]=e.from("e5","hex"),r["ed25519-pub"]=e.from("ed","hex"),r["holochain-adr-v0"]=e.from("807124","hex"),r["holochain-adr-v1"]=e.from("817124","hex"),r["holochain-key-v0"]=e.from("947124","hex"),r["holochain-key-v1"]=e.from("957124","hex"),r["holochain-sig-v0"]=e.from("a27124","hex"),r["holochain-sig-v1"]=e.from("a37124","hex")}).call(this,n(0).Buffer)},function(e,r,n){"use strict";(function(r){var t=n(1);function o(e){return parseInt(e.toString("hex"),16)}function i(e){var n=e.toString(16);return n.length%2==1&&(n="0"+n),r.from(n,"hex")}e.exports={numberToBuffer:i,bufferToNumber:o,varintBufferEncode:function(e){return r.from(t.encode(o(e)))},varintBufferDecode:function(e){return i(t.decode(e))}}}).call(this,n(0).Buffer)},function(e,r,n){e.exports=n(5)},function(e,r,n){"use strict";(function(t){var o=n(1),i=n(13),s=n(14),f=n(3);(r=e.exports).addPrefix=function(e,r){var n;if(t.isBuffer(e))n=f.varintBufferEncode(e);else{if(!i[e])throw new Error("multicodec not recognized");n=i[e]}return t.concat([n,r])},r.rmPrefix=function(e){return o.decode(e),e.slice(o.decode.bytes)},r.getCodec=function(e){var r=f.varintBufferDecode(e),n=s[r.toString("hex")];if(void 0===n)throw new Error("Code `0x"+r.toString("hex")+"` not found");return n},r.getName=function(e){return s[e.toString(16)]},r.getNumber=function(e){var r=i[e];if(void 0===r)throw new Error("Codec `"+e+"` not found");return f.varintBufferDecode(r)[0]},r.getCode=function(e){return o.decode(e)},r.getCodeVarint=function(e){var r=i[e];if(void 0===r)throw new Error("Codec `"+e+"` not found");return r},r.getVarint=function(e){return o.encode(e)};var h=n(15);Object.assign(r,h),r.print=n(16)}).call(this,n(0).Buffer)},function(e,r,n){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":t(window))&&(o=window)}e.exports=o},function(e,r,n){"use strict";r.byteLength=function(e){var r=b(e),n=r[0],t=r[1];return 3*(n+t)/4-t},r.toByteArray=function(e){for(var r,n=b(e),t=n[0],s=n[1],f=new i(function(e,r,n){return 3*(r+n)/4-n}(0,t,s)),h=0,a=s>0?t-4:t,k=0;k<a;k+=4)r=o[e.charCodeAt(k)]<<18|o[e.charCodeAt(k+1)]<<12|o[e.charCodeAt(k+2)]<<6|o[e.charCodeAt(k+3)],f[h++]=r>>16&255,f[h++]=r>>8&255,f[h++]=255&r;2===s&&(r=o[e.charCodeAt(k)]<<2|o[e.charCodeAt(k+1)]>>4,f[h++]=255&r);1===s&&(r=o[e.charCodeAt(k)]<<10|o[e.charCodeAt(k+1)]<<4|o[e.charCodeAt(k+2)]>>2,f[h++]=r>>8&255,f[h++]=255&r);return f},r.fromByteArray=function(e){for(var r,n=e.length,o=n%3,i=[],s=0,f=n-o;s<f;s+=16383)i.push(a(e,s,s+16383>f?f:s+16383));1===o?(r=e[n-1],i.push(t[r>>2]+t[r<<4&63]+"==")):2===o&&(r=(e[n-2]<<8)+e[n-1],i.push(t[r>>10]+t[r>>4&63]+t[r<<2&63]+"="));return i.join("")};for(var t=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=s.length;f<h;++f)t[f]=s[f],o[s.charCodeAt(f)]=f;function b(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=r),[n,n===r?0:4-n%4]}function a(e,r,n){for(var o,i,s=[],f=r;f<n;f+=3)o=(e[f]<<16&16711680)+(e[f+1]<<8&65280)+(255&e[f+2]),s.push(t[(i=o)>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,r,n){"use strict";r.read=function(e,r,n,t,o){var i,s,f=8*o-t-1,h=(1<<f)-1,b=h>>1,a=-7,k=n?o-1:0,u=n?-1:1,l=e[r+k];for(k+=u,i=l&(1<<-a)-1,l>>=-a,a+=f;a>0;i=256*i+e[r+k],k+=u,a-=8);for(s=i&(1<<-a)-1,i>>=-a,a+=t;a>0;s=256*s+e[r+k],k+=u,a-=8);if(0===i)i=1-b;else{if(i===h)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,t),i-=b}return(l?-1:1)*s*Math.pow(2,i-t)},r.write=function(e,r,n,t,o,i){var s,f,h,b=8*i-o-1,a=(1<<b)-1,k=a>>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=t?0:i-1,m=t?1:-1,c=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,s=a):(s=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-s))<1&&(s--,h*=2),(r+=s+k>=1?u/h:u*Math.pow(2,1-k))*h>=2&&(s++,h/=2),s+k>=a?(f=0,s=a):s+k>=1?(f=(r*h-1)*Math.pow(2,o),s+=k):(f=r*Math.pow(2,k-1)*Math.pow(2,o),s=0));o>=8;e[n+l]=255&f,l+=m,f/=256,o-=8);for(s=s<<o|f,b+=o;b>0;e[n+l]=255&s,l+=m,s/=256,b-=8);e[n+l-m]|=128*c}},function(e,r,n){"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},function(e,r,n){"use strict";e.exports=function e(r,n,s){n=n||[];s=s||0;var f=s;for(;r>=i;)n[s++]=255&r|t,r/=128;for(;r&o;)n[s++]=255&r|t,r>>>=7;n[s]=0|r;e.bytes=s-f+1;return n};var t=128,o=-128,i=Math.pow(2,31)},function(e,r,n){"use strict";e.exports=function e(r,n){var i,s=0,n=n||0,f=0,h=n,b=r.length;do{if(h>=b)throw e.bytes=0,new RangeError("Could not decode varint");i=r[h++],s+=f<28?(i&o)<<f:(i&o)*Math.pow(2,f),f+=7}while(i>=t);e.bytes=h-n;return s};var t=128,o=127},function(e,r,n){"use strict";var t=Math.pow(2,7),o=Math.pow(2,14),i=Math.pow(2,21),s=Math.pow(2,28),f=Math.pow(2,35),h=Math.pow(2,42),b=Math.pow(2,49),a=Math.pow(2,56),k=Math.pow(2,63);e.exports=function(e){return e<t?1:e<o?2:e<i?3:e<s?4:e<f?5:e<h?6:e<b?7:e<a?8:e<k?9:10}},function(e,r,n){"use strict";var t=n(2),o=n(3).varintBufferEncode,i={};for(var s in e.exports=i,t){var f=t[s];i[s]=o(f)}},function(e,r,n){"use strict";var t=n(2),o={};for(var i in e.exports=o,t){o[t[i].toString("hex")]=i}},function(e,r,n){"use strict";e.exports=Object.freeze({PROTOBUF:80,CBOR:81,RLP:96,BENCODE:99,MULTICODEC:48,MULTIHASH:49,MULTIADDR:50,MULTIBASE:51,IDENTITY:0,SHA1:17,SHA2_256:18,SHA2_512:19,SHA3_512:20,SHA3_384:21,SHA3_256:22,SHA3_224:23,SHAKE_128:24,SHAKE_256:25,KECCAK_224:26,KECCAK_256:27,KECCAK_384:28,KECCAK_512:29,MURMUR3_128:34,MURMUR3_32:35,DBL_SHA2_256:86,MD4:212,MD5:213,BMT:214,X11:4352,BLAKE2B_8:45569,BLAKE2B_16:45570,BLAKE2B_24:45571,BLAKE2B_32:45572,BLAKE2B_40:45573,BLAKE2B_48:45574,BLAKE2B_56:45575,BLAKE2B_64:45576,BLAKE2B_72:45577,BLAKE2B_80:45578,BLAKE2B_88:45579,BLAKE2B_96:45580,BLAKE2B_104:45581,BLAKE2B_112:45582,BLAKE2B_120:45583,BLAKE2B_128:45584,BLAKE2B_136:45585,BLAKE2B_144:45586,BLAKE2B_152:45587,BLAKE2B_160:45588,BLAKE2B_168:45589,BLAKE2B_176:45590,BLAKE2B_184:45591,BLAKE2B_192:45592,BLAKE2B_200:45593,BLAKE2B_208:45594,BLAKE2B_216:45595,BLAKE2B_224:45596,BLAKE2B_232:45597,BLAKE2B_240:45598,BLAKE2B_248:45599,BLAKE2B_256:45600,BLAKE2B_264:45601,BLAKE2B_272:45602,BLAKE2B_280:45603,BLAKE2B_288:45604,BLAKE2B_296:45605,BLAKE2B_304:45606,BLAKE2B_312:45607,BLAKE2B_320:45608,BLAKE2B_328:45609,BLAKE2B_336:45610,BLAKE2B_344:45611,BLAKE2B_352:45612,BLAKE2B_360:45613,BLAKE2B_368:45614,BLAKE2B_376:45615,BLAKE2B_384:45616,BLAKE2B_392:45617,BLAKE2B_400:45618,BLAKE2B_408:45619,BLAKE2B_416:45620,BLAKE2B_424:45621,BLAKE2B_432:45622,BLAKE2B_440:45623,BLAKE2B_448:45624,BLAKE2B_456:45625,BLAKE2B_464:45626,BLAKE2B_472:45627,BLAKE2B_480:45628,BLAKE2B_488:45629,BLAKE2B_496:45630,BLAKE2B_504:45631,BLAKE2B_512:45632,BLAKE2S_8:45633,BLAKE2S_16:45634,BLAKE2S_24:45635,BLAKE2S_32:45636,BLAKE2S_40:45637,BLAKE2S_48:45638,BLAKE2S_56:45639,BLAKE2S_64:45640,BLAKE2S_72:45641,BLAKE2S_80:45642,BLAKE2S_88:45643,BLAKE2S_96:45644,BLAKE2S_104:45645,BLAKE2S_112:45646,BLAKE2S_120:45647,BLAKE2S_128:45648,BLAKE2S_136:45649,BLAKE2S_144:45650,BLAKE2S_152:45651,BLAKE2S_160:45652,BLAKE2S_168:45653,BLAKE2S_176:45654,BLAKE2S_184:45655,BLAKE2S_192:45656,BLAKE2S_200:45657,BLAKE2S_208:45658,BLAKE2S_216:45659,BLAKE2S_224:45660,BLAKE2S_232:45661,BLAKE2S_240:45662,BLAKE2S_248:45663,BLAKE2S_256:45664,SKEIN256_8:45825,SKEIN256_16:45826,SKEIN256_24:45827,SKEIN256_32:45828,SKEIN256_40:45829,SKEIN256_48:45830,SKEIN256_56:45831,SKEIN256_64:45832,SKEIN256_72:45833,SKEIN256_80:45834,SKEIN256_88:45835,SKEIN256_96:45836,SKEIN256_104:45837,SKEIN256_112:45838,SKEIN256_120:45839,SKEIN256_128:45840,SKEIN256_136:45841,SKEIN256_144:45842,SKEIN256_152:45843,SKEIN256_160:45844,SKEIN256_168:45845,SKEIN256_176:45846,SKEIN256_184:45847,SKEIN256_192:45848,SKEIN256_200:45849,SKEIN256_208:45850,SKEIN256_216:45851,SKEIN256_224:45852,SKEIN256_232:45853,SKEIN256_240:45854,SKEIN256_248:45855,SKEIN256_256:45856,SKEIN512_8:45857,SKEIN512_16:45858,SKEIN512_24:45859,SKEIN512_32:45860,SKEIN512_40:45861,SKEIN512_48:45862,SKEIN512_56:45863,SKEIN512_64:45864,SKEIN512_72:45865,SKEIN512_80:45866,SKEIN512_88:45867,SKEIN512_96:45868,SKEIN512_104:45869,SKEIN512_112:45870,SKEIN512_120:45871,SKEIN512_128:45872,SKEIN512_136:45873,SKEIN512_144:45874,SKEIN512_152:45875,SKEIN512_160:45876,SKEIN512_168:45877,SKEIN512_176:45878,SKEIN512_184:45879,SKEIN512_192:45880,SKEIN512_200:45881,SKEIN512_208:45882,SKEIN512_216:45883,SKEIN512_224:45884,SKEIN512_232:45885,SKEIN512_240:45886,SKEIN512_248:45887,SKEIN512_256:45888,SKEIN512_264:45889,SKEIN512_272:45890,SKEIN512_280:45891,SKEIN512_288:45892,SKEIN512_296:45893,SKEIN512_304:45894,SKEIN512_312:45895,SKEIN512_320:45896,SKEIN512_328:45897,SKEIN512_336:45898,SKEIN512_344:45899,SKEIN512_352:45900,SKEIN512_360:45901,SKEIN512_368:45902,SKEIN512_376:45903,SKEIN512_384:45904,SKEIN512_392:45905,SKEIN512_400:45906,SKEIN512_408:45907,SKEIN512_416:45908,SKEIN512_424:45909,SKEIN512_432:45910,SKEIN512_440:45911,SKEIN512_448:45912,SKEIN512_456:45913,SKEIN512_464:45914,SKEIN512_472:45915,SKEIN512_480:45916,SKEIN512_488:45917,SKEIN512_496:45918,SKEIN512_504:45919,SKEIN512_512:45920,SKEIN1024_8:45921,SKEIN1024_16:45922,SKEIN1024_24:45923,SKEIN1024_32:45924,SKEIN1024_40:45925,SKEIN1024_48:45926,SKEIN1024_56:45927,SKEIN1024_64:45928,SKEIN1024_72:45929,SKEIN1024_80:45930,SKEIN1024_88:45931,SKEIN1024_96:45932,SKEIN1024_104:45933,SKEIN1024_112:45934,SKEIN1024_120:45935,SKEIN1024_128:45936,SKEIN1024_136:45937,SKEIN1024_144:45938,SKEIN1024_152:45939,SKEIN1024_160:45940,SKEIN1024_168:45941,SKEIN1024_176:45942,SKEIN1024_184:45943,SKEIN1024_192:45944,SKEIN1024_200:45945,SKEIN1024_208:45946,SKEIN1024_216:45947,SKEIN1024_224:45948,SKEIN1024_232:45949,SKEIN1024_240:45950,SKEIN1024_248:45951,SKEIN1024_256:45952,SKEIN1024_264:45953,SKEIN1024_272:45954,SKEIN1024_280:45955,SKEIN1024_288:45956,SKEIN1024_296:45957,SKEIN1024_304:45958,SKEIN1024_312:45959,SKEIN1024_320:45960,SKEIN1024_328:45961,SKEIN1024_336:45962,SKEIN1024_344:45963,SKEIN1024_352:45964,SKEIN1024_360:45965,SKEIN1024_368:45966,SKEIN1024_376:45967,SKEIN1024_384:45968,SKEIN1024_392:45969,SKEIN1024_400:45970,SKEIN1024_408:45971,SKEIN1024_416:45972,SKEIN1024_424:45973,SKEIN1024_432:45974,SKEIN1024_440:45975,SKEIN1024_448:45976,SKEIN1024_456:45977,SKEIN1024_464:45978,SKEIN1024_472:45979,SKEIN1024_480:45980,SKEIN1024_488:45981,SKEIN1024_496:45982,SKEIN1024_504:45983,SKEIN1024_512:45984,SKEIN1024_520:45985,SKEIN1024_528:45986,SKEIN1024_536:45987,SKEIN1024_544:45988,SKEIN1024_552:45989,SKEIN1024_560:45990,SKEIN1024_568:45991,SKEIN1024_576:45992,SKEIN1024_584:45993,SKEIN1024_592:45994,SKEIN1024_600:45995,SKEIN1024_608:45996,SKEIN1024_616:45997,SKEIN1024_624:45998,SKEIN1024_632:45999,SKEIN1024_640:46e3,SKEIN1024_648:46001,SKEIN1024_656:46002,SKEIN1024_664:46003,SKEIN1024_672:46004,SKEIN1024_680:46005,SKEIN1024_688:46006,SKEIN1024_696:46007,SKEIN1024_704:46008,SKEIN1024_712:46009,SKEIN1024_720:46010,SKEIN1024_728:46011,SKEIN1024_736:46012,SKEIN1024_744:46013,SKEIN1024_752:46014,SKEIN1024_760:46015,SKEIN1024_768:46016,SKEIN1024_776:46017,SKEIN1024_784:46018,SKEIN1024_792:46019,SKEIN1024_800:46020,SKEIN1024_808:46021,SKEIN1024_816:46022,SKEIN1024_824:46023,SKEIN1024_832:46024,SKEIN1024_840:46025,SKEIN1024_848:46026,SKEIN1024_856:46027,SKEIN1024_864:46028,SKEIN1024_872:46029,SKEIN1024_880:46030,SKEIN1024_888:46031,SKEIN1024_896:46032,SKEIN1024_904:46033,SKEIN1024_912:46034,SKEIN1024_920:46035,SKEIN1024_928:46036,SKEIN1024_936:46037,SKEIN1024_944:46038,SKEIN1024_952:46039,SKEIN1024_960:46040,SKEIN1024_968:46041,SKEIN1024_976:46042,SKEIN1024_984:46043,SKEIN1024_992:46044,SKEIN1024_1000:46045,SKEIN1024_1008:46046,SKEIN1024_1016:46047,SKEIN1024_1024:46048,IP4:4,TCP:6,DCCP:33,IP6:41,IP6ZONE:42,DNS:53,DNS4:54,DNS6:55,DNSADDR:56,SCTP:132,UDP:273,P2P_WEBRTC_STAR:275,P2P_WEBRTC_DIRECT:276,P2P_STARDUST:277,P2P_CIRCUIT:290,UDT:301,UTP:302,UNIX:400,P2P:421,IPFS:421,HTTPS:443,ONION:444,ONION3:445,GARLIC64:446,GARLIC32:447,QUIC:460,WS:477,WSS:478,P2P_WEBSOCKET_STAR:479,HTTP:480,RAW:85,DAG_PB:112,DAG_CBOR:113,LIBP2P_KEY:114,GIT_RAW:120,TORRENT_INFO:123,TORRENT_FILE:124,LEOFCOIN_BLOCK:129,LEOFCOIN_TX:130,LEOFCOIN_PR:131,ETH_BLOCK:144,ETH_BLOCK_LIST:145,ETH_TX_TRIE:146,ETH_TX:147,ETH_TX_RECEIPT_TRIE:148,ETH_TX_RECEIPT:149,ETH_STATE_TRIE:150,ETH_ACCOUNT_SNAPSHOT:151,ETH_STORAGE_TRIE:152,BITCOIN_BLOCK:176,BITCOIN_TX:177,ZCASH_BLOCK:192,ZCASH_TX:193,STELLAR_BLOCK:208,STELLAR_TX:209,DECRED_BLOCK:224,DECRED_TX:225,DASH_BLOCK:240,DASH_TX:241,SWARM_MANIFEST:250,SWARM_FEED:251,DAG_JSON:297,PATH:47,IPLD_NS:226,IPFS_NS:227,SWARM_NS:228,IPNS_NS:229,ED25519_PUB:237,HOLOCHAIN_ADR_V0:8417572,HOLOCHAIN_ADR_V1:8483108,HOLOCHAIN_KEY_V0:9728292,HOLOCHAIN_KEY_V1:9793828,HOLOCHAIN_SIG_V0:10645796,HOLOCHAIN_SIG_V1:10711332})},function(e,r,n){"use strict";e.exports=Object.freeze({80:"protobuf",81:"cbor",96:"rlp",99:"bencode",48:"multicodec",49:"multihash",50:"multiaddr",51:"multibase",0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",20:"sha3-512",21:"sha3-384",22:"sha3-256",23:"sha3-224",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",86:"dbl-sha2-256",212:"md4",213:"md5",214:"bmt",4352:"x11",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"skein256-8",45826:"skein256-16",45827:"skein256-24",45828:"skein256-32",45829:"skein256-40",45830:"skein256-48",45831:"skein256-56",45832:"skein256-64",45833:"skein256-72",45834:"skein256-80",45835:"skein256-88",45836:"skein256-96",45837:"skein256-104",45838:"skein256-112",45839:"skein256-120",45840:"skein256-128",45841:"skein256-136",45842:"skein256-144",45843:"skein256-152",45844:"skein256-160",45845:"skein256-168",45846:"skein256-176",45847:"skein256-184",45848:"skein256-192",45849:"skein256-200",45850:"skein256-208",45851:"skein256-216",45852:"skein256-224",45853:"skein256-232",45854:"skein256-240",45855:"skein256-248",45856:"skein256-256",45857:"skein512-8",45858:"skein512-16",45859:"skein512-24",45860:"skein512-32",45861:"skein512-40",45862:"skein512-48",45863:"skein512-56",45864:"skein512-64",45865:"skein512-72",45866:"skein512-80",45867:"skein512-88",45868:"skein512-96",45869:"skein512-104",45870:"skein512-112",45871:"skein512-120",45872:"skein512-128",45873:"skein512-136",45874:"skein512-144",45875:"skein512-152",45876:"skein512-160",45877:"skein512-168",45878:"skein512-176",45879:"skein512-184",45880:"skein512-192",45881:"skein512-200",45882:"skein512-208",45883:"skein512-216",45884:"skein512-224",45885:"skein512-232",45886:"skein512-240",45887:"skein512-248",45888:"skein512-256",45889:"skein512-264",45890:"skein512-272",45891:"skein512-280",45892:"skein512-288",45893:"skein512-296",45894:"skein512-304",45895:"skein512-312",45896:"skein512-320",45897:"skein512-328",45898:"skein512-336",45899:"skein512-344",45900:"skein512-352",45901:"skein512-360",45902:"skein512-368",45903:"skein512-376",45904:"skein512-384",45905:"skein512-392",45906:"skein512-400",45907:"skein512-408",45908:"skein512-416",45909:"skein512-424",45910:"skein512-432",45911:"skein512-440",45912:"skein512-448",45913:"skein512-456",45914:"skein512-464",45915:"skein512-472",45916:"skein512-480",45917:"skein512-488",45918:"skein512-496",45919:"skein512-504",45920:"skein512-512",45921:"skein1024-8",45922:"skein1024-16",45923:"skein1024-24",45924:"skein1024-32",45925:"skein1024-40",45926:"skein1024-48",45927:"skein1024-56",45928:"skein1024-64",45929:"skein1024-72",45930:"skein1024-80",45931:"skein1024-88",45932:"skein1024-96",45933:"skein1024-104",45934:"skein1024-112",45935:"skein1024-120",45936:"skein1024-128",45937:"skein1024-136",45938:"skein1024-144",45939:"skein1024-152",45940:"skein1024-160",45941:"skein1024-168",45942:"skein1024-176",45943:"skein1024-184",45944:"skein1024-192",45945:"skein1024-200",45946:"skein1024-208",45947:"skein1024-216",45948:"skein1024-224",45949:"skein1024-232",45950:"skein1024-240",45951:"skein1024-248",45952:"skein1024-256",45953:"skein1024-264",45954:"skein1024-272",45955:"skein1024-280",45956:"skein1024-288",45957:"skein1024-296",45958:"skein1024-304",45959:"skein1024-312",45960:"skein1024-320",45961:"skein1024-328",45962:"skein1024-336",45963:"skein1024-344",45964:"skein1024-352",45965:"skein1024-360",45966:"skein1024-368",45967:"skein1024-376",45968:"skein1024-384",45969:"skein1024-392",45970:"skein1024-400",45971:"skein1024-408",45972:"skein1024-416",45973:"skein1024-424",45974:"skein1024-432",45975:"skein1024-440",45976:"skein1024-448",45977:"skein1024-456",45978:"skein1024-464",45979:"skein1024-472",45980:"skein1024-480",45981:"skein1024-488",45982:"skein1024-496",45983:"skein1024-504",45984:"skein1024-512",45985:"skein1024-520",45986:"skein1024-528",45987:"skein1024-536",45988:"skein1024-544",45989:"skein1024-552",45990:"skein1024-560",45991:"skein1024-568",45992:"skein1024-576",45993:"skein1024-584",45994:"skein1024-592",45995:"skein1024-600",45996:"skein1024-608",45997:"skein1024-616",45998:"skein1024-624",45999:"skein1024-632",46000:"skein1024-640",46001:"skein1024-648",46002:"skein1024-656",46003:"skein1024-664",46004:"skein1024-672",46005:"skein1024-680",46006:"skein1024-688",46007:"skein1024-696",46008:"skein1024-704",46009:"skein1024-712",46010:"skein1024-720",46011:"skein1024-728",46012:"skein1024-736",46013:"skein1024-744",46014:"skein1024-752",46015:"skein1024-760",46016:"skein1024-768",46017:"skein1024-776",46018:"skein1024-784",46019:"skein1024-792",46020:"skein1024-800",46021:"skein1024-808",46022:"skein1024-816",46023:"skein1024-824",46024:"skein1024-832",46025:"skein1024-840",46026:"skein1024-848",46027:"skein1024-856",46028:"skein1024-864",46029:"skein1024-872",46030:"skein1024-880",46031:"skein1024-888",46032:"skein1024-896",46033:"skein1024-904",46034:"skein1024-912",46035:"skein1024-920",46036:"skein1024-928",46037:"skein1024-936",46038:"skein1024-944",46039:"skein1024-952",46040:"skein1024-960",46041:"skein1024-968",46042:"skein1024-976",46043:"skein1024-984",46044:"skein1024-992",46045:"skein1024-1000",46046:"skein1024-1008",46047:"skein1024-1016",46048:"skein1024-1024",4:"ip4",6:"tcp",33:"dccp",41:"ip6",42:"ip6zone",53:"dns",54:"dns4",55:"dns6",56:"dnsaddr",132:"sctp",273:"udp",275:"p2p-webrtc-star",276:"p2p-webrtc-direct",277:"p2p-stardust",290:"p2p-circuit",301:"udt",302:"utp",400:"unix",421:"p2p",443:"https",444:"onion",445:"onion3",446:"garlic64",447:"garlic32",460:"quic",477:"ws",478:"wss",479:"p2p-websocket-star",480:"http",85:"raw",112:"dag-pb",113:"dag-cbor",114:"libp2p-key",120:"git-raw",123:"torrent-info",124:"torrent-file",129:"leofcoin-block",130:"leofcoin-tx",131:"leofcoin-pr",144:"eth-block",145:"eth-block-list",146:"eth-tx-trie",147:"eth-tx",148:"eth-tx-receipt-trie",149:"eth-tx-receipt",150:"eth-state-trie",151:"eth-account-snapshot",152:"eth-storage-trie",176:"bitcoin-block",177:"bitcoin-tx",192:"zcash-block",193:"zcash-tx",208:"stellar-block",209:"stellar-tx",224:"decred-block",225:"decred-tx",240:"dash-block",241:"dash-tx",250:"swarm-manifest",251:"swarm-feed",297:"dag-json",47:"path",226:"ipld-ns",227:"ipfs-ns",228:"swarm-ns",229:"ipns-ns",237:"ed25519-pub",8417572:"holochain-adr-v0",8483108:"holochain-adr-v1",9728292:"holochain-key-v0",9793828:"holochain-key-v1",10645796:"holochain-sig-v0",10711332:"holochain-sig-v1"})}])});
/*! For license information please see index.min.js.LICENSE */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Multicodec=t():e.Multicodec=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e){e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},function(e,t,n){"use strict";(function(e){var r=n(7),i=n(8),o=n(9);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return f(this,e,t,n)}function f(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=l(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|k(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):l(e,t);if("Buffer"===t.type&&o(t.data))return l(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t){if(h(t),e=a(e,t<0?0:0|k(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function l(e,t){var n=t.length<0?0:0|k(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function k(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function d(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(f(e,o+l)!==f(t,l)){c=!1;break}if(c)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function v(e,t,n,r){return V(z(t,e.length-n),e,n,r)}function m(e,t,n,r){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return m(e,t,n,r)}function A(e,t,n,r){return V(F(t),e,n,r)}function _(e,t,n,r){return V(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,f=e[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=n)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=c}return function(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=B));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return f(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return c(null,e)},u.allocUnsafeSlow=function(e){return c(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?P(this,0,e):b.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),f=this.slice(r,i),h=e.slice(t,n),c=0;c<a;++c)if(f[c]!==h[c]){o=f[c],s=h[c];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return d(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return d(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return m(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=N(e[o]);return i}function U(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Y(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function C(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||C(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,o){return o||C(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Y(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Y(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Y(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Y(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:z(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(6))},function(e,t,n){"use strict";e.exports={encode:n(10),decode:n(11),encodingLength:n(12)}},function(e,t,n){"use strict";(function(t){const r=n(2);function i(e){return parseInt(e.toString("hex"),16)}function o(e){let n=e.toString(16);return n.length%2==1&&(n="0"+n),t.from(n,"hex")}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return t.from(r.encode(i(e)))},varintBufferDecode:function(e){return o(r.decode(e))},varintEncode:function(e){return t.from(r.encode(e))}}}).call(this,n(1).Buffer)},function(e,t,n){e.exports=n(5)},function(e,t,n){"use strict";(function(r){const i=n(2),o=n(13),s=n(14),a=n(3);(t=e.exports).addPrefix=(e,t)=>{let n;if(r.isBuffer(e))n=a.varintBufferEncode(e);else{if(!o[e])throw new Error("multicodec not recognized");n=o[e]}return r.concat([n,t])},t.rmPrefix=e=>(i.decode(e),e.slice(i.decode.bytes)),t.getCodec=e=>{const t=a.varintBufferDecode(e),n=s[t.toString("hex")];if(void 0===n)throw new Error("Code `0x"+t.toString("hex")+"` not found");return n},t.getName=e=>s[e.toString(16)],t.getNumber=e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return a.varintBufferDecode(t)[0]},t.getCode=e=>i.decode(e),t.getCodeVarint=e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=e=>i.encode(e);const u=n(15);Object.assign(t,u),t.print=n(16)}).call(this,n(1).Buffer)},function(e,t,n){"use strict";var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,n){"use strict";t.byteLength=function(e){var t=f(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=f(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),h=0,c=a>0?s-4:s;for(n=0;n<c;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[h++]=t>>16&255,u[h++]=t>>8&255,u[h++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[h++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[h++]=t>>8&255,u[h++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(h(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function f(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,n){"use strict";t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,f=u>>1,h=-7,c=n?i-1:0,l=n?-1:1,k=e[t+c];for(c+=l,o=k&(1<<-h)-1,k>>=-h,h+=a;h>0;o=256*o+e[t+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(k?-1:1);s+=Math.pow(2,r),o-=f}return(k?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,k=r?0:o-1,p=r?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[n+k]=255&a,k+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[n+k]=255&s,k+=p,s/=256,f-=8);e[n+k-p]|=128*b}},function(e,t,n){"use strict";var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,n){"use strict";e.exports=function e(t,n,s){n=n||[];var a=s=s||0;for(;t>=o;)n[s++]=255&t|r,t/=128;for(;t&i;)n[s++]=255&t|r,t>>>=7;return n[s]=0|t,e.bytes=s-a+1,n};var r=128,i=-128,o=Math.pow(2,31)},function(e,t,n){"use strict";e.exports=function e(t,n){var o,s=0,a=0,u=n=n||0,f=t.length;do{if(u>=f)throw e.bytes=0,new RangeError("Could not decode varint");o=t[u++],s+=a<28?(o&i)<<a:(o&i)*Math.pow(2,a),a+=7}while(o>=r);return e.bytes=u-n,s};var r=128,i=127},function(e,t,n){"use strict";var r=Math.pow(2,7),i=Math.pow(2,14),o=Math.pow(2,21),s=Math.pow(2,28),a=Math.pow(2,35),u=Math.pow(2,42),f=Math.pow(2,49),h=Math.pow(2,56),c=Math.pow(2,63);e.exports=function(e){return e<r?1:e<i?2:e<o?3:e<s?4:e<a?5:e<u?6:e<f?7:e<h?8:e<c?9:10}},function(e,t,n){"use strict";const r=n(0),i=n(3).varintEncode,o={};for(const s in r){const e=r[s];o[s]=i(e)}e.exports=Object.freeze(o)},function(e,t,n){"use strict";const r=n(0),i={};for(const o in r){i[r[o].toString(16)]=o}e.exports=Object.freeze(i)},function(e,t,n){"use strict";const r=n(0),i={};for(const[o,s]of Object.entries(r))i[o.toUpperCase().replace(/-/g,"_")]=s;e.exports=Object.freeze(i)},function(e,t,n){"use strict";const r=n(0),i={};for(const[o,s]of Object.entries(r))void 0===i[s]&&(i[s]=o);e.exports=Object.freeze(i)}])}));
//# sourceMappingURL=index.min.js.map

@@ -7,3 +7,4 @@ 'use strict'

// eslint-disable-next-line no-console
console.log(prefixedProtobuf)
// => prefixedProtobuf 0x50...
{
"name": "multicodec",
"version": "0.5.5",
"version": "0.5.6",
"description": "JavaScript implementation of the multicodec specification",

@@ -46,12 +46,15 @@ "leadMaintainer": "Henrique Dias <hacdias@gmail.com>",

"devDependencies": {
"aegir": "^18.2.2",
"aegir": "^20.2.0",
"bent": "^7.0.1",
"chai": "^4.2.0",
"pre-push": "~0.1.1",
"dirty-chai": "^2.0.1"
"dirty-chai": "^2.0.1",
"pre-push": "~0.1.1"
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
"Filip Š <filip.stamcar@hotmail.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Henrique Dias <hacdias@gmail.com>",
"Marcin Rataj <lidel@lidel.org>",
"Mikeal Rogers <mikeal.rogers@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",

@@ -58,0 +61,0 @@ "Volker Mische <volker.mische@gmail.com>",

@@ -44,2 +44,10 @@ # js-multicodec

// prefixedProtobuf 0x50...
// The multicodec codec values can be accessed directly:
console.log(multicodec.DAG_CBOR)
// 113
// To get the string representation of a codec, e.g. for error messages:
console.log(multicodec.print[113])
// dag-cbor
```

@@ -59,3 +67,3 @@

curl -X GET https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv | ./tools/update-table.py
node ./tools/update-table.js

@@ -62,0 +70,0 @@ ## Contribute

@@ -1,448 +0,12 @@

// THIS FILE IS GENERATED, DO NO EDIT MANUALLY
// For more information see the README.md
/* eslint-disable dot-notation */
'use strict'
module.exports = Object.freeze({
// serialization
PROTOBUF: 0x50,
CBOR: 0x51,
RLP: 0x60,
BENCODE: 0x63,
JSON: 0x0200,
MESSAGEPACK: 0x0201,
const table = require('./base-table.json')
// multiformat
MULTICODEC: 0x30,
MULTIHASH: 0x31,
MULTIADDR: 0x32,
MULTIBASE: 0x33,
// map for codecConstant -> code
const constants = {}
// multihash
IDENTITY: 0x00,
SHA1: 0x11,
SHA2_256: 0x12,
SHA2_512: 0x13,
SHA3_512: 0x14,
SHA3_384: 0x15,
SHA3_256: 0x16,
SHA3_224: 0x17,
SHAKE_128: 0x18,
SHAKE_256: 0x19,
KECCAK_224: 0x1a,
KECCAK_256: 0x1b,
KECCAK_384: 0x1c,
KECCAK_512: 0x1d,
MURMUR3_128: 0x22,
MURMUR3_32: 0x23,
DBL_SHA2_256: 0x56,
MD4: 0xd4,
MD5: 0xd5,
BMT: 0xd6,
X11: 0x1100,
BLAKE2B_8: 0xb201,
BLAKE2B_16: 0xb202,
BLAKE2B_24: 0xb203,
BLAKE2B_32: 0xb204,
BLAKE2B_40: 0xb205,
BLAKE2B_48: 0xb206,
BLAKE2B_56: 0xb207,
BLAKE2B_64: 0xb208,
BLAKE2B_72: 0xb209,
BLAKE2B_80: 0xb20a,
BLAKE2B_88: 0xb20b,
BLAKE2B_96: 0xb20c,
BLAKE2B_104: 0xb20d,
BLAKE2B_112: 0xb20e,
BLAKE2B_120: 0xb20f,
BLAKE2B_128: 0xb210,
BLAKE2B_136: 0xb211,
BLAKE2B_144: 0xb212,
BLAKE2B_152: 0xb213,
BLAKE2B_160: 0xb214,
BLAKE2B_168: 0xb215,
BLAKE2B_176: 0xb216,
BLAKE2B_184: 0xb217,
BLAKE2B_192: 0xb218,
BLAKE2B_200: 0xb219,
BLAKE2B_208: 0xb21a,
BLAKE2B_216: 0xb21b,
BLAKE2B_224: 0xb21c,
BLAKE2B_232: 0xb21d,
BLAKE2B_240: 0xb21e,
BLAKE2B_248: 0xb21f,
BLAKE2B_256: 0xb220,
BLAKE2B_264: 0xb221,
BLAKE2B_272: 0xb222,
BLAKE2B_280: 0xb223,
BLAKE2B_288: 0xb224,
BLAKE2B_296: 0xb225,
BLAKE2B_304: 0xb226,
BLAKE2B_312: 0xb227,
BLAKE2B_320: 0xb228,
BLAKE2B_328: 0xb229,
BLAKE2B_336: 0xb22a,
BLAKE2B_344: 0xb22b,
BLAKE2B_352: 0xb22c,
BLAKE2B_360: 0xb22d,
BLAKE2B_368: 0xb22e,
BLAKE2B_376: 0xb22f,
BLAKE2B_384: 0xb230,
BLAKE2B_392: 0xb231,
BLAKE2B_400: 0xb232,
BLAKE2B_408: 0xb233,
BLAKE2B_416: 0xb234,
BLAKE2B_424: 0xb235,
BLAKE2B_432: 0xb236,
BLAKE2B_440: 0xb237,
BLAKE2B_448: 0xb238,
BLAKE2B_456: 0xb239,
BLAKE2B_464: 0xb23a,
BLAKE2B_472: 0xb23b,
BLAKE2B_480: 0xb23c,
BLAKE2B_488: 0xb23d,
BLAKE2B_496: 0xb23e,
BLAKE2B_504: 0xb23f,
BLAKE2B_512: 0xb240,
BLAKE2S_8: 0xb241,
BLAKE2S_16: 0xb242,
BLAKE2S_24: 0xb243,
BLAKE2S_32: 0xb244,
BLAKE2S_40: 0xb245,
BLAKE2S_48: 0xb246,
BLAKE2S_56: 0xb247,
BLAKE2S_64: 0xb248,
BLAKE2S_72: 0xb249,
BLAKE2S_80: 0xb24a,
BLAKE2S_88: 0xb24b,
BLAKE2S_96: 0xb24c,
BLAKE2S_104: 0xb24d,
BLAKE2S_112: 0xb24e,
BLAKE2S_120: 0xb24f,
BLAKE2S_128: 0xb250,
BLAKE2S_136: 0xb251,
BLAKE2S_144: 0xb252,
BLAKE2S_152: 0xb253,
BLAKE2S_160: 0xb254,
BLAKE2S_168: 0xb255,
BLAKE2S_176: 0xb256,
BLAKE2S_184: 0xb257,
BLAKE2S_192: 0xb258,
BLAKE2S_200: 0xb259,
BLAKE2S_208: 0xb25a,
BLAKE2S_216: 0xb25b,
BLAKE2S_224: 0xb25c,
BLAKE2S_232: 0xb25d,
BLAKE2S_240: 0xb25e,
BLAKE2S_248: 0xb25f,
BLAKE2S_256: 0xb260,
SKEIN256_8: 0xb301,
SKEIN256_16: 0xb302,
SKEIN256_24: 0xb303,
SKEIN256_32: 0xb304,
SKEIN256_40: 0xb305,
SKEIN256_48: 0xb306,
SKEIN256_56: 0xb307,
SKEIN256_64: 0xb308,
SKEIN256_72: 0xb309,
SKEIN256_80: 0xb30a,
SKEIN256_88: 0xb30b,
SKEIN256_96: 0xb30c,
SKEIN256_104: 0xb30d,
SKEIN256_112: 0xb30e,
SKEIN256_120: 0xb30f,
SKEIN256_128: 0xb310,
SKEIN256_136: 0xb311,
SKEIN256_144: 0xb312,
SKEIN256_152: 0xb313,
SKEIN256_160: 0xb314,
SKEIN256_168: 0xb315,
SKEIN256_176: 0xb316,
SKEIN256_184: 0xb317,
SKEIN256_192: 0xb318,
SKEIN256_200: 0xb319,
SKEIN256_208: 0xb31a,
SKEIN256_216: 0xb31b,
SKEIN256_224: 0xb31c,
SKEIN256_232: 0xb31d,
SKEIN256_240: 0xb31e,
SKEIN256_248: 0xb31f,
SKEIN256_256: 0xb320,
SKEIN512_8: 0xb321,
SKEIN512_16: 0xb322,
SKEIN512_24: 0xb323,
SKEIN512_32: 0xb324,
SKEIN512_40: 0xb325,
SKEIN512_48: 0xb326,
SKEIN512_56: 0xb327,
SKEIN512_64: 0xb328,
SKEIN512_72: 0xb329,
SKEIN512_80: 0xb32a,
SKEIN512_88: 0xb32b,
SKEIN512_96: 0xb32c,
SKEIN512_104: 0xb32d,
SKEIN512_112: 0xb32e,
SKEIN512_120: 0xb32f,
SKEIN512_128: 0xb330,
SKEIN512_136: 0xb331,
SKEIN512_144: 0xb332,
SKEIN512_152: 0xb333,
SKEIN512_160: 0xb334,
SKEIN512_168: 0xb335,
SKEIN512_176: 0xb336,
SKEIN512_184: 0xb337,
SKEIN512_192: 0xb338,
SKEIN512_200: 0xb339,
SKEIN512_208: 0xb33a,
SKEIN512_216: 0xb33b,
SKEIN512_224: 0xb33c,
SKEIN512_232: 0xb33d,
SKEIN512_240: 0xb33e,
SKEIN512_248: 0xb33f,
SKEIN512_256: 0xb340,
SKEIN512_264: 0xb341,
SKEIN512_272: 0xb342,
SKEIN512_280: 0xb343,
SKEIN512_288: 0xb344,
SKEIN512_296: 0xb345,
SKEIN512_304: 0xb346,
SKEIN512_312: 0xb347,
SKEIN512_320: 0xb348,
SKEIN512_328: 0xb349,
SKEIN512_336: 0xb34a,
SKEIN512_344: 0xb34b,
SKEIN512_352: 0xb34c,
SKEIN512_360: 0xb34d,
SKEIN512_368: 0xb34e,
SKEIN512_376: 0xb34f,
SKEIN512_384: 0xb350,
SKEIN512_392: 0xb351,
SKEIN512_400: 0xb352,
SKEIN512_408: 0xb353,
SKEIN512_416: 0xb354,
SKEIN512_424: 0xb355,
SKEIN512_432: 0xb356,
SKEIN512_440: 0xb357,
SKEIN512_448: 0xb358,
SKEIN512_456: 0xb359,
SKEIN512_464: 0xb35a,
SKEIN512_472: 0xb35b,
SKEIN512_480: 0xb35c,
SKEIN512_488: 0xb35d,
SKEIN512_496: 0xb35e,
SKEIN512_504: 0xb35f,
SKEIN512_512: 0xb360,
SKEIN1024_8: 0xb361,
SKEIN1024_16: 0xb362,
SKEIN1024_24: 0xb363,
SKEIN1024_32: 0xb364,
SKEIN1024_40: 0xb365,
SKEIN1024_48: 0xb366,
SKEIN1024_56: 0xb367,
SKEIN1024_64: 0xb368,
SKEIN1024_72: 0xb369,
SKEIN1024_80: 0xb36a,
SKEIN1024_88: 0xb36b,
SKEIN1024_96: 0xb36c,
SKEIN1024_104: 0xb36d,
SKEIN1024_112: 0xb36e,
SKEIN1024_120: 0xb36f,
SKEIN1024_128: 0xb370,
SKEIN1024_136: 0xb371,
SKEIN1024_144: 0xb372,
SKEIN1024_152: 0xb373,
SKEIN1024_160: 0xb374,
SKEIN1024_168: 0xb375,
SKEIN1024_176: 0xb376,
SKEIN1024_184: 0xb377,
SKEIN1024_192: 0xb378,
SKEIN1024_200: 0xb379,
SKEIN1024_208: 0xb37a,
SKEIN1024_216: 0xb37b,
SKEIN1024_224: 0xb37c,
SKEIN1024_232: 0xb37d,
SKEIN1024_240: 0xb37e,
SKEIN1024_248: 0xb37f,
SKEIN1024_256: 0xb380,
SKEIN1024_264: 0xb381,
SKEIN1024_272: 0xb382,
SKEIN1024_280: 0xb383,
SKEIN1024_288: 0xb384,
SKEIN1024_296: 0xb385,
SKEIN1024_304: 0xb386,
SKEIN1024_312: 0xb387,
SKEIN1024_320: 0xb388,
SKEIN1024_328: 0xb389,
SKEIN1024_336: 0xb38a,
SKEIN1024_344: 0xb38b,
SKEIN1024_352: 0xb38c,
SKEIN1024_360: 0xb38d,
SKEIN1024_368: 0xb38e,
SKEIN1024_376: 0xb38f,
SKEIN1024_384: 0xb390,
SKEIN1024_392: 0xb391,
SKEIN1024_400: 0xb392,
SKEIN1024_408: 0xb393,
SKEIN1024_416: 0xb394,
SKEIN1024_424: 0xb395,
SKEIN1024_432: 0xb396,
SKEIN1024_440: 0xb397,
SKEIN1024_448: 0xb398,
SKEIN1024_456: 0xb399,
SKEIN1024_464: 0xb39a,
SKEIN1024_472: 0xb39b,
SKEIN1024_480: 0xb39c,
SKEIN1024_488: 0xb39d,
SKEIN1024_496: 0xb39e,
SKEIN1024_504: 0xb39f,
SKEIN1024_512: 0xb3a0,
SKEIN1024_520: 0xb3a1,
SKEIN1024_528: 0xb3a2,
SKEIN1024_536: 0xb3a3,
SKEIN1024_544: 0xb3a4,
SKEIN1024_552: 0xb3a5,
SKEIN1024_560: 0xb3a6,
SKEIN1024_568: 0xb3a7,
SKEIN1024_576: 0xb3a8,
SKEIN1024_584: 0xb3a9,
SKEIN1024_592: 0xb3aa,
SKEIN1024_600: 0xb3ab,
SKEIN1024_608: 0xb3ac,
SKEIN1024_616: 0xb3ad,
SKEIN1024_624: 0xb3ae,
SKEIN1024_632: 0xb3af,
SKEIN1024_640: 0xb3b0,
SKEIN1024_648: 0xb3b1,
SKEIN1024_656: 0xb3b2,
SKEIN1024_664: 0xb3b3,
SKEIN1024_672: 0xb3b4,
SKEIN1024_680: 0xb3b5,
SKEIN1024_688: 0xb3b6,
SKEIN1024_696: 0xb3b7,
SKEIN1024_704: 0xb3b8,
SKEIN1024_712: 0xb3b9,
SKEIN1024_720: 0xb3ba,
SKEIN1024_728: 0xb3bb,
SKEIN1024_736: 0xb3bc,
SKEIN1024_744: 0xb3bd,
SKEIN1024_752: 0xb3be,
SKEIN1024_760: 0xb3bf,
SKEIN1024_768: 0xb3c0,
SKEIN1024_776: 0xb3c1,
SKEIN1024_784: 0xb3c2,
SKEIN1024_792: 0xb3c3,
SKEIN1024_800: 0xb3c4,
SKEIN1024_808: 0xb3c5,
SKEIN1024_816: 0xb3c6,
SKEIN1024_824: 0xb3c7,
SKEIN1024_832: 0xb3c8,
SKEIN1024_840: 0xb3c9,
SKEIN1024_848: 0xb3ca,
SKEIN1024_856: 0xb3cb,
SKEIN1024_864: 0xb3cc,
SKEIN1024_872: 0xb3cd,
SKEIN1024_880: 0xb3ce,
SKEIN1024_888: 0xb3cf,
SKEIN1024_896: 0xb3d0,
SKEIN1024_904: 0xb3d1,
SKEIN1024_912: 0xb3d2,
SKEIN1024_920: 0xb3d3,
SKEIN1024_928: 0xb3d4,
SKEIN1024_936: 0xb3d5,
SKEIN1024_944: 0xb3d6,
SKEIN1024_952: 0xb3d7,
SKEIN1024_960: 0xb3d8,
SKEIN1024_968: 0xb3d9,
SKEIN1024_976: 0xb3da,
SKEIN1024_984: 0xb3db,
SKEIN1024_992: 0xb3dc,
SKEIN1024_1000: 0xb3dd,
SKEIN1024_1008: 0xb3de,
SKEIN1024_1016: 0xb3df,
SKEIN1024_1024: 0xb3e0,
for (const [name, code] of Object.entries(table)) {
constants[name.toUpperCase().replace(/-/g, '_')] = code
}
// multiaddr
IP4: 0x04,
TCP: 0x06,
DCCP: 0x21,
IP6: 0x29,
IP6ZONE: 0x2a,
DNS: 0x35,
DNS4: 0x36,
DNS6: 0x37,
DNSADDR: 0x38,
SCTP: 0x84,
UDP: 0x0111,
P2P_WEBRTC_STAR: 0x0113,
P2P_WEBRTC_DIRECT: 0x0114,
P2P_STARDUST: 0x0115,
P2P_CIRCUIT: 0x0122,
UDT: 0x012d,
UTP: 0x012e,
UNIX: 0x0190,
P2P: 0x01a5,
IPFS: 0x01a5,
HTTPS: 0x01bb,
ONION: 0x01bc,
ONION3: 0x01bd,
GARLIC64: 0x01be,
GARLIC32: 0x01bf,
QUIC: 0x01cc,
WS: 0x01dd,
WSS: 0x01de,
P2P_WEBSOCKET_STAR: 0x01df,
HTTP: 0x01e0,
// ipld
RAW: 0x55,
DAG_PB: 0x70,
DAG_CBOR: 0x71,
LIBP2P_KEY: 0x72,
GIT_RAW: 0x78,
TORRENT_INFO: 0x7b,
TORRENT_FILE: 0x7c,
LEOFCOIN_BLOCK: 0x81,
LEOFCOIN_TX: 0x82,
LEOFCOIN_PR: 0x83,
ETH_BLOCK: 0x90,
ETH_BLOCK_LIST: 0x91,
ETH_TX_TRIE: 0x92,
ETH_TX: 0x93,
ETH_TX_RECEIPT_TRIE: 0x94,
ETH_TX_RECEIPT: 0x95,
ETH_STATE_TRIE: 0x96,
ETH_ACCOUNT_SNAPSHOT: 0x97,
ETH_STORAGE_TRIE: 0x98,
BITCOIN_BLOCK: 0xb0,
BITCOIN_TX: 0xb1,
ZCASH_BLOCK: 0xc0,
ZCASH_TX: 0xc1,
STELLAR_BLOCK: 0xd0,
STELLAR_TX: 0xd1,
DECRED_BLOCK: 0xe0,
DECRED_TX: 0xe1,
DASH_BLOCK: 0xf0,
DASH_TX: 0xf1,
SWARM_MANIFEST: 0xfa,
SWARM_FEED: 0xfb,
DAG_JSON: 0x0129,
// namespace
PATH: 0x2f,
IPLD_NS: 0xe2,
IPFS_NS: 0xe3,
SWARM_NS: 0xe4,
IPNS_NS: 0xe5,
ZERONET: 0xe6,
// key
ED25519_PUB: 0xed,
// holochain
HOLOCHAIN_ADR_V0: 0x807124,
HOLOCHAIN_ADR_V1: 0x817124,
HOLOCHAIN_KEY_V0: 0x947124,
HOLOCHAIN_KEY_V1: 0x957124,
HOLOCHAIN_SIG_V0: 0xa27124,
HOLOCHAIN_SIG_V1: 0xa37124
})
module.exports = Object.freeze(constants)
'use strict'
const baseTable = require('./base-table')
const baseTable = require('./base-table.json')
// this creates a map for code as hexString -> codecName
// map for hexString -> codecName
const nameTable = {}
module.exports = nameTable
for (let encodingName in baseTable) {
let code = baseTable[encodingName]
nameTable[code.toString('hex')] = encodingName
for (const encodingName in baseTable) {
const code = baseTable[encodingName]
nameTable[code.toString(16)] = encodingName
}
module.exports = Object.freeze(nameTable)

@@ -1,447 +0,12 @@

// THIS FILE IS GENERATED, DO NO EDIT MANUALLY
// For more information see the README.md
/* eslint-disable dot-notation */
'use strict'
module.exports = Object.freeze({
// serialization
0x50: 'protobuf',
0x51: 'cbor',
0x60: 'rlp',
0x63: 'bencode',
0x0200: 'json',
0x0201: 'messagepack',
const table = require('./base-table.json')
// multiformat
0x30: 'multicodec',
0x31: 'multihash',
0x32: 'multiaddr',
0x33: 'multibase',
// map for code -> print friendly name
const tableByCode = {}
// multihash
0x00: 'identity',
0x11: 'sha1',
0x12: 'sha2-256',
0x13: 'sha2-512',
0x14: 'sha3-512',
0x15: 'sha3-384',
0x16: 'sha3-256',
0x17: 'sha3-224',
0x18: 'shake-128',
0x19: 'shake-256',
0x1a: 'keccak-224',
0x1b: 'keccak-256',
0x1c: 'keccak-384',
0x1d: 'keccak-512',
0x22: 'murmur3-128',
0x23: 'murmur3-32',
0x56: 'dbl-sha2-256',
0xd4: 'md4',
0xd5: 'md5',
0xd6: 'bmt',
0x1100: 'x11',
0xb201: 'blake2b-8',
0xb202: 'blake2b-16',
0xb203: 'blake2b-24',
0xb204: 'blake2b-32',
0xb205: 'blake2b-40',
0xb206: 'blake2b-48',
0xb207: 'blake2b-56',
0xb208: 'blake2b-64',
0xb209: 'blake2b-72',
0xb20a: 'blake2b-80',
0xb20b: 'blake2b-88',
0xb20c: 'blake2b-96',
0xb20d: 'blake2b-104',
0xb20e: 'blake2b-112',
0xb20f: 'blake2b-120',
0xb210: 'blake2b-128',
0xb211: 'blake2b-136',
0xb212: 'blake2b-144',
0xb213: 'blake2b-152',
0xb214: 'blake2b-160',
0xb215: 'blake2b-168',
0xb216: 'blake2b-176',
0xb217: 'blake2b-184',
0xb218: 'blake2b-192',
0xb219: 'blake2b-200',
0xb21a: 'blake2b-208',
0xb21b: 'blake2b-216',
0xb21c: 'blake2b-224',
0xb21d: 'blake2b-232',
0xb21e: 'blake2b-240',
0xb21f: 'blake2b-248',
0xb220: 'blake2b-256',
0xb221: 'blake2b-264',
0xb222: 'blake2b-272',
0xb223: 'blake2b-280',
0xb224: 'blake2b-288',
0xb225: 'blake2b-296',
0xb226: 'blake2b-304',
0xb227: 'blake2b-312',
0xb228: 'blake2b-320',
0xb229: 'blake2b-328',
0xb22a: 'blake2b-336',
0xb22b: 'blake2b-344',
0xb22c: 'blake2b-352',
0xb22d: 'blake2b-360',
0xb22e: 'blake2b-368',
0xb22f: 'blake2b-376',
0xb230: 'blake2b-384',
0xb231: 'blake2b-392',
0xb232: 'blake2b-400',
0xb233: 'blake2b-408',
0xb234: 'blake2b-416',
0xb235: 'blake2b-424',
0xb236: 'blake2b-432',
0xb237: 'blake2b-440',
0xb238: 'blake2b-448',
0xb239: 'blake2b-456',
0xb23a: 'blake2b-464',
0xb23b: 'blake2b-472',
0xb23c: 'blake2b-480',
0xb23d: 'blake2b-488',
0xb23e: 'blake2b-496',
0xb23f: 'blake2b-504',
0xb240: 'blake2b-512',
0xb241: 'blake2s-8',
0xb242: 'blake2s-16',
0xb243: 'blake2s-24',
0xb244: 'blake2s-32',
0xb245: 'blake2s-40',
0xb246: 'blake2s-48',
0xb247: 'blake2s-56',
0xb248: 'blake2s-64',
0xb249: 'blake2s-72',
0xb24a: 'blake2s-80',
0xb24b: 'blake2s-88',
0xb24c: 'blake2s-96',
0xb24d: 'blake2s-104',
0xb24e: 'blake2s-112',
0xb24f: 'blake2s-120',
0xb250: 'blake2s-128',
0xb251: 'blake2s-136',
0xb252: 'blake2s-144',
0xb253: 'blake2s-152',
0xb254: 'blake2s-160',
0xb255: 'blake2s-168',
0xb256: 'blake2s-176',
0xb257: 'blake2s-184',
0xb258: 'blake2s-192',
0xb259: 'blake2s-200',
0xb25a: 'blake2s-208',
0xb25b: 'blake2s-216',
0xb25c: 'blake2s-224',
0xb25d: 'blake2s-232',
0xb25e: 'blake2s-240',
0xb25f: 'blake2s-248',
0xb260: 'blake2s-256',
0xb301: 'skein256-8',
0xb302: 'skein256-16',
0xb303: 'skein256-24',
0xb304: 'skein256-32',
0xb305: 'skein256-40',
0xb306: 'skein256-48',
0xb307: 'skein256-56',
0xb308: 'skein256-64',
0xb309: 'skein256-72',
0xb30a: 'skein256-80',
0xb30b: 'skein256-88',
0xb30c: 'skein256-96',
0xb30d: 'skein256-104',
0xb30e: 'skein256-112',
0xb30f: 'skein256-120',
0xb310: 'skein256-128',
0xb311: 'skein256-136',
0xb312: 'skein256-144',
0xb313: 'skein256-152',
0xb314: 'skein256-160',
0xb315: 'skein256-168',
0xb316: 'skein256-176',
0xb317: 'skein256-184',
0xb318: 'skein256-192',
0xb319: 'skein256-200',
0xb31a: 'skein256-208',
0xb31b: 'skein256-216',
0xb31c: 'skein256-224',
0xb31d: 'skein256-232',
0xb31e: 'skein256-240',
0xb31f: 'skein256-248',
0xb320: 'skein256-256',
0xb321: 'skein512-8',
0xb322: 'skein512-16',
0xb323: 'skein512-24',
0xb324: 'skein512-32',
0xb325: 'skein512-40',
0xb326: 'skein512-48',
0xb327: 'skein512-56',
0xb328: 'skein512-64',
0xb329: 'skein512-72',
0xb32a: 'skein512-80',
0xb32b: 'skein512-88',
0xb32c: 'skein512-96',
0xb32d: 'skein512-104',
0xb32e: 'skein512-112',
0xb32f: 'skein512-120',
0xb330: 'skein512-128',
0xb331: 'skein512-136',
0xb332: 'skein512-144',
0xb333: 'skein512-152',
0xb334: 'skein512-160',
0xb335: 'skein512-168',
0xb336: 'skein512-176',
0xb337: 'skein512-184',
0xb338: 'skein512-192',
0xb339: 'skein512-200',
0xb33a: 'skein512-208',
0xb33b: 'skein512-216',
0xb33c: 'skein512-224',
0xb33d: 'skein512-232',
0xb33e: 'skein512-240',
0xb33f: 'skein512-248',
0xb340: 'skein512-256',
0xb341: 'skein512-264',
0xb342: 'skein512-272',
0xb343: 'skein512-280',
0xb344: 'skein512-288',
0xb345: 'skein512-296',
0xb346: 'skein512-304',
0xb347: 'skein512-312',
0xb348: 'skein512-320',
0xb349: 'skein512-328',
0xb34a: 'skein512-336',
0xb34b: 'skein512-344',
0xb34c: 'skein512-352',
0xb34d: 'skein512-360',
0xb34e: 'skein512-368',
0xb34f: 'skein512-376',
0xb350: 'skein512-384',
0xb351: 'skein512-392',
0xb352: 'skein512-400',
0xb353: 'skein512-408',
0xb354: 'skein512-416',
0xb355: 'skein512-424',
0xb356: 'skein512-432',
0xb357: 'skein512-440',
0xb358: 'skein512-448',
0xb359: 'skein512-456',
0xb35a: 'skein512-464',
0xb35b: 'skein512-472',
0xb35c: 'skein512-480',
0xb35d: 'skein512-488',
0xb35e: 'skein512-496',
0xb35f: 'skein512-504',
0xb360: 'skein512-512',
0xb361: 'skein1024-8',
0xb362: 'skein1024-16',
0xb363: 'skein1024-24',
0xb364: 'skein1024-32',
0xb365: 'skein1024-40',
0xb366: 'skein1024-48',
0xb367: 'skein1024-56',
0xb368: 'skein1024-64',
0xb369: 'skein1024-72',
0xb36a: 'skein1024-80',
0xb36b: 'skein1024-88',
0xb36c: 'skein1024-96',
0xb36d: 'skein1024-104',
0xb36e: 'skein1024-112',
0xb36f: 'skein1024-120',
0xb370: 'skein1024-128',
0xb371: 'skein1024-136',
0xb372: 'skein1024-144',
0xb373: 'skein1024-152',
0xb374: 'skein1024-160',
0xb375: 'skein1024-168',
0xb376: 'skein1024-176',
0xb377: 'skein1024-184',
0xb378: 'skein1024-192',
0xb379: 'skein1024-200',
0xb37a: 'skein1024-208',
0xb37b: 'skein1024-216',
0xb37c: 'skein1024-224',
0xb37d: 'skein1024-232',
0xb37e: 'skein1024-240',
0xb37f: 'skein1024-248',
0xb380: 'skein1024-256',
0xb381: 'skein1024-264',
0xb382: 'skein1024-272',
0xb383: 'skein1024-280',
0xb384: 'skein1024-288',
0xb385: 'skein1024-296',
0xb386: 'skein1024-304',
0xb387: 'skein1024-312',
0xb388: 'skein1024-320',
0xb389: 'skein1024-328',
0xb38a: 'skein1024-336',
0xb38b: 'skein1024-344',
0xb38c: 'skein1024-352',
0xb38d: 'skein1024-360',
0xb38e: 'skein1024-368',
0xb38f: 'skein1024-376',
0xb390: 'skein1024-384',
0xb391: 'skein1024-392',
0xb392: 'skein1024-400',
0xb393: 'skein1024-408',
0xb394: 'skein1024-416',
0xb395: 'skein1024-424',
0xb396: 'skein1024-432',
0xb397: 'skein1024-440',
0xb398: 'skein1024-448',
0xb399: 'skein1024-456',
0xb39a: 'skein1024-464',
0xb39b: 'skein1024-472',
0xb39c: 'skein1024-480',
0xb39d: 'skein1024-488',
0xb39e: 'skein1024-496',
0xb39f: 'skein1024-504',
0xb3a0: 'skein1024-512',
0xb3a1: 'skein1024-520',
0xb3a2: 'skein1024-528',
0xb3a3: 'skein1024-536',
0xb3a4: 'skein1024-544',
0xb3a5: 'skein1024-552',
0xb3a6: 'skein1024-560',
0xb3a7: 'skein1024-568',
0xb3a8: 'skein1024-576',
0xb3a9: 'skein1024-584',
0xb3aa: 'skein1024-592',
0xb3ab: 'skein1024-600',
0xb3ac: 'skein1024-608',
0xb3ad: 'skein1024-616',
0xb3ae: 'skein1024-624',
0xb3af: 'skein1024-632',
0xb3b0: 'skein1024-640',
0xb3b1: 'skein1024-648',
0xb3b2: 'skein1024-656',
0xb3b3: 'skein1024-664',
0xb3b4: 'skein1024-672',
0xb3b5: 'skein1024-680',
0xb3b6: 'skein1024-688',
0xb3b7: 'skein1024-696',
0xb3b8: 'skein1024-704',
0xb3b9: 'skein1024-712',
0xb3ba: 'skein1024-720',
0xb3bb: 'skein1024-728',
0xb3bc: 'skein1024-736',
0xb3bd: 'skein1024-744',
0xb3be: 'skein1024-752',
0xb3bf: 'skein1024-760',
0xb3c0: 'skein1024-768',
0xb3c1: 'skein1024-776',
0xb3c2: 'skein1024-784',
0xb3c3: 'skein1024-792',
0xb3c4: 'skein1024-800',
0xb3c5: 'skein1024-808',
0xb3c6: 'skein1024-816',
0xb3c7: 'skein1024-824',
0xb3c8: 'skein1024-832',
0xb3c9: 'skein1024-840',
0xb3ca: 'skein1024-848',
0xb3cb: 'skein1024-856',
0xb3cc: 'skein1024-864',
0xb3cd: 'skein1024-872',
0xb3ce: 'skein1024-880',
0xb3cf: 'skein1024-888',
0xb3d0: 'skein1024-896',
0xb3d1: 'skein1024-904',
0xb3d2: 'skein1024-912',
0xb3d3: 'skein1024-920',
0xb3d4: 'skein1024-928',
0xb3d5: 'skein1024-936',
0xb3d6: 'skein1024-944',
0xb3d7: 'skein1024-952',
0xb3d8: 'skein1024-960',
0xb3d9: 'skein1024-968',
0xb3da: 'skein1024-976',
0xb3db: 'skein1024-984',
0xb3dc: 'skein1024-992',
0xb3dd: 'skein1024-1000',
0xb3de: 'skein1024-1008',
0xb3df: 'skein1024-1016',
0xb3e0: 'skein1024-1024',
for (const [name, code] of Object.entries(table)) {
if (tableByCode[code] === undefined) tableByCode[code] = name
}
// multiaddr
0x04: 'ip4',
0x06: 'tcp',
0x21: 'dccp',
0x29: 'ip6',
0x2a: 'ip6zone',
0x35: 'dns',
0x36: 'dns4',
0x37: 'dns6',
0x38: 'dnsaddr',
0x84: 'sctp',
0x0111: 'udp',
0x0113: 'p2p-webrtc-star',
0x0114: 'p2p-webrtc-direct',
0x0115: 'p2p-stardust',
0x0122: 'p2p-circuit',
0x012d: 'udt',
0x012e: 'utp',
0x0190: 'unix',
0x01a5: 'p2p',
0x01bb: 'https',
0x01bc: 'onion',
0x01bd: 'onion3',
0x01be: 'garlic64',
0x01bf: 'garlic32',
0x01cc: 'quic',
0x01dd: 'ws',
0x01de: 'wss',
0x01df: 'p2p-websocket-star',
0x01e0: 'http',
// ipld
0x55: 'raw',
0x70: 'dag-pb',
0x71: 'dag-cbor',
0x72: 'libp2p-key',
0x78: 'git-raw',
0x7b: 'torrent-info',
0x7c: 'torrent-file',
0x81: 'leofcoin-block',
0x82: 'leofcoin-tx',
0x83: 'leofcoin-pr',
0x90: 'eth-block',
0x91: 'eth-block-list',
0x92: 'eth-tx-trie',
0x93: 'eth-tx',
0x94: 'eth-tx-receipt-trie',
0x95: 'eth-tx-receipt',
0x96: 'eth-state-trie',
0x97: 'eth-account-snapshot',
0x98: 'eth-storage-trie',
0xb0: 'bitcoin-block',
0xb1: 'bitcoin-tx',
0xc0: 'zcash-block',
0xc1: 'zcash-tx',
0xd0: 'stellar-block',
0xd1: 'stellar-tx',
0xe0: 'decred-block',
0xe1: 'decred-tx',
0xf0: 'dash-block',
0xf1: 'dash-tx',
0xfa: 'swarm-manifest',
0xfb: 'swarm-feed',
0x0129: 'dag-json',
// namespace
0x2f: 'path',
0xe2: 'ipld-ns',
0xe3: 'ipfs-ns',
0xe4: 'swarm-ns',
0xe5: 'ipns-ns',
0xe6: 'zeronet',
// key
0xed: 'ed25519-pub',
// holochain
0x807124: 'holochain-adr-v0',
0x817124: 'holochain-adr-v1',
0x947124: 'holochain-key-v0',
0x957124: 'holochain-key-v1',
0xa27124: 'holochain-sig-v0',
0xa37124: 'holochain-sig-v1'
})
module.exports = Object.freeze(tableByCode)

@@ -8,3 +8,4 @@ 'use strict'

varintBufferEncode,
varintBufferDecode
varintBufferDecode,
varintEncode
}

@@ -31,1 +32,5 @@

}
function varintEncode (num) {
return Buffer.from(varint.encode(num))
}
'use strict'
const baseTable = require('./base-table')
const varintBufferEncode = require('./util').varintBufferEncode
// this creates a map for codecName -> codeVarintBuffer
const baseTable = require('./base-table.json')
const varintEncode = require('./util').varintEncode
// map for codecName -> codeVarintBuffer
const varintTable = {}
module.exports = varintTable
for (let encodingName in baseTable) {
let code = baseTable[encodingName]
varintTable[encodingName] = varintBufferEncode(code)
for (const encodingName in baseTable) {
const code = baseTable[encodingName]
varintTable[encodingName] = varintEncode(code)
}
module.exports = Object.freeze(varintTable)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc