Socket
Socket
Sign inDemoInstall

multicodec

Package Overview
Dependencies
1
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.4.0

tools/update-table.py

92

CHANGELOG.md

@@ -0,1 +1,93 @@

<a name="0.4.0"></a>
# [0.4.0](https://github.com/multiformats/js-multicodec/compare/v0.3.0...v0.4.0) (2019-01-08)
* Revert "feat: make adding a custom codec possible" ([9e251ce](https://github.com/multiformats/js-multicodec/commit/9e251ce))
### Chores
* fully automatic table generation ([f3d8c0d](https://github.com/multiformats/js-multicodec/commit/f3d8c0d))
### BREAKING CHANGES
* multibase is not part of this package anymore
As multibase works differently from multicodec, those codecs
were [removed from the multicodec table], hence those are also
removed from this implementation as we have automatic
conversion from the upstream table.
[removed from the multicodec table]:
https://github.com/multiformats/multicodec/commit/1ec0e971d589d2fd5d5418b212846301909525bd
* the `addCodec()` function is removed
The `addCodec()` function is removed as it doesn't work as expected.
Things break as soon as the module is loaded several times, which
can happen if dependencies require a different version.
Steps to reproduce this problem:
```console
$ mkdir addcodecbug
$ cd addcodecbug
$ npm install cids@0.5.7 multicodec@0.3.0
npm WARN saveError ENOENT: no such file or directory, open '/tmp/addcodecbug/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/tmp/addcodecbug/package.json'
npm WARN addcodecbug No description
npm WARN addcodecbug No repository field.
npm WARN addcodecbug No README data
npm WARN addcodecbug No license field.
+ multicodec@0.3.0
+ cids@0.5.7
added 10 packages from 35 contributors and audited 14 packages in 1.363s
found 0 vulnerabilities
$ cat > index.js <<'EOF'
// Uses multicodec v0.2.7
const CID = require('cids')
// Imports multicodec v0.3.0
const multicodec = require('multicodec')
multicodec.addCodec('my-codec', Buffer.from('5566', 'hex'))
// Works, the codec was added
console.log(multicodec.getCodeVarint('my-codec'))
const multihash = Buffer.from(
'1220b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9',
'hex')
const cid = new CID(1, 'my-codec', multihash)
console.log(cid)
// Fails as `my-codec` was only added to the multicodec module loaded by this
// file, and not the one loaded by `cids`.
console.log(cid.toBaseEncodedString())
EOF
$ node index.js
<Buffer e6 aa 01>
CID {
codec: 'my-codec',
version: 1,
multihash:
<Buffer 12 20 b9 4d 27 b9 93 4d 3e 08 a5 2e 52 d7 da 7d ab fa c4 84 ef e3 7a 53 80 ee 90 88 f7 ac e2 ef cd e9> }
/tmp/addcodecbug/node_modules/cids/node_modules/multicodec/src/index.js:76
throw new Error('Codec `' + codecName + '` not found')
^
Error: Codec `my-codec` not found
at Object.exports.getCodeVarint (/tmp/addcodecbug/node_modules/cids/node_modules/multicodec/src/index.js:76:11)
at ClassIsWrapper.get buffer [as buffer] (/tmp/addcodecbug/node_modules/cids/src/index.js:131:22)
at ClassIsWrapper.toBaseEncodedString (/tmp/addcodecbug/node_modules/cids/src/index.js:202:44)
at Object.<anonymous> (/tmp/addcodecbug/index.js:17:17)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
```
<a name="0.3.0"></a>

@@ -2,0 +94,0 @@ # [0.3.0](https://github.com/multiformats/js-multicodec/compare/v0.2.7...v0.3.0) (2018-12-18)

2

dist/index.min.js

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

var Multicodec=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},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,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function r(){return e.default}:function r(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}({"./node_modules/base64-js/index.js":function(e,r,t){"use strict";r.byteLength=a,r.toByteArray=m,r.fromByteArray=l;for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,s=f.length;h<s;++h)n[h]=f[h],o[f.charCodeAt(h)]=h;function b(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("="),n;return-1===t&&(t=r),[t,t===r?0:4-t%4]}function a(e){var r=b(e),t=r[0],n=r[1];return 3*(t+n)/4-n}function u(e,r,t){return 3*(r+t)/4-t}function m(e){for(var r,t=b(e),n=t[0],f=t[1],h=new i(u(e,n,f)),s=0,a=f>0?n-4:n,m=0;m<a;m+=4)r=o[e.charCodeAt(m)]<<18|o[e.charCodeAt(m+1)]<<12|o[e.charCodeAt(m+2)]<<6|o[e.charCodeAt(m+3)],h[s++]=r>>16&255,h[s++]=r>>8&255,h[s++]=255&r;return 2===f&&(r=o[e.charCodeAt(m)]<<2|o[e.charCodeAt(m+1)]>>4,h[s++]=255&r),1===f&&(r=o[e.charCodeAt(m)]<<10|o[e.charCodeAt(m+1)]<<4|o[e.charCodeAt(m+2)]>>2,h[s++]=r>>8&255,h[s++]=255&r),h}function x(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function c(e,r,t){for(var n,o=[],i=r;i<t;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(x(n));return o.join("")}function l(e){for(var r,t=e.length,o=t%3,i=[],f=16383,h=0,s=t-o;h<s;h+=16383)i.push(c(e,h,h+16383>s?s:h+16383));return 1===o?(r=e[t-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(e[t-2]<<8)+e[t-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"=")),i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},"./node_modules/buffer/index.js":function(e,r,t){"use strict";(function(e){var n=t("./node_modules/base64-js/index.js"),o=t("./node_modules/ieee754/index.js"),i=t("./node_modules/isarray/index.js");function f(){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(e){return!1}}function h(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(h()<r)throw new RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r)).__proto__=b.prototype:(null===e&&(e=new b(r)),e.length=r),e}function b(e,r,t){if(!(b.TYPED_ARRAY_SUPPORT||this instanceof b))return new b(e,r,t);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return x(this,e)}return a(this,e,r,t)}function a(e,r,t,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?k(e,r,t,n):"string"==typeof r?c(e,r,t):d(e,r)}function u(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 m(e,r,t,n){return u(r),r<=0?s(e,r):void 0!==t?"string"==typeof n?s(e,r).fill(t,n):s(e,r).fill(t):s(e,r)}function x(e,r){if(u(r),e=s(e,r<0?0:0|p(r)),!b.TYPED_ARRAY_SUPPORT)for(var t=0;t<r;++t)e[t]=0;return e}function c(e,r,t){if("string"==typeof t&&""!==t||(t="utf8"),!b.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(r,t),o=(e=s(e,n)).write(r,t);return o!==n&&(e=e.slice(0,o)),e}function l(e,r){var t=r.length<0?0:0|p(r.length);e=s(e,t);for(var n=0;n<t;n+=1)e[n]=255&r[n];return e}function k(e,r,t,n){if(r.byteLength,t<0||r.byteLength<t)throw new RangeError("'offset' is out of bounds");if(r.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===t&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,t):new Uint8Array(r,t,n),b.TYPED_ARRAY_SUPPORT?(e=r).__proto__=b.prototype:e=l(e,r),e}function d(e,r){if(b.isBuffer(r)){var t=0|p(r.length);return 0===(e=s(e,t)).length?e:(r.copy(e,0,0,t),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||re(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&i(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e){if(e>=h())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),b.alloc(+e)}function y(e,r){if(b.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 n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return $(e).length;default:if(n)return K(e).length;r=(""+r).toLowerCase(),n=!0}}function w(e,r,t){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,r,t);case"utf8":case"utf-8":return j(this,r,t);case"ascii":return I(this,r,t);case"latin1":case"binary":return C(this,r,t);case"base64":return U(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function _(e,r,t,n,o){if(0===e.length)return-1;if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(o)return-1;t=e.length-1}else if(t<0){if(!o)return-1;t=0}if("string"==typeof r&&(r=b.from(r,n)),b.isBuffer(r))return 0===r.length?-1:E(e,r,t,n,o);if("number"==typeof r)return r&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):E(e,[r],t,n,o);throw new TypeError("val must be string, number or Buffer")}function E(e,r,t,n,o){var i=1,f=e.length,h=r.length,s;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||r.length<2)return-1;i=2,f/=2,h/=2,t/=2}function b(e,r){return 1===i?e[r]:e.readUInt16BE(r*i)}if(o){var a=-1;for(s=t;s<f;s++)if(b(e,s)===b(r,-1===a?0:s-a)){if(-1===a&&(a=s),s-a+1===h)return a*i}else-1!==a&&(s-=s-a),a=-1}else for(t+h>f&&(t=f-h),s=t;s>=0;s--){for(var u=!0,m=0;m<h;m++)if(b(e,s+m)!==b(r,m)){u=!1;break}if(u)return s}return-1}function A(e,r,t,n){t=Number(t)||0;var o=e.length-t;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var f=0;f<n;++f){var h=parseInt(r.substr(2*f,2),16);if(isNaN(h))return f;e[t+f]=h}return f}function R(e,r,t,n){return ee(K(r,e.length-t),e,t,n)}function P(e,r,t,n){return ee(Q(r),e,t,n)}function B(e,r,t,n){return P(e,r,t,n)}function T(e,r,t,n){return ee($(r),e,t,n)}function S(e,r,t,n){return ee(W(r,e.length-t),e,t,n)}function U(e,r,t){return 0===r&&t===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(r,t))}function j(e,r,t){t=Math.min(e.length,t);for(var n=[],o=r;o<t;){var i=e[o],f=null,h=i>239?4:i>223?3:i>191?2:1,s,b,a,u;if(o+h<=t)switch(h){case 1:i<128&&(f=i);break;case 2:128==(192&(s=e[o+1]))&&(u=(31&i)<<6|63&s)>127&&(f=u);break;case 3:s=e[o+1],b=e[o+2],128==(192&s)&&128==(192&b)&&(u=(15&i)<<12|(63&s)<<6|63&b)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:s=e[o+1],b=e[o+2],a=e[o+3],128==(192&s)&&128==(192&b)&&128==(192&a)&&(u=(15&i)<<18|(63&s)<<12|(63&b)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=h}return Y(n)}r.Buffer=b,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,b.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:f(),r.kMaxLength=h(),b.poolSize=8192,b._augment=function(e){return e.__proto__=b.prototype,e},b.from=function(e,r,t){return a(null,e,r,t)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&b[Symbol.species]===b&&Object.defineProperty(b,Symbol.species,{value:null,configurable:!0})),b.alloc=function(e,r,t){return m(null,e,r,t)},b.allocUnsafe=function(e){return x(null,e)},b.allocUnsafeSlow=function(e){return x(null,e)},b.isBuffer=function e(r){return!(null==r||!r._isBuffer)},b.compare=function e(r,t){if(!b.isBuffer(r)||!b.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(r===t)return 0;for(var n=r.length,o=t.length,i=0,f=Math.min(n,o);i<f;++i)if(r[i]!==t[i]){n=r[i],o=t[i];break}return n<o?-1:o<n?1:0},b.isEncoding=function e(r){switch(String(r).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}},b.concat=function e(r,t){if(!i(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return b.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var o=b.allocUnsafe(t),f=0;for(n=0;n<r.length;++n){var h=r[n];if(!b.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(o,f),f+=h.length}return o},b.byteLength=y,b.prototype._isBuffer=!0,b.prototype.swap16=function e(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)v(this,t,t+1);return this},b.prototype.swap32=function e(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},b.prototype.swap64=function e(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},b.prototype.toString=function e(){var r=0|this.length;return 0===r?"":0===arguments.length?j(this,0,r):w.apply(this,arguments)},b.prototype.equals=function e(r){if(!b.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===b.compare(this,r)},b.prototype.inspect=function e(){var t="",n=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},b.prototype.compare=function e(r,t,n,o,i){if(!b.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=r?r.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||n>r.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=n)return 0;if(o>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,o>>>=0,i>>>=0,this===r)return 0;for(var f=i-o,h=n-t,s=Math.min(f,h),a=this.slice(o,i),u=r.slice(t,n),m=0;m<s;++m)if(a[m]!==u[m]){f=a[m],h=u[m];break}return f<h?-1:h<f?1:0},b.prototype.includes=function e(r,t,n){return-1!==this.indexOf(r,t,n)},b.prototype.indexOf=function e(r,t,n){return _(this,r,t,n,!0)},b.prototype.lastIndexOf=function e(r,t,n){return _(this,r,t,n,!1)},b.prototype.write=function e(r,t,n,o){if(void 0===t)o="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)o=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===o&&(o="utf8")):(o=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var f=!1;;)switch(o){case"hex":return A(this,r,t,n);case"utf8":case"utf-8":return R(this,r,t,n);case"ascii":return P(this,r,t,n);case"latin1":case"binary":return B(this,r,t,n);case"base64":return T(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,r,t,n);default:if(f)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),f=!0}},b.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function Y(e){var r=e.length;if(r<=M)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=M));return t}function I(e,r,t){var n="";t=Math.min(e.length,t);for(var o=r;o<t;++o)n+=String.fromCharCode(127&e[o]);return n}function C(e,r,t){var n="";t=Math.min(e.length,t);for(var o=r;o<t;++o)n+=String.fromCharCode(e[o]);return n}function O(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var o="",i=r;i<t;++i)o+=H(e[i]);return o}function L(e,r,t){for(var n=e.slice(r,t),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function D(e,r,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,t,n,o,i){if(!b.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}function z(e,r,t,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(e.length-t,2);o<i;++o)e[t+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function F(e,r,t,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(e.length-t,4);o<i;++o)e[t+o]=r>>>8*(n?o:3-o)&255}function V(e,r,t,n,o,i){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function q(e,r,t,n,i){return i||V(e,r,t,4,3.4028234663852886e38,-3.4028234663852886e38),o.write(e,r,t,n,23,4),t+4}function X(e,r,t,n,i){return i||V(e,r,t,8,1.7976931348623157e308,-1.7976931348623157e308),o.write(e,r,t,n,52,8),t+8}b.prototype.slice=function e(r,t){var n=this.length,o;if(r=~~r,t=void 0===t?n:~~t,r<0?(r+=n)<0&&(r=0):r>n&&(r=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<r&&(t=r),b.TYPED_ARRAY_SUPPORT)(o=this.subarray(r,t)).__proto__=b.prototype;else{var i=t-r;o=new b(i,void 0);for(var f=0;f<i;++f)o[f]=this[f+r]}return o},b.prototype.readUIntLE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=this[r],i=1,f=0;++f<t&&(i*=256);)o+=this[r+f]*i;return o},b.prototype.readUIntBE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=this[r+--t],i=1;t>0&&(i*=256);)o+=this[r+--t]*i;return o},b.prototype.readUInt8=function e(r,t){return t||D(r,1,this.length),this[r]},b.prototype.readUInt16LE=function e(r,t){return t||D(r,2,this.length),this[r]|this[r+1]<<8},b.prototype.readUInt16BE=function e(r,t){return t||D(r,2,this.length),this[r]<<8|this[r+1]},b.prototype.readUInt32LE=function e(r,t){return t||D(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},b.prototype.readUInt32BE=function e(r,t){return t||D(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},b.prototype.readIntLE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=this[r],i=1,f=0;++f<t&&(i*=256);)o+=this[r+f]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},b.prototype.readIntBE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=t,i=1,f=this[r+--o];o>0&&(i*=256);)f+=this[r+--o]*i;return f>=(i*=128)&&(f-=Math.pow(2,8*t)),f},b.prototype.readInt8=function e(r,t){return t||D(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},b.prototype.readInt16LE=function e(r,t){t||D(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt16BE=function e(r,t){t||D(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt32LE=function e(r,t){return t||D(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},b.prototype.readInt32BE=function e(r,t){return t||D(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},b.prototype.readFloatLE=function e(r,t){return t||D(r,4,this.length),o.read(this,r,!0,23,4)},b.prototype.readFloatBE=function e(r,t){return t||D(r,4,this.length),o.read(this,r,!1,23,4)},b.prototype.readDoubleLE=function e(r,t){return t||D(r,8,this.length),o.read(this,r,!0,52,8)},b.prototype.readDoubleBE=function e(r,t){return t||D(r,8,this.length),o.read(this,r,!1,52,8)},b.prototype.writeUIntLE=function e(r,t,n,o){var i;(r=+r,t|=0,n|=0,o)||N(this,r,t,n,Math.pow(2,8*n)-1,0);var f=1,h=0;for(this[t]=255&r;++h<n&&(f*=256);)this[t+h]=r/f&255;return t+n},b.prototype.writeUIntBE=function e(r,t,n,o){var i;(r=+r,t|=0,n|=0,o)||N(this,r,t,n,Math.pow(2,8*n)-1,0);var f=n-1,h=1;for(this[t+f]=255&r;--f>=0&&(h*=256);)this[t+f]=r/h&255;return t+n},b.prototype.writeUInt8=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,1,255,0),b.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[t]=255&r,t+1},b.prototype.writeUInt16LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):z(this,r,t,!0),t+2},b.prototype.writeUInt16BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):z(this,r,t,!1),t+2},b.prototype.writeUInt32LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=255&r):F(this,r,t,!0),t+4},b.prototype.writeUInt32BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):F(this,r,t,!1),t+4},b.prototype.writeIntLE=function e(r,t,n,o){if(r=+r,t|=0,!o){var i=Math.pow(2,8*n-1);N(this,r,t,n,i-1,-i)}var f=0,h=1,s=0;for(this[t]=255&r;++f<n&&(h*=256);)r<0&&0===s&&0!==this[t+f-1]&&(s=1),this[t+f]=(r/h>>0)-s&255;return t+n},b.prototype.writeIntBE=function e(r,t,n,o){if(r=+r,t|=0,!o){var i=Math.pow(2,8*n-1);N(this,r,t,n,i-1,-i)}var f=n-1,h=1,s=0;for(this[t+f]=255&r;--f>=0&&(h*=256);)r<0&&0===s&&0!==this[t+f+1]&&(s=1),this[t+f]=(r/h>>0)-s&255;return t+n},b.prototype.writeInt8=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,1,127,-128),b.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[t]=255&r,t+1},b.prototype.writeInt16LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):z(this,r,t,!0),t+2},b.prototype.writeInt16BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):z(this,r,t,!1),t+2},b.prototype.writeInt32LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24):F(this,r,t,!0),t+4},b.prototype.writeInt32BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):F(this,r,t,!1),t+4},b.prototype.writeFloatLE=function e(r,t,n){return q(this,r,t,!0,n)},b.prototype.writeFloatBE=function e(r,t,n){return q(this,r,t,!1,n)},b.prototype.writeDoubleLE=function e(r,t,n){return X(this,r,t,!0,n)},b.prototype.writeDoubleBE=function e(r,t,n){return X(this,r,t,!1,n)},b.prototype.copy=function e(r,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=r.length&&(t=r.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===r.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(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-t<o-n&&(o=r.length-t+n);var i=o-n,f;if(this===r&&n<t&&t<o)for(f=i-1;f>=0;--f)r[f+t]=this[f+n];else if(i<1e3||!b.TYPED_ARRAY_SUPPORT)for(f=0;f<i;++f)r[f+t]=this[f+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+i),t);return i},b.prototype.fill=function e(r,t,n,o){if("string"==typeof r){if("string"==typeof t?(o=t,t=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===r.length){var i=r.charCodeAt(0);i<256&&(r=i)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!b.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof r&&(r&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var f;if(t>>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"==typeof r)for(f=t;f<n;++f)this[f]=r;else{var h=b.isBuffer(r)?r:K(new b(r,o).toString()),s=h.length;for(f=0;f<n-t;++f)this[f+t]=h[f%s]}return this};var J=/[^+\/0-9A-Za-z-_]/g;function Z(e){if((e=G(e).replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,r){var t;r=r||1/0;for(var n=e.length,o=null,i=[],f=0;f<n;++f){if((t=e.charCodeAt(f))>55295&&t<57344){if(!o){if(t>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(r-=3)>-1&&i.push(239,191,189),o=t;continue}t=65536+(o-55296<<10|t-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function Q(e){for(var r=[],t=0;t<e.length;++t)r.push(255&e.charCodeAt(t));return r}function W(e,r){for(var t,n,o,i=[],f=0;f<e.length&&!((r-=2)<0);++f)n=(t=e.charCodeAt(f))>>8,o=t%256,i.push(o),i.push(n);return i}function $(e){return n.toByteArray(Z(e))}function ee(e,r,t,n){for(var o=0;o<n&&!(o+t>=r.length||o>=e.length);++o)r[o+t]=e[o];return o}function re(e){return e!=e}}).call(this,t("./node_modules/webpack/buildin/global.js"))},"./node_modules/ieee754/index.js":function(e,r){r.read=function(e,r,t,n,o){var i,f,h=8*o-n-1,s=(1<<h)-1,b=s>>1,a=-7,u=t?o-1:0,m=t?-1:1,x=e[r+u];for(u+=m,i=x&(1<<-a)-1,x>>=-a,a+=h;a>0;i=256*i+e[r+u],u+=m,a-=8);for(f=i&(1<<-a)-1,i>>=-a,a+=n;a>0;f=256*f+e[r+u],u+=m,a-=8);if(0===i)i=1-b;else{if(i===s)return f?NaN:1/0*(x?-1:1);f+=Math.pow(2,n),i-=b}return(x?-1:1)*f*Math.pow(2,i-n)},r.write=function(e,r,t,n,o,i){var f,h,s,b=8*i-o-1,a=(1<<b)-1,u=a>>1,m=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:i-1,c=n?1:-1,l=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,f=a):(f=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-f))<1&&(f--,s*=2),(r+=f+u>=1?m/s:m*Math.pow(2,1-u))*s>=2&&(f++,s/=2),f+u>=a?(h=0,f=a):f+u>=1?(h=(r*s-1)*Math.pow(2,o),f+=u):(h=r*Math.pow(2,u-1)*Math.pow(2,o),f=0));o>=8;e[t+x]=255&h,x+=c,h/=256,o-=8);for(f=f<<o|h,b+=o;b>0;e[t+x]=255&f,x+=c,f/=256,b-=8);e[t+x-c]|=128*l}},"./node_modules/isarray/index.js":function(e,r){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},"./node_modules/varint/decode.js":function(e,r){e.exports=o;var t=128,n=127;function o(e,r){var i=0,r,f=0,h=r=r||0,s,b=e.length;do{if(h>=b)throw o.bytes=0,new RangeError("Could not decode varint");s=e[h++],i+=f<28?(s&n)<<f:(s&n)*Math.pow(2,f),f+=7}while(s>=t);return o.bytes=h-r,i}},"./node_modules/varint/encode.js":function(e,r){e.exports=f;var t=128,n=127,o=-128,i=Math.pow(2,31);function f(e,r,n){r=r||[];for(var h=n=n||0;e>=i;)r[n++]=255&e|t,e/=128;for(;e&o;)r[n++]=255&e|t,e>>>=7;return r[n]=0|e,f.bytes=n-h+1,r}},"./node_modules/varint/index.js":function(e,r,t){e.exports={encode:t("./node_modules/varint/encode.js"),decode:t("./node_modules/varint/decode.js"),encodingLength:t("./node_modules/varint/length.js")}},"./node_modules/varint/length.js":function(e,r){var t=Math.pow(2,7),n=Math.pow(2,14),o=Math.pow(2,21),i=Math.pow(2,28),f=Math.pow(2,35),h=Math.pow(2,42),s=Math.pow(2,49),b=Math.pow(2,56),a=Math.pow(2,63);e.exports=function(e){return e<t?1:e<n?2:e<o?3:e<i?4:e<f?5:e<h?6:e<s?7:e<b?8:e<a?9:10}},"./node_modules/webpack/buildin/global.js":function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},"./src/base-table.js":function(e,r,t){"use strict";(function(t){(r=e.exports).raw=t.from("55","hex"),r.base1=t.from("01","hex"),r.base2=t.from("00","hex"),r.base8=t.from("07","hex"),r.base10=t.from("09","hex"),r.cbor=t.from("51","hex"),r.protobuf=t.from("50","hex"),r.rlp=t.from("60","hex"),r.bencode=t.from("63","hex"),r.multicodec=t.from("30","hex"),r.multihash=t.from("31","hex"),r.multiaddr=t.from("32","hex"),r.multibase=t.from("33","hex"),r.md4=t.from("d4","hex"),r.md5=t.from("d5","hex"),r.sha1=t.from("11","hex"),r["sha2-256"]=t.from("12","hex"),r["sha2-512"]=t.from("13","hex"),r["dbl-sha2-256"]=t.from("56","hex"),r["sha3-224"]=t.from("17","hex"),r["sha3-256"]=t.from("16","hex"),r["sha3-384"]=t.from("15","hex"),r["sha3-512"]=t.from("14","hex"),r["shake-128"]=t.from("18","hex"),r["shake-256"]=t.from("19","hex"),r["keccak-224"]=t.from("1a","hex"),r["keccak-256"]=t.from("1b","hex"),r["keccak-384"]=t.from("1c","hex"),r["keccak-512"]=t.from("1d","hex"),r["murmur3-128"]=t.from("22","hex"),r["murmur3-32"]=t.from("23","hex"),r.x11=t.from("1100","hex"),r["blake2b-8"]=t.from("b201","hex"),r["blake2b-16"]=t.from("b202","hex"),r["blake2b-24"]=t.from("b203","hex"),r["blake2b-32"]=t.from("b204","hex"),r["blake2b-40"]=t.from("b205","hex"),r["blake2b-48"]=t.from("b206","hex"),r["blake2b-56"]=t.from("b207","hex"),r["blake2b-64"]=t.from("b208","hex"),r["blake2b-72"]=t.from("b209","hex"),r["blake2b-80"]=t.from("b20a","hex"),r["blake2b-88"]=t.from("b20b","hex"),r["blake2b-96"]=t.from("b20c","hex"),r["blake2b-104"]=t.from("b20d","hex"),r["blake2b-112"]=t.from("b20e","hex"),r["blake2b-120"]=t.from("b20f","hex"),r["blake2b-128"]=t.from("b210","hex"),r["blake2b-136"]=t.from("b211","hex"),r["blake2b-144"]=t.from("b212","hex"),r["blake2b-152"]=t.from("b213","hex"),r["blake2b-160"]=t.from("b214","hex"),r["blake2b-168"]=t.from("b215","hex"),r["blake2b-176"]=t.from("b216","hex"),r["blake2b-184"]=t.from("b217","hex"),r["blake2b-192"]=t.from("b218","hex"),r["blake2b-200"]=t.from("b219","hex"),r["blake2b-208"]=t.from("b21a","hex"),r["blake2b-216"]=t.from("b21b","hex"),r["blake2b-224"]=t.from("b21c","hex"),r["blake2b-232"]=t.from("b21d","hex"),r["blake2b-240"]=t.from("b21e","hex"),r["blake2b-248"]=t.from("b21f","hex"),r["blake2b-256"]=t.from("b220","hex"),r["blake2b-264"]=t.from("b221","hex"),r["blake2b-272"]=t.from("b222","hex"),r["blake2b-280"]=t.from("b223","hex"),r["blake2b-288"]=t.from("b224","hex"),r["blake2b-296"]=t.from("b225","hex"),r["blake2b-304"]=t.from("b226","hex"),r["blake2b-312"]=t.from("b227","hex"),r["blake2b-320"]=t.from("b228","hex"),r["blake2b-328"]=t.from("b229","hex"),r["blake2b-336"]=t.from("b22a","hex"),r["blake2b-344"]=t.from("b22b","hex"),r["blake2b-352"]=t.from("b22c","hex"),r["blake2b-360"]=t.from("b22d","hex"),r["blake2b-368"]=t.from("b22e","hex"),r["blake2b-376"]=t.from("b22f","hex"),r["blake2b-384"]=t.from("b230","hex"),r["blake2b-392"]=t.from("b231","hex"),r["blake2b-400"]=t.from("b232","hex"),r["blake2b-408"]=t.from("b233","hex"),r["blake2b-416"]=t.from("b234","hex"),r["blake2b-424"]=t.from("b235","hex"),r["blake2b-432"]=t.from("b236","hex"),r["blake2b-440"]=t.from("b237","hex"),r["blake2b-448"]=t.from("b238","hex"),r["blake2b-456"]=t.from("b239","hex"),r["blake2b-464"]=t.from("b23a","hex"),r["blake2b-472"]=t.from("b23b","hex"),r["blake2b-480"]=t.from("b23c","hex"),r["blake2b-488"]=t.from("b23d","hex"),r["blake2b-496"]=t.from("b23e","hex"),r["blake2b-504"]=t.from("b23f","hex"),r["blake2b-512"]=t.from("b240","hex"),r["blake2s-8"]=t.from("b241","hex"),r["blake2s-16"]=t.from("b242","hex"),r["blake2s-24"]=t.from("b243","hex"),r["blake2s-32"]=t.from("b244","hex"),r["blake2s-40"]=t.from("b245","hex"),r["blake2s-48"]=t.from("b246","hex"),r["blake2s-56"]=t.from("b247","hex"),r["blake2s-64"]=t.from("b248","hex"),r["blake2s-72"]=t.from("b249","hex"),r["blake2s-80"]=t.from("b24a","hex"),r["blake2s-88"]=t.from("b24b","hex"),r["blake2s-96"]=t.from("b24c","hex"),r["blake2s-104"]=t.from("b24d","hex"),r["blake2s-112"]=t.from("b24e","hex"),r["blake2s-120"]=t.from("b24f","hex"),r["blake2s-128"]=t.from("b250","hex"),r["blake2s-136"]=t.from("b251","hex"),r["blake2s-144"]=t.from("b252","hex"),r["blake2s-152"]=t.from("b253","hex"),r["blake2s-160"]=t.from("b254","hex"),r["blake2s-168"]=t.from("b255","hex"),r["blake2s-176"]=t.from("b256","hex"),r["blake2s-184"]=t.from("b257","hex"),r["blake2s-192"]=t.from("b258","hex"),r["blake2s-200"]=t.from("b259","hex"),r["blake2s-208"]=t.from("b25a","hex"),r["blake2s-216"]=t.from("b25b","hex"),r["blake2s-224"]=t.from("b25c","hex"),r["blake2s-232"]=t.from("b25d","hex"),r["blake2s-240"]=t.from("b25e","hex"),r["blake2s-248"]=t.from("b25f","hex"),r["blake2s-256"]=t.from("b260","hex"),r["skein256-8"]=t.from("b301","hex"),r["skein256-16"]=t.from("b302","hex"),r["skein256-24"]=t.from("b303","hex"),r["skein256-32"]=t.from("b304","hex"),r["skein256-40"]=t.from("b305","hex"),r["skein256-48"]=t.from("b306","hex"),r["skein256-56"]=t.from("b307","hex"),r["skein256-64"]=t.from("b308","hex"),r["skein256-72"]=t.from("b309","hex"),r["skein256-80"]=t.from("b30a","hex"),r["skein256-88"]=t.from("b30b","hex"),r["skein256-96"]=t.from("b30c","hex"),r["skein256-104"]=t.from("b30d","hex"),r["skein256-112"]=t.from("b30e","hex"),r["skein256-120"]=t.from("b30f","hex"),r["skein256-128"]=t.from("b310","hex"),r["skein256-136"]=t.from("b311","hex"),r["skein256-144"]=t.from("b312","hex"),r["skein256-152"]=t.from("b313","hex"),r["skein256-160"]=t.from("b314","hex"),r["skein256-168"]=t.from("b315","hex"),r["skein256-176"]=t.from("b316","hex"),r["skein256-184"]=t.from("b317","hex"),r["skein256-192"]=t.from("b318","hex"),r["skein256-200"]=t.from("b319","hex"),r["skein256-208"]=t.from("b31a","hex"),r["skein256-216"]=t.from("b31b","hex"),r["skein256-224"]=t.from("b31c","hex"),r["skein256-232"]=t.from("b31d","hex"),r["skein256-240"]=t.from("b31e","hex"),r["skein256-248"]=t.from("b31f","hex"),r["skein256-256"]=t.from("b320","hex"),r["skein512-8"]=t.from("b321","hex"),r["skein512-16"]=t.from("b322","hex"),r["skein512-24"]=t.from("b323","hex"),r["skein512-32"]=t.from("b324","hex"),r["skein512-40"]=t.from("b325","hex"),r["skein512-48"]=t.from("b326","hex"),r["skein512-56"]=t.from("b327","hex"),r["skein512-64"]=t.from("b328","hex"),r["skein512-72"]=t.from("b329","hex"),r["skein512-80"]=t.from("b32a","hex"),r["skein512-88"]=t.from("b32b","hex"),r["skein512-96"]=t.from("b32c","hex"),r["skein512-104"]=t.from("b32d","hex"),r["skein512-112"]=t.from("b32e","hex"),r["skein512-120"]=t.from("b32f","hex"),r["skein512-128"]=t.from("b330","hex"),r["skein512-136"]=t.from("b331","hex"),r["skein512-144"]=t.from("b332","hex"),r["skein512-152"]=t.from("b333","hex"),r["skein512-160"]=t.from("b334","hex"),r["skein512-168"]=t.from("b335","hex"),r["skein512-176"]=t.from("b336","hex"),r["skein512-184"]=t.from("b337","hex"),r["skein512-192"]=t.from("b338","hex"),r["skein512-200"]=t.from("b339","hex"),r["skein512-208"]=t.from("b33a","hex"),r["skein512-216"]=t.from("b33b","hex"),r["skein512-224"]=t.from("b33c","hex"),r["skein512-232"]=t.from("b33d","hex"),r["skein512-240"]=t.from("b33e","hex"),r["skein512-248"]=t.from("b33f","hex"),r["skein512-256"]=t.from("b340","hex"),r["skein512-264"]=t.from("b341","hex"),r["skein512-272"]=t.from("b342","hex"),r["skein512-280"]=t.from("b343","hex"),r["skein512-288"]=t.from("b344","hex"),r["skein512-296"]=t.from("b345","hex"),r["skein512-304"]=t.from("b346","hex"),r["skein512-312"]=t.from("b347","hex"),r["skein512-320"]=t.from("b348","hex"),r["skein512-328"]=t.from("b349","hex"),r["skein512-336"]=t.from("b34a","hex"),r["skein512-344"]=t.from("b34b","hex"),r["skein512-352"]=t.from("b34c","hex"),r["skein512-360"]=t.from("b34d","hex"),r["skein512-368"]=t.from("b34e","hex"),r["skein512-376"]=t.from("b34f","hex"),r["skein512-384"]=t.from("b350","hex"),r["skein512-392"]=t.from("b351","hex"),r["skein512-400"]=t.from("b352","hex"),r["skein512-408"]=t.from("b353","hex"),r["skein512-416"]=t.from("b354","hex"),r["skein512-424"]=t.from("b355","hex"),r["skein512-432"]=t.from("b356","hex"),r["skein512-440"]=t.from("b357","hex"),r["skein512-448"]=t.from("b358","hex"),r["skein512-456"]=t.from("b359","hex"),r["skein512-464"]=t.from("b35a","hex"),r["skein512-472"]=t.from("b35b","hex"),r["skein512-480"]=t.from("b35c","hex"),r["skein512-488"]=t.from("b35d","hex"),r["skein512-496"]=t.from("b35e","hex"),r["skein512-504"]=t.from("b35f","hex"),r["skein512-512"]=t.from("b360","hex"),r["skein1024-8"]=t.from("b361","hex"),r["skein1024-16"]=t.from("b362","hex"),r["skein1024-24"]=t.from("b363","hex"),r["skein1024-32"]=t.from("b364","hex"),r["skein1024-40"]=t.from("b365","hex"),r["skein1024-48"]=t.from("b366","hex"),r["skein1024-56"]=t.from("b367","hex"),r["skein1024-64"]=t.from("b368","hex"),r["skein1024-72"]=t.from("b369","hex"),r["skein1024-80"]=t.from("b36a","hex"),r["skein1024-88"]=t.from("b36b","hex"),r["skein1024-96"]=t.from("b36c","hex"),r["skein1024-104"]=t.from("b36d","hex"),r["skein1024-112"]=t.from("b36e","hex"),r["skein1024-120"]=t.from("b36f","hex"),r["skein1024-128"]=t.from("b370","hex"),r["skein1024-136"]=t.from("b371","hex"),r["skein1024-144"]=t.from("b372","hex"),r["skein1024-152"]=t.from("b373","hex"),r["skein1024-160"]=t.from("b374","hex"),r["skein1024-168"]=t.from("b375","hex"),r["skein1024-176"]=t.from("b376","hex"),r["skein1024-184"]=t.from("b377","hex"),r["skein1024-192"]=t.from("b378","hex"),r["skein1024-200"]=t.from("b379","hex"),r["skein1024-208"]=t.from("b37a","hex"),r["skein1024-216"]=t.from("b37b","hex"),r["skein1024-224"]=t.from("b37c","hex"),r["skein1024-232"]=t.from("b37d","hex"),r["skein1024-240"]=t.from("b37e","hex"),r["skein1024-248"]=t.from("b37f","hex"),r["skein1024-256"]=t.from("b380","hex"),r["skein1024-264"]=t.from("b381","hex"),r["skein1024-272"]=t.from("b382","hex"),r["skein1024-280"]=t.from("b383","hex"),r["skein1024-288"]=t.from("b384","hex"),r["skein1024-296"]=t.from("b385","hex"),r["skein1024-304"]=t.from("b386","hex"),r["skein1024-312"]=t.from("b387","hex"),r["skein1024-320"]=t.from("b388","hex"),r["skein1024-328"]=t.from("b389","hex"),r["skein1024-336"]=t.from("b38a","hex"),r["skein1024-344"]=t.from("b38b","hex"),r["skein1024-352"]=t.from("b38c","hex"),r["skein1024-360"]=t.from("b38d","hex"),r["skein1024-368"]=t.from("b38e","hex"),r["skein1024-376"]=t.from("b38f","hex"),r["skein1024-384"]=t.from("b390","hex"),r["skein1024-392"]=t.from("b391","hex"),r["skein1024-400"]=t.from("b392","hex"),r["skein1024-408"]=t.from("b393","hex"),r["skein1024-416"]=t.from("b394","hex"),r["skein1024-424"]=t.from("b395","hex"),r["skein1024-432"]=t.from("b396","hex"),r["skein1024-440"]=t.from("b397","hex"),r["skein1024-448"]=t.from("b398","hex"),r["skein1024-456"]=t.from("b399","hex"),r["skein1024-464"]=t.from("b39a","hex"),r["skein1024-472"]=t.from("b39b","hex"),r["skein1024-480"]=t.from("b39c","hex"),r["skein1024-488"]=t.from("b39d","hex"),r["skein1024-496"]=t.from("b39e","hex"),r["skein1024-504"]=t.from("b39f","hex"),r["skein1024-512"]=t.from("b3a0","hex"),r["skein1024-520"]=t.from("b3a1","hex"),r["skein1024-528"]=t.from("b3a2","hex"),r["skein1024-536"]=t.from("b3a3","hex"),r["skein1024-544"]=t.from("b3a4","hex"),r["skein1024-552"]=t.from("b3a5","hex"),r["skein1024-560"]=t.from("b3a6","hex"),r["skein1024-568"]=t.from("b3a7","hex"),r["skein1024-576"]=t.from("b3a8","hex"),r["skein1024-584"]=t.from("b3a9","hex"),r["skein1024-592"]=t.from("b3aa","hex"),r["skein1024-600"]=t.from("b3ab","hex"),r["skein1024-608"]=t.from("b3ac","hex"),r["skein1024-616"]=t.from("b3ad","hex"),r["skein1024-624"]=t.from("b3ae","hex"),r["skein1024-632"]=t.from("b3af","hex"),r["skein1024-640"]=t.from("b3b0","hex"),r["skein1024-648"]=t.from("b3b1","hex"),r["skein1024-656"]=t.from("b3b2","hex"),r["skein1024-664"]=t.from("b3b3","hex"),r["skein1024-672"]=t.from("b3b4","hex"),r["skein1024-680"]=t.from("b3b5","hex"),r["skein1024-688"]=t.from("b3b6","hex"),r["skein1024-696"]=t.from("b3b7","hex"),r["skein1024-704"]=t.from("b3b8","hex"),r["skein1024-712"]=t.from("b3b9","hex"),r["skein1024-720"]=t.from("b3ba","hex"),r["skein1024-728"]=t.from("b3bb","hex"),r["skein1024-736"]=t.from("b3bc","hex"),r["skein1024-744"]=t.from("b3bd","hex"),r["skein1024-752"]=t.from("b3be","hex"),r["skein1024-760"]=t.from("b3bf","hex"),r["skein1024-768"]=t.from("b3c0","hex"),r["skein1024-776"]=t.from("b3c1","hex"),r["skein1024-784"]=t.from("b3c2","hex"),r["skein1024-792"]=t.from("b3c3","hex"),r["skein1024-800"]=t.from("b3c4","hex"),r["skein1024-808"]=t.from("b3c5","hex"),r["skein1024-816"]=t.from("b3c6","hex"),r["skein1024-824"]=t.from("b3c7","hex"),r["skein1024-832"]=t.from("b3c8","hex"),r["skein1024-840"]=t.from("b3c9","hex"),r["skein1024-848"]=t.from("b3ca","hex"),r["skein1024-856"]=t.from("b3cb","hex"),r["skein1024-864"]=t.from("b3cc","hex"),r["skein1024-872"]=t.from("b3cd","hex"),r["skein1024-880"]=t.from("b3ce","hex"),r["skein1024-888"]=t.from("b3cf","hex"),r["skein1024-896"]=t.from("b3d0","hex"),r["skein1024-904"]=t.from("b3d1","hex"),r["skein1024-912"]=t.from("b3d2","hex"),r["skein1024-920"]=t.from("b3d3","hex"),r["skein1024-928"]=t.from("b3d4","hex"),r["skein1024-936"]=t.from("b3d5","hex"),r["skein1024-944"]=t.from("b3d6","hex"),r["skein1024-952"]=t.from("b3d7","hex"),r["skein1024-960"]=t.from("b3d8","hex"),r["skein1024-968"]=t.from("b3d9","hex"),r["skein1024-976"]=t.from("b3da","hex"),r["skein1024-984"]=t.from("b3db","hex"),r["skein1024-992"]=t.from("b3dc","hex"),r["skein1024-1000"]=t.from("b3dd","hex"),r["skein1024-1008"]=t.from("b3de","hex"),r["skein1024-1016"]=t.from("b3df","hex"),r["skein1024-1024"]=t.from("b3e0","hex"),r.ip4=t.from("04","hex"),r.ip6=t.from("29","hex"),r.ip6zone=t.from("2a","hex"),r.tcp=t.from("06","hex"),r.udp=t.from("0111","hex"),r.dccp=t.from("21","hex"),r.sctp=t.from("84","hex"),r.udt=t.from("012d","hex"),r.utp=t.from("012e","hex"),r.ipfs=t.from("01a5","hex"),r.http=t.from("01e0","hex"),r.https=t.from("01bb","hex"),r.quic=t.from("01cc","hex"),r.ws=t.from("01dd","hex"),r.onion=t.from("01bc","hex"),r.onion3=t.from("01bd","hex"),r.garlic64=t.from("01be","hex"),r["p2p-circuit"]=t.from("0122","hex"),r.dns4=t.from("36","hex"),r.dns6=t.from("37","hex"),r.dnsaddr=t.from("38","hex"),r["git-raw"]=t.from("78","hex"),r["dag-pb"]=t.from("70","hex"),r["dag-cbor"]=t.from("71","hex"),r["dag-json"]=t.from("0129","hex"),r["eth-block"]=t.from("90","hex"),r["eth-block-list"]=t.from("91","hex"),r["eth-tx-trie"]=t.from("92","hex"),r["eth-tx"]=t.from("93","hex"),r["eth-tx-receipt-trie"]=t.from("94","hex"),r["eth-tx-receipt"]=t.from("95","hex"),r["eth-state-trie"]=t.from("96","hex"),r["eth-account-snapshot"]=t.from("97","hex"),r["eth-storage-trie"]=t.from("98","hex"),r["bitcoin-block"]=t.from("b0","hex"),r["bitcoin-tx"]=t.from("b1","hex"),r["zcash-block"]=t.from("c0","hex"),r["zcash-tx"]=t.from("c1","hex"),r["stellar-block"]=t.from("d0","hex"),r["stellar-tx"]=t.from("d1","hex"),r["decred-block"]=t.from("e0","hex"),r["decred-tx"]=t.from("e1","hex"),r["dash-block"]=t.from("f0","hex"),r["dash-tx"]=t.from("f1","hex"),r["torrent-info"]=t.from("7b","hex"),r["torrent-file"]=t.from("7c","hex"),r["ed25519-pub"]=t.from("ed","hex")}).call(this,t("./node_modules/buffer/index.js").Buffer)},"./src/index.js":function(e,r,t){"use strict";(function(n){const o=t("./node_modules/varint/index.js"),i=t("./src/varint-table.js"),f=t("./src/name-table.js"),h=t("./src/util.js");(r=e.exports).addPrefix=((e,r)=>{let t;if(n.isBuffer(e))t=h.varintBufferEncode(e);else{if(!i[e])throw new Error("multicodec not recognized");t=i[e]}return n.concat([t,r])}),r.rmPrefix=(e=>(o.decode(e),e.slice(o.decode.bytes))),r.getCodec=(e=>{const r=h.varintBufferDecode(e),t=f[r.toString("hex")];if(void 0===t)throw new Error("Code `0x"+r.toString("hex")+"` not found");return t}),r.getCodeVarint=(e=>{const r=i[e];if(void 0===r)throw new Error("Codec `"+e+"` not found");return r}),r.addCodec=((e,r)=>{i[e]=h.varintBufferEncode(r),f[r.toString("hex")]=e})}).call(this,t("./node_modules/buffer/index.js").Buffer)},"./src/name-table.js":function(e,r,t){"use strict";const n=t("./src/base-table.js"),o={};e.exports=o;for(let e in n){let r;o[n[e].toString("hex")]=e}},"./src/util.js":function(e,r,t){"use strict";(function(r){const n=t("./node_modules/varint/index.js");function o(e){return parseInt(e.toString("hex"),16)}function i(e){let t=e.toString(16);return t.length%2==1&&(t="0"+t),r.from(t,"hex")}function f(e){return r.from(n.encode(o(e)))}function h(e){return i(n.decode(e))}e.exports={numberToBuffer:i,bufferToNumber:o,varintBufferEncode:f,varintBufferDecode:h}}).call(this,t("./node_modules/buffer/index.js").Buffer)},"./src/varint-table.js":function(e,r,t){"use strict";const n=t("./src/base-table.js"),o=t("./src/util.js").varintBufferEncode,i={};e.exports=i;for(let e in n){let r=n[e];i[e]=o(r)}},0:function(e,r,t){e.exports=t("./src/index.js")}});
var Multicodec=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},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,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function r(){return e.default}:function r(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}({"./node_modules/base64-js/index.js":function(e,r,t){"use strict";r.byteLength=a,r.toByteArray=m,r.fromByteArray=l;for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,s=f.length;h<s;++h)n[h]=f[h],o[f.charCodeAt(h)]=h;function b(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("="),n;return-1===t&&(t=r),[t,t===r?0:4-t%4]}function a(e){var r=b(e),t=r[0],n=r[1];return 3*(t+n)/4-n}function u(e,r,t){return 3*(r+t)/4-t}function m(e){for(var r,t=b(e),n=t[0],f=t[1],h=new i(u(e,n,f)),s=0,a=f>0?n-4:n,m=0;m<a;m+=4)r=o[e.charCodeAt(m)]<<18|o[e.charCodeAt(m+1)]<<12|o[e.charCodeAt(m+2)]<<6|o[e.charCodeAt(m+3)],h[s++]=r>>16&255,h[s++]=r>>8&255,h[s++]=255&r;return 2===f&&(r=o[e.charCodeAt(m)]<<2|o[e.charCodeAt(m+1)]>>4,h[s++]=255&r),1===f&&(r=o[e.charCodeAt(m)]<<10|o[e.charCodeAt(m+1)]<<4|o[e.charCodeAt(m+2)]>>2,h[s++]=r>>8&255,h[s++]=255&r),h}function x(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function c(e,r,t){for(var n,o=[],i=r;i<t;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(x(n));return o.join("")}function l(e){for(var r,t=e.length,o=t%3,i=[],f=16383,h=0,s=t-o;h<s;h+=16383)i.push(c(e,h,h+16383>s?s:h+16383));return 1===o?(r=e[t-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(e[t-2]<<8)+e[t-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"=")),i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},"./node_modules/buffer/index.js":function(e,r,t){"use strict";(function(e){var n=t("./node_modules/base64-js/index.js"),o=t("./node_modules/ieee754/index.js"),i=t("./node_modules/isarray/index.js");function f(){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(e){return!1}}function h(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(h()<r)throw new RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r)).__proto__=b.prototype:(null===e&&(e=new b(r)),e.length=r),e}function b(e,r,t){if(!(b.TYPED_ARRAY_SUPPORT||this instanceof b))return new b(e,r,t);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return x(this,e)}return a(this,e,r,t)}function a(e,r,t,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?k(e,r,t,n):"string"==typeof r?c(e,r,t):d(e,r)}function u(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 m(e,r,t,n){return u(r),r<=0?s(e,r):void 0!==t?"string"==typeof n?s(e,r).fill(t,n):s(e,r).fill(t):s(e,r)}function x(e,r){if(u(r),e=s(e,r<0?0:0|p(r)),!b.TYPED_ARRAY_SUPPORT)for(var t=0;t<r;++t)e[t]=0;return e}function c(e,r,t){if("string"==typeof t&&""!==t||(t="utf8"),!b.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(r,t),o=(e=s(e,n)).write(r,t);return o!==n&&(e=e.slice(0,o)),e}function l(e,r){var t=r.length<0?0:0|p(r.length);e=s(e,t);for(var n=0;n<t;n+=1)e[n]=255&r[n];return e}function k(e,r,t,n){if(r.byteLength,t<0||r.byteLength<t)throw new RangeError("'offset' is out of bounds");if(r.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===t&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,t):new Uint8Array(r,t,n),b.TYPED_ARRAY_SUPPORT?(e=r).__proto__=b.prototype:e=l(e,r),e}function d(e,r){if(b.isBuffer(r)){var t=0|p(r.length);return 0===(e=s(e,t)).length?e:(r.copy(e,0,0,t),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||re(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&i(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e){if(e>=h())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),b.alloc(+e)}function y(e,r){if(b.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 n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return $(e).length;default:if(n)return K(e).length;r=(""+r).toLowerCase(),n=!0}}function w(e,r,t){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,r,t);case"utf8":case"utf-8":return j(this,r,t);case"ascii":return I(this,r,t);case"latin1":case"binary":return O(this,r,t);case"base64":return U(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function _(e,r,t,n,o){if(0===e.length)return-1;if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(o)return-1;t=e.length-1}else if(t<0){if(!o)return-1;t=0}if("string"==typeof r&&(r=b.from(r,n)),b.isBuffer(r))return 0===r.length?-1:E(e,r,t,n,o);if("number"==typeof r)return r&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):E(e,[r],t,n,o);throw new TypeError("val must be string, number or Buffer")}function E(e,r,t,n,o){var i=1,f=e.length,h=r.length,s;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||r.length<2)return-1;i=2,f/=2,h/=2,t/=2}function b(e,r){return 1===i?e[r]:e.readUInt16BE(r*i)}if(o){var a=-1;for(s=t;s<f;s++)if(b(e,s)===b(r,-1===a?0:s-a)){if(-1===a&&(a=s),s-a+1===h)return a*i}else-1!==a&&(s-=s-a),a=-1}else for(t+h>f&&(t=f-h),s=t;s>=0;s--){for(var u=!0,m=0;m<h;m++)if(b(e,s+m)!==b(r,m)){u=!1;break}if(u)return s}return-1}function A(e,r,t,n){t=Number(t)||0;var o=e.length-t;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var f=0;f<n;++f){var h=parseInt(r.substr(2*f,2),16);if(isNaN(h))return f;e[t+f]=h}return f}function R(e,r,t,n){return ee(K(r,e.length-t),e,t,n)}function P(e,r,t,n){return ee(Q(r),e,t,n)}function B(e,r,t,n){return P(e,r,t,n)}function T(e,r,t,n){return ee($(r),e,t,n)}function S(e,r,t,n){return ee(W(r,e.length-t),e,t,n)}function U(e,r,t){return 0===r&&t===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(r,t))}function j(e,r,t){t=Math.min(e.length,t);for(var n=[],o=r;o<t;){var i=e[o],f=null,h=i>239?4:i>223?3:i>191?2:1,s,b,a,u;if(o+h<=t)switch(h){case 1:i<128&&(f=i);break;case 2:128==(192&(s=e[o+1]))&&(u=(31&i)<<6|63&s)>127&&(f=u);break;case 3:s=e[o+1],b=e[o+2],128==(192&s)&&128==(192&b)&&(u=(15&i)<<12|(63&s)<<6|63&b)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:s=e[o+1],b=e[o+2],a=e[o+3],128==(192&s)&&128==(192&b)&&128==(192&a)&&(u=(15&i)<<18|(63&s)<<12|(63&b)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=h}return Y(n)}r.Buffer=b,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,b.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:f(),r.kMaxLength=h(),b.poolSize=8192,b._augment=function(e){return e.__proto__=b.prototype,e},b.from=function(e,r,t){return a(null,e,r,t)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&b[Symbol.species]===b&&Object.defineProperty(b,Symbol.species,{value:null,configurable:!0})),b.alloc=function(e,r,t){return m(null,e,r,t)},b.allocUnsafe=function(e){return x(null,e)},b.allocUnsafeSlow=function(e){return x(null,e)},b.isBuffer=function e(r){return!(null==r||!r._isBuffer)},b.compare=function e(r,t){if(!b.isBuffer(r)||!b.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(r===t)return 0;for(var n=r.length,o=t.length,i=0,f=Math.min(n,o);i<f;++i)if(r[i]!==t[i]){n=r[i],o=t[i];break}return n<o?-1:o<n?1:0},b.isEncoding=function e(r){switch(String(r).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}},b.concat=function e(r,t){if(!i(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return b.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var o=b.allocUnsafe(t),f=0;for(n=0;n<r.length;++n){var h=r[n];if(!b.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(o,f),f+=h.length}return o},b.byteLength=y,b.prototype._isBuffer=!0,b.prototype.swap16=function e(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)v(this,t,t+1);return this},b.prototype.swap32=function e(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},b.prototype.swap64=function e(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},b.prototype.toString=function e(){var r=0|this.length;return 0===r?"":0===arguments.length?j(this,0,r):w.apply(this,arguments)},b.prototype.equals=function e(r){if(!b.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===b.compare(this,r)},b.prototype.inspect=function e(){var t="",n=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},b.prototype.compare=function e(r,t,n,o,i){if(!b.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=r?r.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||n>r.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=n)return 0;if(o>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,o>>>=0,i>>>=0,this===r)return 0;for(var f=i-o,h=n-t,s=Math.min(f,h),a=this.slice(o,i),u=r.slice(t,n),m=0;m<s;++m)if(a[m]!==u[m]){f=a[m],h=u[m];break}return f<h?-1:h<f?1:0},b.prototype.includes=function e(r,t,n){return-1!==this.indexOf(r,t,n)},b.prototype.indexOf=function e(r,t,n){return _(this,r,t,n,!0)},b.prototype.lastIndexOf=function e(r,t,n){return _(this,r,t,n,!1)},b.prototype.write=function e(r,t,n,o){if(void 0===t)o="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)o=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===o&&(o="utf8")):(o=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var f=!1;;)switch(o){case"hex":return A(this,r,t,n);case"utf8":case"utf-8":return R(this,r,t,n);case"ascii":return P(this,r,t,n);case"latin1":case"binary":return B(this,r,t,n);case"base64":return T(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,r,t,n);default:if(f)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),f=!0}},b.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function Y(e){var r=e.length;if(r<=M)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=M));return t}function I(e,r,t){var n="";t=Math.min(e.length,t);for(var o=r;o<t;++o)n+=String.fromCharCode(127&e[o]);return n}function O(e,r,t){var n="";t=Math.min(e.length,t);for(var o=r;o<t;++o)n+=String.fromCharCode(e[o]);return n}function C(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var o="",i=r;i<t;++i)o+=H(e[i]);return o}function L(e,r,t){for(var n=e.slice(r,t),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function D(e,r,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,t,n,o,i){if(!b.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}function z(e,r,t,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(e.length-t,2);o<i;++o)e[t+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function F(e,r,t,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(e.length-t,4);o<i;++o)e[t+o]=r>>>8*(n?o:3-o)&255}function V(e,r,t,n,o,i){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function q(e,r,t,n,i){return i||V(e,r,t,4,3.4028234663852886e38,-3.4028234663852886e38),o.write(e,r,t,n,23,4),t+4}function X(e,r,t,n,i){return i||V(e,r,t,8,1.7976931348623157e308,-1.7976931348623157e308),o.write(e,r,t,n,52,8),t+8}b.prototype.slice=function e(r,t){var n=this.length,o;if(r=~~r,t=void 0===t?n:~~t,r<0?(r+=n)<0&&(r=0):r>n&&(r=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<r&&(t=r),b.TYPED_ARRAY_SUPPORT)(o=this.subarray(r,t)).__proto__=b.prototype;else{var i=t-r;o=new b(i,void 0);for(var f=0;f<i;++f)o[f]=this[f+r]}return o},b.prototype.readUIntLE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=this[r],i=1,f=0;++f<t&&(i*=256);)o+=this[r+f]*i;return o},b.prototype.readUIntBE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=this[r+--t],i=1;t>0&&(i*=256);)o+=this[r+--t]*i;return o},b.prototype.readUInt8=function e(r,t){return t||D(r,1,this.length),this[r]},b.prototype.readUInt16LE=function e(r,t){return t||D(r,2,this.length),this[r]|this[r+1]<<8},b.prototype.readUInt16BE=function e(r,t){return t||D(r,2,this.length),this[r]<<8|this[r+1]},b.prototype.readUInt32LE=function e(r,t){return t||D(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},b.prototype.readUInt32BE=function e(r,t){return t||D(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},b.prototype.readIntLE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=this[r],i=1,f=0;++f<t&&(i*=256);)o+=this[r+f]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},b.prototype.readIntBE=function e(r,t,n){r|=0,t|=0,n||D(r,t,this.length);for(var o=t,i=1,f=this[r+--o];o>0&&(i*=256);)f+=this[r+--o]*i;return f>=(i*=128)&&(f-=Math.pow(2,8*t)),f},b.prototype.readInt8=function e(r,t){return t||D(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},b.prototype.readInt16LE=function e(r,t){t||D(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt16BE=function e(r,t){t||D(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt32LE=function e(r,t){return t||D(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},b.prototype.readInt32BE=function e(r,t){return t||D(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},b.prototype.readFloatLE=function e(r,t){return t||D(r,4,this.length),o.read(this,r,!0,23,4)},b.prototype.readFloatBE=function e(r,t){return t||D(r,4,this.length),o.read(this,r,!1,23,4)},b.prototype.readDoubleLE=function e(r,t){return t||D(r,8,this.length),o.read(this,r,!0,52,8)},b.prototype.readDoubleBE=function e(r,t){return t||D(r,8,this.length),o.read(this,r,!1,52,8)},b.prototype.writeUIntLE=function e(r,t,n,o){var i;(r=+r,t|=0,n|=0,o)||N(this,r,t,n,Math.pow(2,8*n)-1,0);var f=1,h=0;for(this[t]=255&r;++h<n&&(f*=256);)this[t+h]=r/f&255;return t+n},b.prototype.writeUIntBE=function e(r,t,n,o){var i;(r=+r,t|=0,n|=0,o)||N(this,r,t,n,Math.pow(2,8*n)-1,0);var f=n-1,h=1;for(this[t+f]=255&r;--f>=0&&(h*=256);)this[t+f]=r/h&255;return t+n},b.prototype.writeUInt8=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,1,255,0),b.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[t]=255&r,t+1},b.prototype.writeUInt16LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):z(this,r,t,!0),t+2},b.prototype.writeUInt16BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):z(this,r,t,!1),t+2},b.prototype.writeUInt32LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=255&r):F(this,r,t,!0),t+4},b.prototype.writeUInt32BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):F(this,r,t,!1),t+4},b.prototype.writeIntLE=function e(r,t,n,o){if(r=+r,t|=0,!o){var i=Math.pow(2,8*n-1);N(this,r,t,n,i-1,-i)}var f=0,h=1,s=0;for(this[t]=255&r;++f<n&&(h*=256);)r<0&&0===s&&0!==this[t+f-1]&&(s=1),this[t+f]=(r/h>>0)-s&255;return t+n},b.prototype.writeIntBE=function e(r,t,n,o){if(r=+r,t|=0,!o){var i=Math.pow(2,8*n-1);N(this,r,t,n,i-1,-i)}var f=n-1,h=1,s=0;for(this[t+f]=255&r;--f>=0&&(h*=256);)r<0&&0===s&&0!==this[t+f+1]&&(s=1),this[t+f]=(r/h>>0)-s&255;return t+n},b.prototype.writeInt8=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,1,127,-128),b.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[t]=255&r,t+1},b.prototype.writeInt16LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):z(this,r,t,!0),t+2},b.prototype.writeInt16BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):z(this,r,t,!1),t+2},b.prototype.writeInt32LE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24):F(this,r,t,!0),t+4},b.prototype.writeInt32BE=function e(r,t,n){return r=+r,t|=0,n||N(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),b.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):F(this,r,t,!1),t+4},b.prototype.writeFloatLE=function e(r,t,n){return q(this,r,t,!0,n)},b.prototype.writeFloatBE=function e(r,t,n){return q(this,r,t,!1,n)},b.prototype.writeDoubleLE=function e(r,t,n){return X(this,r,t,!0,n)},b.prototype.writeDoubleBE=function e(r,t,n){return X(this,r,t,!1,n)},b.prototype.copy=function e(r,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=r.length&&(t=r.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===r.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(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-t<o-n&&(o=r.length-t+n);var i=o-n,f;if(this===r&&n<t&&t<o)for(f=i-1;f>=0;--f)r[f+t]=this[f+n];else if(i<1e3||!b.TYPED_ARRAY_SUPPORT)for(f=0;f<i;++f)r[f+t]=this[f+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+i),t);return i},b.prototype.fill=function e(r,t,n,o){if("string"==typeof r){if("string"==typeof t?(o=t,t=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===r.length){var i=r.charCodeAt(0);i<256&&(r=i)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!b.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof r&&(r&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var f;if(t>>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"==typeof r)for(f=t;f<n;++f)this[f]=r;else{var h=b.isBuffer(r)?r:K(new b(r,o).toString()),s=h.length;for(f=0;f<n-t;++f)this[f+t]=h[f%s]}return this};var J=/[^+\/0-9A-Za-z-_]/g;function Z(e){if((e=G(e).replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,r){var t;r=r||1/0;for(var n=e.length,o=null,i=[],f=0;f<n;++f){if((t=e.charCodeAt(f))>55295&&t<57344){if(!o){if(t>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(r-=3)>-1&&i.push(239,191,189),o=t;continue}t=65536+(o-55296<<10|t-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function Q(e){for(var r=[],t=0;t<e.length;++t)r.push(255&e.charCodeAt(t));return r}function W(e,r){for(var t,n,o,i=[],f=0;f<e.length&&!((r-=2)<0);++f)n=(t=e.charCodeAt(f))>>8,o=t%256,i.push(o),i.push(n);return i}function $(e){return n.toByteArray(Z(e))}function ee(e,r,t,n){for(var o=0;o<n&&!(o+t>=r.length||o>=e.length);++o)r[o+t]=e[o];return o}function re(e){return e!=e}}).call(this,t("./node_modules/webpack/buildin/global.js"))},"./node_modules/ieee754/index.js":function(e,r){r.read=function(e,r,t,n,o){var i,f,h=8*o-n-1,s=(1<<h)-1,b=s>>1,a=-7,u=t?o-1:0,m=t?-1:1,x=e[r+u];for(u+=m,i=x&(1<<-a)-1,x>>=-a,a+=h;a>0;i=256*i+e[r+u],u+=m,a-=8);for(f=i&(1<<-a)-1,i>>=-a,a+=n;a>0;f=256*f+e[r+u],u+=m,a-=8);if(0===i)i=1-b;else{if(i===s)return f?NaN:1/0*(x?-1:1);f+=Math.pow(2,n),i-=b}return(x?-1:1)*f*Math.pow(2,i-n)},r.write=function(e,r,t,n,o,i){var f,h,s,b=8*i-o-1,a=(1<<b)-1,u=a>>1,m=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:i-1,c=n?1:-1,l=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,f=a):(f=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-f))<1&&(f--,s*=2),(r+=f+u>=1?m/s:m*Math.pow(2,1-u))*s>=2&&(f++,s/=2),f+u>=a?(h=0,f=a):f+u>=1?(h=(r*s-1)*Math.pow(2,o),f+=u):(h=r*Math.pow(2,u-1)*Math.pow(2,o),f=0));o>=8;e[t+x]=255&h,x+=c,h/=256,o-=8);for(f=f<<o|h,b+=o;b>0;e[t+x]=255&f,x+=c,f/=256,b-=8);e[t+x-c]|=128*l}},"./node_modules/isarray/index.js":function(e,r){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},"./node_modules/varint/decode.js":function(e,r){e.exports=o;var t=128,n=127;function o(e,r){var i=0,r,f=0,h=r=r||0,s,b=e.length;do{if(h>=b)throw o.bytes=0,new RangeError("Could not decode varint");s=e[h++],i+=f<28?(s&n)<<f:(s&n)*Math.pow(2,f),f+=7}while(s>=t);return o.bytes=h-r,i}},"./node_modules/varint/encode.js":function(e,r){e.exports=f;var t=128,n=127,o=-128,i=Math.pow(2,31);function f(e,r,n){r=r||[];for(var h=n=n||0;e>=i;)r[n++]=255&e|t,e/=128;for(;e&o;)r[n++]=255&e|t,e>>>=7;return r[n]=0|e,f.bytes=n-h+1,r}},"./node_modules/varint/index.js":function(e,r,t){e.exports={encode:t("./node_modules/varint/encode.js"),decode:t("./node_modules/varint/decode.js"),encodingLength:t("./node_modules/varint/length.js")}},"./node_modules/varint/length.js":function(e,r){var t=Math.pow(2,7),n=Math.pow(2,14),o=Math.pow(2,21),i=Math.pow(2,28),f=Math.pow(2,35),h=Math.pow(2,42),s=Math.pow(2,49),b=Math.pow(2,56),a=Math.pow(2,63);e.exports=function(e){return e<t?1:e<n?2:e<o?3:e<i?4:e<f?5:e<h?6:e<s?7:e<b?8:e<a?9:10}},"./node_modules/webpack/buildin/global.js":function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},"./src/base-table.js":function(e,r,t){"use strict";(function(e){r.raw=e.from("55","hex"),r.cbor=e.from("51","hex"),r.protobuf=e.from("50","hex"),r.rlp=e.from("60","hex"),r.bencode=e.from("63","hex"),r.multicodec=e.from("30","hex"),r.multihash=e.from("31","hex"),r.multiaddr=e.from("32","hex"),r.multibase=e.from("33","hex"),r.identity=e.from("00","hex"),r.md4=e.from("d4","hex"),r.md5=e.from("d5","hex"),r.sha1=e.from("11","hex"),r["sha2-256"]=e.from("12","hex"),r["sha2-512"]=e.from("13","hex"),r["dbl-sha2-256"]=e.from("56","hex"),r["sha3-224"]=e.from("17","hex"),r["sha3-256"]=e.from("16","hex"),r["sha3-384"]=e.from("15","hex"),r["sha3-512"]=e.from("14","hex"),r["shake-128"]=e.from("18","hex"),r["shake-256"]=e.from("19","hex"),r["keccak-224"]=e.from("1a","hex"),r["keccak-256"]=e.from("1b","hex"),r["keccak-384"]=e.from("1c","hex"),r["keccak-512"]=e.from("1d","hex"),r["murmur3-128"]=e.from("22","hex"),r["murmur3-32"]=e.from("23","hex"),r.x11=e.from("1100","hex"),r["blake2b-8"]=e.from("b201","hex"),r["blake2b-16"]=e.from("b202","hex"),r["blake2b-24"]=e.from("b203","hex"),r["blake2b-32"]=e.from("b204","hex"),r["blake2b-40"]=e.from("b205","hex"),r["blake2b-48"]=e.from("b206","hex"),r["blake2b-56"]=e.from("b207","hex"),r["blake2b-64"]=e.from("b208","hex"),r["blake2b-72"]=e.from("b209","hex"),r["blake2b-80"]=e.from("b20a","hex"),r["blake2b-88"]=e.from("b20b","hex"),r["blake2b-96"]=e.from("b20c","hex"),r["blake2b-104"]=e.from("b20d","hex"),r["blake2b-112"]=e.from("b20e","hex"),r["blake2b-120"]=e.from("b20f","hex"),r["blake2b-128"]=e.from("b210","hex"),r["blake2b-136"]=e.from("b211","hex"),r["blake2b-144"]=e.from("b212","hex"),r["blake2b-152"]=e.from("b213","hex"),r["blake2b-160"]=e.from("b214","hex"),r["blake2b-168"]=e.from("b215","hex"),r["blake2b-176"]=e.from("b216","hex"),r["blake2b-184"]=e.from("b217","hex"),r["blake2b-192"]=e.from("b218","hex"),r["blake2b-200"]=e.from("b219","hex"),r["blake2b-208"]=e.from("b21a","hex"),r["blake2b-216"]=e.from("b21b","hex"),r["blake2b-224"]=e.from("b21c","hex"),r["blake2b-232"]=e.from("b21d","hex"),r["blake2b-240"]=e.from("b21e","hex"),r["blake2b-248"]=e.from("b21f","hex"),r["blake2b-256"]=e.from("b220","hex"),r["blake2b-264"]=e.from("b221","hex"),r["blake2b-272"]=e.from("b222","hex"),r["blake2b-280"]=e.from("b223","hex"),r["blake2b-288"]=e.from("b224","hex"),r["blake2b-296"]=e.from("b225","hex"),r["blake2b-304"]=e.from("b226","hex"),r["blake2b-312"]=e.from("b227","hex"),r["blake2b-320"]=e.from("b228","hex"),r["blake2b-328"]=e.from("b229","hex"),r["blake2b-336"]=e.from("b22a","hex"),r["blake2b-344"]=e.from("b22b","hex"),r["blake2b-352"]=e.from("b22c","hex"),r["blake2b-360"]=e.from("b22d","hex"),r["blake2b-368"]=e.from("b22e","hex"),r["blake2b-376"]=e.from("b22f","hex"),r["blake2b-384"]=e.from("b230","hex"),r["blake2b-392"]=e.from("b231","hex"),r["blake2b-400"]=e.from("b232","hex"),r["blake2b-408"]=e.from("b233","hex"),r["blake2b-416"]=e.from("b234","hex"),r["blake2b-424"]=e.from("b235","hex"),r["blake2b-432"]=e.from("b236","hex"),r["blake2b-440"]=e.from("b237","hex"),r["blake2b-448"]=e.from("b238","hex"),r["blake2b-456"]=e.from("b239","hex"),r["blake2b-464"]=e.from("b23a","hex"),r["blake2b-472"]=e.from("b23b","hex"),r["blake2b-480"]=e.from("b23c","hex"),r["blake2b-488"]=e.from("b23d","hex"),r["blake2b-496"]=e.from("b23e","hex"),r["blake2b-504"]=e.from("b23f","hex"),r["blake2b-512"]=e.from("b240","hex"),r["blake2s-8"]=e.from("b241","hex"),r["blake2s-16"]=e.from("b242","hex"),r["blake2s-24"]=e.from("b243","hex"),r["blake2s-32"]=e.from("b244","hex"),r["blake2s-40"]=e.from("b245","hex"),r["blake2s-48"]=e.from("b246","hex"),r["blake2s-56"]=e.from("b247","hex"),r["blake2s-64"]=e.from("b248","hex"),r["blake2s-72"]=e.from("b249","hex"),r["blake2s-80"]=e.from("b24a","hex"),r["blake2s-88"]=e.from("b24b","hex"),r["blake2s-96"]=e.from("b24c","hex"),r["blake2s-104"]=e.from("b24d","hex"),r["blake2s-112"]=e.from("b24e","hex"),r["blake2s-120"]=e.from("b24f","hex"),r["blake2s-128"]=e.from("b250","hex"),r["blake2s-136"]=e.from("b251","hex"),r["blake2s-144"]=e.from("b252","hex"),r["blake2s-152"]=e.from("b253","hex"),r["blake2s-160"]=e.from("b254","hex"),r["blake2s-168"]=e.from("b255","hex"),r["blake2s-176"]=e.from("b256","hex"),r["blake2s-184"]=e.from("b257","hex"),r["blake2s-192"]=e.from("b258","hex"),r["blake2s-200"]=e.from("b259","hex"),r["blake2s-208"]=e.from("b25a","hex"),r["blake2s-216"]=e.from("b25b","hex"),r["blake2s-224"]=e.from("b25c","hex"),r["blake2s-232"]=e.from("b25d","hex"),r["blake2s-240"]=e.from("b25e","hex"),r["blake2s-248"]=e.from("b25f","hex"),r["blake2s-256"]=e.from("b260","hex"),r["skein256-8"]=e.from("b301","hex"),r["skein256-16"]=e.from("b302","hex"),r["skein256-24"]=e.from("b303","hex"),r["skein256-32"]=e.from("b304","hex"),r["skein256-40"]=e.from("b305","hex"),r["skein256-48"]=e.from("b306","hex"),r["skein256-56"]=e.from("b307","hex"),r["skein256-64"]=e.from("b308","hex"),r["skein256-72"]=e.from("b309","hex"),r["skein256-80"]=e.from("b30a","hex"),r["skein256-88"]=e.from("b30b","hex"),r["skein256-96"]=e.from("b30c","hex"),r["skein256-104"]=e.from("b30d","hex"),r["skein256-112"]=e.from("b30e","hex"),r["skein256-120"]=e.from("b30f","hex"),r["skein256-128"]=e.from("b310","hex"),r["skein256-136"]=e.from("b311","hex"),r["skein256-144"]=e.from("b312","hex"),r["skein256-152"]=e.from("b313","hex"),r["skein256-160"]=e.from("b314","hex"),r["skein256-168"]=e.from("b315","hex"),r["skein256-176"]=e.from("b316","hex"),r["skein256-184"]=e.from("b317","hex"),r["skein256-192"]=e.from("b318","hex"),r["skein256-200"]=e.from("b319","hex"),r["skein256-208"]=e.from("b31a","hex"),r["skein256-216"]=e.from("b31b","hex"),r["skein256-224"]=e.from("b31c","hex"),r["skein256-232"]=e.from("b31d","hex"),r["skein256-240"]=e.from("b31e","hex"),r["skein256-248"]=e.from("b31f","hex"),r["skein256-256"]=e.from("b320","hex"),r["skein512-8"]=e.from("b321","hex"),r["skein512-16"]=e.from("b322","hex"),r["skein512-24"]=e.from("b323","hex"),r["skein512-32"]=e.from("b324","hex"),r["skein512-40"]=e.from("b325","hex"),r["skein512-48"]=e.from("b326","hex"),r["skein512-56"]=e.from("b327","hex"),r["skein512-64"]=e.from("b328","hex"),r["skein512-72"]=e.from("b329","hex"),r["skein512-80"]=e.from("b32a","hex"),r["skein512-88"]=e.from("b32b","hex"),r["skein512-96"]=e.from("b32c","hex"),r["skein512-104"]=e.from("b32d","hex"),r["skein512-112"]=e.from("b32e","hex"),r["skein512-120"]=e.from("b32f","hex"),r["skein512-128"]=e.from("b330","hex"),r["skein512-136"]=e.from("b331","hex"),r["skein512-144"]=e.from("b332","hex"),r["skein512-152"]=e.from("b333","hex"),r["skein512-160"]=e.from("b334","hex"),r["skein512-168"]=e.from("b335","hex"),r["skein512-176"]=e.from("b336","hex"),r["skein512-184"]=e.from("b337","hex"),r["skein512-192"]=e.from("b338","hex"),r["skein512-200"]=e.from("b339","hex"),r["skein512-208"]=e.from("b33a","hex"),r["skein512-216"]=e.from("b33b","hex"),r["skein512-224"]=e.from("b33c","hex"),r["skein512-232"]=e.from("b33d","hex"),r["skein512-240"]=e.from("b33e","hex"),r["skein512-248"]=e.from("b33f","hex"),r["skein512-256"]=e.from("b340","hex"),r["skein512-264"]=e.from("b341","hex"),r["skein512-272"]=e.from("b342","hex"),r["skein512-280"]=e.from("b343","hex"),r["skein512-288"]=e.from("b344","hex"),r["skein512-296"]=e.from("b345","hex"),r["skein512-304"]=e.from("b346","hex"),r["skein512-312"]=e.from("b347","hex"),r["skein512-320"]=e.from("b348","hex"),r["skein512-328"]=e.from("b349","hex"),r["skein512-336"]=e.from("b34a","hex"),r["skein512-344"]=e.from("b34b","hex"),r["skein512-352"]=e.from("b34c","hex"),r["skein512-360"]=e.from("b34d","hex"),r["skein512-368"]=e.from("b34e","hex"),r["skein512-376"]=e.from("b34f","hex"),r["skein512-384"]=e.from("b350","hex"),r["skein512-392"]=e.from("b351","hex"),r["skein512-400"]=e.from("b352","hex"),r["skein512-408"]=e.from("b353","hex"),r["skein512-416"]=e.from("b354","hex"),r["skein512-424"]=e.from("b355","hex"),r["skein512-432"]=e.from("b356","hex"),r["skein512-440"]=e.from("b357","hex"),r["skein512-448"]=e.from("b358","hex"),r["skein512-456"]=e.from("b359","hex"),r["skein512-464"]=e.from("b35a","hex"),r["skein512-472"]=e.from("b35b","hex"),r["skein512-480"]=e.from("b35c","hex"),r["skein512-488"]=e.from("b35d","hex"),r["skein512-496"]=e.from("b35e","hex"),r["skein512-504"]=e.from("b35f","hex"),r["skein512-512"]=e.from("b360","hex"),r["skein1024-8"]=e.from("b361","hex"),r["skein1024-16"]=e.from("b362","hex"),r["skein1024-24"]=e.from("b363","hex"),r["skein1024-32"]=e.from("b364","hex"),r["skein1024-40"]=e.from("b365","hex"),r["skein1024-48"]=e.from("b366","hex"),r["skein1024-56"]=e.from("b367","hex"),r["skein1024-64"]=e.from("b368","hex"),r["skein1024-72"]=e.from("b369","hex"),r["skein1024-80"]=e.from("b36a","hex"),r["skein1024-88"]=e.from("b36b","hex"),r["skein1024-96"]=e.from("b36c","hex"),r["skein1024-104"]=e.from("b36d","hex"),r["skein1024-112"]=e.from("b36e","hex"),r["skein1024-120"]=e.from("b36f","hex"),r["skein1024-128"]=e.from("b370","hex"),r["skein1024-136"]=e.from("b371","hex"),r["skein1024-144"]=e.from("b372","hex"),r["skein1024-152"]=e.from("b373","hex"),r["skein1024-160"]=e.from("b374","hex"),r["skein1024-168"]=e.from("b375","hex"),r["skein1024-176"]=e.from("b376","hex"),r["skein1024-184"]=e.from("b377","hex"),r["skein1024-192"]=e.from("b378","hex"),r["skein1024-200"]=e.from("b379","hex"),r["skein1024-208"]=e.from("b37a","hex"),r["skein1024-216"]=e.from("b37b","hex"),r["skein1024-224"]=e.from("b37c","hex"),r["skein1024-232"]=e.from("b37d","hex"),r["skein1024-240"]=e.from("b37e","hex"),r["skein1024-248"]=e.from("b37f","hex"),r["skein1024-256"]=e.from("b380","hex"),r["skein1024-264"]=e.from("b381","hex"),r["skein1024-272"]=e.from("b382","hex"),r["skein1024-280"]=e.from("b383","hex"),r["skein1024-288"]=e.from("b384","hex"),r["skein1024-296"]=e.from("b385","hex"),r["skein1024-304"]=e.from("b386","hex"),r["skein1024-312"]=e.from("b387","hex"),r["skein1024-320"]=e.from("b388","hex"),r["skein1024-328"]=e.from("b389","hex"),r["skein1024-336"]=e.from("b38a","hex"),r["skein1024-344"]=e.from("b38b","hex"),r["skein1024-352"]=e.from("b38c","hex"),r["skein1024-360"]=e.from("b38d","hex"),r["skein1024-368"]=e.from("b38e","hex"),r["skein1024-376"]=e.from("b38f","hex"),r["skein1024-384"]=e.from("b390","hex"),r["skein1024-392"]=e.from("b391","hex"),r["skein1024-400"]=e.from("b392","hex"),r["skein1024-408"]=e.from("b393","hex"),r["skein1024-416"]=e.from("b394","hex"),r["skein1024-424"]=e.from("b395","hex"),r["skein1024-432"]=e.from("b396","hex"),r["skein1024-440"]=e.from("b397","hex"),r["skein1024-448"]=e.from("b398","hex"),r["skein1024-456"]=e.from("b399","hex"),r["skein1024-464"]=e.from("b39a","hex"),r["skein1024-472"]=e.from("b39b","hex"),r["skein1024-480"]=e.from("b39c","hex"),r["skein1024-488"]=e.from("b39d","hex"),r["skein1024-496"]=e.from("b39e","hex"),r["skein1024-504"]=e.from("b39f","hex"),r["skein1024-512"]=e.from("b3a0","hex"),r["skein1024-520"]=e.from("b3a1","hex"),r["skein1024-528"]=e.from("b3a2","hex"),r["skein1024-536"]=e.from("b3a3","hex"),r["skein1024-544"]=e.from("b3a4","hex"),r["skein1024-552"]=e.from("b3a5","hex"),r["skein1024-560"]=e.from("b3a6","hex"),r["skein1024-568"]=e.from("b3a7","hex"),r["skein1024-576"]=e.from("b3a8","hex"),r["skein1024-584"]=e.from("b3a9","hex"),r["skein1024-592"]=e.from("b3aa","hex"),r["skein1024-600"]=e.from("b3ab","hex"),r["skein1024-608"]=e.from("b3ac","hex"),r["skein1024-616"]=e.from("b3ad","hex"),r["skein1024-624"]=e.from("b3ae","hex"),r["skein1024-632"]=e.from("b3af","hex"),r["skein1024-640"]=e.from("b3b0","hex"),r["skein1024-648"]=e.from("b3b1","hex"),r["skein1024-656"]=e.from("b3b2","hex"),r["skein1024-664"]=e.from("b3b3","hex"),r["skein1024-672"]=e.from("b3b4","hex"),r["skein1024-680"]=e.from("b3b5","hex"),r["skein1024-688"]=e.from("b3b6","hex"),r["skein1024-696"]=e.from("b3b7","hex"),r["skein1024-704"]=e.from("b3b8","hex"),r["skein1024-712"]=e.from("b3b9","hex"),r["skein1024-720"]=e.from("b3ba","hex"),r["skein1024-728"]=e.from("b3bb","hex"),r["skein1024-736"]=e.from("b3bc","hex"),r["skein1024-744"]=e.from("b3bd","hex"),r["skein1024-752"]=e.from("b3be","hex"),r["skein1024-760"]=e.from("b3bf","hex"),r["skein1024-768"]=e.from("b3c0","hex"),r["skein1024-776"]=e.from("b3c1","hex"),r["skein1024-784"]=e.from("b3c2","hex"),r["skein1024-792"]=e.from("b3c3","hex"),r["skein1024-800"]=e.from("b3c4","hex"),r["skein1024-808"]=e.from("b3c5","hex"),r["skein1024-816"]=e.from("b3c6","hex"),r["skein1024-824"]=e.from("b3c7","hex"),r["skein1024-832"]=e.from("b3c8","hex"),r["skein1024-840"]=e.from("b3c9","hex"),r["skein1024-848"]=e.from("b3ca","hex"),r["skein1024-856"]=e.from("b3cb","hex"),r["skein1024-864"]=e.from("b3cc","hex"),r["skein1024-872"]=e.from("b3cd","hex"),r["skein1024-880"]=e.from("b3ce","hex"),r["skein1024-888"]=e.from("b3cf","hex"),r["skein1024-896"]=e.from("b3d0","hex"),r["skein1024-904"]=e.from("b3d1","hex"),r["skein1024-912"]=e.from("b3d2","hex"),r["skein1024-920"]=e.from("b3d3","hex"),r["skein1024-928"]=e.from("b3d4","hex"),r["skein1024-936"]=e.from("b3d5","hex"),r["skein1024-944"]=e.from("b3d6","hex"),r["skein1024-952"]=e.from("b3d7","hex"),r["skein1024-960"]=e.from("b3d8","hex"),r["skein1024-968"]=e.from("b3d9","hex"),r["skein1024-976"]=e.from("b3da","hex"),r["skein1024-984"]=e.from("b3db","hex"),r["skein1024-992"]=e.from("b3dc","hex"),r["skein1024-1000"]=e.from("b3dd","hex"),r["skein1024-1008"]=e.from("b3de","hex"),r["skein1024-1016"]=e.from("b3df","hex"),r["skein1024-1024"]=e.from("b3e0","hex"),r.ip4=e.from("04","hex"),r.ip6=e.from("29","hex"),r.ip6zone=e.from("2a","hex"),r.tcp=e.from("06","hex"),r.udp=e.from("0111","hex"),r.dccp=e.from("21","hex"),r.sctp=e.from("84","hex"),r.udt=e.from("012d","hex"),r.utp=e.from("012e","hex"),r.p2p=e.from("01a5","hex"),r.ipfs=e.from("01a5","hex"),r.http=e.from("01e0","hex"),r.https=e.from("01bb","hex"),r.quic=e.from("01cc","hex"),r.ws=e.from("01dd","hex"),r.wss=e.from("01de","hex"),r.onion=e.from("01bc","hex"),r.onion3=e.from("01bd","hex"),r.garlic64=e.from("01be","hex"),r["p2p-circuit"]=e.from("0122","hex"),r.dns=e.from("35","hex"),r.dns4=e.from("36","hex"),r.dns6=e.from("37","hex"),r.dnsaddr=e.from("38","hex"),r["p2p-websocket-star"]=e.from("01df","hex"),r["p2p-webrtc-star"]=e.from("0113","hex"),r["p2p-webrtc-direct"]=e.from("0114","hex"),r.unix=e.from("0190","hex"),r["dag-pb"]=e.from("70","hex"),r["dag-cbor"]=e.from("71","hex"),r["dag-json"]=e.from("0129","hex"),r["git-raw"]=e.from("78","hex"),r["eth-block"]=e.from("90","hex"),r["eth-block-list"]=e.from("91","hex"),r["eth-tx-trie"]=e.from("92","hex"),r["eth-tx"]=e.from("93","hex"),r["eth-tx-receipt-trie"]=e.from("94","hex"),r["eth-tx-receipt"]=e.from("95","hex"),r["eth-state-trie"]=e.from("96","hex"),r["eth-account-snapshot"]=e.from("97","hex"),r["eth-storage-trie"]=e.from("98","hex"),r["bitcoin-block"]=e.from("b0","hex"),r["bitcoin-tx"]=e.from("b1","hex"),r["zcash-block"]=e.from("c0","hex"),r["zcash-tx"]=e.from("c1","hex"),r["stellar-block"]=e.from("d0","hex"),r["stellar-tx"]=e.from("d1","hex"),r["decred-block"]=e.from("e0","hex"),r["decred-tx"]=e.from("e1","hex"),r["dash-block"]=e.from("f0","hex"),r["dash-tx"]=e.from("f1","hex"),r["torrent-info"]=e.from("7b","hex"),r["torrent-file"]=e.from("7c","hex"),r["ed25519-pub"]=e.from("ed","hex")}).call(this,t("./node_modules/buffer/index.js").Buffer)},"./src/index.js":function(e,r,t){"use strict";(function(n){const o=t("./node_modules/varint/index.js"),i=t("./src/varint-table.js"),f=t("./src/name-table.js"),h=t("./src/util.js");(r=e.exports).addPrefix=((e,r)=>{let t;if(n.isBuffer(e))t=h.varintBufferEncode(e);else{if(!i[e])throw new Error("multicodec not recognized");t=i[e]}return n.concat([t,r])}),r.rmPrefix=(e=>(o.decode(e),e.slice(o.decode.bytes))),r.getCodec=(e=>{const r=h.varintBufferDecode(e),t=f[r.toString("hex")];if(void 0===t)throw new Error("Code `0x"+r.toString("hex")+"` not found");return t}),r.getCodeVarint=(e=>{const r=i[e];if(void 0===r)throw new Error("Codec `"+e+"` not found");return r})}).call(this,t("./node_modules/buffer/index.js").Buffer)},"./src/name-table.js":function(e,r,t){"use strict";const n=t("./src/base-table.js"),o={};e.exports=o;for(let e in n){let r;o[n[e].toString("hex")]=e}},"./src/util.js":function(e,r,t){"use strict";(function(r){const n=t("./node_modules/varint/index.js");function o(e){return parseInt(e.toString("hex"),16)}function i(e){let t=e.toString(16);return t.length%2==1&&(t="0"+t),r.from(t,"hex")}function f(e){return r.from(n.encode(o(e)))}function h(e){return i(n.decode(e))}e.exports={numberToBuffer:i,bufferToNumber:o,varintBufferEncode:f,varintBufferDecode:h}}).call(this,t("./node_modules/buffer/index.js").Buffer)},"./src/varint-table.js":function(e,r,t){"use strict";const n=t("./src/base-table.js"),o=t("./src/util.js").varintBufferEncode,i={};e.exports=i;for(let e in n){let r=n[e];i[e]=o(r)}},0:function(e,r,t){e.exports=t("./src/index.js")}});
//# sourceMappingURL=index.min.js.map
{
"name": "multicodec",
"version": "0.3.0",
"version": "0.4.0",
"description": "JavaScript implementation of the multicodec specification",

@@ -5,0 +5,0 @@ "leadMaintainer": "Henrique Dias <hacdias@gmail.com>",

@@ -54,13 +54,8 @@ # js-multicodec

Updating the lookup table is a manual process. The source of truth is the
[multicodec default table](https://github.com/multiformats/multicodec/blob/master/table.csv). To make the process easier, there’s an [AWK script in the tools directory](tools/update-table.awk) that does a basic conversion of the default table. The result can’t be used as-is, but serves as a template for manual diffing. The workflow is:
Updating the lookup table is done with a script. The source of truth is the
[multicodec default table](https://github.com/multiformats/multicodec/blob/master/table.csv).
Update the table with running:
- Create a basic draft version
curl -X GET https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv|./tools/update-table.py
`curl -X GET https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv|awk -f tools/update-table.awk > /tmp/draft.js`
- Diff it with your tool of choice (e.g. [Meld](http://meldmerge.org/)) and apply the changes
`meld /tmp/draft.js base-table.js`
## Contribute

@@ -67,0 +62,0 @@

@@ -0,17 +1,10 @@

// THIS FILE IS GENERATED, DO NO EDIT MANUALLY
// For more information see the README.md
/* eslint-disable dot-notation */
'use strict'
// spec and table at: https://github.com/multiformats/multicodec
exports = module.exports
// Miscellaneous
// miscellaneous
exports['raw'] = Buffer.from('55', 'hex')
// bases encodings
exports['base1'] = Buffer.from('01', 'hex')
exports['base2'] = Buffer.from('00', 'hex')
exports['base8'] = Buffer.from('07', 'hex')
exports['base10'] = Buffer.from('09', 'hex')
// Serialization formats
// serialization formats
exports['cbor'] = Buffer.from('51', 'hex')

@@ -22,3 +15,3 @@ exports['protobuf'] = Buffer.from('50', 'hex')

// Multiformats
// multiformats
exports['multicodec'] = Buffer.from('30', 'hex')

@@ -28,6 +21,7 @@ exports['multihash'] = Buffer.from('31', 'hex')

exports['multibase'] = Buffer.from('33', 'hex')
// multihashes
exports['identity'] = Buffer.from('00', 'hex')
exports['md4'] = Buffer.from('d4', 'hex')
exports['md5'] = Buffer.from('d5', 'hex')
// multihashes
exports['sha1'] = Buffer.from('11', 'hex')

@@ -381,2 +375,3 @@ exports['sha2-256'] = Buffer.from('12', 'hex')

exports['utp'] = Buffer.from('012e', 'hex')
exports['p2p'] = Buffer.from('01a5', 'hex')
exports['ipfs'] = Buffer.from('01a5', 'hex')

@@ -387,2 +382,3 @@ exports['http'] = Buffer.from('01e0', 'hex')

exports['ws'] = Buffer.from('01dd', 'hex')
exports['wss'] = Buffer.from('01de', 'hex')
exports['onion'] = Buffer.from('01bc', 'hex')

@@ -392,5 +388,10 @@ exports['onion3'] = Buffer.from('01bd', 'hex')

exports['p2p-circuit'] = Buffer.from('0122', 'hex')
exports['dns'] = Buffer.from('35', 'hex')
exports['dns4'] = Buffer.from('36', 'hex')
exports['dns6'] = Buffer.from('37', 'hex')
exports['dnsaddr'] = Buffer.from('38', 'hex')
exports['p2p-websocket-star'] = Buffer.from('01df', 'hex')
exports['p2p-webrtc-star'] = Buffer.from('0113', 'hex')
exports['p2p-webrtc-direct'] = Buffer.from('0114', 'hex')
exports['unix'] = Buffer.from('0190', 'hex')

@@ -403,5 +404,2 @@ // archiving formats

// VCS formats
exports['git-raw'] = Buffer.from('78', 'hex')
// IPLD formats

@@ -411,2 +409,3 @@ exports['dag-pb'] = Buffer.from('70', 'hex')

exports['dag-json'] = Buffer.from('0129', 'hex')
exports['git-raw'] = Buffer.from('78', 'hex')
exports['eth-block'] = Buffer.from('90', 'hex')

@@ -421,3 +420,2 @@ exports['eth-block-list'] = Buffer.from('91', 'hex')

exports['eth-storage-trie'] = Buffer.from('98', 'hex')
exports['bitcoin-block'] = Buffer.from('b0', 'hex')

@@ -433,5 +431,4 @@ exports['bitcoin-tx'] = Buffer.from('b1', 'hex')

exports['dash-tx'] = Buffer.from('f1', 'hex')
exports['torrent-info'] = Buffer.from('7b', 'hex')
exports['torrent-file'] = Buffer.from('7c', 'hex')
exports['ed25519-pub'] = Buffer.from('ed', 'hex')

@@ -80,12 +80,1 @@ /**

}
/**
* Add a new codec
* @param {string} name Name of the codec
* @param {Buffer} code The code of the codec
* @returns {void}
*/
exports.addCodec = (name, code) => {
codecNameToCodeVarint[name] = util.varintBufferEncode(code)
codeToCodecName[code.toString('hex')] = name
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc