Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multicodec

Package Overview
Dependencies
Maintainers
5
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multicodec - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

dist/src/base-table.d.ts

18

CHANGELOG.md

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

## [2.1.2](https://github.com/multiformats/js-multicodec/compare/v2.1.1...v2.1.2) (2021-03-02)
## [2.1.3](https://github.com/multiformats/js-multicodec/compare/v2.1.0...v2.1.3) (2021-03-02)

@@ -6,20 +6,6 @@

* fix maps types ([d500879](https://github.com/multiformats/js-multicodec/commit/d5008790124bad14c45fe93ace31172cd3a7ea72))
* fix broken release ([3f91ed1](https://github.com/multiformats/js-multicodec/commit/3f91ed16c84893508b8d4c92e9d6c38cd41d35b0))
## [2.1.1](https://github.com/multiformats/js-multicodec/compare/v2.1.0...v2.1.1) (2021-03-02)
### Bug Fixes
* update aegir and revert varint ([d0a413f](https://github.com/multiformats/js-multicodec/commit/d0a413f5154d5138c857c36e03368a1125ed5781))
### Features
* export tables and dedup code ([d26166b](https://github.com/multiformats/js-multicodec/commit/d26166bf298f330e0b16171c589d3dca3d24b6e5))
# [2.1.0](https://github.com/multiformats/js-multicodec/compare/v2.0.4...v2.1.0) (2020-12-11)

@@ -26,0 +12,0 @@

@@ -1,14 +0,1 @@

(function (root, factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
root.Multicodec = factory();
}
}(typeof self !== 'undefined' ? self : this, function () {
var Multicodec=(()=>{var o=(e,n)=>()=>(n||(n={exports:{}},e(n.exports,n)),n.exports);var W=o((e2,Q)=>{Q.exports=X;var Z=128,Re=127,Ke=~Re,Ie=Math.pow(2,31);function X(e,n,b){n=n||[],b=b||0;for(var t=b;e>=Ie;)n[b++]=e&255|Z,e/=128;for(;e&Ke;)n[b++]=e&255|Z,e>>>=7;return n[b]=e|0,X.bytes=b-t+1,n}});var H=o((n2,Y)=>{Y.exports=D;var Le=128,_=127;function D(e,n){var b=0,n=n||0,t=0,i=n,r,x=e.length;do{if(i>=x)throw D.bytes=0,new RangeError("Could not decode varint");r=e[i++],b+=t<28?(r&_)<<t:(r&_)*Math.pow(2,t),t+=7}while(r>=Le);return D.bytes=i-n,b}});var P=o((b2,$)=>{var Ge=Math.pow(2,7),Je=Math.pow(2,14),Qe=Math.pow(2,21),Xe=Math.pow(2,28),Ze=Math.pow(2,35),We=Math.pow(2,42),Ye=Math.pow(2,49),_e=Math.pow(2,56),He=Math.pow(2,63);$.exports=function(e){return e<Ge?1:e<Je?2:e<Qe?3:e<Xe?4:e<Ze?5:e<We?6:e<Ye?7:e<_e?8:e<He?9:10}});var B=o((t2,ee)=>{ee.exports={encode:W(),decode:H(),encodingLength:P()}});var be=o((i2,ne)=>{"use strict";function $e(e,n){n||(n=e.reduce((i,r)=>i+r.length,0));let b=new Uint8Array(n),t=0;for(let i of e)b.set(i,t),t+=i.length;return b}ne.exports=$e});var ie=o((s2,te)=>{"use strict";function Pe(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),b=0;b<n.length;b++)n[b]=255;for(var t=0;t<e.length;t++){var i=e.charAt(t),r=i.charCodeAt(0);if(n[r]!==255)throw new TypeError(i+" is ambiguous");n[r]=t}var x=e.length,k=e.charAt(0),y=Math.log(x)/Math.log(256),l=Math.log(256)/Math.log(x);function q(s){if(s instanceof Uint8Array||(ArrayBuffer.isView(s)?s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength):Array.isArray(s)&&(s=Uint8Array.from(s))),!(s instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(s.length===0)return"";for(var c=0,A=0,f=0,h=s.length;f!==h&&s[f]===0;)f++,c++;for(var p=(h-f)*l+1>>>0,d=new Uint8Array(p);f!==h;){for(var w=s[f],v=0,u=p-1;(w!==0||v<A)&&u!==-1;u--,v++)w+=256*d[u]>>>0,d[u]=w%x>>>0,w=w/x>>>0;if(w!==0)throw new Error("Non-zero carry");A=v,f++}for(var g=p-A;g!==p&&d[g]===0;)g++;for(var N=k.repeat(c);g<p;++g)N+=e.charAt(d[g]);return N}function J(s){if(typeof s!="string")throw new TypeError("Expected String");if(s.length===0)return new Uint8Array;var c=0;if(s[c]!==" "){for(var A=0,f=0;s[c]===k;)A++,c++;for(var h=(s.length-c)*y+1>>>0,p=new Uint8Array(h);s[c];){var d=n[s.charCodeAt(c)];if(d===255)return;for(var w=0,v=h-1;(d!==0||w<f)&&v!==-1;v--,w++)d+=x*p[v]>>>0,p[v]=d%256>>>0,d=d/256>>>0;if(d!==0)throw new Error("Non-zero carry");f=w,c++}if(s[c]!==" "){for(var u=h-f;u!==h&&p[u]===0;)u++;for(var g=new Uint8Array(A+(h-u)),N=A;u!==h;)g[N++]=p[u++];return g}}}function Oe(s){var c=J(s);if(c)return c;throw new Error("Non-base"+x+" character")}return{encode:q,decodeUnsafe:J,decode:Oe}}te.exports=Pe});var z=o(V=>{"use strict";V.TextEncoder=TextEncoder;V.TextDecoder=TextDecoder});var F=o((r2,se)=>{"use strict";var{TextEncoder:e0,TextDecoder:n0}=z(),b0=new n0,t0=e=>b0.decode(e),i0=new e0,s0=e=>i0.encode(e);function x0(e,n){let b=new Uint8Array(n),t=0;for(let i of e)b.set(i,t),t+=i.length;return b}se.exports={decodeText:t0,encodeText:s0,concat:x0}});var oe=o((o2,xe)=>{"use strict";var{encodeText:r0}=F(),re=class{constructor(n,b,t,i){this.name=n,this.code=b,this.codeBuf=r0(this.code),this.alphabet=i,this.codec=t(i)}encode(n){return this.codec.encode(n)}decode(n){for(let b of n)if(this.alphabet&&this.alphabet.indexOf(b)<0)throw new Error(`invalid character '${b}' in '${n}'`);return this.codec.decode(n)}};xe.exports=re});var ce=o((a2,ae)=>{"use strict";var o0=(e,n,b)=>{let t={};for(let l=0;l<n.length;++l)t[n[l]]=l;let i=e.length;for(;e[i-1]==="=";)--i;let r=new Uint8Array(i*b/8|0),x=0,k=0,y=0;for(let l=0;l<i;++l){let q=t[e[l]];if(q===void 0)throw new SyntaxError("Invalid character "+e[l]);k=k<<b|q,x+=b,x>=8&&(x-=8,r[y++]=255&k>>x)}if(x>=b||255&k<<8-x)throw new SyntaxError("Unexpected end of data");return r},a0=(e,n,b)=>{let t=n[n.length-1]==="=",i=(1<<b)-1,r="",x=0,k=0;for(let y=0;y<e.length;++y)for(k=k<<8|e[y],x+=8;x>b;)x-=b,r+=n[i&k>>x];if(x&&(r+=n[i&k<<b-x]),t)for(;r.length*b&7;)r+="=";return r},c0=e=>n=>({encode(b){return a0(b,n,e)},decode(b){return o0(b,n,e)}});ae.exports={rfc4648:c0}});var fe=o((c2,ke)=>{"use strict";var U=ie(),k0=oe(),{rfc4648:a}=ce(),{decodeText:d0,encodeText:l0}=F(),f0=()=>({encode:d0,decode:l0}),de=[["identity","\0",f0,""],["base2","0",a(1),"01"],["base8","7",a(3),"01234567"],["base10","9",U,"0123456789"],["base16","f",a(4),"0123456789abcdef"],["base16upper","F",a(4),"0123456789ABCDEF"],["base32hex","v",a(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",a(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",a(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",a(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",a(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",a(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",a(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",a(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",a(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",U,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",U,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",U,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",U,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",a(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",a(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",a(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",a(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],le=de.reduce((e,n)=>(e[n[0]]=new k0(n[0],n[1],n[2],n[3]),e),{}),u0=de.reduce((e,n)=>(e[n[1]]=le[n[0]],e),{});ke.exports={names:le,codes:u0}});var O=o((m,ue)=>{"use strict";var T=fe(),{encodeText:h0,decodeText:M,concat:he}=F();function w0(e,n){if(!n)throw new Error("requires an encoded Uint8Array");let{name:b,codeBuf:t}=E(e);return p0(b,n),he([t,n],t.length+n.length)}function g0(e,n){let b=E(e),t=h0(b.encode(n));return he([b.codeBuf,t],b.codeBuf.length+t.length)}function m0(e){e instanceof Uint8Array&&(e=M(e));let n=e[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(n)&&(e=e.toLowerCase()),E(e[0]).decode(e.substring(1))}function v0(e){if(e instanceof Uint8Array&&(e=M(e)),Object.prototype.toString.call(e)!=="[object String]")return!1;try{return E(e[0]).name}catch(n){return!1}}function p0(e,n){E(e).decode(M(n))}function E(e){if(Object.prototype.hasOwnProperty.call(T.names,e))return T.names[e];if(Object.prototype.hasOwnProperty.call(T.codes,e))return T.codes[e];throw new Error(`Unsupported encoding: ${e}`)}function y0(e){return e instanceof Uint8Array&&(e=M(e)),E(e[0])}m=ue.exports=w0;m.encode=g0;m.decode=m0;m.isEncoded=v0;m.encoding=E;m.encodingFromData=y0;var A0=Object.freeze(T.names),E0=Object.freeze(T.codes);m.names=A0;m.codes=E0});var we=o((k2,pe)=>{"use strict";var{encoding:T0}=O(),{TextDecoder:U0}=z(),q0=new U0("utf8");function N0(e){let n="";for(let b=0;b<e.length;b++)n+=String.fromCharCode(e[b]);return n}function z0(e,n="utf8"){return n==="utf8"||n==="utf-8"?q0.decode(e):n==="ascii"?N0(e):T0(n).encode(e)}pe.exports=z0});var me=o((d2,ge)=>{"use strict";var{encoding:F0}=O(),{TextEncoder:M0}=z(),j0=new M0;function S0(e){let n=new Uint8Array(e.length);for(let b=0;b<e.length;b++)n[b]=e.charCodeAt(b);return n}function C0(e,n="utf8"){return n==="utf8"||n==="utf-8"?j0.encode(e):n==="ascii"?S0(e):F0(n).decode(e)}ge.exports=C0});var R=o((l2,ve)=>{"use strict";var ye=B(),D0=we(),B0=me();ve.exports={numberToUint8Array:V0,uint8ArrayToNumber:Ae,varintUint8ArrayEncode:O0,varintEncode:R0};function Ae(e){return parseInt(D0(e,"base16"),16)}function V0(e){let n=e.toString(16);return n.length%2==1&&(n="0"+n),B0(n,"base16")}function O0(e){return Uint8Array.from(ye.encode(Ae(e)))}function R0(e){return Uint8Array.from(ye.encode(e))}});var Te=o((f2,Ee)=>{"use strict";var K0=Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,docid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,thread:406,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,json:512,messagepack:513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,kangarootwelve:7425,"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,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056});Ee.exports={baseTable:K0}});var qe=o((u2,Ue)=>{"use strict";var{baseTable:K}=Te(),I0=R().varintEncode,I={},L={},j={};for(let e in K){let n=e,b=K[n];I[n]=I0(b);let t=n.toUpperCase().replace(/-/g,"_");L[t]=b,j[b]||(j[b]=n)}Object.freeze(I);Object.freeze(L);Object.freeze(j);var L0=Object.freeze(K);Ue.exports={nameToVarint:I,constantToCode:L,nameToCode:L0,codeToName:j}});var Ve=o((h2,Ne)=>{"use strict";var S=B(),G0=be(),ze=R(),{nameToVarint:C,constantToCode:J0,nameToCode:Fe,codeToName:G}=qe();function Q0(e,n){let b;if(e instanceof Uint8Array)b=ze.varintUint8ArrayEncode(e);else if(C[e])b=C[e];else throw new Error("multicodec not recognized");return G0([b,n],b.length+n.length)}function X0(e){return S.decode(e),e.slice(S.decode.bytes)}function Me(e){let n=S.decode(e),b=G[n];if(b===void 0)throw new Error(`Code "${n}" not found`);return b}function je(e){return G[e]}function Se(e){let n=Fe[e];if(n===void 0)throw new Error(`Codec "${e}" not found`);return n}function Ce(e){return S.decode(e)}function De(e){let n=C[e];if(n===void 0)throw new Error(`Codec "${e}" not found`);return n}function Be(e){return ze.varintEncode(e)}function Z0(e){return Me(e)}function W0(e){return je(e)}function Y0(e){return Se(e)}function _0(e){return Ce(e)}function H0(e){return De(e)}function $0(e){return Array.from(Be(e))}Ne.exports={addPrefix:Q0,rmPrefix:X0,getNameFromData:Me,getNameFromCode:je,getCodeFromName:Se,getCodeFromData:Ce,getVarintFromName:De,getVarintFromCode:Be,getCodec:Z0,getName:W0,getNumber:Y0,getCode:_0,getCodeVarint:H0,getVarint:$0,...J0,nameToVarint:C,nameToCode:Fe,codeToName:G}});return Ve();})();
return Multicodec;
}));
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Multicodec=n():e.Multicodec=n()}(self,(function(){return function(e){var n={};function t(s){if(n[s])return n[s].exports;var i=n[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,s){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:s})},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 s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(s,i,function(n){return e[n]}.bind(null,i));return s},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=6)}([function(e,n,t){"use strict";const s=Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,docid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,json:512,messagepack:513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,kangarootwelve:7425,"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,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056});e.exports={baseTable:s}},function(e,n,t){"use strict";n.TextEncoder=TextEncoder,n.TextDecoder=TextDecoder},function(e,n,t){"use strict";e.exports={encode:t(8),decode:t(9),encodingLength:t(10)}},function(e,n,t){"use strict";const s=t(2),i=t(13),r=t(17);function o(e){return parseInt(i(e,"base16"),16)}e.exports={numberToUint8Array:function(e){let n=e.toString(16);n.length%2==1&&(n="0"+n);return r(n,"base16")},uint8ArrayToNumber:o,varintUint8ArrayEncode:function(e){return Uint8Array.from(s.encode(o(e)))},varintEncode:function(e){return Uint8Array.from(s.encode(e))}}},function(e,n,t){"use strict";const s=t(14),i=t(15),{rfc4648:r}=t(16),{decodeText:o,encodeText:k}=t(5),a=[["identity","\0",()=>({encode:o,decode:k}),""],["base2","0",r(1),"01"],["base8","7",r(3),"01234567"],["base10","9",s,"0123456789"],["base16","f",r(4),"0123456789abcdef"],["base16upper","F",r(4),"0123456789ABCDEF"],["base32hex","v",r(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",r(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",r(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",r(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",r(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",r(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",r(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",r(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",r(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",s,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",s,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",s,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",s,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",r(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",r(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",r(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",r(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=a.reduce((e,n)=>(e[n[0]]=new i(n[0],n[1],n[2],n[3]),e),{}),b=a.reduce((e,n)=>(e[n[1]]=c[n[0]],e),{});e.exports={names:c,codes:b}},function(e,n,t){"use strict";const{TextEncoder:s,TextDecoder:i}=t(1),r=new i,o=new s;e.exports={decodeText:e=>r.decode(e),encodeText:e=>o.encode(e),concat:function(e,n){const t=new Uint8Array(n);let s=0;for(const i of e)t.set(i,s),s+=i.length;return t}}},function(e,n,t){e.exports=t(7)},function(e,n,t){"use strict";const s=t(2),i=t(11),r=t(12),o=t(3),k=t(18);const a=t(19),c=t(20);e.exports={addPrefix:function(e,n){let t;if(e instanceof Uint8Array)t=o.varintUint8ArrayEncode(e);else{if(!r[e])throw new Error("multicodec not recognized");t=r[e]}return k([t,n],t.length+n.length)},rmPrefix:function(e){return s.decode(e),e.slice(s.decode.bytes)},getCodec:function(e){const n=s.decode(e),t=i.get(n);if(void 0===t)throw new Error(`Code ${n} not found`);return t},getName:function(e){return i.get(e)},getNumber:function(e){const n=r[e];if(void 0===n)throw new Error("Codec `"+e+"` not found");return s.decode(n)},getCode:function(e){return s.decode(e)},getCodeVarint:function(e){const n=r[e];if(void 0===n)throw new Error("Codec `"+e+"` not found");return n},getVarint:function(e){return s.encode(e)},print:c,...a}},function(e,n,t){"use strict";e.exports=function e(n,t,i){if(Number.MAX_SAFE_INTEGER&&n>Number.MAX_SAFE_INTEGER)throw e.bytes=0,new RangeError("Could not encode varint");t=t||[];var r=i=i||0;for(;n>=s;)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-r+1,t};var s=Math.pow(2,31)},function(e,n,t){"use strict";e.exports=function e(n,t){var s,i=0,r=0,o=t=t||0,k=n.length;do{if(o>=k||r>49)throw e.bytes=0,new RangeError("Could not decode varint");s=n[o++],i+=r<28?(127&s)<<r:(127&s)*Math.pow(2,r),r+=7}while(s>=128);return e.bytes=o-t,i}},function(e,n,t){"use strict";var s=Math.pow(2,7),i=Math.pow(2,14),r=Math.pow(2,21),o=Math.pow(2,28),k=Math.pow(2,35),a=Math.pow(2,42),c=Math.pow(2,49),b=Math.pow(2,56),l=Math.pow(2,63);e.exports=function(e){return e<s?1:e<i?2:e<r?3:e<o?4:e<k?5:e<a?6:e<c?7:e<b?8:e<l?9:10}},function(e,n,t){"use strict";const{baseTable:s}=t(0),i=new Map;for(const r in s){const e=s[r];i.set(e,r)}e.exports=Object.freeze(i)},function(e,n,t){"use strict";const{baseTable:s}=t(0),i=t(3).varintEncode,r={};for(const o in s){const e=s[o];r[o]=i(e)}e.exports=Object.freeze(r)},function(e,n,t){"use strict";const{names:s}=t(4),{TextDecoder:i}=t(1),r=new i("utf8");e.exports=function(e,n="utf8"){if("utf8"===n||"utf-8"===n)return r.decode(e);if("ascii"===n)return function(e){let n="";for(let t=0;t<e.length;t++)n+=String.fromCharCode(e[t]);return n}(e);const t=s[n];if(!t)throw new Error("Unknown base");return t.encode(e)}},function(e,n,t){"use strict";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 s=0;s<e.length;s++){var i=e.charAt(s),r=i.charCodeAt(0);if(255!==n[r])throw new TypeError(i+" is ambiguous");n[r]=s}var o=e.length,k=e.charAt(0),a=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function b(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var s=0,i=0;e[t]===k;)s++,t++;for(var r=(e.length-t)*a+1>>>0,c=new Uint8Array(r);e[t];){var b=n[e.charCodeAt(t)];if(255===b)return;for(var l=0,u=r-1;(0!==b||l<i)&&-1!==u;u--,l++)b+=o*c[u]>>>0,c[u]=b%256>>>0,b=b/256>>>0;if(0!==b)throw new Error("Non-zero carry");i=l,t++}if(" "!==e[t]){for(var f=r-i;f!==r&&0===c[f];)f++;for(var d=new Uint8Array(s+(r-f)),p=s;f!==r;)d[p++]=c[f++];return d}}}return{encode:function(n){if(n instanceof Uint8Array||(ArrayBuffer.isView(n)?n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength):Array.isArray(n)&&(n=Uint8Array.from(n))),!(n instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===n.length)return"";for(var t=0,s=0,i=0,r=n.length;i!==r&&0===n[i];)i++,t++;for(var a=(r-i)*c+1>>>0,b=new Uint8Array(a);i!==r;){for(var l=n[i],u=0,f=a-1;(0!==l||u<s)&&-1!==f;f--,u++)l+=256*b[f]>>>0,b[f]=l%o>>>0,l=l/o>>>0;if(0!==l)throw new Error("Non-zero carry");s=u,i++}for(var d=a-s;d!==a&&0===b[d];)d++;for(var p=k.repeat(t);d<a;++d)p+=e.charAt(b[d]);return p},decodeUnsafe:b,decode:function(e){var n=b(e);if(n)return n;throw new Error("Non-base"+o+" character")}}}},function(e,n,t){"use strict";const{encodeText:s}=t(5);e.exports=class{constructor(e,n,t,i){this.name=e,this.code=n,this.codeBuf=s(this.code),this.alphabet=i,this.codec=t(i)}encode(e){return this.codec.encode(e)}decode(e){for(const n of e)if(this.alphabet&&this.alphabet.indexOf(n)<0)throw new Error(`invalid character '${n}' in '${e}'`);return this.codec.decode(e)}}},function(e,n,t){"use strict";e.exports={rfc4648:e=>n=>({encode:t=>((e,n,t)=>{const s="="===n[n.length-1],i=(1<<t)-1;let r="",o=0,k=0;for(let a=0;a<e.length;++a)for(k=k<<8|e[a],o+=8;o>t;)o-=t,r+=n[i&k>>o];if(o&&(r+=n[i&k<<t-o]),s)for(;r.length*t&7;)r+="=";return r})(t,n,e),decode:t=>((e,n,t)=>{const s={};for(let c=0;c<n.length;++c)s[n[c]]=c;let i=e.length;for(;"="===e[i-1];)--i;const r=new Uint8Array(i*t/8|0);let o=0,k=0,a=0;for(let c=0;c<i;++c){const n=s[e[c]];if(void 0===n)throw new SyntaxError("Invalid character "+e[c]);k=k<<t|n,o+=t,o>=8&&(o-=8,r[a++]=255&k>>o)}if(o>=t||255&k<<8-o)throw new SyntaxError("Unexpected end of data");return r})(t,n,e)})}},function(e,n,t){"use strict";const{names:s}=t(4),{TextEncoder:i}=t(1),r=new i;e.exports=function(e,n="utf8"){if("utf8"===n||"utf-8"===n)return r.encode(e);if("ascii"===n)return function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}(e);const t=s[n];if(!t)throw new Error("Unknown base");return t.decode(e)}},function(e,n,t){"use strict";e.exports=function(e,n){n||(n=e.reduce((e,n)=>e+n.length,0));const t=new Uint8Array(n);let s=0;for(const i of e)t.set(i,s),s+=i.length;return t}},function(e,n,t){"use strict";const{baseTable:s}=t(0),i={};for(const[r,o]of Object.entries(s)){i[r.toUpperCase().replace(/-/g,"_")]=o}e.exports=Object.freeze(i)},function(e,n,t){"use strict";const{baseTable:s}=t(0),i={};for(const[r,o]of Object.entries(s))void 0===i[o]&&(i[o]=r);e.exports=Object.freeze(i)}])}));

@@ -1,21 +0,17 @@

// DO NOT CHANGE THIS FILE MANUALLY. IT IS GENERATED BY tools/update-table.js
/**
* Constant names for all available codecs
*/
export type CodecConstant = 'IDENTITY' | 'CIDV1' | 'CIDV2' | 'CIDV3' | 'IP4' | 'TCP' | 'SHA1' | 'SHA2_256' | 'SHA2_512' | 'SHA3_512' | 'SHA3_384' | 'SHA3_256' | 'SHA3_224' | 'SHAKE_128' | 'SHAKE_256' | 'KECCAK_224' | 'KECCAK_256' | 'KECCAK_384' | 'KECCAK_512' | 'BLAKE3' | 'DCCP' | 'MURMUR3_128' | 'MURMUR3_32' | 'IP6' | 'IP6ZONE' | 'PATH' | 'MULTICODEC' | 'MULTIHASH' | 'MULTIADDR' | 'MULTIBASE' | 'DNS' | 'DNS4' | 'DNS6' | 'DNSADDR' | 'PROTOBUF' | 'CBOR' | 'RAW' | 'DBL_SHA2_256' | 'RLP' | 'BENCODE' | 'DAG_PB' | 'DAG_CBOR' | 'LIBP2P_KEY' | 'GIT_RAW' | 'TORRENT_INFO' | 'TORRENT_FILE' | 'LEOFCOIN_BLOCK' | 'LEOFCOIN_TX' | 'LEOFCOIN_PR' | 'SCTP' | 'DAG_JOSE' | 'DAG_COSE' | 'ETH_BLOCK' | 'ETH_BLOCK_LIST' | 'ETH_TX_TRIE' | 'ETH_TX' | 'ETH_TX_RECEIPT_TRIE' | 'ETH_TX_RECEIPT' | 'ETH_STATE_TRIE' | 'ETH_ACCOUNT_SNAPSHOT' | 'ETH_STORAGE_TRIE' | 'BITCOIN_BLOCK' | 'BITCOIN_TX' | 'BITCOIN_WITNESS_COMMITMENT' | 'ZCASH_BLOCK' | 'ZCASH_TX' | 'DOCID' | 'STELLAR_BLOCK' | 'STELLAR_TX' | 'MD4' | 'MD5' | 'BMT' | 'DECRED_BLOCK' | 'DECRED_TX' | 'IPLD_NS' | 'IPFS_NS' | 'SWARM_NS' | 'IPNS_NS' | 'ZERONET' | 'SECP256K1_PUB' | 'BLS12_381_G1_PUB' | 'BLS12_381_G2_PUB' | 'X25519_PUB' | 'ED25519_PUB' | 'BLS12_381_G1G2_PUB' | 'DASH_BLOCK' | 'DASH_TX' | 'SWARM_MANIFEST' | 'SWARM_FEED' | 'UDP' | 'P2P_WEBRTC_STAR' | 'P2P_WEBRTC_DIRECT' | 'P2P_STARDUST' | 'P2P_CIRCUIT' | 'DAG_JSON' | 'UDT' | 'UTP' | 'UNIX' | 'THREAD' | 'P2P' | 'IPFS' | 'HTTPS' | 'ONION' | 'ONION3' | 'GARLIC64' | 'GARLIC32' | 'TLS' | 'QUIC' | 'WS' | 'WSS' | 'P2P_WEBSOCKET_STAR' | 'HTTP' | 'JSON' | 'MESSAGEPACK' | 'LIBP2P_PEER_RECORD' | 'SHA2_256_TRUNC254_PADDED' | 'RIPEMD_128' | 'RIPEMD_160' | 'RIPEMD_256' | 'RIPEMD_320' | 'X11' | 'P256_PUB' | 'P384_PUB' | 'P521_PUB' | 'ED448_PUB' | 'X448_PUB' | 'ED25519_PRIV' | 'KANGAROOTWELVE' | 'SM3_256' | 'BLAKE2B_8' | 'BLAKE2B_16' | 'BLAKE2B_24' | 'BLAKE2B_32' | 'BLAKE2B_40' | 'BLAKE2B_48' | 'BLAKE2B_56' | 'BLAKE2B_64' | 'BLAKE2B_72' | 'BLAKE2B_80' | 'BLAKE2B_88' | 'BLAKE2B_96' | 'BLAKE2B_104' | 'BLAKE2B_112' | 'BLAKE2B_120' | 'BLAKE2B_128' | 'BLAKE2B_136' | 'BLAKE2B_144' | 'BLAKE2B_152' | 'BLAKE2B_160' | 'BLAKE2B_168' | 'BLAKE2B_176' | 'BLAKE2B_184' | 'BLAKE2B_192' | 'BLAKE2B_200' | 'BLAKE2B_208' | 'BLAKE2B_216' | 'BLAKE2B_224' | 'BLAKE2B_232' | 'BLAKE2B_240' | 'BLAKE2B_248' | 'BLAKE2B_256' | 'BLAKE2B_264' | 'BLAKE2B_272' | 'BLAKE2B_280' | 'BLAKE2B_288' | 'BLAKE2B_296' | 'BLAKE2B_304' | 'BLAKE2B_312' | 'BLAKE2B_320' | 'BLAKE2B_328' | 'BLAKE2B_336' | 'BLAKE2B_344' | 'BLAKE2B_352' | 'BLAKE2B_360' | 'BLAKE2B_368' | 'BLAKE2B_376' | 'BLAKE2B_384' | 'BLAKE2B_392' | 'BLAKE2B_400' | 'BLAKE2B_408' | 'BLAKE2B_416' | 'BLAKE2B_424' | 'BLAKE2B_432' | 'BLAKE2B_440' | 'BLAKE2B_448' | 'BLAKE2B_456' | 'BLAKE2B_464' | 'BLAKE2B_472' | 'BLAKE2B_480' | 'BLAKE2B_488' | 'BLAKE2B_496' | 'BLAKE2B_504' | 'BLAKE2B_512' | 'BLAKE2S_8' | 'BLAKE2S_16' | 'BLAKE2S_24' | 'BLAKE2S_32' | 'BLAKE2S_40' | 'BLAKE2S_48' | 'BLAKE2S_56' | 'BLAKE2S_64' | 'BLAKE2S_72' | 'BLAKE2S_80' | 'BLAKE2S_88' | 'BLAKE2S_96' | 'BLAKE2S_104' | 'BLAKE2S_112' | 'BLAKE2S_120' | 'BLAKE2S_128' | 'BLAKE2S_136' | 'BLAKE2S_144' | 'BLAKE2S_152' | 'BLAKE2S_160' | 'BLAKE2S_168' | 'BLAKE2S_176' | 'BLAKE2S_184' | 'BLAKE2S_192' | 'BLAKE2S_200' | 'BLAKE2S_208' | 'BLAKE2S_216' | 'BLAKE2S_224' | 'BLAKE2S_232' | 'BLAKE2S_240' | 'BLAKE2S_248' | 'BLAKE2S_256' | 'SKEIN256_8' | 'SKEIN256_16' | 'SKEIN256_24' | 'SKEIN256_32' | 'SKEIN256_40' | 'SKEIN256_48' | 'SKEIN256_56' | 'SKEIN256_64' | 'SKEIN256_72' | 'SKEIN256_80' | 'SKEIN256_88' | 'SKEIN256_96' | 'SKEIN256_104' | 'SKEIN256_112' | 'SKEIN256_120' | 'SKEIN256_128' | 'SKEIN256_136' | 'SKEIN256_144' | 'SKEIN256_152' | 'SKEIN256_160' | 'SKEIN256_168' | 'SKEIN256_176' | 'SKEIN256_184' | 'SKEIN256_192' | 'SKEIN256_200' | 'SKEIN256_208' | 'SKEIN256_216' | 'SKEIN256_224' | 'SKEIN256_232' | 'SKEIN256_240' | 'SKEIN256_248' | 'SKEIN256_256' | 'SKEIN512_8' | 'SKEIN512_16' | 'SKEIN512_24' | 'SKEIN512_32' | 'SKEIN512_40' | 'SKEIN512_48' | 'SKEIN512_56' | 'SKEIN512_64' | 'SKEIN512_72' | 'SKEIN512_80' | 'SKEIN512_88' | 'SKEIN512_96' | 'SKEIN512_104' | 'SKEIN512_112' | 'SKEIN512_120' | 'SKEIN512_128' | 'SKEIN512_136' | 'SKEIN512_144' | 'SKEIN512_152' | 'SKEIN512_160' | 'SKEIN512_168' | 'SKEIN512_176' | 'SKEIN512_184' | 'SKEIN512_192' | 'SKEIN512_200' | 'SKEIN512_208' | 'SKEIN512_216' | 'SKEIN512_224' | 'SKEIN512_232' | 'SKEIN512_240' | 'SKEIN512_248' | 'SKEIN512_256' | 'SKEIN512_264' | 'SKEIN512_272' | 'SKEIN512_280' | 'SKEIN512_288' | 'SKEIN512_296' | 'SKEIN512_304' | 'SKEIN512_312' | 'SKEIN512_320' | 'SKEIN512_328' | 'SKEIN512_336' | 'SKEIN512_344' | 'SKEIN512_352' | 'SKEIN512_360' | 'SKEIN512_368' | 'SKEIN512_376' | 'SKEIN512_384' | 'SKEIN512_392' | 'SKEIN512_400' | 'SKEIN512_408' | 'SKEIN512_416' | 'SKEIN512_424' | 'SKEIN512_432' | 'SKEIN512_440' | 'SKEIN512_448' | 'SKEIN512_456' | 'SKEIN512_464' | 'SKEIN512_472' | 'SKEIN512_480' | 'SKEIN512_488' | 'SKEIN512_496' | 'SKEIN512_504' | 'SKEIN512_512' | 'SKEIN1024_8' | 'SKEIN1024_16' | 'SKEIN1024_24' | 'SKEIN1024_32' | 'SKEIN1024_40' | 'SKEIN1024_48' | 'SKEIN1024_56' | 'SKEIN1024_64' | 'SKEIN1024_72' | 'SKEIN1024_80' | 'SKEIN1024_88' | 'SKEIN1024_96' | 'SKEIN1024_104' | 'SKEIN1024_112' | 'SKEIN1024_120' | 'SKEIN1024_128' | 'SKEIN1024_136' | 'SKEIN1024_144' | 'SKEIN1024_152' | 'SKEIN1024_160' | 'SKEIN1024_168' | 'SKEIN1024_176' | 'SKEIN1024_184' | 'SKEIN1024_192' | 'SKEIN1024_200' | 'SKEIN1024_208' | 'SKEIN1024_216' | 'SKEIN1024_224' | 'SKEIN1024_232' | 'SKEIN1024_240' | 'SKEIN1024_248' | 'SKEIN1024_256' | 'SKEIN1024_264' | 'SKEIN1024_272' | 'SKEIN1024_280' | 'SKEIN1024_288' | 'SKEIN1024_296' | 'SKEIN1024_304' | 'SKEIN1024_312' | 'SKEIN1024_320' | 'SKEIN1024_328' | 'SKEIN1024_336' | 'SKEIN1024_344' | 'SKEIN1024_352' | 'SKEIN1024_360' | 'SKEIN1024_368' | 'SKEIN1024_376' | 'SKEIN1024_384' | 'SKEIN1024_392' | 'SKEIN1024_400' | 'SKEIN1024_408' | 'SKEIN1024_416' | 'SKEIN1024_424' | 'SKEIN1024_432' | 'SKEIN1024_440' | 'SKEIN1024_448' | 'SKEIN1024_456' | 'SKEIN1024_464' | 'SKEIN1024_472' | 'SKEIN1024_480' | 'SKEIN1024_488' | 'SKEIN1024_496' | 'SKEIN1024_504' | 'SKEIN1024_512' | 'SKEIN1024_520' | 'SKEIN1024_528' | 'SKEIN1024_536' | 'SKEIN1024_544' | 'SKEIN1024_552' | 'SKEIN1024_560' | 'SKEIN1024_568' | 'SKEIN1024_576' | 'SKEIN1024_584' | 'SKEIN1024_592' | 'SKEIN1024_600' | 'SKEIN1024_608' | 'SKEIN1024_616' | 'SKEIN1024_624' | 'SKEIN1024_632' | 'SKEIN1024_640' | 'SKEIN1024_648' | 'SKEIN1024_656' | 'SKEIN1024_664' | 'SKEIN1024_672' | 'SKEIN1024_680' | 'SKEIN1024_688' | 'SKEIN1024_696' | 'SKEIN1024_704' | 'SKEIN1024_712' | 'SKEIN1024_720' | 'SKEIN1024_728' | 'SKEIN1024_736' | 'SKEIN1024_744' | 'SKEIN1024_752' | 'SKEIN1024_760' | 'SKEIN1024_768' | 'SKEIN1024_776' | 'SKEIN1024_784' | 'SKEIN1024_792' | 'SKEIN1024_800' | 'SKEIN1024_808' | 'SKEIN1024_816' | 'SKEIN1024_824' | 'SKEIN1024_832' | 'SKEIN1024_840' | 'SKEIN1024_848' | 'SKEIN1024_856' | 'SKEIN1024_864' | 'SKEIN1024_872' | 'SKEIN1024_880' | 'SKEIN1024_888' | 'SKEIN1024_896' | 'SKEIN1024_904' | 'SKEIN1024_912' | 'SKEIN1024_920' | 'SKEIN1024_928' | 'SKEIN1024_936' | 'SKEIN1024_944' | 'SKEIN1024_952' | 'SKEIN1024_960' | 'SKEIN1024_968' | 'SKEIN1024_976' | 'SKEIN1024_984' | 'SKEIN1024_992' | 'SKEIN1024_1000' | 'SKEIN1024_1008' | 'SKEIN1024_1016' | 'SKEIN1024_1024' | 'POSEIDON_BLS12_381_A2_FC1' | 'POSEIDON_BLS12_381_A2_FC1_SC' | 'ZEROXCERT_IMPRINT_256' | 'FIL_COMMITMENT_UNSEALED' | 'FIL_COMMITMENT_SEALED' | 'HOLOCHAIN_ADR_V0' | 'HOLOCHAIN_ADR_V1' | 'HOLOCHAIN_KEY_V0' | 'HOLOCHAIN_KEY_V1' | 'HOLOCHAIN_SIG_V0' | 'HOLOCHAIN_SIG_V1' | 'SKYNET_NS'
export declare type CodecConstant = 'IDENTITY' | 'CIDV1' | 'CIDV2' | 'CIDV3' | 'IP4' | 'TCP' | 'SHA1' | 'SHA2_256' | 'SHA2_512' | 'SHA3_512' | 'SHA3_384' | 'SHA3_256' | 'SHA3_224' | 'SHAKE_128' | 'SHAKE_256' | 'KECCAK_224' | 'KECCAK_256' | 'KECCAK_384' | 'KECCAK_512' | 'BLAKE3' | 'DCCP' | 'MURMUR3_128' | 'MURMUR3_32' | 'IP6' | 'IP6ZONE' | 'PATH' | 'MULTICODEC' | 'MULTIHASH' | 'MULTIADDR' | 'MULTIBASE' | 'DNS' | 'DNS4' | 'DNS6' | 'DNSADDR' | 'PROTOBUF' | 'CBOR' | 'RAW' | 'DBL_SHA2_256' | 'RLP' | 'BENCODE' | 'DAG_PB' | 'DAG_CBOR' | 'LIBP2P_KEY' | 'GIT_RAW' | 'TORRENT_INFO' | 'TORRENT_FILE' | 'LEOFCOIN_BLOCK' | 'LEOFCOIN_TX' | 'LEOFCOIN_PR' | 'SCTP' | 'DAG_JOSE' | 'DAG_COSE' | 'ETH_BLOCK' | 'ETH_BLOCK_LIST' | 'ETH_TX_TRIE' | 'ETH_TX' | 'ETH_TX_RECEIPT_TRIE' | 'ETH_TX_RECEIPT' | 'ETH_STATE_TRIE' | 'ETH_ACCOUNT_SNAPSHOT' | 'ETH_STORAGE_TRIE' | 'BITCOIN_BLOCK' | 'BITCOIN_TX' | 'BITCOIN_WITNESS_COMMITMENT' | 'ZCASH_BLOCK' | 'ZCASH_TX' | 'DOCID' | 'STELLAR_BLOCK' | 'STELLAR_TX' | 'MD4' | 'MD5' | 'BMT' | 'DECRED_BLOCK' | 'DECRED_TX' | 'IPLD_NS' | 'IPFS_NS' | 'SWARM_NS' | 'IPNS_NS' | 'ZERONET' | 'SECP256K1_PUB' | 'BLS12_381_G1_PUB' | 'BLS12_381_G2_PUB' | 'X25519_PUB' | 'ED25519_PUB' | 'BLS12_381_G1G2_PUB' | 'DASH_BLOCK' | 'DASH_TX' | 'SWARM_MANIFEST' | 'SWARM_FEED' | 'UDP' | 'P2P_WEBRTC_STAR' | 'P2P_WEBRTC_DIRECT' | 'P2P_STARDUST' | 'P2P_CIRCUIT' | 'DAG_JSON' | 'UDT' | 'UTP' | 'UNIX' | 'P2P' | 'IPFS' | 'HTTPS' | 'ONION' | 'ONION3' | 'GARLIC64' | 'GARLIC32' | 'TLS' | 'QUIC' | 'WS' | 'WSS' | 'P2P_WEBSOCKET_STAR' | 'HTTP' | 'JSON' | 'MESSAGEPACK' | 'LIBP2P_PEER_RECORD' | 'SHA2_256_TRUNC254_PADDED' | 'RIPEMD_128' | 'RIPEMD_160' | 'RIPEMD_256' | 'RIPEMD_320' | 'X11' | 'P256_PUB' | 'P384_PUB' | 'P521_PUB' | 'ED448_PUB' | 'X448_PUB' | 'ED25519_PRIV' | 'KANGAROOTWELVE' | 'SM3_256' | 'BLAKE2B_8' | 'BLAKE2B_16' | 'BLAKE2B_24' | 'BLAKE2B_32' | 'BLAKE2B_40' | 'BLAKE2B_48' | 'BLAKE2B_56' | 'BLAKE2B_64' | 'BLAKE2B_72' | 'BLAKE2B_80' | 'BLAKE2B_88' | 'BLAKE2B_96' | 'BLAKE2B_104' | 'BLAKE2B_112' | 'BLAKE2B_120' | 'BLAKE2B_128' | 'BLAKE2B_136' | 'BLAKE2B_144' | 'BLAKE2B_152' | 'BLAKE2B_160' | 'BLAKE2B_168' | 'BLAKE2B_176' | 'BLAKE2B_184' | 'BLAKE2B_192' | 'BLAKE2B_200' | 'BLAKE2B_208' | 'BLAKE2B_216' | 'BLAKE2B_224' | 'BLAKE2B_232' | 'BLAKE2B_240' | 'BLAKE2B_248' | 'BLAKE2B_256' | 'BLAKE2B_264' | 'BLAKE2B_272' | 'BLAKE2B_280' | 'BLAKE2B_288' | 'BLAKE2B_296' | 'BLAKE2B_304' | 'BLAKE2B_312' | 'BLAKE2B_320' | 'BLAKE2B_328' | 'BLAKE2B_336' | 'BLAKE2B_344' | 'BLAKE2B_352' | 'BLAKE2B_360' | 'BLAKE2B_368' | 'BLAKE2B_376' | 'BLAKE2B_384' | 'BLAKE2B_392' | 'BLAKE2B_400' | 'BLAKE2B_408' | 'BLAKE2B_416' | 'BLAKE2B_424' | 'BLAKE2B_432' | 'BLAKE2B_440' | 'BLAKE2B_448' | 'BLAKE2B_456' | 'BLAKE2B_464' | 'BLAKE2B_472' | 'BLAKE2B_480' | 'BLAKE2B_488' | 'BLAKE2B_496' | 'BLAKE2B_504' | 'BLAKE2B_512' | 'BLAKE2S_8' | 'BLAKE2S_16' | 'BLAKE2S_24' | 'BLAKE2S_32' | 'BLAKE2S_40' | 'BLAKE2S_48' | 'BLAKE2S_56' | 'BLAKE2S_64' | 'BLAKE2S_72' | 'BLAKE2S_80' | 'BLAKE2S_88' | 'BLAKE2S_96' | 'BLAKE2S_104' | 'BLAKE2S_112' | 'BLAKE2S_120' | 'BLAKE2S_128' | 'BLAKE2S_136' | 'BLAKE2S_144' | 'BLAKE2S_152' | 'BLAKE2S_160' | 'BLAKE2S_168' | 'BLAKE2S_176' | 'BLAKE2S_184' | 'BLAKE2S_192' | 'BLAKE2S_200' | 'BLAKE2S_208' | 'BLAKE2S_216' | 'BLAKE2S_224' | 'BLAKE2S_232' | 'BLAKE2S_240' | 'BLAKE2S_248' | 'BLAKE2S_256' | 'SKEIN256_8' | 'SKEIN256_16' | 'SKEIN256_24' | 'SKEIN256_32' | 'SKEIN256_40' | 'SKEIN256_48' | 'SKEIN256_56' | 'SKEIN256_64' | 'SKEIN256_72' | 'SKEIN256_80' | 'SKEIN256_88' | 'SKEIN256_96' | 'SKEIN256_104' | 'SKEIN256_112' | 'SKEIN256_120' | 'SKEIN256_128' | 'SKEIN256_136' | 'SKEIN256_144' | 'SKEIN256_152' | 'SKEIN256_160' | 'SKEIN256_168' | 'SKEIN256_176' | 'SKEIN256_184' | 'SKEIN256_192' | 'SKEIN256_200' | 'SKEIN256_208' | 'SKEIN256_216' | 'SKEIN256_224' | 'SKEIN256_232' | 'SKEIN256_240' | 'SKEIN256_248' | 'SKEIN256_256' | 'SKEIN512_8' | 'SKEIN512_16' | 'SKEIN512_24' | 'SKEIN512_32' | 'SKEIN512_40' | 'SKEIN512_48' | 'SKEIN512_56' | 'SKEIN512_64' | 'SKEIN512_72' | 'SKEIN512_80' | 'SKEIN512_88' | 'SKEIN512_96' | 'SKEIN512_104' | 'SKEIN512_112' | 'SKEIN512_120' | 'SKEIN512_128' | 'SKEIN512_136' | 'SKEIN512_144' | 'SKEIN512_152' | 'SKEIN512_160' | 'SKEIN512_168' | 'SKEIN512_176' | 'SKEIN512_184' | 'SKEIN512_192' | 'SKEIN512_200' | 'SKEIN512_208' | 'SKEIN512_216' | 'SKEIN512_224' | 'SKEIN512_232' | 'SKEIN512_240' | 'SKEIN512_248' | 'SKEIN512_256' | 'SKEIN512_264' | 'SKEIN512_272' | 'SKEIN512_280' | 'SKEIN512_288' | 'SKEIN512_296' | 'SKEIN512_304' | 'SKEIN512_312' | 'SKEIN512_320' | 'SKEIN512_328' | 'SKEIN512_336' | 'SKEIN512_344' | 'SKEIN512_352' | 'SKEIN512_360' | 'SKEIN512_368' | 'SKEIN512_376' | 'SKEIN512_384' | 'SKEIN512_392' | 'SKEIN512_400' | 'SKEIN512_408' | 'SKEIN512_416' | 'SKEIN512_424' | 'SKEIN512_432' | 'SKEIN512_440' | 'SKEIN512_448' | 'SKEIN512_456' | 'SKEIN512_464' | 'SKEIN512_472' | 'SKEIN512_480' | 'SKEIN512_488' | 'SKEIN512_496' | 'SKEIN512_504' | 'SKEIN512_512' | 'SKEIN1024_8' | 'SKEIN1024_16' | 'SKEIN1024_24' | 'SKEIN1024_32' | 'SKEIN1024_40' | 'SKEIN1024_48' | 'SKEIN1024_56' | 'SKEIN1024_64' | 'SKEIN1024_72' | 'SKEIN1024_80' | 'SKEIN1024_88' | 'SKEIN1024_96' | 'SKEIN1024_104' | 'SKEIN1024_112' | 'SKEIN1024_120' | 'SKEIN1024_128' | 'SKEIN1024_136' | 'SKEIN1024_144' | 'SKEIN1024_152' | 'SKEIN1024_160' | 'SKEIN1024_168' | 'SKEIN1024_176' | 'SKEIN1024_184' | 'SKEIN1024_192' | 'SKEIN1024_200' | 'SKEIN1024_208' | 'SKEIN1024_216' | 'SKEIN1024_224' | 'SKEIN1024_232' | 'SKEIN1024_240' | 'SKEIN1024_248' | 'SKEIN1024_256' | 'SKEIN1024_264' | 'SKEIN1024_272' | 'SKEIN1024_280' | 'SKEIN1024_288' | 'SKEIN1024_296' | 'SKEIN1024_304' | 'SKEIN1024_312' | 'SKEIN1024_320' | 'SKEIN1024_328' | 'SKEIN1024_336' | 'SKEIN1024_344' | 'SKEIN1024_352' | 'SKEIN1024_360' | 'SKEIN1024_368' | 'SKEIN1024_376' | 'SKEIN1024_384' | 'SKEIN1024_392' | 'SKEIN1024_400' | 'SKEIN1024_408' | 'SKEIN1024_416' | 'SKEIN1024_424' | 'SKEIN1024_432' | 'SKEIN1024_440' | 'SKEIN1024_448' | 'SKEIN1024_456' | 'SKEIN1024_464' | 'SKEIN1024_472' | 'SKEIN1024_480' | 'SKEIN1024_488' | 'SKEIN1024_496' | 'SKEIN1024_504' | 'SKEIN1024_512' | 'SKEIN1024_520' | 'SKEIN1024_528' | 'SKEIN1024_536' | 'SKEIN1024_544' | 'SKEIN1024_552' | 'SKEIN1024_560' | 'SKEIN1024_568' | 'SKEIN1024_576' | 'SKEIN1024_584' | 'SKEIN1024_592' | 'SKEIN1024_600' | 'SKEIN1024_608' | 'SKEIN1024_616' | 'SKEIN1024_624' | 'SKEIN1024_632' | 'SKEIN1024_640' | 'SKEIN1024_648' | 'SKEIN1024_656' | 'SKEIN1024_664' | 'SKEIN1024_672' | 'SKEIN1024_680' | 'SKEIN1024_688' | 'SKEIN1024_696' | 'SKEIN1024_704' | 'SKEIN1024_712' | 'SKEIN1024_720' | 'SKEIN1024_728' | 'SKEIN1024_736' | 'SKEIN1024_744' | 'SKEIN1024_752' | 'SKEIN1024_760' | 'SKEIN1024_768' | 'SKEIN1024_776' | 'SKEIN1024_784' | 'SKEIN1024_792' | 'SKEIN1024_800' | 'SKEIN1024_808' | 'SKEIN1024_816' | 'SKEIN1024_824' | 'SKEIN1024_832' | 'SKEIN1024_840' | 'SKEIN1024_848' | 'SKEIN1024_856' | 'SKEIN1024_864' | 'SKEIN1024_872' | 'SKEIN1024_880' | 'SKEIN1024_888' | 'SKEIN1024_896' | 'SKEIN1024_904' | 'SKEIN1024_912' | 'SKEIN1024_920' | 'SKEIN1024_928' | 'SKEIN1024_936' | 'SKEIN1024_944' | 'SKEIN1024_952' | 'SKEIN1024_960' | 'SKEIN1024_968' | 'SKEIN1024_976' | 'SKEIN1024_984' | 'SKEIN1024_992' | 'SKEIN1024_1000' | 'SKEIN1024_1008' | 'SKEIN1024_1016' | 'SKEIN1024_1024' | 'POSEIDON_BLS12_381_A2_FC1' | 'POSEIDON_BLS12_381_A2_FC1_SC' | 'ZEROXCERT_IMPRINT_256' | 'FIL_COMMITMENT_UNSEALED' | 'FIL_COMMITMENT_SEALED' | 'HOLOCHAIN_ADR_V0' | 'HOLOCHAIN_ADR_V1' | 'HOLOCHAIN_KEY_V0' | 'HOLOCHAIN_KEY_V1' | 'HOLOCHAIN_SIG_V0' | 'HOLOCHAIN_SIG_V1' | 'SKYNET_NS';
/**
* Names for all available codecs
*/
export type CodecName = 'identity' | 'cidv1' | 'cidv2' | 'cidv3' | 'ip4' | 'tcp' | 'sha1' | 'sha2-256' | 'sha2-512' | 'sha3-512' | 'sha3-384' | 'sha3-256' | 'sha3-224' | 'shake-128' | 'shake-256' | 'keccak-224' | 'keccak-256' | 'keccak-384' | 'keccak-512' | 'blake3' | 'dccp' | 'murmur3-128' | 'murmur3-32' | 'ip6' | 'ip6zone' | 'path' | 'multicodec' | 'multihash' | 'multiaddr' | 'multibase' | 'dns' | 'dns4' | 'dns6' | 'dnsaddr' | 'protobuf' | 'cbor' | 'raw' | 'dbl-sha2-256' | 'rlp' | 'bencode' | 'dag-pb' | 'dag-cbor' | 'libp2p-key' | 'git-raw' | 'torrent-info' | 'torrent-file' | 'leofcoin-block' | 'leofcoin-tx' | 'leofcoin-pr' | 'sctp' | 'dag-jose' | 'dag-cose' | 'eth-block' | 'eth-block-list' | 'eth-tx-trie' | 'eth-tx' | 'eth-tx-receipt-trie' | 'eth-tx-receipt' | 'eth-state-trie' | 'eth-account-snapshot' | 'eth-storage-trie' | 'bitcoin-block' | 'bitcoin-tx' | 'bitcoin-witness-commitment' | 'zcash-block' | 'zcash-tx' | 'docid' | 'stellar-block' | 'stellar-tx' | 'md4' | 'md5' | 'bmt' | 'decred-block' | 'decred-tx' | 'ipld-ns' | 'ipfs-ns' | 'swarm-ns' | 'ipns-ns' | 'zeronet' | 'secp256k1-pub' | 'bls12_381-g1-pub' | 'bls12_381-g2-pub' | 'x25519-pub' | 'ed25519-pub' | 'bls12_381-g1g2-pub' | 'dash-block' | 'dash-tx' | 'swarm-manifest' | 'swarm-feed' | 'udp' | 'p2p-webrtc-star' | 'p2p-webrtc-direct' | 'p2p-stardust' | 'p2p-circuit' | 'dag-json' | 'udt' | 'utp' | 'unix' | 'thread' | 'p2p' | 'ipfs' | 'https' | 'onion' | 'onion3' | 'garlic64' | 'garlic32' | 'tls' | 'quic' | 'ws' | 'wss' | 'p2p-websocket-star' | 'http' | 'json' | 'messagepack' | 'libp2p-peer-record' | 'sha2-256-trunc254-padded' | 'ripemd-128' | 'ripemd-160' | 'ripemd-256' | 'ripemd-320' | 'x11' | 'p256-pub' | 'p384-pub' | 'p521-pub' | 'ed448-pub' | 'x448-pub' | 'ed25519-priv' | 'kangarootwelve' | 'sm3-256' | 'blake2b-8' | 'blake2b-16' | 'blake2b-24' | 'blake2b-32' | 'blake2b-40' | 'blake2b-48' | 'blake2b-56' | 'blake2b-64' | 'blake2b-72' | 'blake2b-80' | 'blake2b-88' | 'blake2b-96' | 'blake2b-104' | 'blake2b-112' | 'blake2b-120' | 'blake2b-128' | 'blake2b-136' | 'blake2b-144' | 'blake2b-152' | 'blake2b-160' | 'blake2b-168' | 'blake2b-176' | 'blake2b-184' | 'blake2b-192' | 'blake2b-200' | 'blake2b-208' | 'blake2b-216' | 'blake2b-224' | 'blake2b-232' | 'blake2b-240' | 'blake2b-248' | 'blake2b-256' | 'blake2b-264' | 'blake2b-272' | 'blake2b-280' | 'blake2b-288' | 'blake2b-296' | 'blake2b-304' | 'blake2b-312' | 'blake2b-320' | 'blake2b-328' | 'blake2b-336' | 'blake2b-344' | 'blake2b-352' | 'blake2b-360' | 'blake2b-368' | 'blake2b-376' | 'blake2b-384' | 'blake2b-392' | 'blake2b-400' | 'blake2b-408' | 'blake2b-416' | 'blake2b-424' | 'blake2b-432' | 'blake2b-440' | 'blake2b-448' | 'blake2b-456' | 'blake2b-464' | 'blake2b-472' | 'blake2b-480' | 'blake2b-488' | 'blake2b-496' | 'blake2b-504' | 'blake2b-512' | 'blake2s-8' | 'blake2s-16' | 'blake2s-24' | 'blake2s-32' | 'blake2s-40' | 'blake2s-48' | 'blake2s-56' | 'blake2s-64' | 'blake2s-72' | 'blake2s-80' | 'blake2s-88' | 'blake2s-96' | 'blake2s-104' | 'blake2s-112' | 'blake2s-120' | 'blake2s-128' | 'blake2s-136' | 'blake2s-144' | 'blake2s-152' | 'blake2s-160' | 'blake2s-168' | 'blake2s-176' | 'blake2s-184' | 'blake2s-192' | 'blake2s-200' | 'blake2s-208' | 'blake2s-216' | 'blake2s-224' | 'blake2s-232' | 'blake2s-240' | 'blake2s-248' | 'blake2s-256' | 'skein256-8' | 'skein256-16' | 'skein256-24' | 'skein256-32' | 'skein256-40' | 'skein256-48' | 'skein256-56' | 'skein256-64' | 'skein256-72' | 'skein256-80' | 'skein256-88' | 'skein256-96' | 'skein256-104' | 'skein256-112' | 'skein256-120' | 'skein256-128' | 'skein256-136' | 'skein256-144' | 'skein256-152' | 'skein256-160' | 'skein256-168' | 'skein256-176' | 'skein256-184' | 'skein256-192' | 'skein256-200' | 'skein256-208' | 'skein256-216' | 'skein256-224' | 'skein256-232' | 'skein256-240' | 'skein256-248' | 'skein256-256' | 'skein512-8' | 'skein512-16' | 'skein512-24' | 'skein512-32' | 'skein512-40' | 'skein512-48' | 'skein512-56' | 'skein512-64' | 'skein512-72' | 'skein512-80' | 'skein512-88' | 'skein512-96' | 'skein512-104' | 'skein512-112' | 'skein512-120' | 'skein512-128' | 'skein512-136' | 'skein512-144' | 'skein512-152' | 'skein512-160' | 'skein512-168' | 'skein512-176' | 'skein512-184' | 'skein512-192' | 'skein512-200' | 'skein512-208' | 'skein512-216' | 'skein512-224' | 'skein512-232' | 'skein512-240' | 'skein512-248' | 'skein512-256' | 'skein512-264' | 'skein512-272' | 'skein512-280' | 'skein512-288' | 'skein512-296' | 'skein512-304' | 'skein512-312' | 'skein512-320' | 'skein512-328' | 'skein512-336' | 'skein512-344' | 'skein512-352' | 'skein512-360' | 'skein512-368' | 'skein512-376' | 'skein512-384' | 'skein512-392' | 'skein512-400' | 'skein512-408' | 'skein512-416' | 'skein512-424' | 'skein512-432' | 'skein512-440' | 'skein512-448' | 'skein512-456' | 'skein512-464' | 'skein512-472' | 'skein512-480' | 'skein512-488' | 'skein512-496' | 'skein512-504' | 'skein512-512' | 'skein1024-8' | 'skein1024-16' | 'skein1024-24' | 'skein1024-32' | 'skein1024-40' | 'skein1024-48' | 'skein1024-56' | 'skein1024-64' | 'skein1024-72' | 'skein1024-80' | 'skein1024-88' | 'skein1024-96' | 'skein1024-104' | 'skein1024-112' | 'skein1024-120' | 'skein1024-128' | 'skein1024-136' | 'skein1024-144' | 'skein1024-152' | 'skein1024-160' | 'skein1024-168' | 'skein1024-176' | 'skein1024-184' | 'skein1024-192' | 'skein1024-200' | 'skein1024-208' | 'skein1024-216' | 'skein1024-224' | 'skein1024-232' | 'skein1024-240' | 'skein1024-248' | 'skein1024-256' | 'skein1024-264' | 'skein1024-272' | 'skein1024-280' | 'skein1024-288' | 'skein1024-296' | 'skein1024-304' | 'skein1024-312' | 'skein1024-320' | 'skein1024-328' | 'skein1024-336' | 'skein1024-344' | 'skein1024-352' | 'skein1024-360' | 'skein1024-368' | 'skein1024-376' | 'skein1024-384' | 'skein1024-392' | 'skein1024-400' | 'skein1024-408' | 'skein1024-416' | 'skein1024-424' | 'skein1024-432' | 'skein1024-440' | 'skein1024-448' | 'skein1024-456' | 'skein1024-464' | 'skein1024-472' | 'skein1024-480' | 'skein1024-488' | 'skein1024-496' | 'skein1024-504' | 'skein1024-512' | 'skein1024-520' | 'skein1024-528' | 'skein1024-536' | 'skein1024-544' | 'skein1024-552' | 'skein1024-560' | 'skein1024-568' | 'skein1024-576' | 'skein1024-584' | 'skein1024-592' | 'skein1024-600' | 'skein1024-608' | 'skein1024-616' | 'skein1024-624' | 'skein1024-632' | 'skein1024-640' | 'skein1024-648' | 'skein1024-656' | 'skein1024-664' | 'skein1024-672' | 'skein1024-680' | 'skein1024-688' | 'skein1024-696' | 'skein1024-704' | 'skein1024-712' | 'skein1024-720' | 'skein1024-728' | 'skein1024-736' | 'skein1024-744' | 'skein1024-752' | 'skein1024-760' | 'skein1024-768' | 'skein1024-776' | 'skein1024-784' | 'skein1024-792' | 'skein1024-800' | 'skein1024-808' | 'skein1024-816' | 'skein1024-824' | 'skein1024-832' | 'skein1024-840' | 'skein1024-848' | 'skein1024-856' | 'skein1024-864' | 'skein1024-872' | 'skein1024-880' | 'skein1024-888' | 'skein1024-896' | 'skein1024-904' | 'skein1024-912' | 'skein1024-920' | 'skein1024-928' | 'skein1024-936' | 'skein1024-944' | 'skein1024-952' | 'skein1024-960' | 'skein1024-968' | 'skein1024-976' | 'skein1024-984' | 'skein1024-992' | 'skein1024-1000' | 'skein1024-1008' | 'skein1024-1016' | 'skein1024-1024' | 'poseidon-bls12_381-a2-fc1' | 'poseidon-bls12_381-a2-fc1-sc' | 'zeroxcert-imprint-256' | 'fil-commitment-unsealed' | 'fil-commitment-sealed' | 'holochain-adr-v0' | 'holochain-adr-v1' | 'holochain-key-v0' | 'holochain-key-v1' | 'holochain-sig-v0' | 'holochain-sig-v1' | 'skynet-ns'
export declare type CodecName = 'identity' | 'cidv1' | 'cidv2' | 'cidv3' | 'ip4' | 'tcp' | 'sha1' | 'sha2-256' | 'sha2-512' | 'sha3-512' | 'sha3-384' | 'sha3-256' | 'sha3-224' | 'shake-128' | 'shake-256' | 'keccak-224' | 'keccak-256' | 'keccak-384' | 'keccak-512' | 'blake3' | 'dccp' | 'murmur3-128' | 'murmur3-32' | 'ip6' | 'ip6zone' | 'path' | 'multicodec' | 'multihash' | 'multiaddr' | 'multibase' | 'dns' | 'dns4' | 'dns6' | 'dnsaddr' | 'protobuf' | 'cbor' | 'raw' | 'dbl-sha2-256' | 'rlp' | 'bencode' | 'dag-pb' | 'dag-cbor' | 'libp2p-key' | 'git-raw' | 'torrent-info' | 'torrent-file' | 'leofcoin-block' | 'leofcoin-tx' | 'leofcoin-pr' | 'sctp' | 'dag-jose' | 'dag-cose' | 'eth-block' | 'eth-block-list' | 'eth-tx-trie' | 'eth-tx' | 'eth-tx-receipt-trie' | 'eth-tx-receipt' | 'eth-state-trie' | 'eth-account-snapshot' | 'eth-storage-trie' | 'bitcoin-block' | 'bitcoin-tx' | 'bitcoin-witness-commitment' | 'zcash-block' | 'zcash-tx' | 'docid' | 'stellar-block' | 'stellar-tx' | 'md4' | 'md5' | 'bmt' | 'decred-block' | 'decred-tx' | 'ipld-ns' | 'ipfs-ns' | 'swarm-ns' | 'ipns-ns' | 'zeronet' | 'secp256k1-pub' | 'bls12_381-g1-pub' | 'bls12_381-g2-pub' | 'x25519-pub' | 'ed25519-pub' | 'bls12_381-g1g2-pub' | 'dash-block' | 'dash-tx' | 'swarm-manifest' | 'swarm-feed' | 'udp' | 'p2p-webrtc-star' | 'p2p-webrtc-direct' | 'p2p-stardust' | 'p2p-circuit' | 'dag-json' | 'udt' | 'utp' | 'unix' | 'p2p' | 'ipfs' | 'https' | 'onion' | 'onion3' | 'garlic64' | 'garlic32' | 'tls' | 'quic' | 'ws' | 'wss' | 'p2p-websocket-star' | 'http' | 'json' | 'messagepack' | 'libp2p-peer-record' | 'sha2-256-trunc254-padded' | 'ripemd-128' | 'ripemd-160' | 'ripemd-256' | 'ripemd-320' | 'x11' | 'p256-pub' | 'p384-pub' | 'p521-pub' | 'ed448-pub' | 'x448-pub' | 'ed25519-priv' | 'kangarootwelve' | 'sm3-256' | 'blake2b-8' | 'blake2b-16' | 'blake2b-24' | 'blake2b-32' | 'blake2b-40' | 'blake2b-48' | 'blake2b-56' | 'blake2b-64' | 'blake2b-72' | 'blake2b-80' | 'blake2b-88' | 'blake2b-96' | 'blake2b-104' | 'blake2b-112' | 'blake2b-120' | 'blake2b-128' | 'blake2b-136' | 'blake2b-144' | 'blake2b-152' | 'blake2b-160' | 'blake2b-168' | 'blake2b-176' | 'blake2b-184' | 'blake2b-192' | 'blake2b-200' | 'blake2b-208' | 'blake2b-216' | 'blake2b-224' | 'blake2b-232' | 'blake2b-240' | 'blake2b-248' | 'blake2b-256' | 'blake2b-264' | 'blake2b-272' | 'blake2b-280' | 'blake2b-288' | 'blake2b-296' | 'blake2b-304' | 'blake2b-312' | 'blake2b-320' | 'blake2b-328' | 'blake2b-336' | 'blake2b-344' | 'blake2b-352' | 'blake2b-360' | 'blake2b-368' | 'blake2b-376' | 'blake2b-384' | 'blake2b-392' | 'blake2b-400' | 'blake2b-408' | 'blake2b-416' | 'blake2b-424' | 'blake2b-432' | 'blake2b-440' | 'blake2b-448' | 'blake2b-456' | 'blake2b-464' | 'blake2b-472' | 'blake2b-480' | 'blake2b-488' | 'blake2b-496' | 'blake2b-504' | 'blake2b-512' | 'blake2s-8' | 'blake2s-16' | 'blake2s-24' | 'blake2s-32' | 'blake2s-40' | 'blake2s-48' | 'blake2s-56' | 'blake2s-64' | 'blake2s-72' | 'blake2s-80' | 'blake2s-88' | 'blake2s-96' | 'blake2s-104' | 'blake2s-112' | 'blake2s-120' | 'blake2s-128' | 'blake2s-136' | 'blake2s-144' | 'blake2s-152' | 'blake2s-160' | 'blake2s-168' | 'blake2s-176' | 'blake2s-184' | 'blake2s-192' | 'blake2s-200' | 'blake2s-208' | 'blake2s-216' | 'blake2s-224' | 'blake2s-232' | 'blake2s-240' | 'blake2s-248' | 'blake2s-256' | 'skein256-8' | 'skein256-16' | 'skein256-24' | 'skein256-32' | 'skein256-40' | 'skein256-48' | 'skein256-56' | 'skein256-64' | 'skein256-72' | 'skein256-80' | 'skein256-88' | 'skein256-96' | 'skein256-104' | 'skein256-112' | 'skein256-120' | 'skein256-128' | 'skein256-136' | 'skein256-144' | 'skein256-152' | 'skein256-160' | 'skein256-168' | 'skein256-176' | 'skein256-184' | 'skein256-192' | 'skein256-200' | 'skein256-208' | 'skein256-216' | 'skein256-224' | 'skein256-232' | 'skein256-240' | 'skein256-248' | 'skein256-256' | 'skein512-8' | 'skein512-16' | 'skein512-24' | 'skein512-32' | 'skein512-40' | 'skein512-48' | 'skein512-56' | 'skein512-64' | 'skein512-72' | 'skein512-80' | 'skein512-88' | 'skein512-96' | 'skein512-104' | 'skein512-112' | 'skein512-120' | 'skein512-128' | 'skein512-136' | 'skein512-144' | 'skein512-152' | 'skein512-160' | 'skein512-168' | 'skein512-176' | 'skein512-184' | 'skein512-192' | 'skein512-200' | 'skein512-208' | 'skein512-216' | 'skein512-224' | 'skein512-232' | 'skein512-240' | 'skein512-248' | 'skein512-256' | 'skein512-264' | 'skein512-272' | 'skein512-280' | 'skein512-288' | 'skein512-296' | 'skein512-304' | 'skein512-312' | 'skein512-320' | 'skein512-328' | 'skein512-336' | 'skein512-344' | 'skein512-352' | 'skein512-360' | 'skein512-368' | 'skein512-376' | 'skein512-384' | 'skein512-392' | 'skein512-400' | 'skein512-408' | 'skein512-416' | 'skein512-424' | 'skein512-432' | 'skein512-440' | 'skein512-448' | 'skein512-456' | 'skein512-464' | 'skein512-472' | 'skein512-480' | 'skein512-488' | 'skein512-496' | 'skein512-504' | 'skein512-512' | 'skein1024-8' | 'skein1024-16' | 'skein1024-24' | 'skein1024-32' | 'skein1024-40' | 'skein1024-48' | 'skein1024-56' | 'skein1024-64' | 'skein1024-72' | 'skein1024-80' | 'skein1024-88' | 'skein1024-96' | 'skein1024-104' | 'skein1024-112' | 'skein1024-120' | 'skein1024-128' | 'skein1024-136' | 'skein1024-144' | 'skein1024-152' | 'skein1024-160' | 'skein1024-168' | 'skein1024-176' | 'skein1024-184' | 'skein1024-192' | 'skein1024-200' | 'skein1024-208' | 'skein1024-216' | 'skein1024-224' | 'skein1024-232' | 'skein1024-240' | 'skein1024-248' | 'skein1024-256' | 'skein1024-264' | 'skein1024-272' | 'skein1024-280' | 'skein1024-288' | 'skein1024-296' | 'skein1024-304' | 'skein1024-312' | 'skein1024-320' | 'skein1024-328' | 'skein1024-336' | 'skein1024-344' | 'skein1024-352' | 'skein1024-360' | 'skein1024-368' | 'skein1024-376' | 'skein1024-384' | 'skein1024-392' | 'skein1024-400' | 'skein1024-408' | 'skein1024-416' | 'skein1024-424' | 'skein1024-432' | 'skein1024-440' | 'skein1024-448' | 'skein1024-456' | 'skein1024-464' | 'skein1024-472' | 'skein1024-480' | 'skein1024-488' | 'skein1024-496' | 'skein1024-504' | 'skein1024-512' | 'skein1024-520' | 'skein1024-528' | 'skein1024-536' | 'skein1024-544' | 'skein1024-552' | 'skein1024-560' | 'skein1024-568' | 'skein1024-576' | 'skein1024-584' | 'skein1024-592' | 'skein1024-600' | 'skein1024-608' | 'skein1024-616' | 'skein1024-624' | 'skein1024-632' | 'skein1024-640' | 'skein1024-648' | 'skein1024-656' | 'skein1024-664' | 'skein1024-672' | 'skein1024-680' | 'skein1024-688' | 'skein1024-696' | 'skein1024-704' | 'skein1024-712' | 'skein1024-720' | 'skein1024-728' | 'skein1024-736' | 'skein1024-744' | 'skein1024-752' | 'skein1024-760' | 'skein1024-768' | 'skein1024-776' | 'skein1024-784' | 'skein1024-792' | 'skein1024-800' | 'skein1024-808' | 'skein1024-816' | 'skein1024-824' | 'skein1024-832' | 'skein1024-840' | 'skein1024-848' | 'skein1024-856' | 'skein1024-864' | 'skein1024-872' | 'skein1024-880' | 'skein1024-888' | 'skein1024-896' | 'skein1024-904' | 'skein1024-912' | 'skein1024-920' | 'skein1024-928' | 'skein1024-936' | 'skein1024-944' | 'skein1024-952' | 'skein1024-960' | 'skein1024-968' | 'skein1024-976' | 'skein1024-984' | 'skein1024-992' | 'skein1024-1000' | 'skein1024-1008' | 'skein1024-1016' | 'skein1024-1024' | 'poseidon-bls12_381-a2-fc1' | 'poseidon-bls12_381-a2-fc1-sc' | 'zeroxcert-imprint-256' | 'fil-commitment-unsealed' | 'fil-commitment-sealed' | 'holochain-adr-v0' | 'holochain-adr-v1' | 'holochain-key-v0' | 'holochain-key-v1' | 'holochain-sig-v0' | 'holochain-sig-v1' | 'skynet-ns';
/**
* Number for all available codecs
*/
export type CodecCode = 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x06 | 0x11 | 0x12 | 0x13 | 0x14 | 0x15 | 0x16 | 0x17 | 0x18 | 0x19 | 0x1a | 0x1b | 0x1c | 0x1d | 0x1e | 0x21 | 0x22 | 0x23 | 0x29 | 0x2a | 0x2f | 0x30 | 0x31 | 0x32 | 0x33 | 0x35 | 0x36 | 0x37 | 0x38 | 0x50 | 0x51 | 0x55 | 0x56 | 0x60 | 0x63 | 0x70 | 0x71 | 0x72 | 0x78 | 0x7b | 0x7c | 0x81 | 0x82 | 0x83 | 0x84 | 0x85 | 0x86 | 0x90 | 0x91 | 0x92 | 0x93 | 0x94 | 0x95 | 0x96 | 0x97 | 0x98 | 0xb0 | 0xb1 | 0xb2 | 0xc0 | 0xc1 | 0xce | 0xd0 | 0xd1 | 0xd4 | 0xd5 | 0xd6 | 0xe0 | 0xe1 | 0xe2 | 0xe3 | 0xe4 | 0xe5 | 0xe6 | 0xe7 | 0xea | 0xeb | 0xec | 0xed | 0xee | 0xf0 | 0xf1 | 0xfa | 0xfb | 0x0111 | 0x0113 | 0x0114 | 0x0115 | 0x0122 | 0x0129 | 0x012d | 0x012e | 0x0190 | 0x0196 | 0x01a5 | 0x01a5 | 0x01bb | 0x01bc | 0x01bd | 0x01be | 0x01bf | 0x01c0 | 0x01cc | 0x01dd | 0x01de | 0x01df | 0x01e0 | 0x0200 | 0x0201 | 0x0301 | 0x1012 | 0x1052 | 0x1053 | 0x1054 | 0x1055 | 0x1100 | 0x1200 | 0x1201 | 0x1202 | 0x1203 | 0x1204 | 0x1300 | 0x1d01 | 0x534d | 0xb201 | 0xb202 | 0xb203 | 0xb204 | 0xb205 | 0xb206 | 0xb207 | 0xb208 | 0xb209 | 0xb20a | 0xb20b | 0xb20c | 0xb20d | 0xb20e | 0xb20f | 0xb210 | 0xb211 | 0xb212 | 0xb213 | 0xb214 | 0xb215 | 0xb216 | 0xb217 | 0xb218 | 0xb219 | 0xb21a | 0xb21b | 0xb21c | 0xb21d | 0xb21e | 0xb21f | 0xb220 | 0xb221 | 0xb222 | 0xb223 | 0xb224 | 0xb225 | 0xb226 | 0xb227 | 0xb228 | 0xb229 | 0xb22a | 0xb22b | 0xb22c | 0xb22d | 0xb22e | 0xb22f | 0xb230 | 0xb231 | 0xb232 | 0xb233 | 0xb234 | 0xb235 | 0xb236 | 0xb237 | 0xb238 | 0xb239 | 0xb23a | 0xb23b | 0xb23c | 0xb23d | 0xb23e | 0xb23f | 0xb240 | 0xb241 | 0xb242 | 0xb243 | 0xb244 | 0xb245 | 0xb246 | 0xb247 | 0xb248 | 0xb249 | 0xb24a | 0xb24b | 0xb24c | 0xb24d | 0xb24e | 0xb24f | 0xb250 | 0xb251 | 0xb252 | 0xb253 | 0xb254 | 0xb255 | 0xb256 | 0xb257 | 0xb258 | 0xb259 | 0xb25a | 0xb25b | 0xb25c | 0xb25d | 0xb25e | 0xb25f | 0xb260 | 0xb301 | 0xb302 | 0xb303 | 0xb304 | 0xb305 | 0xb306 | 0xb307 | 0xb308 | 0xb309 | 0xb30a | 0xb30b | 0xb30c | 0xb30d | 0xb30e | 0xb30f | 0xb310 | 0xb311 | 0xb312 | 0xb313 | 0xb314 | 0xb315 | 0xb316 | 0xb317 | 0xb318 | 0xb319 | 0xb31a | 0xb31b | 0xb31c | 0xb31d | 0xb31e | 0xb31f | 0xb320 | 0xb321 | 0xb322 | 0xb323 | 0xb324 | 0xb325 | 0xb326 | 0xb327 | 0xb328 | 0xb329 | 0xb32a | 0xb32b | 0xb32c | 0xb32d | 0xb32e | 0xb32f | 0xb330 | 0xb331 | 0xb332 | 0xb333 | 0xb334 | 0xb335 | 0xb336 | 0xb337 | 0xb338 | 0xb339 | 0xb33a | 0xb33b | 0xb33c | 0xb33d | 0xb33e | 0xb33f | 0xb340 | 0xb341 | 0xb342 | 0xb343 | 0xb344 | 0xb345 | 0xb346 | 0xb347 | 0xb348 | 0xb349 | 0xb34a | 0xb34b | 0xb34c | 0xb34d | 0xb34e | 0xb34f | 0xb350 | 0xb351 | 0xb352 | 0xb353 | 0xb354 | 0xb355 | 0xb356 | 0xb357 | 0xb358 | 0xb359 | 0xb35a | 0xb35b | 0xb35c | 0xb35d | 0xb35e | 0xb35f | 0xb360 | 0xb361 | 0xb362 | 0xb363 | 0xb364 | 0xb365 | 0xb366 | 0xb367 | 0xb368 | 0xb369 | 0xb36a | 0xb36b | 0xb36c | 0xb36d | 0xb36e | 0xb36f | 0xb370 | 0xb371 | 0xb372 | 0xb373 | 0xb374 | 0xb375 | 0xb376 | 0xb377 | 0xb378 | 0xb379 | 0xb37a | 0xb37b | 0xb37c | 0xb37d | 0xb37e | 0xb37f | 0xb380 | 0xb381 | 0xb382 | 0xb383 | 0xb384 | 0xb385 | 0xb386 | 0xb387 | 0xb388 | 0xb389 | 0xb38a | 0xb38b | 0xb38c | 0xb38d | 0xb38e | 0xb38f | 0xb390 | 0xb391 | 0xb392 | 0xb393 | 0xb394 | 0xb395 | 0xb396 | 0xb397 | 0xb398 | 0xb399 | 0xb39a | 0xb39b | 0xb39c | 0xb39d | 0xb39e | 0xb39f | 0xb3a0 | 0xb3a1 | 0xb3a2 | 0xb3a3 | 0xb3a4 | 0xb3a5 | 0xb3a6 | 0xb3a7 | 0xb3a8 | 0xb3a9 | 0xb3aa | 0xb3ab | 0xb3ac | 0xb3ad | 0xb3ae | 0xb3af | 0xb3b0 | 0xb3b1 | 0xb3b2 | 0xb3b3 | 0xb3b4 | 0xb3b5 | 0xb3b6 | 0xb3b7 | 0xb3b8 | 0xb3b9 | 0xb3ba | 0xb3bb | 0xb3bc | 0xb3bd | 0xb3be | 0xb3bf | 0xb3c0 | 0xb3c1 | 0xb3c2 | 0xb3c3 | 0xb3c4 | 0xb3c5 | 0xb3c6 | 0xb3c7 | 0xb3c8 | 0xb3c9 | 0xb3ca | 0xb3cb | 0xb3cc | 0xb3cd | 0xb3ce | 0xb3cf | 0xb3d0 | 0xb3d1 | 0xb3d2 | 0xb3d3 | 0xb3d4 | 0xb3d5 | 0xb3d6 | 0xb3d7 | 0xb3d8 | 0xb3d9 | 0xb3da | 0xb3db | 0xb3dc | 0xb3dd | 0xb3de | 0xb3df | 0xb3e0 | 0xb401 | 0xb402 | 0xce11 | 0xf101 | 0xf102 | 0x807124 | 0x817124 | 0x947124 | 0x957124 | 0xa27124 | 0xa37124 | 0xb19910
export type ConstantCodeMap = Record<CodecConstant, CodecCode>
export type NameUint8ArrayMap = Record<CodecName, Uint8Array>
export type CodeNameMap = Record<CodecCode, CodecName>
export type NameCodeMap = Record<CodecName, CodecCode>
export declare type CodecNumber = 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x06 | 0x11 | 0x12 | 0x13 | 0x14 | 0x15 | 0x16 | 0x17 | 0x18 | 0x19 | 0x1a | 0x1b | 0x1c | 0x1d | 0x1e | 0x21 | 0x22 | 0x23 | 0x29 | 0x2a | 0x2f | 0x30 | 0x31 | 0x32 | 0x33 | 0x35 | 0x36 | 0x37 | 0x38 | 0x50 | 0x51 | 0x55 | 0x56 | 0x60 | 0x63 | 0x70 | 0x71 | 0x72 | 0x78 | 0x7b | 0x7c | 0x81 | 0x82 | 0x83 | 0x84 | 0x85 | 0x86 | 0x90 | 0x91 | 0x92 | 0x93 | 0x94 | 0x95 | 0x96 | 0x97 | 0x98 | 0xb0 | 0xb1 | 0xb2 | 0xc0 | 0xc1 | 0xce | 0xd0 | 0xd1 | 0xd4 | 0xd5 | 0xd6 | 0xe0 | 0xe1 | 0xe2 | 0xe3 | 0xe4 | 0xe5 | 0xe6 | 0xe7 | 0xea | 0xeb | 0xec | 0xed | 0xee | 0xf0 | 0xf1 | 0xfa | 0xfb | 0x0111 | 0x0113 | 0x0114 | 0x0115 | 0x0122 | 0x0129 | 0x012d | 0x012e | 0x0190 | 0x01a5 | 0x01a5 | 0x01bb | 0x01bc | 0x01bd | 0x01be | 0x01bf | 0x01c0 | 0x01cc | 0x01dd | 0x01de | 0x01df | 0x01e0 | 0x0200 | 0x0201 | 0x0301 | 0x1012 | 0x1052 | 0x1053 | 0x1054 | 0x1055 | 0x1100 | 0x1200 | 0x1201 | 0x1202 | 0x1203 | 0x1204 | 0x1300 | 0x1d01 | 0x534d | 0xb201 | 0xb202 | 0xb203 | 0xb204 | 0xb205 | 0xb206 | 0xb207 | 0xb208 | 0xb209 | 0xb20a | 0xb20b | 0xb20c | 0xb20d | 0xb20e | 0xb20f | 0xb210 | 0xb211 | 0xb212 | 0xb213 | 0xb214 | 0xb215 | 0xb216 | 0xb217 | 0xb218 | 0xb219 | 0xb21a | 0xb21b | 0xb21c | 0xb21d | 0xb21e | 0xb21f | 0xb220 | 0xb221 | 0xb222 | 0xb223 | 0xb224 | 0xb225 | 0xb226 | 0xb227 | 0xb228 | 0xb229 | 0xb22a | 0xb22b | 0xb22c | 0xb22d | 0xb22e | 0xb22f | 0xb230 | 0xb231 | 0xb232 | 0xb233 | 0xb234 | 0xb235 | 0xb236 | 0xb237 | 0xb238 | 0xb239 | 0xb23a | 0xb23b | 0xb23c | 0xb23d | 0xb23e | 0xb23f | 0xb240 | 0xb241 | 0xb242 | 0xb243 | 0xb244 | 0xb245 | 0xb246 | 0xb247 | 0xb248 | 0xb249 | 0xb24a | 0xb24b | 0xb24c | 0xb24d | 0xb24e | 0xb24f | 0xb250 | 0xb251 | 0xb252 | 0xb253 | 0xb254 | 0xb255 | 0xb256 | 0xb257 | 0xb258 | 0xb259 | 0xb25a | 0xb25b | 0xb25c | 0xb25d | 0xb25e | 0xb25f | 0xb260 | 0xb301 | 0xb302 | 0xb303 | 0xb304 | 0xb305 | 0xb306 | 0xb307 | 0xb308 | 0xb309 | 0xb30a | 0xb30b | 0xb30c | 0xb30d | 0xb30e | 0xb30f | 0xb310 | 0xb311 | 0xb312 | 0xb313 | 0xb314 | 0xb315 | 0xb316 | 0xb317 | 0xb318 | 0xb319 | 0xb31a | 0xb31b | 0xb31c | 0xb31d | 0xb31e | 0xb31f | 0xb320 | 0xb321 | 0xb322 | 0xb323 | 0xb324 | 0xb325 | 0xb326 | 0xb327 | 0xb328 | 0xb329 | 0xb32a | 0xb32b | 0xb32c | 0xb32d | 0xb32e | 0xb32f | 0xb330 | 0xb331 | 0xb332 | 0xb333 | 0xb334 | 0xb335 | 0xb336 | 0xb337 | 0xb338 | 0xb339 | 0xb33a | 0xb33b | 0xb33c | 0xb33d | 0xb33e | 0xb33f | 0xb340 | 0xb341 | 0xb342 | 0xb343 | 0xb344 | 0xb345 | 0xb346 | 0xb347 | 0xb348 | 0xb349 | 0xb34a | 0xb34b | 0xb34c | 0xb34d | 0xb34e | 0xb34f | 0xb350 | 0xb351 | 0xb352 | 0xb353 | 0xb354 | 0xb355 | 0xb356 | 0xb357 | 0xb358 | 0xb359 | 0xb35a | 0xb35b | 0xb35c | 0xb35d | 0xb35e | 0xb35f | 0xb360 | 0xb361 | 0xb362 | 0xb363 | 0xb364 | 0xb365 | 0xb366 | 0xb367 | 0xb368 | 0xb369 | 0xb36a | 0xb36b | 0xb36c | 0xb36d | 0xb36e | 0xb36f | 0xb370 | 0xb371 | 0xb372 | 0xb373 | 0xb374 | 0xb375 | 0xb376 | 0xb377 | 0xb378 | 0xb379 | 0xb37a | 0xb37b | 0xb37c | 0xb37d | 0xb37e | 0xb37f | 0xb380 | 0xb381 | 0xb382 | 0xb383 | 0xb384 | 0xb385 | 0xb386 | 0xb387 | 0xb388 | 0xb389 | 0xb38a | 0xb38b | 0xb38c | 0xb38d | 0xb38e | 0xb38f | 0xb390 | 0xb391 | 0xb392 | 0xb393 | 0xb394 | 0xb395 | 0xb396 | 0xb397 | 0xb398 | 0xb399 | 0xb39a | 0xb39b | 0xb39c | 0xb39d | 0xb39e | 0xb39f | 0xb3a0 | 0xb3a1 | 0xb3a2 | 0xb3a3 | 0xb3a4 | 0xb3a5 | 0xb3a6 | 0xb3a7 | 0xb3a8 | 0xb3a9 | 0xb3aa | 0xb3ab | 0xb3ac | 0xb3ad | 0xb3ae | 0xb3af | 0xb3b0 | 0xb3b1 | 0xb3b2 | 0xb3b3 | 0xb3b4 | 0xb3b5 | 0xb3b6 | 0xb3b7 | 0xb3b8 | 0xb3b9 | 0xb3ba | 0xb3bb | 0xb3bc | 0xb3bd | 0xb3be | 0xb3bf | 0xb3c0 | 0xb3c1 | 0xb3c2 | 0xb3c3 | 0xb3c4 | 0xb3c5 | 0xb3c6 | 0xb3c7 | 0xb3c8 | 0xb3c9 | 0xb3ca | 0xb3cb | 0xb3cc | 0xb3cd | 0xb3ce | 0xb3cf | 0xb3d0 | 0xb3d1 | 0xb3d2 | 0xb3d3 | 0xb3d4 | 0xb3d5 | 0xb3d6 | 0xb3d7 | 0xb3d8 | 0xb3d9 | 0xb3da | 0xb3db | 0xb3dc | 0xb3dd | 0xb3de | 0xb3df | 0xb3e0 | 0xb401 | 0xb402 | 0xce11 | 0xf101 | 0xf102 | 0x807124 | 0x817124 | 0x947124 | 0x957124 | 0xa27124 | 0xa37124 | 0xb19910;
export declare type ConstantNumberMap = Record<CodecConstant, CodecNumber>;
export declare type NameUint8ArrayMap = Record<CodecName, Uint8Array>;
export declare type NumberNameMap = Record<CodecNumber, CodecName>;
export declare type NameNumberMap = Record<CodecName, CodecNumber>;
//# sourceMappingURL=generated-types.d.ts.map

@@ -1,17 +0,5 @@

/**
* @param {number} num
*/
export function numberToUint8Array(num: number): Uint8Array;
/**
* @param {Uint8Array} buf
*/
export function uint8ArrayToNumber(buf: Uint8Array): number;
/**
* @param {Uint8Array} input
*/
export function varintUint8ArrayEncode(input: Uint8Array): Uint8Array;
/**
* @param {number} num
*/
export function varintEncode(num: number): Uint8Array;
export function numberToUint8Array(num: any): any;
export function uint8ArrayToNumber(buf: any): number;
export function varintUint8ArrayEncode(input: any): Uint8Array;
export function varintEncode(num: any): Uint8Array;
//# sourceMappingURL=util.d.ts.map
{
"name": "multicodec",
"version": "2.1.2",
"version": "2.1.3",
"description": "JavaScript implementation of the multicodec specification",

@@ -26,2 +26,4 @@ "leadMaintainer": "Henrique Dias <hacdias@gmail.com>",

"release-major": "aegir release --type major",
"coverage": "aegir coverage",
"coverage-publish": "aegir coverage --provider coveralls",
"update-table": "node tools/update-table.js"

@@ -52,28 +54,19 @@ },

"dependencies": {
"uint8arrays": "^2.1.3",
"varint": "^5.0.2"
"uint8arrays": "1.1.0",
"varint": "^6.0.0"
},
"devDependencies": {
"@types/varint": "^5.0.0",
"aegir": "^31.0.1",
"aegir": "^29.2.2",
"bent": "^7.3.12",
"pre-push": "~0.1.1"
},
"eslintConfig": {
"extends": "ipfs"
},
"aegir": {
"build": {
"bundlesizeMax": "6.7kB"
}
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
"Henrique Dias <hacdias@gmail.com>",
"David Dias <daviddias.p@gmail.com>",
"Volker Mische <volker.mische@gmail.com>",
"Mikeal Rogers <mikeal.rogers@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Hugo Dias <hugomrdias@gmail.com>",
"wanderer <mjbecze@gmail.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Hugo Dias <hugomrdias@gmail.com>",
"Rod Vagg <rod@vagg.org>",

@@ -80,0 +73,0 @@ "achingbrain <alex@achingbrain.net>",

@@ -48,3 +48,3 @@ # js-multicodec <!-- omit in toc -->

// To get the string representation of a codec, e.g. for error messages:
console.log(multicodec.getNameFromCode(113))
console.log(multicodec.print[113])
// dag-cbor

@@ -51,0 +51,0 @@ ```

@@ -15,8 +15,9 @@ /**

/** @typedef {import('./generated-types').CodecName} CodecName */
/** @typedef {import('./generated-types').CodecCode} CodecCode */
/** @typedef {import('./generated-types').CodecNumber} CodecNumber */
const varint = require('varint')
const intTable = require('./int-table')
const codecNameToCodeVarint = require('./varint-table')
const util = require('./util')
const uint8ArrayConcat = require('uint8arrays/concat')
const util = require('./util')
const { nameToVarint, constantToCode, nameToCode, codeToName } = require('./maps')

@@ -36,4 +37,4 @@ /**

} else {
if (nameToVarint[multicodecStrOrCode]) {
prefix = nameToVarint[multicodecStrOrCode]
if (codecNameToCodeVarint[multicodecStrOrCode]) {
prefix = codecNameToCodeVarint[multicodecStrOrCode]
} else {

@@ -43,3 +44,2 @@ throw new Error('multicodec not recognized')

}
return uint8ArrayConcat([prefix, data], prefix.length + data.length)

@@ -55,3 +55,3 @@ }

function rmPrefix (data) {
varint.decode(/** @type {Buffer} */(data))
varint.decode(data)
return data.slice(varint.decode.bytes)

@@ -61,3 +61,3 @@ }

/**
* Get the codec name of the prefixed data.
* Get the codec of the prefixed data.
*

@@ -67,19 +67,19 @@ * @param {Uint8Array} prefixedData

*/
function getNameFromData (prefixedData) {
const code = /** @type {CodecCode} */(varint.decode(/** @type {Buffer} */(prefixedData)))
const name = codeToName[code]
if (name === undefined) {
throw new Error(`Code "${code}" not found`)
function getCodec (prefixedData) {
const code = varint.decode(prefixedData)
const codecName = intTable.get(code)
if (codecName === undefined) {
throw new Error(`Code ${code} not found`)
}
return name
return codecName
}
/**
* Get the codec name from a code.
* Get the name of the codec.
*
* @param {CodecCode} codec
* @returns {CodecName}
* @param {CodecNumber} codec
* @returns {CodecName|undefined}
*/
function getNameFromCode (codec) {
return codeToName[codec]
function getName (codec) {
return intTable.get(codec)
}

@@ -91,10 +91,10 @@

* @param {CodecName} name
* @returns {CodecCode}
* @returns {CodecNumber}
*/
function getCodeFromName (name) {
const code = nameToCode[name]
function getNumber (name) {
const code = codecNameToCodeVarint[name]
if (code === undefined) {
throw new Error(`Codec "${name}" not found`)
throw new Error('Codec `' + name + '` not found')
}
return code
return varint.decode(code)
}

@@ -106,6 +106,6 @@

* @param {Uint8Array} prefixedData
* @returns {CodecCode}
* @returns {CodecNumber}
*/
function getCodeFromData (prefixedData) {
return /** @type {CodecCode} */(varint.decode(/** @type {Buffer} */(prefixedData)))
function getCode (prefixedData) {
return varint.decode(prefixedData)
}

@@ -116,9 +116,9 @@

*
* @param {CodecName} name
* @param {CodecName} codecName
* @returns {Uint8Array}
*/
function getVarintFromName (name) {
const code = nameToVarint[name]
function getCodeVarint (codecName) {
const code = codecNameToCodeVarint[codecName]
if (code === undefined) {
throw new Error(`Codec "${name}" not found`)
throw new Error('Codec `' + codecName + '` not found')
}

@@ -131,85 +131,18 @@ return code

*
* @param {CodecCode} code
* @returns {Uint8Array}
* @param {CodecNumber} code
* @returns {Array.<number>}
*/
function getVarintFromCode (code) {
return util.varintEncode(code)
function getVarint (code) {
return varint.encode(code)
}
/**
* Get the codec name of the prefixed data.
*
* @deprecated use getNameFromData instead.
* @param {Uint8Array} prefixedData
* @returns {CodecName}
*/
function getCodec (prefixedData) {
return getNameFromData(prefixedData)
}
// Make the constants top-level constants
const constants = require('./constants')
/**
* Get the codec name from a code.
*
* @deprecated use getNameFromCode instead.
* @param {CodecCode} codec
* @returns {CodecName}
*/
function getName (codec) {
return getNameFromCode(codec)
}
// Human friendly names for printing, e.g. in error messages
const print = require('./print')
/**
* Get the code of the codec
*
* @deprecated use getCodeFromName instead.
* @param {CodecName} name
* @returns {CodecCode}
*/
function getNumber (name) {
return getCodeFromName(name)
}
/**
* Get the code of the prefixed data.
*
* @deprecated use getCodeFromData instead.
* @param {Uint8Array} prefixedData
* @returns {CodecCode}
*/
function getCode (prefixedData) {
return getCodeFromData(prefixedData)
}
/**
* Get the code as varint of a codec name.
*
* @deprecated use getVarintFromName instead.
* @param {CodecName} name
* @returns {Uint8Array}
*/
function getCodeVarint (name) {
return getVarintFromName(name)
}
/**
* Get the varint of a code.
*
* @deprecated use getVarintFromCode instead.
* @param {CodecCode} code
* @returns {Array.<number>}
*/
function getVarint (code) {
return Array.from(getVarintFromCode(code))
}
module.exports = {
addPrefix,
rmPrefix,
getNameFromData,
getNameFromCode,
getCodeFromName,
getCodeFromData,
getVarintFromName,
getVarintFromCode,
// Deprecated
getCodec,

@@ -221,8 +154,4 @@ getName,

getVarint,
// Make the constants top-level constants
...constantToCode,
// Export the maps
nameToVarint,
nameToCode,
codeToName
print,
...constants
}

@@ -14,5 +14,2 @@ 'use strict'

/**
* @param {Uint8Array} buf
*/
function uint8ArrayToNumber (buf) {

@@ -22,5 +19,2 @@ return parseInt(uint8ArrayToString(buf, 'base16'), 16)

/**
* @param {number} num
*/
function numberToUint8Array (num) {

@@ -34,5 +28,2 @@ let hexString = num.toString(16)

/**
* @param {Uint8Array} input
*/
function varintUint8ArrayEncode (input) {

@@ -42,7 +33,4 @@ return Uint8Array.from(varint.encode(uint8ArrayToNumber(input)))

/**
* @param {number} num
*/
function varintEncode (num) {
return Uint8Array.from(varint.encode(num))
}

@@ -35,3 +35,3 @@ 'use strict'

*/
export type CodecConstant = ${names.map(n => `${n.toUpperCase().replace(/-/g, '_')}`).join(' | ')}
export type CodecConstant = ${names.map(n => `${n.toUpperCase().replace(/-/g, '_')}`).join(' | ')};

@@ -41,3 +41,3 @@ /**

*/
export type CodecName = ${names.join(' | ')}
export type CodecName = ${names.join(' | ')};

@@ -47,8 +47,8 @@ /**

*/
export type CodecCode = ${codes.join(' | ')}
export type CodecNumber = ${codes.join(' | ')};
export type ConstantCodeMap = Record<CodecConstant, CodecCode>
export type ConstantNumberMap = Record<CodecConstant, CodecNumber>
export type NameUint8ArrayMap = Record<CodecName, Uint8Array>
export type CodeNameMap = Record<CodecCode, CodecName>
export type NameCodeMap = Record<CodecName, CodecCode>
export type NumberNameMap = Record<CodecNumber, CodecName>
export type NameNumberMap = Record<CodecName, CodecNumber>
`

@@ -61,3 +61,3 @@

/**
* @type {import('./generated-types').NameCodeMap}
* @type {import('./generated-types').NameNumberMap}
*/

@@ -71,6 +71,6 @@ const baseTable = Object.freeze({

fs.writeFileSync(path.join(__dirname, '../src/generated-types.d.ts'), typesTemplate)
fs.writeFileSync(path.join(__dirname, '../src/generated-table.js'), tableTemplate)
fs.writeFileSync(path.join(__dirname, '../src/generated-types.ts'), typesTemplate)
fs.writeFileSync(path.join(__dirname, '../src/base-table.js'), tableTemplate)
}
run()

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc