Socket
Socket
Sign inDemoInstall

multihashes

Package Overview
Dependencies
7
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.20 to 0.4.21

dist/index.js

19

CHANGELOG.md

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

<a name="0.4.20"></a>
## [0.4.20](https://github.com/multiformats/js-multihash/compare/v0.4.19...v0.4.20) (2020-06-18)
<a name="0.4.21"></a>
## [0.4.21](https://github.com/multiformats/js-multihash/compare/v0.4.19...v0.4.21) (2020-06-19)
### Bug Fixes
* change maintainer, add docs ([0e7152e](https://github.com/multiformats/js-multihash/commit/0e7152e))
* update multibase and add buffer in the test ([#83](https://github.com/multiformats/js-multihash/issues/83)) ([a42bcc7](https://github.com/multiformats/js-multihash/commit/a42bcc7))
<a name="0.4.20"></a>
## [0.4.20](https://github.com/multiformats/js-multihash/compare/v0.4.19...v0.4.20) (2020-06-19)
### Features
* updates multihash table ([a8c8838](https://github.com/multiformats/js-multihash/commit/a8c8838))
### BREAKING CHANGES
* defaultLengths removed
<a name="0.4.19"></a>

@@ -23,0 +12,0 @@ ## [0.4.19](https://github.com/multiformats/js-multihash/compare/v0.4.18...v0.4.19) (2020-03-31)

/*! For license information please see index.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Multihashes=t():e.Multihashes=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=1)}([function(e,t,n){"use strict";(function(e){var r=n(4),i=n(5),o=n(6);function s(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=f.prototype:(null===e&&(e=new f(t)),e.length=t),e}function f(e,t,n){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(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 u(this,e,t,n)}function u(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);f.TYPED_ARRAY_SUPPORT?(e=t).__proto__=f.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(!f.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|k(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(f.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||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|p(t)),!f.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|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function k(e,t){if(f.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 N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return N(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 P(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return T(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=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){var o,s=1,a=e.length,f=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,f/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===f)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+f>a&&(n=a-f),o=n;o>=0;o--){for(var c=!0,l=0;l<f;l++)if(u(e,o+l)!==u(t,l)){c=!1;break}if(c)return o}return-1}function y(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 F(N(t,e.length-n),e,n,r)}function m(e,t,n,r){return F(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 F(z(t),e,n,r)}function B(e,t,n,r){return F(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 _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,f,u=e[i],h=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c<=n)switch(c){case 1:u<128&&(h=u);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&u)<<6|63&o)>127&&(h=f);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(f=(15&u)<<12|(63&o)<<6|63&s)>2047&&(f<55296||f>57343)&&(h=f);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(f=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&f<1114112&&(h=f)}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<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=f,t.SlowBuffer=function(e){+e!=e&&(e=0);return f.alloc(+e)},t.INSPECT_MAX_BYTES=50,f.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(),f.poolSize=8192,f._augment=function(e){return e.__proto__=f.prototype,e},f.from=function(e,t,n){return u(null,e,t,n)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.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)},f.allocUnsafe=function(e){return c(null,e)},f.allocUnsafeSlow=function(e){return c(null,e)},f.isBuffer=function(e){return!(null==e||!e._isBuffer)},f.compare=function(e,t){if(!f.isBuffer(e)||!f.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},f.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}},f.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=f.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!f.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},f.byteLength=k,f.prototype._isBuffer=!0,f.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},f.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},f.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},f.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_(this,0,e):b.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.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+">"},f.prototype.compare=function(e,t,n,r,i){if(!f.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),u=this.slice(r,i),h=e.slice(t,n),c=0;c<a;++c)if(u[c]!==h[c]){o=u[c],s=h[c];break}return o<s?-1:s<o?1:0},f.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},f.prototype.indexOf=function(e,t,n){return d(this,e,t,n,!0)},f.prototype.lastIndexOf=function(e,t,n){return d(this,e,t,n,!1)},f.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 y(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 B(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(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 T(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 P(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+=j(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 x(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 M(e,t,n,r,i,o){if(!f.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 C(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 O(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 Y(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 I(e,t,n,r,o){return o||Y(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||Y(e,0,n,8),i.write(e,t,n,r,52,8),n+8}f.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),f.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=f.prototype;else{var i=t-e;n=new f(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},f.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||x(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},f.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||x(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},f.prototype.readUInt8=function(e,t){return t||x(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||x(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||x(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||x(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},f.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||x(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},f.prototype.readInt8=function(e,t){return t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||x(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt16BE=function(e,t){t||x(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt32LE=function(e,t){return t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||x(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||x(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||x(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||x(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(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},f.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(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},f.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(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},f.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(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},f.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},f.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},f.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},f.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},f.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||!f.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},f.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&&!f.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=f.isBuffer(e)?e:N(new f(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(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 z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(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(3))},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";const{Buffer:r}=n(0),i=n(7),o=n(13),{names:s}=n(17),a={};for(const u in s)a[s[u]]=u;function f(e){t.decode(e)}t.names=s,t.codes=Object.freeze(a),t.toHexString=function(e){if(!r.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return r.from(e,"hex")},t.toB58String=function(e){if(!r.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){let t=e;return r.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!r.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");const n=o.decode(e);if(!t.isValidCode(n))throw new Error("multihash unknown function code: 0x".concat(n.toString(16)));e=e.slice(o.decode.bytes);const i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:n,name:a[n],length:i,digest:e}},t.encode=function(e,n,i){if(!e||void 0===n)throw new Error("multihash encode requires at least two args: digest, code");const s=t.coerceCode(n);if(!r.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return r.concat([r.from(o.encode(s)),r.from(o.encode(i)),e])},t.coerceCode=function(e){let n=e;if("string"==typeof e){if(void 0===s[e])throw new Error("Unrecognized hash function named: ".concat(e));n=s[e]}if("number"!=typeof n)throw new Error("Hash function code should be a number. Got: ".concat(n));if(void 0===a[n]&&!t.isAppCode(n))throw new Error("Unrecognized function code: ".concat(n));return n},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a[e]},t.validate=f,t.prefix=function(e){return f(e),e.slice(0,2)}},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=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],f=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)],f[h++]=t>>16&255,f[h++]=t>>8&255,f[h++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,f[h++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,f[h++]=t>>8&255,f[h++]=255&t);return f},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,f=s.length;a<f;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function u(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,f=(1<<a)-1,u=f>>1,h=-7,c=n?i-1:0,l=n?-1:1,p=e[t+c];for(c+=l,o=p&(1<<-h)-1,p>>=-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-u;else{if(o===f)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=u}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,f,u=8*o-i-1,h=(1<<u)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,k=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*(f=Math.pow(2,-s))<1&&(s--,f*=2),(t+=s+c>=1?l/f:l*Math.pow(2,1-c))*f>=2&&(s++,f/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(t*f-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=k,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+p]=255&s,p+=k,s/=256,u-=8);e[n+p-k]|=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";const{Buffer:r}=n(0),i=n(8);function o(e){if(i.names[e])return i.names[e];if(i.codes[e])return i.codes[e];throw new Error("Unsupported encoding: ".concat(e))}(t=e.exports=function(e,t){if(!t)throw new Error("requires an encoded buffer");const n=o(e);return function(e,t){o(e).decode(t.toString())}(n.name,t),r.concat([n.codeBuf,t])}).encode=function(e,t){const n=o(e);return r.concat([n.codeBuf,r.from(n.encode(t))])},t.decode=function(e){r.isBuffer(e)&&(e=e.toString());const t=e[0];["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(t)&&(e=e.toLowerCase());const n=o(e[0]);return r.from(n.decode(e.substring(1)))},t.isEncoded=function(e){if(r.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;try{return o(e[0]).name}catch(t){return!1}},t.encoding=o,t.encodingFromData=function(e){return r.isBuffer(e)&&(e=e.toString()),o(e[0])},t.names=Object.freeze(i.names),t.codes=Object.freeze(i.codes)},function(e,t,n){"use strict";const r=n(9),{Buffer:i}=n(0),o=n(11),s=n(12),a=[["identity","\0",()=>({encode:e=>i.from(e).toString(),decode:e=>i.from(e)}),""],["base2","0",s(1),"01"],["base8","7",s(3),"01234567"],["base10","9",r,"0123456789"],["base16","f",s(4),"0123456789abcdef"],["base16upper","F",s(4),"0123456789ABCDEF"],["base32hex","v",s(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",s(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",s(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",s(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",s(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",s(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",s(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",s(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",s(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",r,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",r,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",r,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",r,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",s(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],f=a.reduce((e,t)=>(e[t[0]]=new o(t[0],t[1],t[2],t[3]),e),{}),u=a.reduce((e,t)=>(e[t[1]]=f[t[0]],e),{});e.exports={names:f,codes:u}},function(e,t,n){"use strict";var r=n(10).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==t[s])throw new TypeError(o+" is ambiguous");t[s]=i}var a=e.length,f=e.charAt(0),u=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function c(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);var n=0;if(" "!==e[n]){for(var i=0,o=0;e[n]===f;)i++,n++;for(var s=(e.length-n)*u+1>>>0,h=new Uint8Array(s);e[n];){var c=t[e.charCodeAt(n)];if(255===c)return;for(var l=0,p=s-1;(0!==c||l<o)&&-1!==p;p--,l++)c+=a*h[p]>>>0,h[p]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");o=l,n++}if(" "!==e[n]){for(var k=s-o;k!==s&&0===h[k];)k++;var b=r.allocUnsafe(i+(s-k));b.fill(0,0,i);for(var g=i;k!==s;)b[g++]=h[k++];return b}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var n=0,i=0,o=0,s=t.length;o!==s&&0===t[o];)o++,n++;for(var u=(s-o)*h+1>>>0,c=new Uint8Array(u);o!==s;){for(var l=t[o],p=0,k=u-1;(0!==l||p<i)&&-1!==k;k--,p++)l+=256*c[k]>>>0,c[k]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");i=p,o++}for(var b=u-i;b!==u&&0===c[b];)b++;for(var g=f.repeat(n);b<u;++b)g+=e.charAt(c[b]);return g},decodeUnsafe:c,decode:function(e){var t=c(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},function(e,t,n){"use strict";var r=n(0),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";const{Buffer:r}=n(0);e.exports=class{constructor(e,t,n,i){this.name=e,this.code=t,this.codeBuf=r.from(this.code),this.alphabet=i,this.engine=n(i)}encode(e){return this.engine.encode(e)}decode(e){for(const t of e)if(this.alphabet&&this.alphabet.indexOf(t)<0)throw new Error("invalid character '".concat(t,"' in '").concat(e,"'"));return this.engine.decode(e)}}},function(e,t,n){"use strict";e.exports=e=>t=>({encode:n=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let f=0;f<e.length;++f)for(a=a<<8|e[f],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(n,t,e),decode:n=>((e,t,n)=>{const r={};for(let u=0;u<t.length;++u)r[t[u]]=u;let i=e.length;for(;"="===e[i-1];)--i;const o=new Uint8Array(i*n/8|0);let s=0,a=0,f=0;for(let u=0;u<i;++u){const t=r[e[u]];if(void 0===t)throw new SyntaxError("Invalid character "+e[u]);a=a<<n|t,s+=n,s>=8&&(s-=8,o[f++]=255&a>>s)}if(s>=n||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return o})(n,t,e)})},function(e,t,n){"use strict";e.exports={encode:n(14),decode:n(15),encodingLength:n(16)}},function(e,t,n){"use strict";e.exports=function e(t,n,i){n=n||[];var o=i=i||0;for(;t>=r;)n[i++]=255&t|128,t/=128;for(;-128&t;)n[i++]=255&t|128,t>>>=7;return n[i]=0|t,e.bytes=i-o+1,n};var r=Math.pow(2,31)},function(e,t,n){"use strict";e.exports=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(127&r)<<o:(127&r)*Math.pow(2,o),o+=7}while(r>=128);return e.bytes=s-n,i}},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),f=Math.pow(2,42),u=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<f?6:e<u?7:e<h?8:e<c?9:10}},function(e,t,n){"use strict";const r=Object.freeze({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,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,x11:4352,"sm3-256":21325,"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});e.exports={names:r}}])}));
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Multihashes=n():e.Multihashes=n()}(window,(function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([function(e,n,t){"use strict";(function(e){var r=t(4),i=t(5),o=t(6);function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,n){if(a()<n)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(n)).__proto__=f.prototype:(null===e&&(e=new f(n)),e.length=n),e}function f(e,n,t){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(e,n,t);if("number"==typeof e){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return u(this,e,n,t)}function u(e,n,t,r){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer?function(e,n,t,r){if(n.byteLength,t<0||n.byteLength<t)throw new RangeError("'offset' is out of bounds");if(n.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");n=void 0===t&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,t):new Uint8Array(n,t,r);f.TYPED_ARRAY_SUPPORT?(e=n).__proto__=f.prototype:e=l(e,n);return e}(e,n,t,r):"string"==typeof n?function(e,n,t){"string"==typeof t&&""!==t||(t="utf8");if(!f.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|S(n,t),i=(e=s(e,r)).write(n,t);i!==r&&(e=e.slice(0,i));return e}(e,n,t):function(e,n){if(f.isBuffer(n)){var t=0|c(n.length);return 0===(e=s(e,t)).length||n.copy(e,0,0,t),e}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(r=n.length)!=r?s(e,0):l(e,n);if("Buffer"===n.type&&o(n.data))return l(e,n.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,n)}function k(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 h(e,n){if(k(n),e=s(e,n<0?0:0|c(n)),!f.TYPED_ARRAY_SUPPORT)for(var t=0;t<n;++t)e[t]=0;return e}function l(e,n){var t=n.length<0?0:0|c(n.length);e=s(e,t);for(var r=0;r<t;r+=1)e[r]=255&n[r];return e}function c(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function S(e,n){if(f.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 t=e.length;if(0===t)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return N(e).length;default:if(r)return z(e).length;n=(""+n).toLowerCase(),r=!0}}function b(e,n,t){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,n,t);case"utf8":case"utf-8":return R(this,n,t);case"ascii":return B(this,n,t);case"latin1":case"binary":return T(this,n,t);case"base64":return _(this,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,n,t);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function p(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function g(e,n,t,r,i){if(0===e.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0){if(!i)return-1;t=0}if("string"==typeof n&&(n=f.from(n,r)),f.isBuffer(n))return 0===n.length?-1:d(e,n,t,r,i);if("number"==typeof n)return n&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,n,t):Uint8Array.prototype.lastIndexOf.call(e,n,t):d(e,[n],t,r,i);throw new TypeError("val must be string, number or Buffer")}function d(e,n,t,r,i){var o,a=1,s=e.length,f=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||n.length<2)return-1;a=2,s/=2,f/=2,t/=2}function u(e,n){return 1===a?e[n]:e.readUInt16BE(n*a)}if(i){var k=-1;for(o=t;o<s;o++)if(u(e,o)===u(n,-1===k?0:o-k)){if(-1===k&&(k=o),o-k+1===f)return k*a}else-1!==k&&(o-=o-k),k=-1}else for(t+f>s&&(t=s-f),o=t;o>=0;o--){for(var h=!0,l=0;l<f;l++)if(u(e,o+l)!==u(n,l)){h=!1;break}if(h)return o}return-1}function y(e,n,t,r){t=Number(t)||0;var i=e.length-t;r?(r=Number(r))>i&&(r=i):r=i;var o=n.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(n.substr(2*a,2),16);if(isNaN(s))return a;e[t+a]=s}return a}function w(e,n,t,r){return q(z(n,e.length-t),e,t,r)}function m(e,n,t,r){return q(function(e){for(var n=[],t=0;t<e.length;++t)n.push(255&e.charCodeAt(t));return n}(n),e,t,r)}function v(e,n,t,r){return m(e,n,t,r)}function E(e,n,t,r){return q(N(n),e,t,r)}function A(e,n,t,r){return q(function(e,n){for(var t,r,i,o=[],a=0;a<e.length&&!((n-=2)<0);++a)t=e.charCodeAt(a),r=t>>8,i=t%256,o.push(i),o.push(r);return o}(n,e.length-t),e,t,r)}function _(e,n,t){return 0===n&&t===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(n,t))}function R(e,n,t){t=Math.min(e.length,t);for(var r=[],i=n;i<t;){var o,a,s,f,u=e[i],k=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=t)switch(h){case 1:u<128&&(k=u);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&u)<<6|63&o)>127&&(k=f);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(f=(15&u)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(k=f);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(f=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&f<1114112&&(k=f)}null===k?(k=65533,h=1):k>65535&&(k-=65536,r.push(k>>>10&1023|55296),k=56320|1023&k),r.push(k),i+=h}return function(e){var n=e.length;if(n<=4096)return String.fromCharCode.apply(String,e);var t="",r=0;for(;r<n;)t+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return t}(r)}n.Buffer=f,n.SlowBuffer=function(e){+e!=e&&(e=0);return f.alloc(+e)},n.INSPECT_MAX_BYTES=50,f.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(n){return!1}}(),n.kMaxLength=a(),f.poolSize=8192,f._augment=function(e){return e.__proto__=f.prototype,e},f.from=function(e,n,t){return u(null,e,n,t)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(e,n,t){return function(e,n,t,r){return k(n),n<=0?s(e,n):void 0!==t?"string"==typeof r?s(e,n).fill(t,r):s(e,n).fill(t):s(e,n)}(null,e,n,t)},f.allocUnsafe=function(e){return h(null,e)},f.allocUnsafeSlow=function(e){return h(null,e)},f.isBuffer=function(e){return!(null==e||!e._isBuffer)},f.compare=function(e,n){if(!f.isBuffer(e)||!f.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var t=e.length,r=n.length,i=0,o=Math.min(t,r);i<o;++i)if(e[i]!==n[i]){t=e[i],r=n[i];break}return t<r?-1:r<t?1:0},f.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}},f.concat=function(e,n){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var t;if(void 0===n)for(n=0,t=0;t<e.length;++t)n+=e[t].length;var r=f.allocUnsafe(n),i=0;for(t=0;t<e.length;++t){var a=e[t];if(!f.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},f.byteLength=S,f.prototype._isBuffer=!0,f.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 n=0;n<e;n+=2)p(this,n,n+1);return this},f.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 n=0;n<e;n+=4)p(this,n,n+3),p(this,n+1,n+2);return this},f.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 n=0;n<e;n+=8)p(this,n,n+7),p(this,n+1,n+6),p(this,n+2,n+5),p(this,n+3,n+4);return this},f.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?R(this,0,e):b.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},f.prototype.compare=function(e,n,t,r,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),n<0||t>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&n>=t)return 0;if(r>=i)return-1;if(n>=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(t>>>=0)-(n>>>=0),s=Math.min(o,a),u=this.slice(r,i),k=e.slice(n,t),h=0;h<s;++h)if(u[h]!==k[h]){o=u[h],a=k[h];break}return o<a?-1:a<o?1:0},f.prototype.includes=function(e,n,t){return-1!==this.indexOf(e,n,t)},f.prototype.indexOf=function(e,n,t){return g(this,e,n,t,!0)},f.prototype.lastIndexOf=function(e,n,t){return g(this,e,n,t,!1)},f.prototype.write=function(e,n,t,r){if(void 0===n)r="utf8",t=this.length,n=0;else if(void 0===t&&"string"==typeof n)r=n,t=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(t)?(t|=0,void 0===r&&(r="utf8")):(r=t,t=void 0)}var i=this.length-n;if((void 0===t||t>i)&&(t=i),e.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,n,t);case"utf8":case"utf-8":return w(this,e,n,t);case"ascii":return m(this,e,n,t);case"latin1":case"binary":return v(this,e,n,t);case"base64":return E(this,e,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,n,t);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(e,n,t){var r="";t=Math.min(e.length,t);for(var i=n;i<t;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,n,t){var r="";t=Math.min(e.length,t);for(var i=n;i<t;++i)r+=String.fromCharCode(e[i]);return r}function P(e,n,t){var r=e.length;(!n||n<0)&&(n=0),(!t||t<0||t>r)&&(t=r);for(var i="",o=n;o<t;++o)i+=D(e[o]);return i}function U(e,n,t){for(var r=e.slice(n,t),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function x(e,n,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+n>t)throw new RangeError("Trying to access beyond buffer length")}function O(e,n,t,r,i,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>i||n<o)throw new RangeError('"value" argument is out of bounds');if(t+r>e.length)throw new RangeError("Index out of range")}function M(e,n,t,r){n<0&&(n=65535+n+1);for(var i=0,o=Math.min(e.length-t,2);i<o;++i)e[t+i]=(n&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function Y(e,n,t,r){n<0&&(n=4294967295+n+1);for(var i=0,o=Math.min(e.length-t,4);i<o;++i)e[t+i]=n>>>8*(r?i:3-i)&255}function C(e,n,t,r,i,o){if(t+r>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function I(e,n,t,r,o){return o||C(e,0,t,4),i.write(e,n,t,r,23,4),t+4}function L(e,n,t,r,o){return o||C(e,0,t,8),i.write(e,n,t,r,52,8),t+8}f.prototype.slice=function(e,n){var t,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<e&&(n=e),f.TYPED_ARRAY_SUPPORT)(t=this.subarray(e,n)).__proto__=f.prototype;else{var i=n-e;t=new f(i,void 0);for(var o=0;o<i;++o)t[o]=this[o+e]}return t},f.prototype.readUIntLE=function(e,n,t){e|=0,n|=0,t||x(e,n,this.length);for(var r=this[e],i=1,o=0;++o<n&&(i*=256);)r+=this[e+o]*i;return r},f.prototype.readUIntBE=function(e,n,t){e|=0,n|=0,t||x(e,n,this.length);for(var r=this[e+--n],i=1;n>0&&(i*=256);)r+=this[e+--n]*i;return r},f.prototype.readUInt8=function(e,n){return n||x(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,n){return n||x(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,n){return n||x(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,n){return n||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,n){return n||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,n,t){e|=0,n|=0,t||x(e,n,this.length);for(var r=this[e],i=1,o=0;++o<n&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*n)),r},f.prototype.readIntBE=function(e,n,t){e|=0,n|=0,t||x(e,n,this.length);for(var r=n,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*n)),o},f.prototype.readInt8=function(e,n){return n||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,n){n||x(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt16BE=function(e,n){n||x(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt32LE=function(e,n){return n||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,n){return n||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,n){return n||x(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,n){return n||x(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,n){return n||x(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,n){return n||x(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||O(this,e,n,t,Math.pow(2,8*t)-1,0);var i=1,o=0;for(this[n]=255&e;++o<t&&(i*=256);)this[n+o]=e/i&255;return n+t},f.prototype.writeUIntBE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||O(this,e,n,t,Math.pow(2,8*t)-1,0);var i=t-1,o=1;for(this[n+i]=255&e;--i>=0&&(o*=256);)this[n+i]=e/o&255;return n+t},f.prototype.writeUInt8=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},f.prototype.writeUInt16LE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):M(this,e,n,!0),n+2},f.prototype.writeUInt16BE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):M(this,e,n,!1),n+2},f.prototype.writeUInt32LE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Y(this,e,n,!0),n+4},f.prototype.writeUInt32BE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},f.prototype.writeIntLE=function(e,n,t,r){if(e=+e,n|=0,!r){var i=Math.pow(2,8*t-1);O(this,e,n,t,i-1,-i)}var o=0,a=1,s=0;for(this[n]=255&e;++o<t&&(a*=256);)e<0&&0===s&&0!==this[n+o-1]&&(s=1),this[n+o]=(e/a>>0)-s&255;return n+t},f.prototype.writeIntBE=function(e,n,t,r){if(e=+e,n|=0,!r){var i=Math.pow(2,8*t-1);O(this,e,n,t,i-1,-i)}var o=t-1,a=1,s=0;for(this[n+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[n+o+1]&&(s=1),this[n+o]=(e/a>>0)-s&255;return n+t},f.prototype.writeInt8=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},f.prototype.writeInt16LE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):M(this,e,n,!0),n+2},f.prototype.writeInt16BE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):M(this,e,n,!1),n+2},f.prototype.writeInt32LE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Y(this,e,n,!0),n+4},f.prototype.writeInt32BE=function(e,n,t){return e=+e,n|=0,t||O(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},f.prototype.writeFloatLE=function(e,n,t){return I(this,e,n,!0,t)},f.prototype.writeFloatBE=function(e,n,t){return I(this,e,n,!1,t)},f.prototype.writeDoubleLE=function(e,n,t){return L(this,e,n,!0,t)},f.prototype.writeDoubleBE=function(e,n,t){return L(this,e,n,!1,t)},f.prototype.copy=function(e,n,t,r){if(t||(t=0),r||0===r||(r=this.length),n>=e.length&&(n=e.length),n||(n=0),r>0&&r<t&&(r=t),r===t)return 0;if(0===e.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=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-n<r-t&&(r=e.length-n+t);var i,o=r-t;if(this===e&&t<n&&n<r)for(i=o-1;i>=0;--i)e[i+n]=this[i+t];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+n]=this[i+t];else Uint8Array.prototype.set.call(e,this.subarray(t,t+o),n);return o},f.prototype.fill=function(e,n,t,r){if("string"==typeof e){if("string"==typeof n?(r=n,n=0,t=this.length):"string"==typeof t&&(r=t,t=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&&!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(n<0||this.length<n||this.length<t)throw new RangeError("Out of range index");if(t<=n)return this;var o;if(n>>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(o=n;o<t;++o)this[o]=e;else{var a=f.isBuffer(e)?e:z(new f(e,r).toString()),s=a.length;for(o=0;o<t-n;++o)this[o+n]=a[o%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,n){var t;n=n||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((t=e.charCodeAt(a))>55295&&t<57344){if(!i){if(t>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(n-=3)>-1&&o.push(239,191,189),i=t;continue}t=65536+(i-55296<<10|t-56320)}else i&&(n-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((n-=1)<0)break;o.push(t)}else if(t<2048){if((n-=2)<0)break;o.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;o.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return o}function N(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 q(e,n,t,r){for(var i=0;i<r&&!(i+t>=n.length||i>=e.length);++i)n[i+t]=e[i];return i}}).call(this,t(3))},function(e,n,t){e.exports=t(2)},function(e,n,t){"use strict";const{Buffer:r}=t(0),i=t(7),o=t(15),a=t(19);function s(e){n.decode(e)}n.names=a.names,n.codes=a.codes,n.defaultLengths=a.defaultLengths,n.toHexString=function(e){if(!r.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},n.fromHexString=function(e){return r.from(e,"hex")},n.toB58String=function(e){if(!r.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},n.fromB58String=function(e){let n=e;return r.isBuffer(e)&&(n=e.toString()),i.decode("z"+n)},n.decode=function(e){if(!r.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");const t=o.decode(e);if(!n.isValidCode(t))throw new Error("multihash unknown function code: 0x".concat(t.toString(16)));e=e.slice(o.decode.bytes);const i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:t,name:a.codes[t],length:i,digest:e}},n.encode=function(e,t,i){if(!e||void 0===t)throw new Error("multihash encode requires at least two args: digest, code");const a=n.coerceCode(t);if(!r.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return r.concat([r.from(o.encode(a)),r.from(o.encode(i)),e])},n.coerceCode=function(e){let t=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));t=a.names[e]}if("number"!=typeof t)throw new Error("Hash function code should be a number. Got: ".concat(t));if(void 0===a.codes[t]&&!n.isAppCode(t))throw new Error("Unrecognized function code: ".concat(t));return t},n.isAppCode=function(e){return e>0&&e<16},n.isValidCode=function(e){return!!n.isAppCode(e)||!!a.codes[e]},n.validate=s,n.prefix=function(e){return s(e),e.slice(0,2)}},function(e,n,t){"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,n,t){"use strict";n.byteLength=function(e){var n=u(e),t=n[0],r=n[1];return 3*(t+r)/4-r},n.toByteArray=function(e){var n,t,r=u(e),a=r[0],s=r[1],f=new o(function(e,n,t){return 3*(n+t)/4-t}(0,a,s)),k=0,h=s>0?a-4:a;for(t=0;t<h;t+=4)n=i[e.charCodeAt(t)]<<18|i[e.charCodeAt(t+1)]<<12|i[e.charCodeAt(t+2)]<<6|i[e.charCodeAt(t+3)],f[k++]=n>>16&255,f[k++]=n>>8&255,f[k++]=255&n;2===s&&(n=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,f[k++]=255&n);1===s&&(n=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,f[k++]=n>>8&255,f[k++]=255&n);return f},n.fromByteArray=function(e){for(var n,t=e.length,i=t%3,o=[],a=0,s=t-i;a<s;a+=16383)o.push(k(e,a,a+16383>s?s:a+16383));1===i?(n=e[t-1],o.push(r[n>>2]+r[n<<4&63]+"==")):2===i&&(n=(e[t-2]<<8)+e[t-1],o.push(r[n>>10]+r[n>>4&63]+r[n<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=a.length;s<f;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(e){var n=e.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=n),[t,t===n?0:4-t%4]}function k(e,n,t){for(var i,o,a=[],s=n;s<t;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,n,t){"use strict";n.read=function(e,n,t,r,i){var o,a,s=8*i-r-1,f=(1<<s)-1,u=f>>1,k=-7,h=t?i-1:0,l=t?-1:1,c=e[n+h];for(h+=l,o=c&(1<<-k)-1,c>>=-k,k+=s;k>0;o=256*o+e[n+h],h+=l,k-=8);for(a=o&(1<<-k)-1,o>>=-k,k+=r;k>0;a=256*a+e[n+h],h+=l,k-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(c?-1:1);a+=Math.pow(2,r),o-=u}return(c?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,n,t,r,i,o){var a,s,f,u=8*o-i-1,k=(1<<u)-1,h=k>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,S=r?1:-1,b=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(s=isNaN(n)?1:0,a=k):(a=Math.floor(Math.log(n)/Math.LN2),n*(f=Math.pow(2,-a))<1&&(a--,f*=2),(n+=a+h>=1?l/f:l*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=k?(s=0,a=k):a+h>=1?(s=(n*f-1)*Math.pow(2,i),a+=h):(s=n*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[t+c]=255&s,c+=S,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[t+c]=255&a,c+=S,a/=256,u-=8);e[t+c-S]|=128*b}},function(e,n,t){"use strict";var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,n,t){"use strict";const{Buffer:r}=t(0),i=t(8);function o(e,n){if(!n)throw new Error("requires an encoded buffer");const t=a(e),i=r.from(t.code);return function(e,n){a(e).decode(n.toString())}(t.name,n),r.concat([i,n])}function a(e){let n;if(i.names[e])n=i.names[e];else{if(!i.codes[e])throw new Error("Unsupported encoding");n=i.codes[e]}if(!n.isImplemented())throw new Error("Base "+e+" is not implemented yet");return n}(n=e.exports=o).encode=function(e,n){const t=a(e);return o(t.name,r.from(t.encode(n)))},n.decode=function(e){r.isBuffer(e)&&(e=e.toString());const n=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=r.from(e));const t=a(n);return r.from(t.decode(e.toString()))},n.isEncoded=function(e){r.isBuffer(e)&&(e=e.toString());if("[object String]"!==Object.prototype.toString.call(e))return!1;const n=e.substring(0,1);try{return a(n).name}catch(t){return!1}},n.names=Object.freeze(Object.keys(i.names)),n.codes=Object.freeze(Object.keys(i.codes))},function(e,n,t){"use strict";const r=t(9),i=t(10),o=t(12),a=t(13),s=t(14),f=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=f.reduce((e,n)=>(e[n[0]]=new r(n[0],n[1],n[2],n[3]),e),{}),k=f.reduce((e,n)=>(e[n[1]]=u[n[0]],e),{});e.exports={names:u,codes:k}},function(e,n,t){"use strict";e.exports=class{constructor(e,n,t,r){this.name=e,this.code=n,this.alphabet=r,t&&r&&(this.engine=t(r))}encode(e){return this.engine.encode(e)}decode(e){return this.engine.decode(e)}isImplemented(){return this.engine}}},function(e,n,t){"use strict";var r=t(11).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),t=0;t<n.length;t++)n[t]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==n[a])throw new TypeError(o+" is ambiguous");n[a]=i}var s=e.length,f=e.charAt(0),u=Math.log(s)/Math.log(256),k=Math.log(256)/Math.log(s);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);var t=0;if(" "!==e[t]){for(var i=0,o=0;e[t]===f;)i++,t++;for(var a=(e.length-t)*u+1>>>0,k=new Uint8Array(a);e[t];){var h=n[e.charCodeAt(t)];if(255===h)return;for(var l=0,c=a-1;(0!==h||l<o)&&-1!==c;c--,l++)h+=s*k[c]>>>0,k[c]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=l,t++}if(" "!==e[t]){for(var S=a-o;S!==a&&0===k[S];)S++;var b=r.allocUnsafe(i+(a-S));b.fill(0,0,i);for(var p=i;S!==a;)b[p++]=k[S++];return b}}}return{encode:function(n){if((Array.isArray(n)||n instanceof Uint8Array)&&(n=r.from(n)),!r.isBuffer(n))throw new TypeError("Expected Buffer");if(0===n.length)return"";for(var t=0,i=0,o=0,a=n.length;o!==a&&0===n[o];)o++,t++;for(var u=(a-o)*k+1>>>0,h=new Uint8Array(u);o!==a;){for(var l=n[o],c=0,S=u-1;(0!==l||c<i)&&-1!==S;S--,c++)l+=256*h[S]>>>0,h[S]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");i=c,o++}for(var b=u-i;b!==u&&0===h[b];)b++;for(var p=f.repeat(t);b<u;++b)p+=e.charAt(h[b]);return p},decodeUnsafe:h,decode:function(e){var n=h(e);if(n)return n;throw new Error("Non-base"+s+" character")}}}},function(e,n,t){"use strict";var r=t(0),i=r.Buffer;function o(e,n){for(var t in e)n[t]=e[t]}function a(e,n,t){return i(e,n,t)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,n),n.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,n,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,n,t)},a.alloc=function(e,n,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==n?"string"==typeof t?r.fill(n,t):r.fill(n):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,n,t){"use strict";const{Buffer:r}=t(0);e.exports=function(e){return{encode:e=>"string"==typeof e?r.from(e).toString("hex"):e.toString("hex"),decode(n){for(const t of n)if(e.indexOf(t)<0)throw new Error("invalid base16 character");return r.from(n,"hex")}}}},function(e,n,t){"use strict";function r(e,n){const t=e.byteLength,r=new Uint8Array(e),i=n.indexOf("=")===n.length-1;i&&(n=n.substring(0,n.length-1));let o=0,a=0,s="";for(let f=0;f<t;f++)for(a=a<<8|r[f],o+=8;o>=5;)s+=n[a>>>o-5&31],o-=5;if(o>0&&(s+=n[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}e.exports=function(e){return{encode:n=>r("string"==typeof n?Uint8Array.from(n):n,e),decode(n){for(const t of n)if(e.indexOf(t)<0)throw new Error("invalid base32 character");return function(e,n){const t=(e=e.replace(new RegExp("=","g"),"")).length;let r=0,i=0,o=0;const a=new Uint8Array(5*t/8|0);for(let s=0;s<t;s++)i=i<<5|n.indexOf(e[s]),r+=5,r>=8&&(a[o++]=i>>>r-8&255,r-=8);return a.buffer}(n,e)}}}},function(e,n,t){"use strict";const{Buffer:r}=t(0);e.exports=function(e){const n=e.indexOf("=")>-1,t=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode(e){let i="";i="string"==typeof e?r.from(e).toString("base64"):e.toString("base64"),t&&(i=i.replace(/\+/g,"-").replace(/\//g,"_"));const o=i.indexOf("=");return o>0&&!n&&(i=i.substring(0,o)),i},decode(n){for(const t of n)if(e.indexOf(t)<0)throw new Error("invalid base64 character");return r.from(n,"base64")}}}},function(e,n,t){"use strict";e.exports={encode:t(16),decode:t(17),encodingLength:t(18)}},function(e,n,t){"use strict";e.exports=function e(n,t,i){t=t||[];var o=i=i||0;for(;n>=r;)t[i++]=255&n|128,n/=128;for(;-128&n;)t[i++]=255&n|128,n>>>=7;return t[i]=0|n,e.bytes=i-o+1,t};var r=Math.pow(2,31)},function(e,n,t){"use strict";e.exports=function e(n,t){var r,i=0,o=0,a=t=t||0,s=n.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=n[a++],i+=o<28?(127&r)<<o:(127&r)*Math.pow(2,o),o+=7}while(r>=128);return e.bytes=a-t,i}},function(e,n,t){"use strict";var r=Math.pow(2,7),i=Math.pow(2,14),o=Math.pow(2,21),a=Math.pow(2,28),s=Math.pow(2,35),f=Math.pow(2,42),u=Math.pow(2,49),k=Math.pow(2,56),h=Math.pow(2,63);e.exports=function(e){return e<r?1:e<i?2:e<o?3:e<a?4:e<s?5:e<f?6:e<u?7:e<k?8:e<h?9:10}},function(e,n,t){"use strict";n.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"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}),n.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",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",46e3:"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"}),n.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})}])}));
//# sourceMappingURL=index.min.js.map
{
"name": "multihashes",
"version": "0.4.20",
"version": "0.4.21",
"description": "multihash implementation",
"leadMaintainer": "Hugo Dias <hugomrdias@gmail.com>",
"leadMaintainer": "David Dias <daviddias@ipfs.io>",
"main": "src/index.js",

@@ -18,4 +18,3 @@ "scripts": {

"coverage": "aegir coverage",
"coverage-publish": "aegir coverage --provider coveralls",
"update-constants": "node update-constants.js"
"coverage-publish": "aegir coverage --provider coveralls"
},

@@ -38,11 +37,11 @@ "files": [

"dependencies": {
"buffer": "^5.6.0",
"multibase": "^1.0.1",
"buffer": "^5.5.0",
"multibase": "^0.7.0",
"varint": "^5.0.0"
},
"devDependencies": {
"aegir": "^24.0.0",
"aegir": "^21.4.4",
"chai": "^4.1.2",
"dirty-chai": "^2.0.1",
"ipfs-utils": "^2.2.0"
"pre-commit": "^1.2.2"
},

@@ -54,9 +53,9 @@ "contributors": [

"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Hugo Dias <hugomrdias@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>",
"Rod Vagg <rod@vagg.org>",
"Pedro Teixeira <i@pgte.me>",
"Linus Unnebäck <linus@folkdatorn.se>",
"kumavis <aaron@kumavis.me>",
"Alan Shaw <alan@tableflip.io>",
"Fil <fil@rezo.net>",

@@ -69,5 +68,5 @@ "Donald Tsang <brandonknlee@gmail.com>",

"nginnever <ginneversource@gmail.com>",
"Nate Foss <npfoss@gmail.com>",
"Alan Shaw <alan@tableflip.io>"
"Linus Unnebäck <linus@folkdatorn.se>",
"Nate Foss <npfoss@gmail.com>"
]
}

@@ -22,3 +22,3 @@ js-multihash

[Hugo Dias](http://github.com/hugomrdias/)
[David Dias](http://github.com/diasdavid/)

@@ -88,11 +88,2 @@ ## Table of Contents

## Update Constants
To update the constants table run the command below. This will fetch the main codec list from https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv and filter only the multihash codecs and update the `constants.js` file in this repo.
```sh
npm run update-constants
```
## Contribute

@@ -108,2 +99,2 @@

[MIT](LICENSE) © Protocol Labs Inc.
[MIT](LICENSE) © 2016 Protocol Labs Inc.
/* eslint quote-props: off */
/* eslint key-spacing: off */
'use strict'
const names = Object.freeze({
'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,
'blake3': 0x1e,
exports.names = Object.freeze({
'identity': 0x0,
'sha1': 0x11,
'sha2-256': 0x12,
'sha2-512': 0x13,
'dbl-sha2-256': 0x56,
'sha3-224': 0x17,
'sha3-256': 0x16,
'sha3-384': 0x15,
'sha3-512': 0x14,
'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,
'sm3-256': 0x534d,
'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,
'murmur3-32': 0x23,
'md4': 0xd4,
'md5': 0xd5,
'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,

@@ -92,14 +89,14 @@ 'blake2b-112': 0xb20e,

'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-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,

@@ -125,228 +122,915 @@ 'blake2s-112': 0xb24e,

'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
'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
})
module.exports = { names }
exports.codes = Object.freeze({
0x0: 'identity',
// sha family
0x11: 'sha1',
0x12: 'sha2-256',
0x13: 'sha2-512',
0x56: 'dbl-sha2-256',
0x17: 'sha3-224',
0x16: 'sha3-256',
0x15: 'sha3-384',
0x14: 'sha3-512',
0x18: 'shake-128',
0x19: 'shake-256',
0x1A: 'keccak-224',
0x1B: 'keccak-256',
0x1C: 'keccak-384',
0x1D: 'keccak-512',
0x22: 'murmur3-128',
0x23: 'murmur3-32',
0xd4: 'md4',
0xd5: 'md5',
// blake2
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',
// skein
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'
})
exports.defaultLengths = Object.freeze({
0x11: 20,
0x12: 32,
0x13: 64,
0x56: 32,
0x17: 28,
0x16: 32,
0x15: 48,
0x14: 64,
0x18: 32,
0x19: 64,
0x1A: 28,
0x1B: 32,
0x1C: 48,
0x1D: 64,
0x22: 32,
0xb201: 0x01,
0xb202: 0x02,
0xb203: 0x03,
0xb204: 0x04,
0xb205: 0x05,
0xb206: 0x06,
0xb207: 0x07,
0xb208: 0x08,
0xb209: 0x09,
0xb20a: 0x0a,
0xb20b: 0x0b,
0xb20c: 0x0c,
0xb20d: 0x0d,
0xb20e: 0x0e,
0xb20f: 0x0f,
0xb210: 0x10,
0xb211: 0x11,
0xb212: 0x12,
0xb213: 0x13,
0xb214: 0x14,
0xb215: 0x15,
0xb216: 0x16,
0xb217: 0x17,
0xb218: 0x18,
0xb219: 0x19,
0xb21a: 0x1a,
0xb21b: 0x1b,
0xb21c: 0x1c,
0xb21d: 0x1d,
0xb21e: 0x1e,
0xb21f: 0x1f,
0xb220: 0x20,
0xb221: 0x21,
0xb222: 0x22,
0xb223: 0x23,
0xb224: 0x24,
0xb225: 0x25,
0xb226: 0x26,
0xb227: 0x27,
0xb228: 0x28,
0xb229: 0x29,
0xb22a: 0x2a,
0xb22b: 0x2b,
0xb22c: 0x2c,
0xb22d: 0x2d,
0xb22e: 0x2e,
0xb22f: 0x2f,
0xb230: 0x30,
0xb231: 0x31,
0xb232: 0x32,
0xb233: 0x33,
0xb234: 0x34,
0xb235: 0x35,
0xb236: 0x36,
0xb237: 0x37,
0xb238: 0x38,
0xb239: 0x39,
0xb23a: 0x3a,
0xb23b: 0x3b,
0xb23c: 0x3c,
0xb23d: 0x3d,
0xb23e: 0x3e,
0xb23f: 0x3f,
0xb240: 0x40,
0xb241: 0x01,
0xb242: 0x02,
0xb243: 0x03,
0xb244: 0x04,
0xb245: 0x05,
0xb246: 0x06,
0xb247: 0x07,
0xb248: 0x08,
0xb249: 0x09,
0xb24a: 0x0a,
0xb24b: 0x0b,
0xb24c: 0x0c,
0xb24d: 0x0d,
0xb24e: 0x0e,
0xb24f: 0x0f,
0xb250: 0x10,
0xb251: 0x11,
0xb252: 0x12,
0xb253: 0x13,
0xb254: 0x14,
0xb255: 0x15,
0xb256: 0x16,
0xb257: 0x17,
0xb258: 0x18,
0xb259: 0x19,
0xb25a: 0x1a,
0xb25b: 0x1b,
0xb25c: 0x1c,
0xb25d: 0x1d,
0xb25e: 0x1e,
0xb25f: 0x1f,
0xb260: 0x20,
0xb301: 0x01,
0xb302: 0x02,
0xb303: 0x03,
0xb304: 0x04,
0xb305: 0x05,
0xb306: 0x06,
0xb307: 0x07,
0xb308: 0x08,
0xb309: 0x09,
0xb30a: 0x0a,
0xb30b: 0x0b,
0xb30c: 0x0c,
0xb30d: 0x0d,
0xb30e: 0x0e,
0xb30f: 0x0f,
0xb310: 0x10,
0xb311: 0x11,
0xb312: 0x12,
0xb313: 0x13,
0xb314: 0x14,
0xb315: 0x15,
0xb316: 0x16,
0xb317: 0x17,
0xb318: 0x18,
0xb319: 0x19,
0xb31a: 0x1a,
0xb31b: 0x1b,
0xb31c: 0x1c,
0xb31d: 0x1d,
0xb31e: 0x1e,
0xb31f: 0x1f,
0xb320: 0x20,
0xb321: 0x01,
0xb322: 0x02,
0xb323: 0x03,
0xb324: 0x04,
0xb325: 0x05,
0xb326: 0x06,
0xb327: 0x07,
0xb328: 0x08,
0xb329: 0x09,
0xb32a: 0x0a,
0xb32b: 0x0b,
0xb32c: 0x0c,
0xb32d: 0x0d,
0xb32e: 0x0e,
0xb32f: 0x0f,
0xb330: 0x10,
0xb331: 0x11,
0xb332: 0x12,
0xb333: 0x13,
0xb334: 0x14,
0xb335: 0x15,
0xb336: 0x16,
0xb337: 0x17,
0xb338: 0x18,
0xb339: 0x19,
0xb33a: 0x1a,
0xb33b: 0x1b,
0xb33c: 0x1c,
0xb33d: 0x1d,
0xb33e: 0x1e,
0xb33f: 0x1f,
0xb340: 0x20,
0xb341: 0x21,
0xb342: 0x22,
0xb343: 0x23,
0xb344: 0x24,
0xb345: 0x25,
0xb346: 0x26,
0xb347: 0x27,
0xb348: 0x28,
0xb349: 0x29,
0xb34a: 0x2a,
0xb34b: 0x2b,
0xb34c: 0x2c,
0xb34d: 0x2d,
0xb34e: 0x2e,
0xb34f: 0x2f,
0xb350: 0x30,
0xb351: 0x31,
0xb352: 0x32,
0xb353: 0x33,
0xb354: 0x34,
0xb355: 0x35,
0xb356: 0x36,
0xb357: 0x37,
0xb358: 0x38,
0xb359: 0x39,
0xb35a: 0x3a,
0xb35b: 0x3b,
0xb35c: 0x3c,
0xb35d: 0x3d,
0xb35e: 0x3e,
0xb35f: 0x3f,
0xb360: 0x40,
0xb361: 0x01,
0xb362: 0x02,
0xb363: 0x03,
0xb364: 0x04,
0xb365: 0x05,
0xb366: 0x06,
0xb367: 0x07,
0xb368: 0x08,
0xb369: 0x09,
0xb36a: 0x0a,
0xb36b: 0x0b,
0xb36c: 0x0c,
0xb36d: 0x0d,
0xb36e: 0x0e,
0xb36f: 0x0f,
0xb370: 0x10,
0xb371: 0x11,
0xb372: 0x12,
0xb373: 0x13,
0xb374: 0x14,
0xb375: 0x15,
0xb376: 0x16,
0xb377: 0x17,
0xb378: 0x18,
0xb379: 0x19,
0xb37a: 0x1a,
0xb37b: 0x1b,
0xb37c: 0x1c,
0xb37d: 0x1d,
0xb37e: 0x1e,
0xb37f: 0x1f,
0xb380: 0x20,
0xb381: 0x21,
0xb382: 0x22,
0xb383: 0x23,
0xb384: 0x24,
0xb385: 0x25,
0xb386: 0x26,
0xb387: 0x27,
0xb388: 0x28,
0xb389: 0x29,
0xb38a: 0x2a,
0xb38b: 0x2b,
0xb38c: 0x2c,
0xb38d: 0x2d,
0xb38e: 0x2e,
0xb38f: 0x2f,
0xb390: 0x30,
0xb391: 0x31,
0xb392: 0x32,
0xb393: 0x33,
0xb394: 0x34,
0xb395: 0x35,
0xb396: 0x36,
0xb397: 0x37,
0xb398: 0x38,
0xb399: 0x39,
0xb39a: 0x3a,
0xb39b: 0x3b,
0xb39c: 0x3c,
0xb39d: 0x3d,
0xb39e: 0x3e,
0xb39f: 0x3f,
0xb3a0: 0x40,
0xb3a1: 0x41,
0xb3a2: 0x42,
0xb3a3: 0x43,
0xb3a4: 0x44,
0xb3a5: 0x45,
0xb3a6: 0x46,
0xb3a7: 0x47,
0xb3a8: 0x48,
0xb3a9: 0x49,
0xb3aa: 0x4a,
0xb3ab: 0x4b,
0xb3ac: 0x4c,
0xb3ad: 0x4d,
0xb3ae: 0x4e,
0xb3af: 0x4f,
0xb3b0: 0x50,
0xb3b1: 0x51,
0xb3b2: 0x52,
0xb3b3: 0x53,
0xb3b4: 0x54,
0xb3b5: 0x55,
0xb3b6: 0x56,
0xb3b7: 0x57,
0xb3b8: 0x58,
0xb3b9: 0x59,
0xb3ba: 0x5a,
0xb3bb: 0x5b,
0xb3bc: 0x5c,
0xb3bd: 0x5d,
0xb3be: 0x5e,
0xb3bf: 0x5f,
0xb3c0: 0x60,
0xb3c1: 0x61,
0xb3c2: 0x62,
0xb3c3: 0x63,
0xb3c4: 0x64,
0xb3c5: 0x65,
0xb3c6: 0x66,
0xb3c7: 0x67,
0xb3c8: 0x68,
0xb3c9: 0x69,
0xb3ca: 0x6a,
0xb3cb: 0x6b,
0xb3cc: 0x6c,
0xb3cd: 0x6d,
0xb3ce: 0x6e,
0xb3cf: 0x6f,
0xb3d0: 0x70,
0xb3d1: 0x71,
0xb3d2: 0x72,
0xb3d3: 0x73,
0xb3d4: 0x74,
0xb3d5: 0x75,
0xb3d6: 0x76,
0xb3d7: 0x77,
0xb3d8: 0x78,
0xb3d9: 0x79,
0xb3da: 0x7a,
0xb3db: 0x7b,
0xb3dc: 0x7c,
0xb3dd: 0x7d,
0xb3de: 0x7e,
0xb3df: 0x7f,
0xb3e0: 0x80
})

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

/* eslint-disable guard-for-in */
/**

@@ -12,12 +11,8 @@ * Multihash implementation in JavaScript.

const varint = require('varint')
const { names } = require('./constants')
const cs = require('./constants')
const codes = {}
exports.names = cs.names
exports.codes = cs.codes
exports.defaultLengths = cs.defaultLengths
for (const key in names) {
codes[names[key]] = key
}
exports.names = names
exports.codes = Object.freeze(codes)
/**

@@ -108,4 +103,4 @@ * Convert the given multihash to a hex encoded string.

return {
code,
name: codes[code],
code: code,
name: cs.codes[code],
length: len,

@@ -163,6 +158,6 @@ digest: buf

if (typeof name === 'string') {
if (names[name] === undefined) {
if (cs.names[name] === undefined) {
throw new Error(`Unrecognized hash function named: ${name}`)
}
code = names[name]
code = cs.names[name]
}

@@ -174,3 +169,3 @@

if (codes[code] === undefined && !exports.isAppCode(code)) {
if (cs.codes[code] === undefined && !exports.isAppCode(code)) {
throw new Error(`Unrecognized function code: ${code}`)

@@ -203,3 +198,3 @@ }

if (codes[code]) {
if (cs.codes[code]) {
return true

@@ -206,0 +201,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc