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

cids

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cids - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

9

CHANGELOG.md

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

## [1.1.1](https://github.com/multiformats/js-cid/compare/v1.1.0...v1.1.1) (2020-12-11)
### Bug Fixes
* allow CIDs to be compared through deep equality ([127745e](https://github.com/multiformats/js-cid/commit/127745ea90bbeecc80c0bd1f58d24660d832ba14)), closes [#131](https://github.com/multiformats/js-cid/issues/131)
# [1.1.0](https://github.com/multiformats/js-cid/compare/v1.0.2...v1.1.0) (2020-12-11)

@@ -2,0 +11,0 @@

2

dist/index.min.js

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

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Cids=n():e.Cids=n()}(self,(function(){return function(e){var n={};function s(i){if(n[i])return n[i].exports;var t=n[i]={i:i,l:!1,exports:{}};return e[i].call(t.exports,t,t.exports,s),t.l=!0,t.exports}return s.m=e,s.c=n,s.d=function(e,n,i){s.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,n){if(1&n&&(e=s(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)s.d(i,t,function(n){return e[n]}.bind(null,t));return i},s.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(n,"a",n),n},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},s.p="",s(s.s=10)}([function(e,n,s){"use strict";const i=s(12),t=s(13),r=s(14),{decodeText:o,encodeText:k}=s(3),a=[["identity","\0",()=>({encode:o,decode:k}),""],["base2","0",r(1),"01"],["base8","7",r(3),"01234567"],["base10","9",i,"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",i,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",i,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",i,"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 t(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,s){"use strict";n.TextEncoder=TextEncoder,n.TextDecoder=TextDecoder},function(e){e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"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,"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,"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,"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":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"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}')},function(e,n,s){"use strict";const{TextEncoder:i,TextDecoder:t}=s(1),r=new t,o=new i;e.exports={decodeText:e=>r.decode(e),encodeText:e=>o.encode(e),concat:function(e,n){const s=new Uint8Array(n);let i=0;for(const t of e)s.set(t,i),i+=t.length;return s}}},function(e,n,s){"use strict";e.exports={encode:s(15),decode:s(16),encodingLength:s(17)}},function(e,n,s){"use strict";const i=s(6),t=s(4),{names:r}=s(18),o=s(7),k=s(19),a=s(8),c={};for(const l in r)c[r[l]]=l;function b(e){n.decode(e)}n.names=r,n.codes=Object.freeze(c),n.toHexString=function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return o(e,"base16")},n.fromHexString=function(e){return k(e,"base16")},n.toB58String=function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return o(i.encode("base58btc",e)).slice(1)},n.fromB58String=function(e){const n=e instanceof Uint8Array?o(e):e;return i.decode("z"+n)},n.decode=function(e){if(!(e instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");const s=t.decode(e);if(!n.isValidCode(s))throw new Error("multihash unknown function code: 0x"+s.toString(16));e=e.slice(t.decode.bytes);const i=t.decode(e);if(i<0)throw new Error("multihash invalid length: "+i);if((e=e.slice(t.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x"+o(e,"base16"));return{code:s,name:c[s],length:i,digest:e}},n.encode=function(e,s,i){if(!e||void 0===s)throw new Error("multihash encode requires at least two args: digest, code");const r=n.coerceCode(s);if(!(e instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");const o=t.encode(r),k=t.encode(i);return a([o,k,e],o.length+k.length+e.length)},n.coerceCode=function(e){let s=e;if("string"==typeof e){if(void 0===r[e])throw new Error("Unrecognized hash function named: "+e);s=r[e]}if("number"!=typeof s)throw new Error("Hash function code should be a number. Got: "+s);if(void 0===c[s]&&!n.isAppCode(s))throw new Error("Unrecognized function code: "+s);return s},n.isAppCode=function(e){return e>0&&e<16},n.isValidCode=function(e){return!!n.isAppCode(e)||!!c[e]},n.validate=b,n.prefix=function(e){return b(e),e.subarray(0,2)}},function(e,n,s){"use strict";const i=s(0),{encodeText:t,decodeText:r,concat:o}=s(3);function k(e){if(i.names[e])return i.names[e];if(i.codes[e])return i.codes[e];throw new Error("Unsupported encoding: "+e)}(n=e.exports=function(e,n){if(!n)throw new Error("requires an encoded Uint8Array");const{name:s,codeBuf:i}=k(e);return function(e,n){k(e).decode(r(n))}(s,n),o([i,n],i.length+n.length)}).encode=function(e,n){const s=k(e),i=t(s.encode(n));return o([s.codeBuf,i],s.codeBuf.length+i.length)},n.decode=function(e){e instanceof Uint8Array&&(e=r(e));const n=e[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(n)&&(e=e.toLowerCase()),k(e[0]).decode(e.substring(1))},n.isEncoded=function(e){if(e instanceof Uint8Array&&(e=r(e)),"[object String]"!==Object.prototype.toString.call(e))return!1;try{return k(e[0]).name}catch(n){return!1}},n.encoding=k,n.encodingFromData=function(e){return e instanceof Uint8Array&&(e=r(e)),k(e[0])},n.names=Object.freeze(i.names),n.codes=Object.freeze(i.codes)},function(e,n,s){"use strict";const{names:i}=s(0),{TextDecoder:t}=s(1),r=new t("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 s=0;s<e.length;s++)n+=String.fromCharCode(e[s]);return n}(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.encode(e)}},function(e,n,s){"use strict";e.exports=function(e,n){n||(n=e.reduce((e,n)=>e+n.length,0));const s=new Uint8Array(n);let i=0;for(const t of e)s.set(t,i),i+=t.length;return s}},function(e,n,s){"use strict";const i=s(4),t=s(23),r=s(24);function o(e){return parseInt(t(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(i.encode(o(e)))},varintEncode:function(e){return Uint8Array.from(i.encode(e))}}},function(e,n,s){e.exports=s(11)},function(e,n,s){"use strict";const i=s(5),t=s(6),r=s(20),o=s(2),k=s(28),a=s(8),c=s(7),b=s(29),l=Object.keys(o).reduce((e,n)=>(e[o[n]]=n,e),{}),u=Symbol.for("@ipld/js-cid/CID");class d{constructor(e,n,s,o){if(Object.defineProperty(this,u,{value:!0}),d.isCID(e)){const n=e;return this.version=n.version,this.codec=n.codec,this.multihash=n.multihash,void(this.multibaseName=n.multibaseName||(0===n.version?"base58btc":"base32"))}if("string"==typeof e){const n=t.isEncoded(e);if(n){const s=t.decode(e);this.version=parseInt(s[0].toString(),16),this.codec=r.getCodec(s.slice(1)),this.multihash=r.rmPrefix(s.slice(1)),this.multibaseName=n}else this.version=0,this.codec="dag-pb",this.multihash=i.fromB58String(e),this.multibaseName="base58btc";return d.validateCID(this),void(this.string=e)}if(e instanceof Uint8Array){const n=parseInt(e[0].toString(),16);if(1===n){const s=e;this.version=n,this.codec=r.getCodec(s.slice(1)),this.multihash=r.rmPrefix(s.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";d.validateCID(this)}else this.version=e,"number"==typeof n&&(n=l[n]),this.codec=n,this.multihash=s,this.multibaseName=o||(0===e?"base58btc":"base32"),d.validateCID(this)}get bytes(){let e=this._bytes;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");{const n=r.getCodeVarint(this.codec);e=a([[1],n,this.multihash],1+n.byteLength+this.multihash.byteLength)}}this._bytes=e}return e}get prefix(){const e=r.getCodeVarint(this.codec),n=i.prefix(this.multihash);return a([[this.version],e,n],1+e.byteLength+n.byteLength)}get code(){return o[this.codec]}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:n}=i.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==n)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new d(0,this.codec,this.multihash)}toV1(){return new d(1,this.codec,this.multihash)}toBaseEncodedString(e=this.multibaseName){if(this.string&&0!==this.string.length&&e===this.multibaseName)return this.string;let n;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");n=i.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");n=c(t.encode(e,this.bytes))}return e===this.multibaseName&&(this.string=n),n}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&b(this.multihash,e.multihash)}static validateCID(e){const n=k.checkCIDComponents(e);if(n)throw new Error(n)}static isCID(e){return e instanceof d||Boolean(e&&e[u])}}d.codecs=o,e.exports=d},function(e,n,s){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),s=0;s<n.length;s++)n[s]=255;for(var i=0;i<e.length;i++){var t=e.charAt(i),r=t.charCodeAt(0);if(255!==n[r])throw new TypeError(t+" is ambiguous");n[r]=i}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 s=0;if(" "!==e[s]){for(var i=0,t=0;e[s]===k;)i++,s++;for(var r=(e.length-s)*a+1>>>0,c=new Uint8Array(r);e[s];){var b=n[e.charCodeAt(s)];if(255===b)return;for(var l=0,u=r-1;(0!==b||l<t)&&-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");t=l,s++}if(" "!==e[s]){for(var d=r-t;d!==r&&0===c[d];)d++;for(var h=new Uint8Array(i+(r-d)),f=i;d!==r;)h[f++]=c[d++];return h}}}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 s=0,i=0,t=0,r=n.length;t!==r&&0===n[t];)t++,s++;for(var a=(r-t)*c+1>>>0,b=new Uint8Array(a);t!==r;){for(var l=n[t],u=0,d=a-1;(0!==l||u<i)&&-1!==d;d--,u++)l+=256*b[d]>>>0,b[d]=l%o>>>0,l=l/o>>>0;if(0!==l)throw new Error("Non-zero carry");i=u,t++}for(var h=a-i;h!==a&&0===b[h];)h++;for(var f=k.repeat(s);h<a;++h)f+=e.charAt(b[h]);return f},decodeUnsafe:b,decode:function(e){var n=b(e);if(n)return n;throw new Error("Non-base"+o+" character")}}}},function(e,n,s){"use strict";const{encodeText:i}=s(3);e.exports=class{constructor(e,n,s,t){this.name=e,this.code=n,this.codeBuf=i(this.code),this.alphabet=t,this.engine=s(t)}encode(e){return this.engine.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.engine.decode(e)}}},function(e,n,s){"use strict";e.exports=e=>n=>({encode:s=>((e,n,s)=>{const i="="===n[n.length-1],t=(1<<s)-1;let r="",o=0,k=0;for(let a=0;a<e.length;++a)for(k=k<<8|e[a],o+=8;o>s;)o-=s,r+=n[t&k>>o];if(o&&(r+=n[t&k<<s-o]),i)for(;r.length*s&7;)r+="=";return r})(s,n,e),decode:s=>((e,n,s)=>{const i={};for(let c=0;c<n.length;++c)i[n[c]]=c;let t=e.length;for(;"="===e[t-1];)--t;const r=new Uint8Array(t*s/8|0);let o=0,k=0,a=0;for(let c=0;c<t;++c){const n=i[e[c]];if(void 0===n)throw new SyntaxError("Invalid character "+e[c]);k=k<<s|n,o+=s,o>=8&&(o-=8,r[a++]=255&k>>o)}if(o>=s||255&k<<8-o)throw new SyntaxError("Unexpected end of data");return r})(s,n,e)})},function(e,n,s){"use strict";e.exports=function e(n,s,t){s=s||[];var r=t=t||0;for(;n>=i;)s[t++]=255&n|128,n/=128;for(;-128&n;)s[t++]=255&n|128,n>>>=7;return s[t]=0|n,e.bytes=t-r+1,s};var i=Math.pow(2,31)},function(e,n,s){"use strict";e.exports=function e(n,s){var i,t=0,r=0,o=s=s||0,k=n.length;do{if(o>=k)throw e.bytes=0,new RangeError("Could not decode varint");i=n[o++],t+=r<28?(127&i)<<r:(127&i)*Math.pow(2,r),r+=7}while(i>=128);return e.bytes=o-s,t}},function(e,n,s){"use strict";var i=Math.pow(2,7),t=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<i?1:e<t?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,s){"use strict";const i=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});e.exports={names:i}},function(e,n,s){"use strict";const{names:i}=s(0),{TextEncoder:t}=s(1),r=new t;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 s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n}(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.decode(e)}},function(e,n,s){"use strict";const i=s(4),t=s(21),r=s(22),o=s(9),k=s(25);(n=e.exports).addPrefix=(e,n)=>{let s;if(e instanceof Uint8Array)s=o.varintUint8ArrayEncode(e);else{if(!r[e])throw new Error("multicodec not recognized");s=r[e]}return k([s,n],s.length+n.length)},n.rmPrefix=e=>(i.decode(e),e.slice(i.decode.bytes)),n.getCodec=e=>{const n=i.decode(e),s=t.get(n);if(void 0===s)throw new Error(`Code ${n} not found`);return s},n.getName=e=>t.get(e),n.getNumber=e=>{const n=r[e];if(void 0===n)throw new Error("Codec `"+e+"` not found");return i.decode(n)},n.getCode=e=>i.decode(e),n.getCodeVarint=e=>{const n=r[e];if(void 0===n)throw new Error("Codec `"+e+"` not found");return n},n.getVarint=e=>i.encode(e);const a=s(26);Object.assign(n,a),n.print=s(27)},function(e,n,s){"use strict";const i=s(2),t=new Map;for(const r in i){const e=i[r];t.set(e,r)}e.exports=Object.freeze(t)},function(e,n,s){"use strict";const i=s(2),t=s(9).varintEncode,r={};for(const o in i){const e=i[o];r[o]=t(e)}e.exports=Object.freeze(r)},function(e,n,s){"use strict";const{names:i}=s(0),{TextDecoder:t}=s(1),r=new t("utf8");e.exports=function(e,n="utf8"){if("utf8"===n||"utf-8"===n)return r.decode(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.encode(e)}},function(e,n,s){"use strict";const{names:i}=s(0),{TextEncoder:t}=s(1),r=new t;e.exports=function(e,n="utf8"){if("utf8"===n||"utf-8"===n)return r.encode(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.decode(e)}},function(e,n,s){"use strict";e.exports=function(e,n){n||(n=e.reduce((e,n)=>e+n.length,0));const s=new Uint8Array(n);let i=0;for(const t of e)s.set(t,i),i+=t.length;return s}},function(e,n,s){"use strict";const i=s(2),t={};for(const[r,o]of Object.entries(i))t[r.toUpperCase().replace(/-/g,"_")]=o;e.exports=Object.freeze(t)},function(e,n,s){"use strict";const i=s(2),t={};for(const[r,o]of Object.entries(i))void 0===t[o]&&(t[o]=r);e.exports=Object.freeze(t)},function(e,n,s){"use strict";const i=s(5),t={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!(e.multihash instanceof Uint8Array))return"multihash must be a Uint8Array";try{i.validate(e.multihash)}catch(n){let e=n.message;return e||(e="Multihash validation failed"),e}}};e.exports=t},function(e,n,s){"use strict";e.exports=function(e,n){if(e===n)return!0;if(e.byteLength!==n.byteLength)return!1;for(let s=0;s<e.byteLength;s++)if(e[s]!==n[s])return!1;return!0}}])}));
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Cids=n():e.Cids=n()}(self,(function(){return function(e){var n={};function s(i){if(n[i])return n[i].exports;var t=n[i]={i:i,l:!1,exports:{}};return e[i].call(t.exports,t,t.exports,s),t.l=!0,t.exports}return s.m=e,s.c=n,s.d=function(e,n,i){s.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,n){if(1&n&&(e=s(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)s.d(i,t,function(n){return e[n]}.bind(null,t));return i},s.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(n,"a",n),n},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},s.p="",s(s.s=10)}([function(e,n,s){"use strict";const i=s(12),t=s(13),r=s(14),{decodeText:o,encodeText:k}=s(3),a=[["identity","\0",()=>({encode:o,decode:k}),""],["base2","0",r(1),"01"],["base8","7",r(3),"01234567"],["base10","9",i,"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",i,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",i,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",i,"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 t(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,s){"use strict";n.TextEncoder=TextEncoder,n.TextDecoder=TextDecoder},function(e){e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"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,"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,"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,"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":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"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}')},function(e,n,s){"use strict";const{TextEncoder:i,TextDecoder:t}=s(1),r=new t,o=new i;e.exports={decodeText:e=>r.decode(e),encodeText:e=>o.encode(e),concat:function(e,n){const s=new Uint8Array(n);let i=0;for(const t of e)s.set(t,i),i+=t.length;return s}}},function(e,n,s){"use strict";e.exports={encode:s(15),decode:s(16),encodingLength:s(17)}},function(e,n,s){"use strict";const i=s(6),t=s(4),{names:r}=s(18),o=s(7),k=s(19),a=s(8),c={};for(const l in r)c[r[l]]=l;function b(e){n.decode(e)}n.names=r,n.codes=Object.freeze(c),n.toHexString=function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return o(e,"base16")},n.fromHexString=function(e){return k(e,"base16")},n.toB58String=function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return o(i.encode("base58btc",e)).slice(1)},n.fromB58String=function(e){const n=e instanceof Uint8Array?o(e):e;return i.decode("z"+n)},n.decode=function(e){if(!(e instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");const s=t.decode(e);if(!n.isValidCode(s))throw new Error("multihash unknown function code: 0x"+s.toString(16));e=e.slice(t.decode.bytes);const i=t.decode(e);if(i<0)throw new Error("multihash invalid length: "+i);if((e=e.slice(t.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x"+o(e,"base16"));return{code:s,name:c[s],length:i,digest:e}},n.encode=function(e,s,i){if(!e||void 0===s)throw new Error("multihash encode requires at least two args: digest, code");const r=n.coerceCode(s);if(!(e instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");const o=t.encode(r),k=t.encode(i);return a([o,k,e],o.length+k.length+e.length)},n.coerceCode=function(e){let s=e;if("string"==typeof e){if(void 0===r[e])throw new Error("Unrecognized hash function named: "+e);s=r[e]}if("number"!=typeof s)throw new Error("Hash function code should be a number. Got: "+s);if(void 0===c[s]&&!n.isAppCode(s))throw new Error("Unrecognized function code: "+s);return s},n.isAppCode=function(e){return e>0&&e<16},n.isValidCode=function(e){return!!n.isAppCode(e)||!!c[e]},n.validate=b,n.prefix=function(e){return b(e),e.subarray(0,2)}},function(e,n,s){"use strict";const i=s(0),{encodeText:t,decodeText:r,concat:o}=s(3);function k(e){if(i.names[e])return i.names[e];if(i.codes[e])return i.codes[e];throw new Error("Unsupported encoding: "+e)}(n=e.exports=function(e,n){if(!n)throw new Error("requires an encoded Uint8Array");const{name:s,codeBuf:i}=k(e);return function(e,n){k(e).decode(r(n))}(s,n),o([i,n],i.length+n.length)}).encode=function(e,n){const s=k(e),i=t(s.encode(n));return o([s.codeBuf,i],s.codeBuf.length+i.length)},n.decode=function(e){e instanceof Uint8Array&&(e=r(e));const n=e[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(n)&&(e=e.toLowerCase()),k(e[0]).decode(e.substring(1))},n.isEncoded=function(e){if(e instanceof Uint8Array&&(e=r(e)),"[object String]"!==Object.prototype.toString.call(e))return!1;try{return k(e[0]).name}catch(n){return!1}},n.encoding=k,n.encodingFromData=function(e){return e instanceof Uint8Array&&(e=r(e)),k(e[0])},n.names=Object.freeze(i.names),n.codes=Object.freeze(i.codes)},function(e,n,s){"use strict";const{names:i}=s(0),{TextDecoder:t}=s(1),r=new t("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 s=0;s<e.length;s++)n+=String.fromCharCode(e[s]);return n}(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.encode(e)}},function(e,n,s){"use strict";e.exports=function(e,n){n||(n=e.reduce((e,n)=>e+n.length,0));const s=new Uint8Array(n);let i=0;for(const t of e)s.set(t,i),i+=t.length;return s}},function(e,n,s){"use strict";const i=s(4),t=s(23),r=s(24);function o(e){return parseInt(t(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(i.encode(o(e)))},varintEncode:function(e){return Uint8Array.from(i.encode(e))}}},function(e,n,s){e.exports=s(11)},function(e,n,s){"use strict";const i=s(5),t=s(6),r=s(20),o=s(2),k=s(28),a=s(8),c=s(7),b=s(29),l=Object.keys(o).reduce((e,n)=>(e[o[n]]=n,e),{}),u=Symbol.for("@ipld/js-cid/CID");class d{constructor(e,n,s,o){if(Object.defineProperty(this,u,{value:!0}),d.isCID(e)){const n=e;return this.version=n.version,this.codec=n.codec,this.multihash=n.multihash,void(this.multibaseName=n.multibaseName||(0===n.version?"base58btc":"base32"))}if("string"==typeof e){const n=t.isEncoded(e);if(n){const s=t.decode(e);this.version=parseInt(s[0].toString(),16),this.codec=r.getCodec(s.slice(1)),this.multihash=r.rmPrefix(s.slice(1)),this.multibaseName=n}else this.version=0,this.codec="dag-pb",this.multihash=i.fromB58String(e),this.multibaseName="base58btc";return d.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(e instanceof Uint8Array){const n=parseInt(e[0].toString(),16);if(1===n){const s=e;this.version=n,this.codec=r.getCodec(s.slice(1)),this.multihash=r.rmPrefix(s.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";d.validateCID(this)}else this.version=e,"number"==typeof n&&(n=l[n]),this.codec=n,this.multihash=s,this.multibaseName=o||(0===e?"base58btc":"base32"),d.validateCID(this)}get bytes(){let e=this._bytes;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");{const n=r.getCodeVarint(this.codec);e=a([[1],n,this.multihash],1+n.byteLength+this.multihash.byteLength)}}Object.defineProperty(this,"_bytes",{value:e})}return e}get prefix(){const e=r.getCodeVarint(this.codec),n=i.prefix(this.multihash);return a([[this.version],e,n],1+e.byteLength+n.byteLength)}get code(){return o[this.codec]}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:n}=i.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==n)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new d(0,this.codec,this.multihash)}toV1(){return new d(1,this.codec,this.multihash)}toBaseEncodedString(e=this.multibaseName){if(this.string&&0!==this.string.length&&e===this.multibaseName)return this.string;let n;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");n=i.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");n=c(t.encode(e,this.bytes))}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:n}),n}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&b(this.multihash,e.multihash)}static validateCID(e){const n=k.checkCIDComponents(e);if(n)throw new Error(n)}static isCID(e){return e instanceof d||Boolean(e&&e[u])}}d.codecs=o,e.exports=d},function(e,n,s){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),s=0;s<n.length;s++)n[s]=255;for(var i=0;i<e.length;i++){var t=e.charAt(i),r=t.charCodeAt(0);if(255!==n[r])throw new TypeError(t+" is ambiguous");n[r]=i}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 s=0;if(" "!==e[s]){for(var i=0,t=0;e[s]===k;)i++,s++;for(var r=(e.length-s)*a+1>>>0,c=new Uint8Array(r);e[s];){var b=n[e.charCodeAt(s)];if(255===b)return;for(var l=0,u=r-1;(0!==b||l<t)&&-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");t=l,s++}if(" "!==e[s]){for(var d=r-t;d!==r&&0===c[d];)d++;for(var h=new Uint8Array(i+(r-d)),f=i;d!==r;)h[f++]=c[d++];return h}}}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 s=0,i=0,t=0,r=n.length;t!==r&&0===n[t];)t++,s++;for(var a=(r-t)*c+1>>>0,b=new Uint8Array(a);t!==r;){for(var l=n[t],u=0,d=a-1;(0!==l||u<i)&&-1!==d;d--,u++)l+=256*b[d]>>>0,b[d]=l%o>>>0,l=l/o>>>0;if(0!==l)throw new Error("Non-zero carry");i=u,t++}for(var h=a-i;h!==a&&0===b[h];)h++;for(var f=k.repeat(s);h<a;++h)f+=e.charAt(b[h]);return f},decodeUnsafe:b,decode:function(e){var n=b(e);if(n)return n;throw new Error("Non-base"+o+" character")}}}},function(e,n,s){"use strict";const{encodeText:i}=s(3);e.exports=class{constructor(e,n,s,t){this.name=e,this.code=n,this.codeBuf=i(this.code),this.alphabet=t,this.engine=s(t)}encode(e){return this.engine.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.engine.decode(e)}}},function(e,n,s){"use strict";e.exports=e=>n=>({encode:s=>((e,n,s)=>{const i="="===n[n.length-1],t=(1<<s)-1;let r="",o=0,k=0;for(let a=0;a<e.length;++a)for(k=k<<8|e[a],o+=8;o>s;)o-=s,r+=n[t&k>>o];if(o&&(r+=n[t&k<<s-o]),i)for(;r.length*s&7;)r+="=";return r})(s,n,e),decode:s=>((e,n,s)=>{const i={};for(let c=0;c<n.length;++c)i[n[c]]=c;let t=e.length;for(;"="===e[t-1];)--t;const r=new Uint8Array(t*s/8|0);let o=0,k=0,a=0;for(let c=0;c<t;++c){const n=i[e[c]];if(void 0===n)throw new SyntaxError("Invalid character "+e[c]);k=k<<s|n,o+=s,o>=8&&(o-=8,r[a++]=255&k>>o)}if(o>=s||255&k<<8-o)throw new SyntaxError("Unexpected end of data");return r})(s,n,e)})},function(e,n,s){"use strict";e.exports=function e(n,s,t){s=s||[];var r=t=t||0;for(;n>=i;)s[t++]=255&n|128,n/=128;for(;-128&n;)s[t++]=255&n|128,n>>>=7;return s[t]=0|n,e.bytes=t-r+1,s};var i=Math.pow(2,31)},function(e,n,s){"use strict";e.exports=function e(n,s){var i,t=0,r=0,o=s=s||0,k=n.length;do{if(o>=k)throw e.bytes=0,new RangeError("Could not decode varint");i=n[o++],t+=r<28?(127&i)<<r:(127&i)*Math.pow(2,r),r+=7}while(i>=128);return e.bytes=o-s,t}},function(e,n,s){"use strict";var i=Math.pow(2,7),t=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<i?1:e<t?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,s){"use strict";const i=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});e.exports={names:i}},function(e,n,s){"use strict";const{names:i}=s(0),{TextEncoder:t}=s(1),r=new t;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 s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n}(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.decode(e)}},function(e,n,s){"use strict";const i=s(4),t=s(21),r=s(22),o=s(9),k=s(25);(n=e.exports).addPrefix=(e,n)=>{let s;if(e instanceof Uint8Array)s=o.varintUint8ArrayEncode(e);else{if(!r[e])throw new Error("multicodec not recognized");s=r[e]}return k([s,n],s.length+n.length)},n.rmPrefix=e=>(i.decode(e),e.slice(i.decode.bytes)),n.getCodec=e=>{const n=i.decode(e),s=t.get(n);if(void 0===s)throw new Error(`Code ${n} not found`);return s},n.getName=e=>t.get(e),n.getNumber=e=>{const n=r[e];if(void 0===n)throw new Error("Codec `"+e+"` not found");return i.decode(n)},n.getCode=e=>i.decode(e),n.getCodeVarint=e=>{const n=r[e];if(void 0===n)throw new Error("Codec `"+e+"` not found");return n},n.getVarint=e=>i.encode(e);const a=s(26);Object.assign(n,a),n.print=s(27)},function(e,n,s){"use strict";const i=s(2),t=new Map;for(const r in i){const e=i[r];t.set(e,r)}e.exports=Object.freeze(t)},function(e,n,s){"use strict";const i=s(2),t=s(9).varintEncode,r={};for(const o in i){const e=i[o];r[o]=t(e)}e.exports=Object.freeze(r)},function(e,n,s){"use strict";const{names:i}=s(0),{TextDecoder:t}=s(1),r=new t("utf8");e.exports=function(e,n="utf8"){if("utf8"===n||"utf-8"===n)return r.decode(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.encode(e)}},function(e,n,s){"use strict";const{names:i}=s(0),{TextEncoder:t}=s(1),r=new t;e.exports=function(e,n="utf8"){if("utf8"===n||"utf-8"===n)return r.encode(e);const s=i[n];if(!s)throw new Error("Unknown base");return s.decode(e)}},function(e,n,s){"use strict";e.exports=function(e,n){n||(n=e.reduce((e,n)=>e+n.length,0));const s=new Uint8Array(n);let i=0;for(const t of e)s.set(t,i),i+=t.length;return s}},function(e,n,s){"use strict";const i=s(2),t={};for(const[r,o]of Object.entries(i))t[r.toUpperCase().replace(/-/g,"_")]=o;e.exports=Object.freeze(t)},function(e,n,s){"use strict";const i=s(2),t={};for(const[r,o]of Object.entries(i))void 0===t[o]&&(t[o]=r);e.exports=Object.freeze(t)},function(e,n,s){"use strict";const i=s(5),t={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!(e.multihash instanceof Uint8Array))return"multihash must be a Uint8Array";try{i.validate(e.multihash)}catch(n){let e=n.message;return e||(e="Multihash validation failed"),e}}};e.exports=t},function(e,n,s){"use strict";e.exports=function(e,n){if(e===n)return!0;if(e.byteLength!==n.byteLength)return!1;for(let s=0;s<e.byteLength;s++)if(e[s]!==n[s])return!1;return!0}}])}));

@@ -69,3 +69,2 @@ export = CID;

multibaseName: any;
string: string | undefined;
/**

@@ -78,3 +77,2 @@ * The CID as a `Uint8Array`

get bytes(): Uint8Array;
_bytes: any;
/**

@@ -318,2 +316,7 @@ * The prefix of the CID.

"blake2b-480": number;
/**
* The version of the CID.
*
* @type {CIDVersion}
*/
"blake2b-488": number;

@@ -329,9 +332,10 @@ "blake2b-496": number;

"blake2s-48": number;
/**
* The codec of the CID.
*
* @type {string}
*/
"blake2s-56": number;
"blake2s-64": number;
"blake2s-72": number; /**
* The multihash of the CID.
*
* @type {Uint8Array}
*/
"blake2s-72": number;
"blake2s-80": number;

@@ -399,3 +403,7 @@ "blake2s-88": number;

"skein512-56": number;
"skein512-64": number;
"skein512-64": number; /**
* Convert to a CID of version `0`.
*
* @returns {CID}
*/
"skein512-72": number;

@@ -494,9 +502,2 @@ "skein512-80": number;

"skein1024-296": number;
/**
* Test if the given input is a valid CID object.
* Throws if it is not.
*
* @param {any} other - The other CID.
* @returns {void}
*/
"skein1024-304": number;

@@ -503,0 +504,0 @@ "skein1024-312": number;

{
"name": "cids",
"version": "1.1.0",
"version": "1.1.1",
"description": "CID Implementation in JavaScript",

@@ -48,2 +48,3 @@ "leadMaintainer": "Volker Mische <volker.mische@gmail.com>",

"devDependencies": {
"@sinonjs/samsam": "^5.3.0",
"aegir": "^29.0.1",

@@ -60,4 +61,4 @@ "multihashing-async": "^2.0.1"

"contributors": [
"Volker Mische <volker.mische@gmail.com>",
"David Dias <daviddias.p@gmail.com>",
"Volker Mische <volker.mische@gmail.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",

@@ -64,0 +65,0 @@ "Alan Shaw <alan.shaw@protocol.ai>",

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

CID.validateCID(this)
this.string = version
Object.defineProperty(this, 'string', { value: version })
return

@@ -168,2 +168,3 @@ }

get bytes () {
// @ts-ignore
let bytes = this._bytes

@@ -184,3 +185,3 @@

// Cache this Uint8Array so it doesn't have to be recreated
this._bytes = bytes
Object.defineProperty(this, '_bytes', { value: bytes })
}

@@ -254,3 +255,5 @@

toBaseEncodedString (base = this.multibaseName) {
// @ts-ignore non enumerable cache property
if (this.string && this.string.length !== 0 && base === this.multibaseName) {
// @ts-ignore non enumerable cache property
return this.string

@@ -271,3 +274,3 @@ }

// cache the string value
this.string = str
Object.defineProperty(this, 'string', { value: str })
}

@@ -274,0 +277,0 @@ return str

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