From b29fe5c1640568984ba742b6b679224888e9413d Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 20:38:43 -0700 Subject: [PATCH 01/13] .gitignore pnpm-lock.yaml --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4cdb1c9..23f0612 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ package-lock.json +pnpm-lock.yaml yarn.lock **/node_modules/ From 097c81e8d9d86f234bb6821d0ac3cdbd0ef17657 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 21:00:47 -0700 Subject: [PATCH 02/13] Add https://github.com/multiformats/multicodec as a submodule dependency --- .gitmodules | 3 +++ src/multicodec | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 src/multicodec diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5f150f0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "multicodec"] + path = src/multicodec + url = https://github.com/multiformats/multicodec diff --git a/src/multicodec b/src/multicodec new file mode 160000 index 0000000..566eaf8 --- /dev/null +++ b/src/multicodec @@ -0,0 +1 @@ +Subproject commit 566eaf857a9d20573d3910221db7b34d98e8a0fc From 5ec78205d23022241393690cfb08398a67c5618a Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 21:13:26 -0700 Subject: [PATCH 03/13] Update Aegir --- .aegir.js | 7 +++++++ package.json | 33 +++++++-------------------------- tsconfig.json | 8 ++++---- 3 files changed, 18 insertions(+), 30 deletions(-) create mode 100644 .aegir.js diff --git a/.aegir.js b/.aegir.js new file mode 100644 index 0000000..786928c --- /dev/null +++ b/.aegir.js @@ -0,0 +1,7 @@ +/** @type {import('aegir').PartialOptions} */ +module.exports = { + tsRepo: true, + release: { + build: false + } +} diff --git a/package.json b/package.json index 9c7dc21..48de4a1 100644 --- a/package.json +++ b/package.json @@ -4,28 +4,17 @@ "description": "JavaScript implementation of the multicodec specification", "leadMaintainer": "Henrique Dias ", "main": "src/index.js", - "types": "dist/src/index.d.ts", - "typesVersions": { - "*": { - "src/*": [ - "dist/src/*", - "dist/src/*/index" - ], - "src/": [ - "dist/src/index" - ] - } - }, + "files": [ + "src", + "dist" + ], "scripts": { "lint": "aegir lint", + "release": "aegir release", + "build": "aegir build", "test": "aegir test", "test:node": "aegir test --target node", "test:browser": "aegir test --target browser", - "build": "aegir build", - "docs": "aegir docs", - "release": "aegir release", - "release-minor": "aegir release --type minor", - "release-major": "aegir release --type major", "update-table": "node tools/update-table.js" }, "pre-push": [ @@ -56,19 +45,11 @@ }, "devDependencies": { "@types/varint": "^6.0.0", - "aegir": "^32.2.0", + "aegir": "^39.0.9", "bent": "^7.3.12", "pre-push": "~0.1.1", "util": "^0.12.3" }, - "eslintConfig": { - "extends": "ipfs" - }, - "aegir": { - "build": { - "bundlesizeMax": "15kB" - } - }, "contributors": [ "Henrique Dias ", "David Dias ", diff --git a/tsconfig.json b/tsconfig.json index 7371337..ec163b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "./node_modules/aegir/src/config/tsconfig.aegir.json", + "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { "outDir": "dist" }, "include": [ - "test", - "src" + "src", + "test" ] -} +} \ No newline at end of file From 8250f660d2ca77742411276a473fe6a5c02827c5 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 21:20:46 -0700 Subject: [PATCH 04/13] Clear dependencies --- package.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index 48de4a1..1b28d6c 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,9 @@ }, "homepage": "https://github.com/multiformats/js-multicodec#readme", "dependencies": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" }, "devDependencies": { - "@types/varint": "^6.0.0", - "aegir": "^39.0.9", - "bent": "^7.3.12", - "pre-push": "~0.1.1", - "util": "^0.12.3" + "aegir": "^39.0.9" }, "contributors": [ "Henrique Dias ", From df9443369d8d68feee9188f786652c23a60d8b31 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:26:51 -0700 Subject: [PATCH 05/13] Clear code --- package.json | 3 +- src/generated-table.js | 482 --------------------------------------- src/generated-types.d.ts | 21 -- src/index.js | 217 ------------------ src/maps.js | 39 ---- src/util.js | 44 ---- test/multicodec.spec.js | 122 ---------- tools/update-table.js | 71 ------ 8 files changed, 1 insertion(+), 998 deletions(-) delete mode 100644 src/generated-table.js delete mode 100644 src/generated-types.d.ts delete mode 100644 src/index.js delete mode 100644 src/maps.js delete mode 100644 src/util.js delete mode 100644 test/multicodec.spec.js delete mode 100755 tools/update-table.js diff --git a/package.json b/package.json index 1b28d6c..a720fc5 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "build": "aegir build", "test": "aegir test", "test:node": "aegir test --target node", - "test:browser": "aegir test --target browser", - "update-table": "node tools/update-table.js" + "test:browser": "aegir test --target browser" }, "pre-push": [ "lint", diff --git a/src/generated-table.js b/src/generated-table.js deleted file mode 100644 index 0391a63..0000000 --- a/src/generated-table.js +++ /dev/null @@ -1,482 +0,0 @@ -// DO NOT CHANGE THIS FILE. IT IS GENERATED BY tools/update-table.js -/* eslint quote-props: off */ -'use strict' - -/** - * @type {import('./generated-types').NameCodeMap} - */ -const baseTable = Object.freeze({ - 'identity': 0x00, - 'cidv1': 0x01, - 'cidv2': 0x02, - 'cidv3': 0x03, - 'ip4': 0x04, - 'tcp': 0x06, - 'sha1': 0x11, - 'sha2-256': 0x12, - 'sha2-512': 0x13, - 'sha3-512': 0x14, - 'sha3-384': 0x15, - 'sha3-256': 0x16, - 'sha3-224': 0x17, - 'shake-128': 0x18, - 'shake-256': 0x19, - 'keccak-224': 0x1a, - 'keccak-256': 0x1b, - 'keccak-384': 0x1c, - 'keccak-512': 0x1d, - 'blake3': 0x1e, - 'dccp': 0x21, - 'murmur3-128': 0x22, - 'murmur3-32': 0x23, - 'ip6': 0x29, - 'ip6zone': 0x2a, - 'path': 0x2f, - 'multicodec': 0x30, - 'multihash': 0x31, - 'multiaddr': 0x32, - 'multibase': 0x33, - 'dns': 0x35, - 'dns4': 0x36, - 'dns6': 0x37, - 'dnsaddr': 0x38, - 'protobuf': 0x50, - 'cbor': 0x51, - 'raw': 0x55, - 'dbl-sha2-256': 0x56, - 'rlp': 0x60, - 'bencode': 0x63, - 'dag-pb': 0x70, - 'dag-cbor': 0x71, - 'libp2p-key': 0x72, - 'git-raw': 0x78, - 'torrent-info': 0x7b, - 'torrent-file': 0x7c, - 'leofcoin-block': 0x81, - 'leofcoin-tx': 0x82, - 'leofcoin-pr': 0x83, - 'sctp': 0x84, - 'dag-jose': 0x85, - 'dag-cose': 0x86, - 'eth-block': 0x90, - 'eth-block-list': 0x91, - 'eth-tx-trie': 0x92, - 'eth-tx': 0x93, - 'eth-tx-receipt-trie': 0x94, - 'eth-tx-receipt': 0x95, - 'eth-state-trie': 0x96, - 'eth-account-snapshot': 0x97, - 'eth-storage-trie': 0x98, - 'eth-receipt-log-trie': 0x99, - 'eth-reciept-log': 0x9a, - 'bitcoin-block': 0xb0, - 'bitcoin-tx': 0xb1, - 'bitcoin-witness-commitment': 0xb2, - 'zcash-block': 0xc0, - 'zcash-tx': 0xc1, - 'caip-50': 0xca, - 'streamid': 0xce, - 'stellar-block': 0xd0, - 'stellar-tx': 0xd1, - 'md4': 0xd4, - 'md5': 0xd5, - 'bmt': 0xd6, - 'decred-block': 0xe0, - 'decred-tx': 0xe1, - 'ipld-ns': 0xe2, - 'ipfs-ns': 0xe3, - 'swarm-ns': 0xe4, - 'ipns-ns': 0xe5, - 'zeronet': 0xe6, - 'secp256k1-pub': 0xe7, - 'bls12_381-g1-pub': 0xea, - 'bls12_381-g2-pub': 0xeb, - 'x25519-pub': 0xec, - 'ed25519-pub': 0xed, - 'bls12_381-g1g2-pub': 0xee, - 'dash-block': 0xf0, - 'dash-tx': 0xf1, - 'swarm-manifest': 0xfa, - 'swarm-feed': 0xfb, - 'udp': 0x0111, - 'p2p-webrtc-star': 0x0113, - 'p2p-webrtc-direct': 0x0114, - 'p2p-stardust': 0x0115, - 'p2p-circuit': 0x0122, - 'dag-json': 0x0129, - 'udt': 0x012d, - 'utp': 0x012e, - 'unix': 0x0190, - 'thread': 0x0196, - 'p2p': 0x01a5, - 'ipfs': 0x01a5, - 'https': 0x01bb, - 'onion': 0x01bc, - 'onion3': 0x01bd, - 'garlic64': 0x01be, - 'garlic32': 0x01bf, - 'tls': 0x01c0, - 'noise': 0x01c6, - 'quic': 0x01cc, - 'ws': 0x01dd, - 'wss': 0x01de, - 'p2p-websocket-star': 0x01df, - 'http': 0x01e0, - 'swhid-1-snp': 0x01f0, - 'json': 0x0200, - 'messagepack': 0x0201, - 'libp2p-peer-record': 0x0301, - 'libp2p-relay-rsvp': 0x0302, - 'car-index-sorted': 0x0400, - 'sha2-256-trunc254-padded': 0x1012, - 'ripemd-128': 0x1052, - 'ripemd-160': 0x1053, - 'ripemd-256': 0x1054, - 'ripemd-320': 0x1055, - 'x11': 0x1100, - 'p256-pub': 0x1200, - 'p384-pub': 0x1201, - 'p521-pub': 0x1202, - 'ed448-pub': 0x1203, - 'x448-pub': 0x1204, - 'ed25519-priv': 0x1300, - 'secp256k1-priv': 0x1301, - 'x25519-priv': 0x1302, - 'kangarootwelve': 0x1d01, - 'sm3-256': 0x534d, - 'blake2b-8': 0xb201, - 'blake2b-16': 0xb202, - 'blake2b-24': 0xb203, - 'blake2b-32': 0xb204, - 'blake2b-40': 0xb205, - 'blake2b-48': 0xb206, - 'blake2b-56': 0xb207, - 'blake2b-64': 0xb208, - 'blake2b-72': 0xb209, - 'blake2b-80': 0xb20a, - 'blake2b-88': 0xb20b, - 'blake2b-96': 0xb20c, - 'blake2b-104': 0xb20d, - 'blake2b-112': 0xb20e, - 'blake2b-120': 0xb20f, - 'blake2b-128': 0xb210, - 'blake2b-136': 0xb211, - 'blake2b-144': 0xb212, - 'blake2b-152': 0xb213, - 'blake2b-160': 0xb214, - 'blake2b-168': 0xb215, - 'blake2b-176': 0xb216, - 'blake2b-184': 0xb217, - 'blake2b-192': 0xb218, - 'blake2b-200': 0xb219, - 'blake2b-208': 0xb21a, - 'blake2b-216': 0xb21b, - 'blake2b-224': 0xb21c, - 'blake2b-232': 0xb21d, - 'blake2b-240': 0xb21e, - 'blake2b-248': 0xb21f, - 'blake2b-256': 0xb220, - 'blake2b-264': 0xb221, - 'blake2b-272': 0xb222, - 'blake2b-280': 0xb223, - 'blake2b-288': 0xb224, - 'blake2b-296': 0xb225, - 'blake2b-304': 0xb226, - 'blake2b-312': 0xb227, - 'blake2b-320': 0xb228, - 'blake2b-328': 0xb229, - 'blake2b-336': 0xb22a, - 'blake2b-344': 0xb22b, - 'blake2b-352': 0xb22c, - 'blake2b-360': 0xb22d, - 'blake2b-368': 0xb22e, - 'blake2b-376': 0xb22f, - 'blake2b-384': 0xb230, - 'blake2b-392': 0xb231, - 'blake2b-400': 0xb232, - 'blake2b-408': 0xb233, - 'blake2b-416': 0xb234, - 'blake2b-424': 0xb235, - 'blake2b-432': 0xb236, - 'blake2b-440': 0xb237, - 'blake2b-448': 0xb238, - 'blake2b-456': 0xb239, - 'blake2b-464': 0xb23a, - 'blake2b-472': 0xb23b, - 'blake2b-480': 0xb23c, - 'blake2b-488': 0xb23d, - 'blake2b-496': 0xb23e, - 'blake2b-504': 0xb23f, - 'blake2b-512': 0xb240, - 'blake2s-8': 0xb241, - 'blake2s-16': 0xb242, - 'blake2s-24': 0xb243, - 'blake2s-32': 0xb244, - 'blake2s-40': 0xb245, - 'blake2s-48': 0xb246, - 'blake2s-56': 0xb247, - 'blake2s-64': 0xb248, - 'blake2s-72': 0xb249, - 'blake2s-80': 0xb24a, - 'blake2s-88': 0xb24b, - 'blake2s-96': 0xb24c, - 'blake2s-104': 0xb24d, - 'blake2s-112': 0xb24e, - 'blake2s-120': 0xb24f, - 'blake2s-128': 0xb250, - 'blake2s-136': 0xb251, - 'blake2s-144': 0xb252, - 'blake2s-152': 0xb253, - 'blake2s-160': 0xb254, - 'blake2s-168': 0xb255, - 'blake2s-176': 0xb256, - 'blake2s-184': 0xb257, - 'blake2s-192': 0xb258, - 'blake2s-200': 0xb259, - 'blake2s-208': 0xb25a, - 'blake2s-216': 0xb25b, - 'blake2s-224': 0xb25c, - 'blake2s-232': 0xb25d, - 'blake2s-240': 0xb25e, - 'blake2s-248': 0xb25f, - 'blake2s-256': 0xb260, - 'skein256-8': 0xb301, - 'skein256-16': 0xb302, - 'skein256-24': 0xb303, - 'skein256-32': 0xb304, - 'skein256-40': 0xb305, - 'skein256-48': 0xb306, - 'skein256-56': 0xb307, - 'skein256-64': 0xb308, - 'skein256-72': 0xb309, - 'skein256-80': 0xb30a, - 'skein256-88': 0xb30b, - 'skein256-96': 0xb30c, - 'skein256-104': 0xb30d, - 'skein256-112': 0xb30e, - 'skein256-120': 0xb30f, - 'skein256-128': 0xb310, - 'skein256-136': 0xb311, - 'skein256-144': 0xb312, - 'skein256-152': 0xb313, - 'skein256-160': 0xb314, - 'skein256-168': 0xb315, - 'skein256-176': 0xb316, - 'skein256-184': 0xb317, - 'skein256-192': 0xb318, - 'skein256-200': 0xb319, - 'skein256-208': 0xb31a, - 'skein256-216': 0xb31b, - 'skein256-224': 0xb31c, - 'skein256-232': 0xb31d, - 'skein256-240': 0xb31e, - 'skein256-248': 0xb31f, - 'skein256-256': 0xb320, - 'skein512-8': 0xb321, - 'skein512-16': 0xb322, - 'skein512-24': 0xb323, - 'skein512-32': 0xb324, - 'skein512-40': 0xb325, - 'skein512-48': 0xb326, - 'skein512-56': 0xb327, - 'skein512-64': 0xb328, - 'skein512-72': 0xb329, - 'skein512-80': 0xb32a, - 'skein512-88': 0xb32b, - 'skein512-96': 0xb32c, - 'skein512-104': 0xb32d, - 'skein512-112': 0xb32e, - 'skein512-120': 0xb32f, - 'skein512-128': 0xb330, - 'skein512-136': 0xb331, - 'skein512-144': 0xb332, - 'skein512-152': 0xb333, - 'skein512-160': 0xb334, - 'skein512-168': 0xb335, - 'skein512-176': 0xb336, - 'skein512-184': 0xb337, - 'skein512-192': 0xb338, - 'skein512-200': 0xb339, - 'skein512-208': 0xb33a, - 'skein512-216': 0xb33b, - 'skein512-224': 0xb33c, - 'skein512-232': 0xb33d, - 'skein512-240': 0xb33e, - 'skein512-248': 0xb33f, - 'skein512-256': 0xb340, - 'skein512-264': 0xb341, - 'skein512-272': 0xb342, - 'skein512-280': 0xb343, - 'skein512-288': 0xb344, - 'skein512-296': 0xb345, - 'skein512-304': 0xb346, - 'skein512-312': 0xb347, - 'skein512-320': 0xb348, - 'skein512-328': 0xb349, - 'skein512-336': 0xb34a, - 'skein512-344': 0xb34b, - 'skein512-352': 0xb34c, - 'skein512-360': 0xb34d, - 'skein512-368': 0xb34e, - 'skein512-376': 0xb34f, - 'skein512-384': 0xb350, - 'skein512-392': 0xb351, - 'skein512-400': 0xb352, - 'skein512-408': 0xb353, - 'skein512-416': 0xb354, - 'skein512-424': 0xb355, - 'skein512-432': 0xb356, - 'skein512-440': 0xb357, - 'skein512-448': 0xb358, - 'skein512-456': 0xb359, - 'skein512-464': 0xb35a, - 'skein512-472': 0xb35b, - 'skein512-480': 0xb35c, - 'skein512-488': 0xb35d, - 'skein512-496': 0xb35e, - 'skein512-504': 0xb35f, - 'skein512-512': 0xb360, - 'skein1024-8': 0xb361, - 'skein1024-16': 0xb362, - 'skein1024-24': 0xb363, - 'skein1024-32': 0xb364, - 'skein1024-40': 0xb365, - 'skein1024-48': 0xb366, - 'skein1024-56': 0xb367, - 'skein1024-64': 0xb368, - 'skein1024-72': 0xb369, - 'skein1024-80': 0xb36a, - 'skein1024-88': 0xb36b, - 'skein1024-96': 0xb36c, - 'skein1024-104': 0xb36d, - 'skein1024-112': 0xb36e, - 'skein1024-120': 0xb36f, - 'skein1024-128': 0xb370, - 'skein1024-136': 0xb371, - 'skein1024-144': 0xb372, - 'skein1024-152': 0xb373, - 'skein1024-160': 0xb374, - 'skein1024-168': 0xb375, - 'skein1024-176': 0xb376, - 'skein1024-184': 0xb377, - 'skein1024-192': 0xb378, - 'skein1024-200': 0xb379, - 'skein1024-208': 0xb37a, - 'skein1024-216': 0xb37b, - 'skein1024-224': 0xb37c, - 'skein1024-232': 0xb37d, - 'skein1024-240': 0xb37e, - 'skein1024-248': 0xb37f, - 'skein1024-256': 0xb380, - 'skein1024-264': 0xb381, - 'skein1024-272': 0xb382, - 'skein1024-280': 0xb383, - 'skein1024-288': 0xb384, - 'skein1024-296': 0xb385, - 'skein1024-304': 0xb386, - 'skein1024-312': 0xb387, - 'skein1024-320': 0xb388, - 'skein1024-328': 0xb389, - 'skein1024-336': 0xb38a, - 'skein1024-344': 0xb38b, - 'skein1024-352': 0xb38c, - 'skein1024-360': 0xb38d, - 'skein1024-368': 0xb38e, - 'skein1024-376': 0xb38f, - 'skein1024-384': 0xb390, - 'skein1024-392': 0xb391, - 'skein1024-400': 0xb392, - 'skein1024-408': 0xb393, - 'skein1024-416': 0xb394, - 'skein1024-424': 0xb395, - 'skein1024-432': 0xb396, - 'skein1024-440': 0xb397, - 'skein1024-448': 0xb398, - 'skein1024-456': 0xb399, - 'skein1024-464': 0xb39a, - 'skein1024-472': 0xb39b, - 'skein1024-480': 0xb39c, - 'skein1024-488': 0xb39d, - 'skein1024-496': 0xb39e, - 'skein1024-504': 0xb39f, - 'skein1024-512': 0xb3a0, - 'skein1024-520': 0xb3a1, - 'skein1024-528': 0xb3a2, - 'skein1024-536': 0xb3a3, - 'skein1024-544': 0xb3a4, - 'skein1024-552': 0xb3a5, - 'skein1024-560': 0xb3a6, - 'skein1024-568': 0xb3a7, - 'skein1024-576': 0xb3a8, - 'skein1024-584': 0xb3a9, - 'skein1024-592': 0xb3aa, - 'skein1024-600': 0xb3ab, - 'skein1024-608': 0xb3ac, - 'skein1024-616': 0xb3ad, - 'skein1024-624': 0xb3ae, - 'skein1024-632': 0xb3af, - 'skein1024-640': 0xb3b0, - 'skein1024-648': 0xb3b1, - 'skein1024-656': 0xb3b2, - 'skein1024-664': 0xb3b3, - 'skein1024-672': 0xb3b4, - 'skein1024-680': 0xb3b5, - 'skein1024-688': 0xb3b6, - 'skein1024-696': 0xb3b7, - 'skein1024-704': 0xb3b8, - 'skein1024-712': 0xb3b9, - 'skein1024-720': 0xb3ba, - 'skein1024-728': 0xb3bb, - 'skein1024-736': 0xb3bc, - 'skein1024-744': 0xb3bd, - 'skein1024-752': 0xb3be, - 'skein1024-760': 0xb3bf, - 'skein1024-768': 0xb3c0, - 'skein1024-776': 0xb3c1, - 'skein1024-784': 0xb3c2, - 'skein1024-792': 0xb3c3, - 'skein1024-800': 0xb3c4, - 'skein1024-808': 0xb3c5, - 'skein1024-816': 0xb3c6, - 'skein1024-824': 0xb3c7, - 'skein1024-832': 0xb3c8, - 'skein1024-840': 0xb3c9, - 'skein1024-848': 0xb3ca, - 'skein1024-856': 0xb3cb, - 'skein1024-864': 0xb3cc, - 'skein1024-872': 0xb3cd, - 'skein1024-880': 0xb3ce, - 'skein1024-888': 0xb3cf, - 'skein1024-896': 0xb3d0, - 'skein1024-904': 0xb3d1, - 'skein1024-912': 0xb3d2, - 'skein1024-920': 0xb3d3, - 'skein1024-928': 0xb3d4, - 'skein1024-936': 0xb3d5, - 'skein1024-944': 0xb3d6, - 'skein1024-952': 0xb3d7, - 'skein1024-960': 0xb3d8, - 'skein1024-968': 0xb3d9, - 'skein1024-976': 0xb3da, - 'skein1024-984': 0xb3db, - 'skein1024-992': 0xb3dc, - 'skein1024-1000': 0xb3dd, - 'skein1024-1008': 0xb3de, - 'skein1024-1016': 0xb3df, - 'skein1024-1024': 0xb3e0, - 'poseidon-bls12_381-a2-fc1': 0xb401, - 'poseidon-bls12_381-a2-fc1-sc': 0xb402, - 'zeroxcert-imprint-256': 0xce11, - 'fil-commitment-unsealed': 0xf101, - 'fil-commitment-sealed': 0xf102, - 'holochain-adr-v0': 0x807124, - 'holochain-adr-v1': 0x817124, - 'holochain-key-v0': 0x947124, - 'holochain-key-v1': 0x957124, - 'holochain-sig-v0': 0xa27124, - 'holochain-sig-v1': 0xa37124, - 'skynet-ns': 0xb19910, - 'arweave-ns': 0xb29910 -}) - -module.exports = { baseTable } diff --git a/src/generated-types.d.ts b/src/generated-types.d.ts deleted file mode 100644 index caa5673..0000000 --- a/src/generated-types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// 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' | 'ETH_RECEIPT_LOG_TRIE' | 'ETH_RECIEPT_LOG' | 'BITCOIN_BLOCK' | 'BITCOIN_TX' | 'BITCOIN_WITNESS_COMMITMENT' | 'ZCASH_BLOCK' | 'ZCASH_TX' | 'CAIP_50' | 'STREAMID' | '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' | 'NOISE' | 'QUIC' | 'WS' | 'WSS' | 'P2P_WEBSOCKET_STAR' | 'HTTP' | 'SWHID_1_SNP' | 'JSON' | 'MESSAGEPACK' | 'LIBP2P_PEER_RECORD' | 'LIBP2P_RELAY_RSVP' | 'CAR_INDEX_SORTED' | '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' | 'SECP256K1_PRIV' | 'X25519_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' | 'ARWEAVE_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' | 'eth-receipt-log-trie' | 'eth-reciept-log' | 'bitcoin-block' | 'bitcoin-tx' | 'bitcoin-witness-commitment' | 'zcash-block' | 'zcash-tx' | 'caip-50' | 'streamid' | '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' | 'noise' | 'quic' | 'ws' | 'wss' | 'p2p-websocket-star' | 'http' | 'swhid-1-snp' | 'json' | 'messagepack' | 'libp2p-peer-record' | 'libp2p-relay-rsvp' | 'car-index-sorted' | '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' | 'secp256k1-priv' | 'x25519-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' | 'arweave-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 | 0x99 | 0x9a | 0xb0 | 0xb1 | 0xb2 | 0xc0 | 0xc1 | 0xca | 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 | 0x01c6 | 0x01cc | 0x01dd | 0x01de | 0x01df | 0x01e0 | 0x01f0 | 0x0200 | 0x0201 | 0x0301 | 0x0302 | 0x0400 | 0x1012 | 0x1052 | 0x1053 | 0x1054 | 0x1055 | 0x1100 | 0x1200 | 0x1201 | 0x1202 | 0x1203 | 0x1204 | 0x1300 | 0x1301 | 0x1302 | 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 | 0xb29910 - -export type ConstantCodeMap = Record -export type NameUint8ArrayMap = Record -export type CodeNameMap = Record -export type NameCodeMap = Record diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 57777b4..0000000 --- a/src/index.js +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Implementation of the multicodec specification. - * - * @module multicodec - * @example - * const multicodec = require('multicodec') - * - * const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer) - * // prefixedProtobuf 0x50... - * - */ -'use strict' - -/** @typedef {import('./generated-types').CodecName} CodecName */ -/** @typedef {import('./generated-types').CodecCode} CodecCode */ - -const varint = require('varint') -const { concat: uint8ArrayConcat } = require('uint8arrays/concat') -const util = require('./util') -const { nameToVarint, constantToCode, nameToCode, codeToName } = require('./maps') - -/** - * Prefix a buffer with a multicodec-packed. - * - * @param {CodecName|Uint8Array} multicodecStrOrCode - * @param {Uint8Array} data - * @returns {Uint8Array} - */ -function addPrefix (multicodecStrOrCode, data) { - let prefix - - if (multicodecStrOrCode instanceof Uint8Array) { - prefix = util.varintUint8ArrayEncode(multicodecStrOrCode) - } else { - if (nameToVarint[multicodecStrOrCode]) { - prefix = nameToVarint[multicodecStrOrCode] - } else { - throw new Error('multicodec not recognized') - } - } - - return uint8ArrayConcat([prefix, data], prefix.length + data.length) -} - -/** - * Decapsulate the multicodec-packed prefix from the data. - * - * @param {Uint8Array} data - * @returns {Uint8Array} - */ -function rmPrefix (data) { - varint.decode(/** @type {Buffer} */(data)) - return data.slice(varint.decode.bytes) -} - -/** - * Get the codec name of the prefixed data. - * - * @param {Uint8Array} prefixedData - * @returns {CodecName} - */ -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`) - } - return name -} - -/** - * Get the codec name from a code. - * - * @param {CodecCode} codec - * @returns {CodecName} - */ -function getNameFromCode (codec) { - return codeToName[codec] -} - -/** - * Get the code of the codec - * - * @param {CodecName} name - * @returns {CodecCode} - */ -function getCodeFromName (name) { - const code = nameToCode[name] - if (code === undefined) { - throw new Error(`Codec "${name}" not found`) - } - return code -} - -/** - * Get the code of the prefixed data. - * - * @param {Uint8Array} prefixedData - * @returns {CodecCode} - */ -function getCodeFromData (prefixedData) { - return /** @type {CodecCode} */(varint.decode(/** @type {Buffer} */(prefixedData))) -} - -/** - * Get the code as varint of a codec name. - * - * @param {CodecName} name - * @returns {Uint8Array} - */ -function getVarintFromName (name) { - const code = nameToVarint[name] - if (code === undefined) { - throw new Error(`Codec "${name}" not found`) - } - return code -} - -/** - * Get the varint of a code. - * - * @param {CodecCode} code - * @returns {Uint8Array} - */ -function getVarintFromCode (code) { - return util.varintEncode(code) -} - -/** - * Get the codec name of the prefixed data. - * - * @deprecated use getNameFromData instead. - * @param {Uint8Array} prefixedData - * @returns {CodecName} - */ -function getCodec (prefixedData) { - return getNameFromData(prefixedData) -} - -/** - * Get the codec name from a code. - * - * @deprecated use getNameFromCode instead. - * @param {CodecCode} codec - * @returns {CodecName} - */ -function getName (codec) { - return getNameFromCode(codec) -} - -/** - * 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.} - */ -function getVarint (code) { - return Array.from(getVarintFromCode(code)) -} - -module.exports = { - addPrefix, - rmPrefix, - getNameFromData, - getNameFromCode, - getCodeFromName, - getCodeFromData, - getVarintFromName, - getVarintFromCode, - // Deprecated - getCodec, - getName, - getNumber, - getCode, - getCodeVarint, - getVarint, - // Make the constants top-level constants - ...constantToCode, - // Export the maps - nameToVarint, - nameToCode, - codeToName -} diff --git a/src/maps.js b/src/maps.js deleted file mode 100644 index 1651060..0000000 --- a/src/maps.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict' - -/** @typedef {import('./generated-types').ConstantCodeMap} ConstantCodeMap */ -/** @typedef {import('./generated-types').NameUint8ArrayMap} NameUint8ArrayMap */ -/** @typedef {import('./generated-types').CodeNameMap} CodeNameMap */ -/** @typedef {import('./generated-types').CodecName} CodecName */ -/** @typedef {import('./generated-types').CodecConstant} CodecConstant */ - -const { baseTable } = require('./generated-table') -const varintEncode = require('./util').varintEncode - -const nameToVarint = /** @type {NameUint8ArrayMap} */ ({}) -const constantToCode = /** @type {ConstantCodeMap} */({}) -const codeToName = /** @type {CodeNameMap} */({}) - -// eslint-disable-next-line guard-for-in -for (const name in baseTable) { - const codecName = /** @type {CodecName} */(name) - const code = baseTable[codecName] - nameToVarint[codecName] = varintEncode(code) - - const constant = /** @type {CodecConstant} */(codecName.toUpperCase().replace(/-/g, '_')) - constantToCode[constant] = code - - if (!codeToName[code]) { - codeToName[code] = codecName - } -} - -Object.freeze(nameToVarint) -Object.freeze(constantToCode) -Object.freeze(codeToName) -const nameToCode = Object.freeze(baseTable) -module.exports = { - nameToVarint, - constantToCode, - nameToCode, - codeToName -} diff --git a/src/util.js b/src/util.js deleted file mode 100644 index 461fc29..0000000 --- a/src/util.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict' - -const varint = require('varint') -const { toString: uint8ArrayToString } = require('uint8arrays/to-string') -const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string') - -module.exports = { - numberToUint8Array, - uint8ArrayToNumber, - varintUint8ArrayEncode, - varintEncode -} - -/** - * @param {Uint8Array} buf - */ -function uint8ArrayToNumber (buf) { - return parseInt(uint8ArrayToString(buf, 'base16'), 16) -} - -/** - * @param {number} num - */ -function numberToUint8Array (num) { - let hexString = num.toString(16) - if (hexString.length % 2 === 1) { - hexString = '0' + hexString - } - return uint8ArrayFromString(hexString, 'base16') -} - -/** - * @param {Uint8Array} input - */ -function varintUint8ArrayEncode (input) { - return Uint8Array.from(varint.encode(uint8ArrayToNumber(input))) -} - -/** - * @param {number} num - */ -function varintEncode (num) { - return Uint8Array.from(varint.encode(num)) -} diff --git a/test/multicodec.spec.js b/test/multicodec.spec.js deleted file mode 100644 index 359a817..0000000 --- a/test/multicodec.spec.js +++ /dev/null @@ -1,122 +0,0 @@ -/* eslint-env mocha */ -'use strict' - -/** @typedef {import("../src/generated-types").CodecName} CodecName */ -/** @typedef {import("../src/generated-types").CodecCode} CodecCode */ - -const { expect } = require('aegir/utils/chai') -const multicodec = require('../src') -const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string') -const { nameToCode } = require('../src/maps') - -describe('multicodec', () => { - it('add prefix through multicodec (string)', () => { - const buf = uint8ArrayFromString('hey') - const prefixedBuf = multicodec.addPrefix('protobuf', buf) - expect(multicodec.getNameFromData(prefixedBuf)).to.equal('protobuf') - expect(buf).to.eql(multicodec.rmPrefix(prefixedBuf)) - }) - - it('add prefix through code (code)', () => { - const buf = uint8ArrayFromString('hey') - const prefixedBuf = multicodec.addPrefix(uint8ArrayFromString('70', 'base16'), buf) - expect(multicodec.getNameFromData(prefixedBuf)).to.equal('dag-pb') - expect(buf).to.eql(multicodec.rmPrefix(prefixedBuf)) - }) - - it('add multibyte varint prefix (eth-block) through multicodec (string)', () => { - const buf = uint8ArrayFromString('hey') - const prefixedBuf = multicodec.addPrefix('eth-block', buf) - expect(multicodec.getNameFromData(prefixedBuf)).to.equal('eth-block') - expect(buf).to.eql(multicodec.rmPrefix(prefixedBuf)) - }) - - it('returns code via codec name', () => { - const code = multicodec.getVarintFromName('keccak-256') - expect(code).to.eql(uint8ArrayFromString('1b', 'base16')) - }) - - it('returns code from prefixed data', () => { - const buf = uint8ArrayFromString('hey') - const prefixedBuf = multicodec.addPrefix('dag-cbor', buf) - const code = multicodec.getCodeFromData(prefixedBuf) - expect(code).to.eql(multicodec.DAG_CBOR) - }) - - it('returns varint from code', () => { - const code = multicodec.getVarintFromCode(multicodec.KECCAK_256) - expect(code).to.eql(Uint8Array.from([0x1b])) - }) - - it('returns the codec name from code', () => { - expect(multicodec.getNameFromCode(144)).to.eql('eth-block') - expect(multicodec.getNameFromCode(112)).to.eql('dag-pb') - expect(multicodec.getNameFromCode(0xb201)).to.eql('blake2b-8') - }) - - it('returns the codec number from name', () => { - expect(multicodec.getCodeFromName('eth-block')).to.eql(144) - expect(multicodec.getCodeFromName('dag-pb')).to.eql(112) - expect(multicodec.getCodeFromName('blake2b-8')).to.eql(0xb201) - }) - - it('returns all codec numbers from names', () => { - // eslint-disable-next-line guard-for-in - for (const name in nameToCode) { - expect(multicodec.getCodeFromName(/** @type {CodecName} */(name))).to.eql(nameToCode[/** @type {CodecName} */(name)]) - } - }) - - it('returns the codec number from constant', () => { - expect(multicodec.ETH_BLOCK).to.eql(144) - expect(multicodec.DAG_PB).to.eql(112) - expect(multicodec.BLAKE2B_8).to.eql(0xb201) - }) - - it('returns the name from codec number', () => { - expect(multicodec.getNameFromCode(144)).to.eql('eth-block') - expect(multicodec.getNameFromCode(112)).to.eql('dag-pb') - expect(multicodec.getNameFromCode(0x0111)).to.eql('udp') - expect(multicodec.getNameFromCode(0xb201)).to.eql('blake2b-8') - - expect(multicodec.getNameFromCode(multicodec.ETH_BLOCK)).to.eql('eth-block') - expect(multicodec.getNameFromCode(multicodec.DAG_PB)).to.eql('dag-pb') - expect(multicodec.getNameFromCode(multicodec.UDP)).to.eql('udp') - expect(multicodec.getNameFromCode(multicodec.BLAKE2B_8)).to.eql('blake2b-8') - }) - - it('returns p2p when 0x01a5 is used', () => { - // `ipfs` and `p2p` are assigned to `0x01a5`, `ipfs` is deprecated - expect(multicodec.getNameFromCode(0x01a5)).to.eql('p2p') - }) - - it('throws error on unknown codec name when getting the varint from name', () => { - expect(() => { - // @ts-expect-error - multicodec.getVarintFromName('this-codec-doesnt-exist') - }).to.throw( - 'Codec "this-codec-doesnt-exist" not found' - ) - }) - - it('throws error on unknown codec name when getting the code from name', () => { - expect(() => { - // @ts-expect-error - multicodec.getCodeFromName('this-codec-doesnt-exist') - }).to.throw( - 'Codec "this-codec-doesnt-exist" not found' - ) - }) - - it('throws error on unknown codec name when getting the name from the code', () => { - const code = uint8ArrayFromString('ffee', 'base16') - - const buf = uint8ArrayFromString('hey') - const prefixedBuf = multicodec.addPrefix(code, buf) - expect(() => { - multicodec.getNameFromData(prefixedBuf) - }).to.throw( - 'Code "65518" not found' - ) - }) -}) diff --git a/tools/update-table.js b/tools/update-table.js deleted file mode 100755 index 3799848..0000000 --- a/tools/update-table.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict' - -const fs = require('fs') -const path = require('path') -const http = require('ipfs-utils/src/http') -const url = 'https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv' - -const run = async () => { - const rsp = await http.get(url) - const lines = (await rsp.text()).split('\n') - const names = [] - const codes = [] - const processed = lines - .slice(1, lines.length - 1) - .map(l => { - const [name, tag, code] = l.split(',') - return [name.trim(), tag.trim(), code.trim()] - }) - .reduce((acc, l, index, arr) => { - names.push(`'${l[0]}'`) - codes.push(`${l[2].replace('\'', '')}`) - acc += ` '${l[0]}': ${l[2].replace('\'', '')}` - - if (index !== arr.length - 1) { - acc += ',\n' - } - return acc - }, '') - - const typesTemplate = `// DO NOT CHANGE THIS FILE MANUALLY. IT IS GENERATED BY tools/update-table.js - -/** - * Constant names for all available codecs - */ -export type CodecConstant = ${names.map(n => `${n.toUpperCase().replace(/-/g, '_')}`).join(' | ')} - -/** - * Names for all available codecs - */ -export type CodecName = ${names.join(' | ')} - -/** - * Number for all available codecs - */ -export type CodecCode = ${codes.join(' | ')} - -export type ConstantCodeMap = Record -export type NameUint8ArrayMap = Record -export type CodeNameMap = Record -export type NameCodeMap = Record -` - - const tableTemplate = `// DO NOT CHANGE THIS FILE. IT IS GENERATED BY tools/update-table.js -/* eslint quote-props: off */ -'use strict' - -/** - * @type {import('./generated-types').NameCodeMap} - */ -const baseTable = Object.freeze({ -${processed} -}) - -module.exports = { baseTable } -` - - fs.writeFileSync(path.join(__dirname, '../src/generated-types.d.ts'), typesTemplate) - fs.writeFileSync(path.join(__dirname, '../src/generated-table.js'), tableTemplate) -} - -run() From 8a952d9e8ef05b48036b68676fd464a1ac61d9e2 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:29:41 -0700 Subject: [PATCH 06/13] Convert CSV to JSON with `csvtojson`; generate TypeScript types with `quicktype` --- package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a720fc5..b59ec36 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,10 @@ "dist" ], "scripts": { + "prepare": "npm run generate", + "generate": "npm run generate:json && npm run generate:typescript", + "generate:json": "csvtojson ./src/multicodec/table.csv > ./src/multicodecs.json", + "generate:typescript": "quicktype ./src/multicodecs.json -o ./src/types.d.ts --top-level 'Multicodec' --just-types --nice-property-names --explicit-unions --prefer-unions --prefer-types", "lint": "aegir lint", "release": "aegir release", "build": "aegir build", @@ -38,10 +42,10 @@ "url": "https://github.com/multiformats/js-multicodec/issues" }, "homepage": "https://github.com/multiformats/js-multicodec#readme", - "dependencies": { - }, "devDependencies": { - "aegir": "^39.0.9" + "aegir": "^39.0.9", + "csvtojson": "^2.0.10", + "quicktype": "^23.0.47" }, "contributors": [ "Henrique Dias ", From 1bcd57fb3045a6207c3ebd096725715c760fbf47 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:29:54 -0700 Subject: [PATCH 07/13] Generate --- src/multicodecs.json | 535 +++++++++++++++++++++++++++++++++++++++++++ src/types.d.ts | 11 + 2 files changed, 546 insertions(+) create mode 100644 src/multicodecs.json create mode 100644 src/types.d.ts diff --git a/src/multicodecs.json b/src/multicodecs.json new file mode 100644 index 0000000..8eba1b8 --- /dev/null +++ b/src/multicodecs.json @@ -0,0 +1,535 @@ +[ +{"name":"identity","tag":"multihash","code":"0x00","status":"permanent","description":"raw binary"}, +{"name":"cidv1","tag":"cid","code":"0x01","status":"permanent","description":"CIDv1"}, +{"name":"cidv2","tag":"cid","code":"0x02","status":"draft","description":"CIDv2"}, +{"name":"cidv3","tag":"cid","code":"0x03","status":"draft","description":"CIDv3"}, +{"name":"ip4","tag":"multiaddr","code":"0x04","status":"permanent","description":""}, +{"name":"tcp","tag":"multiaddr","code":"0x06","status":"permanent","description":""}, +{"name":"sha1","tag":"multihash","code":"0x11","status":"permanent","description":""}, +{"name":"sha2-256","tag":"multihash","code":"0x12","status":"permanent","description":""}, +{"name":"sha2-512","tag":"multihash","code":"0x13","status":"permanent","description":""}, +{"name":"sha3-512","tag":"multihash","code":"0x14","status":"permanent","description":""}, +{"name":"sha3-384","tag":"multihash","code":"0x15","status":"permanent","description":""}, +{"name":"sha3-256","tag":"multihash","code":"0x16","status":"permanent","description":""}, +{"name":"sha3-224","tag":"multihash","code":"0x17","status":"permanent","description":""}, +{"name":"shake-128","tag":"multihash","code":"0x18","status":"draft","description":""}, +{"name":"shake-256","tag":"multihash","code":"0x19","status":"draft","description":""}, +{"name":"keccak-224","tag":"multihash","code":"0x1a","status":"draft","description":"keccak has variable output length. The number specifies the core length"}, +{"name":"keccak-256","tag":"multihash","code":"0x1b","status":"draft","description":""}, +{"name":"keccak-384","tag":"multihash","code":"0x1c","status":"draft","description":""}, +{"name":"keccak-512","tag":"multihash","code":"0x1d","status":"draft","description":""}, +{"name":"blake3","tag":"multihash","code":"0x1e","status":"draft","description":"BLAKE3 has a default 32 byte output length. The maximum length is (2^64)-1 bytes."}, +{"name":"sha2-384","tag":"multihash","code":"0x20","status":"permanent","description":"aka SHA-384; as specified by FIPS 180-4."}, +{"name":"dccp","tag":"multiaddr","code":"0x21","status":"draft","description":""}, +{"name":"murmur3-x64-64","tag":"hash","code":"0x22","status":"permanent","description":"The first 64-bits of a murmur3-x64-128 - used for UnixFS directory sharding."}, +{"name":"murmur3-32","tag":"hash","code":"0x23","status":"draft","description":""}, +{"name":"ip6","tag":"multiaddr","code":"0x29","status":"permanent","description":""}, +{"name":"ip6zone","tag":"multiaddr","code":"0x2a","status":"draft","description":""}, +{"name":"ipcidr","tag":"multiaddr","code":"0x2b","status":"draft","description":"CIDR mask for IP addresses"}, +{"name":"path","tag":"namespace","code":"0x2f","status":"permanent","description":"Namespace for string paths. Corresponds to `/` in ASCII."}, +{"name":"multicodec","tag":"multiformat","code":"0x30","status":"draft","description":""}, +{"name":"multihash","tag":"multiformat","code":"0x31","status":"draft","description":""}, +{"name":"multiaddr","tag":"multiformat","code":"0x32","status":"draft","description":""}, +{"name":"multibase","tag":"multiformat","code":"0x33","status":"draft","description":""}, +{"name":"varsig","tag":"multiformat","code":"0x34","status":"draft","description":"Variable signature (varsig) multiformat"}, +{"name":"dns","tag":"multiaddr","code":"0x35","status":"permanent","description":""}, +{"name":"dns4","tag":"multiaddr","code":"0x36","status":"permanent","description":""}, +{"name":"dns6","tag":"multiaddr","code":"0x37","status":"permanent","description":""}, +{"name":"dnsaddr","tag":"multiaddr","code":"0x38","status":"permanent","description":""}, +{"name":"protobuf","tag":"serialization","code":"0x50","status":"draft","description":"Protocol Buffers"}, +{"name":"cbor","tag":"ipld","code":"0x51","status":"permanent","description":"CBOR"}, +{"name":"raw","tag":"ipld","code":"0x55","status":"permanent","description":"raw binary"}, +{"name":"dbl-sha2-256","tag":"multihash","code":"0x56","status":"draft","description":""}, +{"name":"rlp","tag":"serialization","code":"0x60","status":"draft","description":"recursive length prefix"}, +{"name":"bencode","tag":"serialization","code":"0x63","status":"draft","description":"bencode"}, +{"name":"dag-pb","tag":"ipld","code":"0x70","status":"permanent","description":"MerkleDAG protobuf"}, +{"name":"dag-cbor","tag":"ipld","code":"0x71","status":"permanent","description":"MerkleDAG cbor"}, +{"name":"libp2p-key","tag":"ipld","code":"0x72","status":"permanent","description":"Libp2p Public Key"}, +{"name":"git-raw","tag":"ipld","code":"0x78","status":"permanent","description":"Raw Git object"}, +{"name":"torrent-info","tag":"ipld","code":"0x7b","status":"draft","description":"Torrent file info field (bencoded)"}, +{"name":"torrent-file","tag":"ipld","code":"0x7c","status":"draft","description":"Torrent file (bencoded)"}, +{"name":"leofcoin-block","tag":"ipld","code":"0x81","status":"draft","description":"Leofcoin Block"}, +{"name":"leofcoin-tx","tag":"ipld","code":"0x82","status":"draft","description":"Leofcoin Transaction"}, +{"name":"leofcoin-pr","tag":"ipld","code":"0x83","status":"draft","description":"Leofcoin Peer Reputation"}, +{"name":"sctp","tag":"multiaddr","code":"0x84","status":"draft","description":""}, +{"name":"dag-jose","tag":"ipld","code":"0x85","status":"draft","description":"MerkleDAG JOSE"}, +{"name":"dag-cose","tag":"ipld","code":"0x86","status":"draft","description":"MerkleDAG COSE"}, +{"name":"eth-block","tag":"ipld","code":"0x90","status":"permanent","description":"Ethereum Header (RLP)"}, +{"name":"eth-block-list","tag":"ipld","code":"0x91","status":"permanent","description":"Ethereum Header List (RLP)"}, +{"name":"eth-tx-trie","tag":"ipld","code":"0x92","status":"permanent","description":"Ethereum Transaction Trie (Eth-Trie)"}, +{"name":"eth-tx","tag":"ipld","code":"0x93","status":"permanent","description":"Ethereum Transaction (MarshalBinary)"}, +{"name":"eth-tx-receipt-trie","tag":"ipld","code":"0x94","status":"permanent","description":"Ethereum Transaction Receipt Trie (Eth-Trie)"}, +{"name":"eth-tx-receipt","tag":"ipld","code":"0x95","status":"permanent","description":"Ethereum Transaction Receipt (MarshalBinary)"}, +{"name":"eth-state-trie","tag":"ipld","code":"0x96","status":"permanent","description":"Ethereum State Trie (Eth-Secure-Trie)"}, +{"name":"eth-account-snapshot","tag":"ipld","code":"0x97","status":"permanent","description":"Ethereum Account Snapshot (RLP)"}, +{"name":"eth-storage-trie","tag":"ipld","code":"0x98","status":"permanent","description":"Ethereum Contract Storage Trie (Eth-Secure-Trie)"}, +{"name":"eth-receipt-log-trie","tag":"ipld","code":"0x99","status":"draft","description":"Ethereum Transaction Receipt Log Trie (Eth-Trie)"}, +{"name":"eth-receipt-log","tag":"ipld","code":"0x9a","status":"draft","description":"Ethereum Transaction Receipt Log (RLP)"}, +{"name":"aes-128","tag":"key","code":"0xa0","status":"draft","description":"128-bit AES symmetric key"}, +{"name":"aes-192","tag":"key","code":"0xa1","status":"draft","description":"192-bit AES symmetric key"}, +{"name":"aes-256","tag":"key","code":"0xa2","status":"draft","description":"256-bit AES symmetric key"}, +{"name":"chacha-128","tag":"key","code":"0xa3","status":"draft","description":"128-bit ChaCha symmetric key"}, +{"name":"chacha-256","tag":"key","code":"0xa4","status":"draft","description":"256-bit ChaCha symmetric key"}, +{"name":"bitcoin-block","tag":"ipld","code":"0xb0","status":"permanent","description":"Bitcoin Block"}, +{"name":"bitcoin-tx","tag":"ipld","code":"0xb1","status":"permanent","description":"Bitcoin Tx"}, +{"name":"bitcoin-witness-commitment","tag":"ipld","code":"0xb2","status":"permanent","description":"Bitcoin Witness Commitment"}, +{"name":"zcash-block","tag":"ipld","code":"0xc0","status":"permanent","description":"Zcash Block"}, +{"name":"zcash-tx","tag":"ipld","code":"0xc1","status":"permanent","description":"Zcash Tx"}, +{"name":"caip-50","tag":"multiformat","code":"0xca","status":"draft","description":"CAIP-50 multi-chain account id"}, +{"name":"streamid","tag":"namespace","code":"0xce","status":"draft","description":"Ceramic Stream Id"}, +{"name":"stellar-block","tag":"ipld","code":"0xd0","status":"draft","description":"Stellar Block"}, +{"name":"stellar-tx","tag":"ipld","code":"0xd1","status":"draft","description":"Stellar Tx"}, +{"name":"md4","tag":"multihash","code":"0xd4","status":"draft","description":""}, +{"name":"md5","tag":"multihash","code":"0xd5","status":"draft","description":""}, +{"name":"decred-block","tag":"ipld","code":"0xe0","status":"draft","description":"Decred Block"}, +{"name":"decred-tx","tag":"ipld","code":"0xe1","status":"draft","description":"Decred Tx"}, +{"name":"ipld","tag":"namespace","code":"0xe2","status":"draft","description":"IPLD path"}, +{"name":"ipfs","tag":"namespace","code":"0xe3","status":"draft","description":"IPFS path"}, +{"name":"swarm","tag":"namespace","code":"0xe4","status":"draft","description":"Swarm path"}, +{"name":"ipns","tag":"namespace","code":"0xe5","status":"draft","description":"IPNS path"}, +{"name":"zeronet","tag":"namespace","code":"0xe6","status":"draft","description":"ZeroNet site address"}, +{"name":"secp256k1-pub","tag":"key","code":"0xe7","status":"draft","description":"Secp256k1 public key (compressed)"}, +{"name":"dnslink","tag":"namespace","code":"0xe8","status":"permanent","description":"DNSLink path"}, +{"name":"bls12_381-g1-pub","tag":"key","code":"0xea","status":"draft","description":"BLS12-381 public key in the G1 field"}, +{"name":"bls12_381-g2-pub","tag":"key","code":"0xeb","status":"draft","description":"BLS12-381 public key in the G2 field"}, +{"name":"x25519-pub","tag":"key","code":"0xec","status":"draft","description":"Curve25519 public key"}, +{"name":"ed25519-pub","tag":"key","code":"0xed","status":"draft","description":"Ed25519 public key"}, +{"name":"bls12_381-g1g2-pub","tag":"key","code":"0xee","status":"draft","description":"BLS12-381 concatenated public keys in both the G1 and G2 fields"}, +{"name":"sr25519-pub","tag":"key","code":"0xef","status":"draft","description":"Sr25519 public key"}, +{"name":"dash-block","tag":"ipld","code":"0xf0","status":"draft","description":"Dash Block"}, +{"name":"dash-tx","tag":"ipld","code":"0xf1","status":"draft","description":"Dash Tx"}, +{"name":"swarm-manifest","tag":"ipld","code":"0xfa","status":"draft","description":"Swarm Manifest"}, +{"name":"swarm-feed","tag":"ipld","code":"0xfb","status":"draft","description":"Swarm Feed"}, +{"name":"beeson","tag":"ipld","code":"0xfc","status":"draft","description":"Swarm BeeSon"}, +{"name":"udp","tag":"multiaddr","code":"0x0111","status":"draft","description":""}, +{"name":"p2p-webrtc-star","tag":"multiaddr","code":"0x0113","status":"deprecated","description":"Use webrtc or webrtc-direct instead"}, +{"name":"p2p-webrtc-direct","tag":"multiaddr","code":"0x0114","status":"deprecated","description":"Use webrtc or webrtc-direct instead"}, +{"name":"p2p-stardust","tag":"multiaddr","code":"0x0115","status":"deprecated","description":""}, +{"name":"webrtc-direct","tag":"multiaddr","code":"0x0118","status":"draft","description":"ICE-lite webrtc transport with SDP munging during connection establishment and without use of a STUN server"}, +{"name":"webrtc","tag":"multiaddr","code":"0x0119","status":"draft","description":"webrtc transport where connection establishment is according to w3c spec"}, +{"name":"p2p-circuit","tag":"multiaddr","code":"0x0122","status":"permanent","description":""}, +{"name":"dag-json","tag":"ipld","code":"0x0129","status":"permanent","description":"MerkleDAG json"}, +{"name":"udt","tag":"multiaddr","code":"0x012d","status":"draft","description":""}, +{"name":"utp","tag":"multiaddr","code":"0x012e","status":"draft","description":""}, +{"name":"crc32","tag":"hash","code":"0x0132","status":"draft","description":"CRC-32 non-cryptographic hash algorithm (IEEE 802.3)"}, +{"name":"crc64-ecma","tag":"hash","code":"0x0164","status":"draft","description":"CRC-64 non-cryptographic hash algorithm (ECMA-182 - Annex B)"}, +{"name":"unix","tag":"multiaddr","code":"0x0190","status":"permanent","description":""}, +{"name":"thread","tag":"multiaddr","code":"0x0196","status":"draft","description":"Textile Thread"}, +{"name":"p2p","tag":"multiaddr","code":"0x01a5","status":"permanent","description":"libp2p"}, +{"name":"https","tag":"multiaddr","code":"0x01bb","status":"draft","description":""}, +{"name":"onion","tag":"multiaddr","code":"0x01bc","status":"draft","description":""}, +{"name":"onion3","tag":"multiaddr","code":"0x01bd","status":"draft","description":""}, +{"name":"garlic64","tag":"multiaddr","code":"0x01be","status":"draft","description":"I2P base64 (raw public key)"}, +{"name":"garlic32","tag":"multiaddr","code":"0x01bf","status":"draft","description":"I2P base32 (hashed public key or encoded public key/checksum+optional secret)"}, +{"name":"tls","tag":"multiaddr","code":"0x01c0","status":"draft","description":""}, +{"name":"sni","tag":"multiaddr","code":"0x01c1","status":"draft","description":"Server Name Indication RFC 6066 § 3"} +, +{"name":"noise","tag":"multiaddr","code":"0x01c6","status":"draft","description":""}, +{"name":"quic","tag":"multiaddr","code":"0x01cc","status":"permanent","description":""}, +{"name":"quic-v1","tag":"multiaddr","code":"0x01cd","status":"permanent","description":""}, +{"name":"webtransport","tag":"multiaddr","code":"0x01d1","status":"draft","description":""}, +{"name":"certhash","tag":"multiaddr","code":"0x01d2","status":"draft","description":"TLS certificate's fingerprint as a multihash"}, +{"name":"ws","tag":"multiaddr","code":"0x01dd","status":"permanent","description":""}, +{"name":"wss","tag":"multiaddr","code":"0x01de","status":"permanent","description":""}, +{"name":"p2p-websocket-star","tag":"multiaddr","code":"0x01df","status":"permanent","description":""}, +{"name":"http","tag":"multiaddr","code":"0x01e0","status":"draft","description":""}, +{"name":"swhid-1-snp","tag":"ipld","code":"0x01f0","status":"draft","description":"SoftWare Heritage persistent IDentifier version 1 snapshot"}, +{"name":"json","tag":"ipld","code":"0x0200","status":"permanent","description":"JSON (UTF-8-encoded)"}, +{"name":"messagepack","tag":"serialization","code":"0x0201","status":"draft","description":"MessagePack"}, +{"name":"car","tag":"serialization","code":"0x0202","status":"draft","description":"Content Addressable aRchive (CAR)"}, +{"name":"ipns-record","tag":"serialization","code":"0x0300","status":"permanent","description":"Signed IPNS Record"}, +{"name":"libp2p-peer-record","tag":"libp2p","code":"0x0301","status":"permanent","description":"libp2p peer record type"}, +{"name":"libp2p-relay-rsvp","tag":"libp2p","code":"0x0302","status":"permanent","description":"libp2p relay reservation voucher"}, +{"name":"memorytransport","tag":"libp2p","code":"0x0309","status":"permanent","description":"in memory transport for self-dialing and testing; arbitrary"}, +{"name":"car-index-sorted","tag":"serialization","code":"0x0400","status":"draft","description":"CARv2 IndexSorted index format"}, +{"name":"car-multihash-index-sorted","tag":"serialization","code":"0x0401","status":"draft","description":"CARv2 MultihashIndexSorted index format"}, +{"name":"transport-bitswap","tag":"transport","code":"0x0900","status":"draft","description":"Bitswap datatransfer"}, +{"name":"transport-graphsync-filecoinv1","tag":"transport","code":"0x0910","status":"draft","description":"Filecoin graphsync datatransfer"}, +{"name":"transport-ipfs-gateway-http","tag":"transport","code":"0x0920","status":"draft","description":"HTTP IPFS Gateway trustless datatransfer"}, +{"name":"multidid","tag":"multiformat","code":"0x0d1d","status":"draft","description":"Compact encoding for Decentralized Identifers"}, +{"name":"sha2-256-trunc254-padded","tag":"multihash","code":"0x1012","status":"permanent","description":"SHA2-256 with the two most significant bits from the last byte zeroed (as via a mask with 0b00111111) - used for proving trees as in Filecoin"}, +{"name":"sha2-224","tag":"multihash","code":"0x1013","status":"permanent","description":"aka SHA-224; as specified by FIPS 180-4."}, +{"name":"sha2-512-224","tag":"multihash","code":"0x1014","status":"permanent","description":"aka SHA-512/224; as specified by FIPS 180-4."}, +{"name":"sha2-512-256","tag":"multihash","code":"0x1015","status":"permanent","description":"aka SHA-512/256; as specified by FIPS 180-4."}, +{"name":"murmur3-x64-128","tag":"hash","code":"0x1022","status":"draft","description":""}, +{"name":"ripemd-128","tag":"multihash","code":"0x1052","status":"draft","description":""}, +{"name":"ripemd-160","tag":"multihash","code":"0x1053","status":"draft","description":""}, +{"name":"ripemd-256","tag":"multihash","code":"0x1054","status":"draft","description":""}, +{"name":"ripemd-320","tag":"multihash","code":"0x1055","status":"draft","description":""}, +{"name":"x11","tag":"multihash","code":"0x1100","status":"draft","description":""}, +{"name":"p256-pub","tag":"key","code":"0x1200","status":"draft","description":"P-256 public Key (compressed)"}, +{"name":"p384-pub","tag":"key","code":"0x1201","status":"draft","description":"P-384 public Key (compressed)"}, +{"name":"p521-pub","tag":"key","code":"0x1202","status":"draft","description":"P-521 public Key (compressed)"}, +{"name":"ed448-pub","tag":"key","code":"0x1203","status":"draft","description":"Ed448 public Key"}, +{"name":"x448-pub","tag":"key","code":"0x1204","status":"draft","description":"X448 public Key"}, +{"name":"rsa-pub","tag":"key","code":"0x1205","status":"draft","description":"RSA public key. DER-encoded ASN.1 type RSAPublicKey according to IETF RFC 8017 (PKCS #1)"}, +{"name":"sm2-pub","tag":"key","code":"0x1206","status":"draft","description":"SM2 public key (compressed)"}, +{"name":"ed25519-priv","tag":"key","code":"0x1300","status":"draft","description":"Ed25519 private key"}, +{"name":"secp256k1-priv","tag":"key","code":"0x1301","status":"draft","description":"Secp256k1 private key"}, +{"name":"x25519-priv","tag":"key","code":"0x1302","status":"draft","description":"Curve25519 private key"}, +{"name":"sr25519-priv","tag":"key","code":"0x1303","status":"draft","description":"Sr25519 private key"}, +{"name":"rsa-priv","tag":"key","code":"0x1305","status":"draft","description":"RSA private key"}, +{"name":"p256-priv","tag":"key","code":"0x1306","status":"draft","description":"P-256 private key"}, +{"name":"p384-priv","tag":"key","code":"0x1307","status":"draft","description":"P-384 private key"}, +{"name":"p521-priv","tag":"key","code":"0x1308","status":"draft","description":"P-521 private key"}, +{"name":"kangarootwelve","tag":"multihash","code":"0x1d01","status":"draft","description":"KangarooTwelve is an extendable-output hash function based on Keccak-p"}, +{"name":"aes-gcm-256","tag":"encryption","code":"0x2000","status":"draft","description":"AES Galois/Counter Mode with 256-bit key and 12-byte IV"}, +{"name":"silverpine","tag":"multiaddr","code":"0x3f42","status":"draft","description":"Experimental QUIC over yggdrasil and ironwood routing protocol"}, +{"name":"sm3-256","tag":"multihash","code":"0x534d","status":"draft","description":""}, +{"name":"blake2b-8","tag":"multihash","code":"0xb201","status":"draft","description":"Blake2b consists of 64 output lengths that give different hashes"}, +{"name":"blake2b-16","tag":"multihash","code":"0xb202","status":"draft","description":""}, +{"name":"blake2b-24","tag":"multihash","code":"0xb203","status":"draft","description":""}, +{"name":"blake2b-32","tag":"multihash","code":"0xb204","status":"draft","description":""}, +{"name":"blake2b-40","tag":"multihash","code":"0xb205","status":"draft","description":""}, +{"name":"blake2b-48","tag":"multihash","code":"0xb206","status":"draft","description":""}, +{"name":"blake2b-56","tag":"multihash","code":"0xb207","status":"draft","description":""}, +{"name":"blake2b-64","tag":"multihash","code":"0xb208","status":"draft","description":""}, +{"name":"blake2b-72","tag":"multihash","code":"0xb209","status":"draft","description":""}, +{"name":"blake2b-80","tag":"multihash","code":"0xb20a","status":"draft","description":""}, +{"name":"blake2b-88","tag":"multihash","code":"0xb20b","status":"draft","description":""}, +{"name":"blake2b-96","tag":"multihash","code":"0xb20c","status":"draft","description":""}, +{"name":"blake2b-104","tag":"multihash","code":"0xb20d","status":"draft","description":""}, +{"name":"blake2b-112","tag":"multihash","code":"0xb20e","status":"draft","description":""}, +{"name":"blake2b-120","tag":"multihash","code":"0xb20f","status":"draft","description":""}, +{"name":"blake2b-128","tag":"multihash","code":"0xb210","status":"draft","description":""}, +{"name":"blake2b-136","tag":"multihash","code":"0xb211","status":"draft","description":""}, +{"name":"blake2b-144","tag":"multihash","code":"0xb212","status":"draft","description":""}, +{"name":"blake2b-152","tag":"multihash","code":"0xb213","status":"draft","description":""}, +{"name":"blake2b-160","tag":"multihash","code":"0xb214","status":"draft","description":""}, +{"name":"blake2b-168","tag":"multihash","code":"0xb215","status":"draft","description":""}, +{"name":"blake2b-176","tag":"multihash","code":"0xb216","status":"draft","description":""}, +{"name":"blake2b-184","tag":"multihash","code":"0xb217","status":"draft","description":""}, +{"name":"blake2b-192","tag":"multihash","code":"0xb218","status":"draft","description":""}, +{"name":"blake2b-200","tag":"multihash","code":"0xb219","status":"draft","description":""}, +{"name":"blake2b-208","tag":"multihash","code":"0xb21a","status":"draft","description":""}, +{"name":"blake2b-216","tag":"multihash","code":"0xb21b","status":"draft","description":""}, +{"name":"blake2b-224","tag":"multihash","code":"0xb21c","status":"draft","description":""}, +{"name":"blake2b-232","tag":"multihash","code":"0xb21d","status":"draft","description":""}, +{"name":"blake2b-240","tag":"multihash","code":"0xb21e","status":"draft","description":""}, +{"name":"blake2b-248","tag":"multihash","code":"0xb21f","status":"draft","description":""}, +{"name":"blake2b-256","tag":"multihash","code":"0xb220","status":"permanent","description":""}, +{"name":"blake2b-264","tag":"multihash","code":"0xb221","status":"draft","description":""}, +{"name":"blake2b-272","tag":"multihash","code":"0xb222","status":"draft","description":""}, +{"name":"blake2b-280","tag":"multihash","code":"0xb223","status":"draft","description":""}, +{"name":"blake2b-288","tag":"multihash","code":"0xb224","status":"draft","description":""}, +{"name":"blake2b-296","tag":"multihash","code":"0xb225","status":"draft","description":""}, +{"name":"blake2b-304","tag":"multihash","code":"0xb226","status":"draft","description":""}, +{"name":"blake2b-312","tag":"multihash","code":"0xb227","status":"draft","description":""}, +{"name":"blake2b-320","tag":"multihash","code":"0xb228","status":"draft","description":""}, +{"name":"blake2b-328","tag":"multihash","code":"0xb229","status":"draft","description":""}, +{"name":"blake2b-336","tag":"multihash","code":"0xb22a","status":"draft","description":""}, +{"name":"blake2b-344","tag":"multihash","code":"0xb22b","status":"draft","description":""}, +{"name":"blake2b-352","tag":"multihash","code":"0xb22c","status":"draft","description":""}, +{"name":"blake2b-360","tag":"multihash","code":"0xb22d","status":"draft","description":""}, +{"name":"blake2b-368","tag":"multihash","code":"0xb22e","status":"draft","description":""}, +{"name":"blake2b-376","tag":"multihash","code":"0xb22f","status":"draft","description":""}, +{"name":"blake2b-384","tag":"multihash","code":"0xb230","status":"draft","description":""}, +{"name":"blake2b-392","tag":"multihash","code":"0xb231","status":"draft","description":""}, +{"name":"blake2b-400","tag":"multihash","code":"0xb232","status":"draft","description":""}, +{"name":"blake2b-408","tag":"multihash","code":"0xb233","status":"draft","description":""}, +{"name":"blake2b-416","tag":"multihash","code":"0xb234","status":"draft","description":""}, +{"name":"blake2b-424","tag":"multihash","code":"0xb235","status":"draft","description":""}, +{"name":"blake2b-432","tag":"multihash","code":"0xb236","status":"draft","description":""}, +{"name":"blake2b-440","tag":"multihash","code":"0xb237","status":"draft","description":""}, +{"name":"blake2b-448","tag":"multihash","code":"0xb238","status":"draft","description":""}, +{"name":"blake2b-456","tag":"multihash","code":"0xb239","status":"draft","description":""}, +{"name":"blake2b-464","tag":"multihash","code":"0xb23a","status":"draft","description":""}, +{"name":"blake2b-472","tag":"multihash","code":"0xb23b","status":"draft","description":""}, +{"name":"blake2b-480","tag":"multihash","code":"0xb23c","status":"draft","description":""}, +{"name":"blake2b-488","tag":"multihash","code":"0xb23d","status":"draft","description":""}, +{"name":"blake2b-496","tag":"multihash","code":"0xb23e","status":"draft","description":""}, +{"name":"blake2b-504","tag":"multihash","code":"0xb23f","status":"draft","description":""}, +{"name":"blake2b-512","tag":"multihash","code":"0xb240","status":"draft","description":""}, +{"name":"blake2s-8","tag":"multihash","code":"0xb241","status":"draft","description":"Blake2s consists of 32 output lengths that give different hashes"}, +{"name":"blake2s-16","tag":"multihash","code":"0xb242","status":"draft","description":""}, +{"name":"blake2s-24","tag":"multihash","code":"0xb243","status":"draft","description":""}, +{"name":"blake2s-32","tag":"multihash","code":"0xb244","status":"draft","description":""}, +{"name":"blake2s-40","tag":"multihash","code":"0xb245","status":"draft","description":""}, +{"name":"blake2s-48","tag":"multihash","code":"0xb246","status":"draft","description":""}, +{"name":"blake2s-56","tag":"multihash","code":"0xb247","status":"draft","description":""}, +{"name":"blake2s-64","tag":"multihash","code":"0xb248","status":"draft","description":""}, +{"name":"blake2s-72","tag":"multihash","code":"0xb249","status":"draft","description":""}, +{"name":"blake2s-80","tag":"multihash","code":"0xb24a","status":"draft","description":""}, +{"name":"blake2s-88","tag":"multihash","code":"0xb24b","status":"draft","description":""}, +{"name":"blake2s-96","tag":"multihash","code":"0xb24c","status":"draft","description":""}, +{"name":"blake2s-104","tag":"multihash","code":"0xb24d","status":"draft","description":""}, +{"name":"blake2s-112","tag":"multihash","code":"0xb24e","status":"draft","description":""}, +{"name":"blake2s-120","tag":"multihash","code":"0xb24f","status":"draft","description":""}, +{"name":"blake2s-128","tag":"multihash","code":"0xb250","status":"draft","description":""}, +{"name":"blake2s-136","tag":"multihash","code":"0xb251","status":"draft","description":""}, +{"name":"blake2s-144","tag":"multihash","code":"0xb252","status":"draft","description":""}, +{"name":"blake2s-152","tag":"multihash","code":"0xb253","status":"draft","description":""}, +{"name":"blake2s-160","tag":"multihash","code":"0xb254","status":"draft","description":""}, +{"name":"blake2s-168","tag":"multihash","code":"0xb255","status":"draft","description":""}, +{"name":"blake2s-176","tag":"multihash","code":"0xb256","status":"draft","description":""}, +{"name":"blake2s-184","tag":"multihash","code":"0xb257","status":"draft","description":""}, +{"name":"blake2s-192","tag":"multihash","code":"0xb258","status":"draft","description":""}, +{"name":"blake2s-200","tag":"multihash","code":"0xb259","status":"draft","description":""}, +{"name":"blake2s-208","tag":"multihash","code":"0xb25a","status":"draft","description":""}, +{"name":"blake2s-216","tag":"multihash","code":"0xb25b","status":"draft","description":""}, +{"name":"blake2s-224","tag":"multihash","code":"0xb25c","status":"draft","description":""}, +{"name":"blake2s-232","tag":"multihash","code":"0xb25d","status":"draft","description":""}, +{"name":"blake2s-240","tag":"multihash","code":"0xb25e","status":"draft","description":""}, +{"name":"blake2s-248","tag":"multihash","code":"0xb25f","status":"draft","description":""}, +{"name":"blake2s-256","tag":"multihash","code":"0xb260","status":"draft","description":""}, +{"name":"skein256-8","tag":"multihash","code":"0xb301","status":"draft","description":"Skein256 consists of 32 output lengths that give different hashes"}, +{"name":"skein256-16","tag":"multihash","code":"0xb302","status":"draft","description":""}, +{"name":"skein256-24","tag":"multihash","code":"0xb303","status":"draft","description":""}, +{"name":"skein256-32","tag":"multihash","code":"0xb304","status":"draft","description":""}, +{"name":"skein256-40","tag":"multihash","code":"0xb305","status":"draft","description":""}, +{"name":"skein256-48","tag":"multihash","code":"0xb306","status":"draft","description":""}, +{"name":"skein256-56","tag":"multihash","code":"0xb307","status":"draft","description":""}, +{"name":"skein256-64","tag":"multihash","code":"0xb308","status":"draft","description":""}, +{"name":"skein256-72","tag":"multihash","code":"0xb309","status":"draft","description":""}, +{"name":"skein256-80","tag":"multihash","code":"0xb30a","status":"draft","description":""}, +{"name":"skein256-88","tag":"multihash","code":"0xb30b","status":"draft","description":""}, +{"name":"skein256-96","tag":"multihash","code":"0xb30c","status":"draft","description":""}, +{"name":"skein256-104","tag":"multihash","code":"0xb30d","status":"draft","description":""}, +{"name":"skein256-112","tag":"multihash","code":"0xb30e","status":"draft","description":""}, +{"name":"skein256-120","tag":"multihash","code":"0xb30f","status":"draft","description":""}, +{"name":"skein256-128","tag":"multihash","code":"0xb310","status":"draft","description":""}, +{"name":"skein256-136","tag":"multihash","code":"0xb311","status":"draft","description":""}, +{"name":"skein256-144","tag":"multihash","code":"0xb312","status":"draft","description":""}, +{"name":"skein256-152","tag":"multihash","code":"0xb313","status":"draft","description":""}, +{"name":"skein256-160","tag":"multihash","code":"0xb314","status":"draft","description":""}, +{"name":"skein256-168","tag":"multihash","code":"0xb315","status":"draft","description":""}, +{"name":"skein256-176","tag":"multihash","code":"0xb316","status":"draft","description":""}, +{"name":"skein256-184","tag":"multihash","code":"0xb317","status":"draft","description":""}, +{"name":"skein256-192","tag":"multihash","code":"0xb318","status":"draft","description":""}, +{"name":"skein256-200","tag":"multihash","code":"0xb319","status":"draft","description":""}, +{"name":"skein256-208","tag":"multihash","code":"0xb31a","status":"draft","description":""}, +{"name":"skein256-216","tag":"multihash","code":"0xb31b","status":"draft","description":""}, +{"name":"skein256-224","tag":"multihash","code":"0xb31c","status":"draft","description":""}, +{"name":"skein256-232","tag":"multihash","code":"0xb31d","status":"draft","description":""}, +{"name":"skein256-240","tag":"multihash","code":"0xb31e","status":"draft","description":""}, +{"name":"skein256-248","tag":"multihash","code":"0xb31f","status":"draft","description":""}, +{"name":"skein256-256","tag":"multihash","code":"0xb320","status":"draft","description":""}, +{"name":"skein512-8","tag":"multihash","code":"0xb321","status":"draft","description":"Skein512 consists of 64 output lengths that give different hashes"}, +{"name":"skein512-16","tag":"multihash","code":"0xb322","status":"draft","description":""}, +{"name":"skein512-24","tag":"multihash","code":"0xb323","status":"draft","description":""}, +{"name":"skein512-32","tag":"multihash","code":"0xb324","status":"draft","description":""}, +{"name":"skein512-40","tag":"multihash","code":"0xb325","status":"draft","description":""}, +{"name":"skein512-48","tag":"multihash","code":"0xb326","status":"draft","description":""}, +{"name":"skein512-56","tag":"multihash","code":"0xb327","status":"draft","description":""}, +{"name":"skein512-64","tag":"multihash","code":"0xb328","status":"draft","description":""}, +{"name":"skein512-72","tag":"multihash","code":"0xb329","status":"draft","description":""}, +{"name":"skein512-80","tag":"multihash","code":"0xb32a","status":"draft","description":""}, +{"name":"skein512-88","tag":"multihash","code":"0xb32b","status":"draft","description":""}, +{"name":"skein512-96","tag":"multihash","code":"0xb32c","status":"draft","description":""}, +{"name":"skein512-104","tag":"multihash","code":"0xb32d","status":"draft","description":""}, +{"name":"skein512-112","tag":"multihash","code":"0xb32e","status":"draft","description":""}, +{"name":"skein512-120","tag":"multihash","code":"0xb32f","status":"draft","description":""}, +{"name":"skein512-128","tag":"multihash","code":"0xb330","status":"draft","description":""}, +{"name":"skein512-136","tag":"multihash","code":"0xb331","status":"draft","description":""}, +{"name":"skein512-144","tag":"multihash","code":"0xb332","status":"draft","description":""}, +{"name":"skein512-152","tag":"multihash","code":"0xb333","status":"draft","description":""}, +{"name":"skein512-160","tag":"multihash","code":"0xb334","status":"draft","description":""}, +{"name":"skein512-168","tag":"multihash","code":"0xb335","status":"draft","description":""}, +{"name":"skein512-176","tag":"multihash","code":"0xb336","status":"draft","description":""}, +{"name":"skein512-184","tag":"multihash","code":"0xb337","status":"draft","description":""}, +{"name":"skein512-192","tag":"multihash","code":"0xb338","status":"draft","description":""}, +{"name":"skein512-200","tag":"multihash","code":"0xb339","status":"draft","description":""}, +{"name":"skein512-208","tag":"multihash","code":"0xb33a","status":"draft","description":""}, +{"name":"skein512-216","tag":"multihash","code":"0xb33b","status":"draft","description":""}, +{"name":"skein512-224","tag":"multihash","code":"0xb33c","status":"draft","description":""}, +{"name":"skein512-232","tag":"multihash","code":"0xb33d","status":"draft","description":""}, +{"name":"skein512-240","tag":"multihash","code":"0xb33e","status":"draft","description":""}, +{"name":"skein512-248","tag":"multihash","code":"0xb33f","status":"draft","description":""}, +{"name":"skein512-256","tag":"multihash","code":"0xb340","status":"draft","description":""}, +{"name":"skein512-264","tag":"multihash","code":"0xb341","status":"draft","description":""}, +{"name":"skein512-272","tag":"multihash","code":"0xb342","status":"draft","description":""}, +{"name":"skein512-280","tag":"multihash","code":"0xb343","status":"draft","description":""}, +{"name":"skein512-288","tag":"multihash","code":"0xb344","status":"draft","description":""}, +{"name":"skein512-296","tag":"multihash","code":"0xb345","status":"draft","description":""}, +{"name":"skein512-304","tag":"multihash","code":"0xb346","status":"draft","description":""}, +{"name":"skein512-312","tag":"multihash","code":"0xb347","status":"draft","description":""}, +{"name":"skein512-320","tag":"multihash","code":"0xb348","status":"draft","description":""}, +{"name":"skein512-328","tag":"multihash","code":"0xb349","status":"draft","description":""}, +{"name":"skein512-336","tag":"multihash","code":"0xb34a","status":"draft","description":""}, +{"name":"skein512-344","tag":"multihash","code":"0xb34b","status":"draft","description":""}, +{"name":"skein512-352","tag":"multihash","code":"0xb34c","status":"draft","description":""}, +{"name":"skein512-360","tag":"multihash","code":"0xb34d","status":"draft","description":""}, +{"name":"skein512-368","tag":"multihash","code":"0xb34e","status":"draft","description":""}, +{"name":"skein512-376","tag":"multihash","code":"0xb34f","status":"draft","description":""}, +{"name":"skein512-384","tag":"multihash","code":"0xb350","status":"draft","description":""}, +{"name":"skein512-392","tag":"multihash","code":"0xb351","status":"draft","description":""}, +{"name":"skein512-400","tag":"multihash","code":"0xb352","status":"draft","description":""}, +{"name":"skein512-408","tag":"multihash","code":"0xb353","status":"draft","description":""}, +{"name":"skein512-416","tag":"multihash","code":"0xb354","status":"draft","description":""}, +{"name":"skein512-424","tag":"multihash","code":"0xb355","status":"draft","description":""}, +{"name":"skein512-432","tag":"multihash","code":"0xb356","status":"draft","description":""}, +{"name":"skein512-440","tag":"multihash","code":"0xb357","status":"draft","description":""}, +{"name":"skein512-448","tag":"multihash","code":"0xb358","status":"draft","description":""}, +{"name":"skein512-456","tag":"multihash","code":"0xb359","status":"draft","description":""}, +{"name":"skein512-464","tag":"multihash","code":"0xb35a","status":"draft","description":""}, +{"name":"skein512-472","tag":"multihash","code":"0xb35b","status":"draft","description":""}, +{"name":"skein512-480","tag":"multihash","code":"0xb35c","status":"draft","description":""}, +{"name":"skein512-488","tag":"multihash","code":"0xb35d","status":"draft","description":""}, +{"name":"skein512-496","tag":"multihash","code":"0xb35e","status":"draft","description":""}, +{"name":"skein512-504","tag":"multihash","code":"0xb35f","status":"draft","description":""}, +{"name":"skein512-512","tag":"multihash","code":"0xb360","status":"draft","description":""}, +{"name":"skein1024-8","tag":"multihash","code":"0xb361","status":"draft","description":"Skein1024 consists of 128 output lengths that give different hashes"}, +{"name":"skein1024-16","tag":"multihash","code":"0xb362","status":"draft","description":""}, +{"name":"skein1024-24","tag":"multihash","code":"0xb363","status":"draft","description":""}, +{"name":"skein1024-32","tag":"multihash","code":"0xb364","status":"draft","description":""}, +{"name":"skein1024-40","tag":"multihash","code":"0xb365","status":"draft","description":""}, +{"name":"skein1024-48","tag":"multihash","code":"0xb366","status":"draft","description":""}, +{"name":"skein1024-56","tag":"multihash","code":"0xb367","status":"draft","description":""}, +{"name":"skein1024-64","tag":"multihash","code":"0xb368","status":"draft","description":""}, +{"name":"skein1024-72","tag":"multihash","code":"0xb369","status":"draft","description":""}, +{"name":"skein1024-80","tag":"multihash","code":"0xb36a","status":"draft","description":""}, +{"name":"skein1024-88","tag":"multihash","code":"0xb36b","status":"draft","description":""}, +{"name":"skein1024-96","tag":"multihash","code":"0xb36c","status":"draft","description":""}, +{"name":"skein1024-104","tag":"multihash","code":"0xb36d","status":"draft","description":""}, +{"name":"skein1024-112","tag":"multihash","code":"0xb36e","status":"draft","description":""}, +{"name":"skein1024-120","tag":"multihash","code":"0xb36f","status":"draft","description":""}, +{"name":"skein1024-128","tag":"multihash","code":"0xb370","status":"draft","description":""}, +{"name":"skein1024-136","tag":"multihash","code":"0xb371","status":"draft","description":""}, +{"name":"skein1024-144","tag":"multihash","code":"0xb372","status":"draft","description":""}, +{"name":"skein1024-152","tag":"multihash","code":"0xb373","status":"draft","description":""}, +{"name":"skein1024-160","tag":"multihash","code":"0xb374","status":"draft","description":""}, +{"name":"skein1024-168","tag":"multihash","code":"0xb375","status":"draft","description":""}, +{"name":"skein1024-176","tag":"multihash","code":"0xb376","status":"draft","description":""}, +{"name":"skein1024-184","tag":"multihash","code":"0xb377","status":"draft","description":""}, +{"name":"skein1024-192","tag":"multihash","code":"0xb378","status":"draft","description":""}, +{"name":"skein1024-200","tag":"multihash","code":"0xb379","status":"draft","description":""}, +{"name":"skein1024-208","tag":"multihash","code":"0xb37a","status":"draft","description":""}, +{"name":"skein1024-216","tag":"multihash","code":"0xb37b","status":"draft","description":""}, +{"name":"skein1024-224","tag":"multihash","code":"0xb37c","status":"draft","description":""}, +{"name":"skein1024-232","tag":"multihash","code":"0xb37d","status":"draft","description":""}, +{"name":"skein1024-240","tag":"multihash","code":"0xb37e","status":"draft","description":""}, +{"name":"skein1024-248","tag":"multihash","code":"0xb37f","status":"draft","description":""}, +{"name":"skein1024-256","tag":"multihash","code":"0xb380","status":"draft","description":""}, +{"name":"skein1024-264","tag":"multihash","code":"0xb381","status":"draft","description":""}, +{"name":"skein1024-272","tag":"multihash","code":"0xb382","status":"draft","description":""}, +{"name":"skein1024-280","tag":"multihash","code":"0xb383","status":"draft","description":""}, +{"name":"skein1024-288","tag":"multihash","code":"0xb384","status":"draft","description":""}, +{"name":"skein1024-296","tag":"multihash","code":"0xb385","status":"draft","description":""}, +{"name":"skein1024-304","tag":"multihash","code":"0xb386","status":"draft","description":""}, +{"name":"skein1024-312","tag":"multihash","code":"0xb387","status":"draft","description":""}, +{"name":"skein1024-320","tag":"multihash","code":"0xb388","status":"draft","description":""}, +{"name":"skein1024-328","tag":"multihash","code":"0xb389","status":"draft","description":""}, +{"name":"skein1024-336","tag":"multihash","code":"0xb38a","status":"draft","description":""}, +{"name":"skein1024-344","tag":"multihash","code":"0xb38b","status":"draft","description":""}, +{"name":"skein1024-352","tag":"multihash","code":"0xb38c","status":"draft","description":""}, +{"name":"skein1024-360","tag":"multihash","code":"0xb38d","status":"draft","description":""}, +{"name":"skein1024-368","tag":"multihash","code":"0xb38e","status":"draft","description":""}, +{"name":"skein1024-376","tag":"multihash","code":"0xb38f","status":"draft","description":""}, +{"name":"skein1024-384","tag":"multihash","code":"0xb390","status":"draft","description":""}, +{"name":"skein1024-392","tag":"multihash","code":"0xb391","status":"draft","description":""}, +{"name":"skein1024-400","tag":"multihash","code":"0xb392","status":"draft","description":""}, +{"name":"skein1024-408","tag":"multihash","code":"0xb393","status":"draft","description":""}, +{"name":"skein1024-416","tag":"multihash","code":"0xb394","status":"draft","description":""}, +{"name":"skein1024-424","tag":"multihash","code":"0xb395","status":"draft","description":""}, +{"name":"skein1024-432","tag":"multihash","code":"0xb396","status":"draft","description":""}, +{"name":"skein1024-440","tag":"multihash","code":"0xb397","status":"draft","description":""}, +{"name":"skein1024-448","tag":"multihash","code":"0xb398","status":"draft","description":""}, +{"name":"skein1024-456","tag":"multihash","code":"0xb399","status":"draft","description":""}, +{"name":"skein1024-464","tag":"multihash","code":"0xb39a","status":"draft","description":""}, +{"name":"skein1024-472","tag":"multihash","code":"0xb39b","status":"draft","description":""}, +{"name":"skein1024-480","tag":"multihash","code":"0xb39c","status":"draft","description":""}, +{"name":"skein1024-488","tag":"multihash","code":"0xb39d","status":"draft","description":""}, +{"name":"skein1024-496","tag":"multihash","code":"0xb39e","status":"draft","description":""}, +{"name":"skein1024-504","tag":"multihash","code":"0xb39f","status":"draft","description":""}, +{"name":"skein1024-512","tag":"multihash","code":"0xb3a0","status":"draft","description":""}, +{"name":"skein1024-520","tag":"multihash","code":"0xb3a1","status":"draft","description":""}, +{"name":"skein1024-528","tag":"multihash","code":"0xb3a2","status":"draft","description":""}, +{"name":"skein1024-536","tag":"multihash","code":"0xb3a3","status":"draft","description":""}, +{"name":"skein1024-544","tag":"multihash","code":"0xb3a4","status":"draft","description":""}, +{"name":"skein1024-552","tag":"multihash","code":"0xb3a5","status":"draft","description":""}, +{"name":"skein1024-560","tag":"multihash","code":"0xb3a6","status":"draft","description":""}, +{"name":"skein1024-568","tag":"multihash","code":"0xb3a7","status":"draft","description":""}, +{"name":"skein1024-576","tag":"multihash","code":"0xb3a8","status":"draft","description":""}, +{"name":"skein1024-584","tag":"multihash","code":"0xb3a9","status":"draft","description":""}, +{"name":"skein1024-592","tag":"multihash","code":"0xb3aa","status":"draft","description":""}, +{"name":"skein1024-600","tag":"multihash","code":"0xb3ab","status":"draft","description":""}, +{"name":"skein1024-608","tag":"multihash","code":"0xb3ac","status":"draft","description":""}, +{"name":"skein1024-616","tag":"multihash","code":"0xb3ad","status":"draft","description":""}, +{"name":"skein1024-624","tag":"multihash","code":"0xb3ae","status":"draft","description":""}, +{"name":"skein1024-632","tag":"multihash","code":"0xb3af","status":"draft","description":""}, +{"name":"skein1024-640","tag":"multihash","code":"0xb3b0","status":"draft","description":""}, +{"name":"skein1024-648","tag":"multihash","code":"0xb3b1","status":"draft","description":""}, +{"name":"skein1024-656","tag":"multihash","code":"0xb3b2","status":"draft","description":""}, +{"name":"skein1024-664","tag":"multihash","code":"0xb3b3","status":"draft","description":""}, +{"name":"skein1024-672","tag":"multihash","code":"0xb3b4","status":"draft","description":""}, +{"name":"skein1024-680","tag":"multihash","code":"0xb3b5","status":"draft","description":""}, +{"name":"skein1024-688","tag":"multihash","code":"0xb3b6","status":"draft","description":""}, +{"name":"skein1024-696","tag":"multihash","code":"0xb3b7","status":"draft","description":""}, +{"name":"skein1024-704","tag":"multihash","code":"0xb3b8","status":"draft","description":""}, +{"name":"skein1024-712","tag":"multihash","code":"0xb3b9","status":"draft","description":""}, +{"name":"skein1024-720","tag":"multihash","code":"0xb3ba","status":"draft","description":""}, +{"name":"skein1024-728","tag":"multihash","code":"0xb3bb","status":"draft","description":""}, +{"name":"skein1024-736","tag":"multihash","code":"0xb3bc","status":"draft","description":""}, +{"name":"skein1024-744","tag":"multihash","code":"0xb3bd","status":"draft","description":""}, +{"name":"skein1024-752","tag":"multihash","code":"0xb3be","status":"draft","description":""}, +{"name":"skein1024-760","tag":"multihash","code":"0xb3bf","status":"draft","description":""}, +{"name":"skein1024-768","tag":"multihash","code":"0xb3c0","status":"draft","description":""}, +{"name":"skein1024-776","tag":"multihash","code":"0xb3c1","status":"draft","description":""}, +{"name":"skein1024-784","tag":"multihash","code":"0xb3c2","status":"draft","description":""}, +{"name":"skein1024-792","tag":"multihash","code":"0xb3c3","status":"draft","description":""}, +{"name":"skein1024-800","tag":"multihash","code":"0xb3c4","status":"draft","description":""}, +{"name":"skein1024-808","tag":"multihash","code":"0xb3c5","status":"draft","description":""}, +{"name":"skein1024-816","tag":"multihash","code":"0xb3c6","status":"draft","description":""}, +{"name":"skein1024-824","tag":"multihash","code":"0xb3c7","status":"draft","description":""}, +{"name":"skein1024-832","tag":"multihash","code":"0xb3c8","status":"draft","description":""}, +{"name":"skein1024-840","tag":"multihash","code":"0xb3c9","status":"draft","description":""}, +{"name":"skein1024-848","tag":"multihash","code":"0xb3ca","status":"draft","description":""}, +{"name":"skein1024-856","tag":"multihash","code":"0xb3cb","status":"draft","description":""}, +{"name":"skein1024-864","tag":"multihash","code":"0xb3cc","status":"draft","description":""}, +{"name":"skein1024-872","tag":"multihash","code":"0xb3cd","status":"draft","description":""}, +{"name":"skein1024-880","tag":"multihash","code":"0xb3ce","status":"draft","description":""}, +{"name":"skein1024-888","tag":"multihash","code":"0xb3cf","status":"draft","description":""}, +{"name":"skein1024-896","tag":"multihash","code":"0xb3d0","status":"draft","description":""}, +{"name":"skein1024-904","tag":"multihash","code":"0xb3d1","status":"draft","description":""}, +{"name":"skein1024-912","tag":"multihash","code":"0xb3d2","status":"draft","description":""}, +{"name":"skein1024-920","tag":"multihash","code":"0xb3d3","status":"draft","description":""}, +{"name":"skein1024-928","tag":"multihash","code":"0xb3d4","status":"draft","description":""}, +{"name":"skein1024-936","tag":"multihash","code":"0xb3d5","status":"draft","description":""}, +{"name":"skein1024-944","tag":"multihash","code":"0xb3d6","status":"draft","description":""}, +{"name":"skein1024-952","tag":"multihash","code":"0xb3d7","status":"draft","description":""}, +{"name":"skein1024-960","tag":"multihash","code":"0xb3d8","status":"draft","description":""}, +{"name":"skein1024-968","tag":"multihash","code":"0xb3d9","status":"draft","description":""}, +{"name":"skein1024-976","tag":"multihash","code":"0xb3da","status":"draft","description":""}, +{"name":"skein1024-984","tag":"multihash","code":"0xb3db","status":"draft","description":""}, +{"name":"skein1024-992","tag":"multihash","code":"0xb3dc","status":"draft","description":""}, +{"name":"skein1024-1000","tag":"multihash","code":"0xb3dd","status":"draft","description":""}, +{"name":"skein1024-1008","tag":"multihash","code":"0xb3de","status":"draft","description":""}, +{"name":"skein1024-1016","tag":"multihash","code":"0xb3df","status":"draft","description":""}, +{"name":"skein1024-1024","tag":"multihash","code":"0xb3e0","status":"draft","description":""}, +{"name":"xxh-32","tag":"hash","code":"0xb3e1","status":"draft","description":"Extremely fast non-cryptographic hash algorithm"}, +{"name":"xxh-64","tag":"hash","code":"0xb3e2","status":"draft","description":"Extremely fast non-cryptographic hash algorithm"}, +{"name":"xxh3-64","tag":"hash","code":"0xb3e3","status":"draft","description":"Extremely fast non-cryptographic hash algorithm"}, +{"name":"xxh3-128","tag":"hash","code":"0xb3e4","status":"draft","description":"Extremely fast non-cryptographic hash algorithm"}, +{"name":"poseidon-bls12_381-a2-fc1","tag":"multihash","code":"0xb401","status":"permanent","description":"Poseidon using BLS12-381 and arity of 2 with Filecoin parameters"}, +{"name":"poseidon-bls12_381-a2-fc1-sc","tag":"multihash","code":"0xb402","status":"draft","description":"Poseidon using BLS12-381 and arity of 2 with Filecoin parameters - high-security variant"}, +{"name":"urdca-2015-canon","tag":"ipld","code":"0xb403","status":"draft","description":"The result of canonicalizing an input according to URDCA-2015 and then expressing its hash value as a multihash value."}, +{"name":"ssz","tag":"serialization","code":"0xb501","status":"draft","description":"SimpleSerialize (SSZ) serialization"}, +{"name":"ssz-sha2-256-bmt","tag":"multihash","code":"0xb502","status":"draft","description":"SSZ Merkle tree root using SHA2-256 as the hashing function and SSZ serialization for the block binary"}, +{"name":"json-jcs","tag":"ipld","code":"0xb601","status":"draft","description":"The result of canonicalizing an input according to JCS - JSON Canonicalisation Scheme (RFC 8785)"}, +{"name":"iscc","tag":"softhash","code":"0xcc01","status":"draft","description":"ISCC (International Standard Content Code) - similarity preserving hash"}, +{"name":"zeroxcert-imprint-256","tag":"zeroxcert","code":"0xce11","status":"draft","description":"0xcert Asset Imprint (root hash)"}, +{"name":"nonstandard-sig","tag":"varsig","code":"0xd000","status":"deprecated","description":"Namespace for all not yet standard signature algorithms"}, +{"name":"es256k","tag":"varsig","code":"0xd0e7","status":"draft","description":"ES256K Siganture Algorithm (secp256k1)"}, +{"name":"bls-12381-g1-sig","tag":"varsig","code":"0xd0ea","status":"draft","description":"G1 signature for BLS-12381-G2"}, +{"name":"bls-12381-g2-sig","tag":"varsig","code":"0xd0eb","status":"draft","description":"G2 signature for BLS-12381-G1"}, +{"name":"eddsa","tag":"varsig","code":"0xd0ed","status":"draft","description":"Edwards-Curve Digital Signature Algorithm"}, +{"name":"eip-191","tag":"varsig","code":"0xd191","status":"draft","description":"EIP-191 Ethereum Signed Data Standard"}, +{"name":"jwk_jcs-pub","tag":"key","code":"0xeb51","status":"draft","description":"JSON object containing only the required members of a JWK (RFC 7518 and RFC 7517) representing the public key. Serialisation based on JCS (RFC 8785)"}, +{"name":"fil-commitment-unsealed","tag":"filecoin","code":"0xf101","status":"permanent","description":"Filecoin piece or sector data commitment merkle node/root (CommP & CommD)"}, +{"name":"fil-commitment-sealed","tag":"filecoin","code":"0xf102","status":"permanent","description":"Filecoin sector data commitment merkle node/root - sealed and replicated (CommR)"}, +{"name":"plaintextv2","tag":"multiaddr","code":"0x706c61","status":"draft","description":""}, +{"name":"holochain-adr-v0","tag":"holochain","code":"0x807124","status":"draft","description":"Holochain v0 address + 8 R-S (63 x Base-32)"}, +{"name":"holochain-adr-v1","tag":"holochain","code":"0x817124","status":"draft","description":"Holochain v1 address + 8 R-S (63 x Base-32)"}, +{"name":"holochain-key-v0","tag":"holochain","code":"0x947124","status":"draft","description":"Holochain v0 public key + 8 R-S (63 x Base-32)"}, +{"name":"holochain-key-v1","tag":"holochain","code":"0x957124","status":"draft","description":"Holochain v1 public key + 8 R-S (63 x Base-32)"}, +{"name":"holochain-sig-v0","tag":"holochain","code":"0xa27124","status":"draft","description":"Holochain v0 signature + 8 R-S (63 x Base-32)"}, +{"name":"holochain-sig-v1","tag":"holochain","code":"0xa37124","status":"draft","description":"Holochain v1 signature + 8 R-S (63 x Base-32)"}, +{"name":"skynet-ns","tag":"namespace","code":"0xb19910","status":"draft","description":"Skynet Namespace"}, +{"name":"arweave-ns","tag":"namespace","code":"0xb29910","status":"draft","description":"Arweave Namespace"}, +{"name":"subspace-ns","tag":"namespace","code":"0xb39910","status":"draft","description":"Subspace Network Namespace"}, +{"name":"kumandra-ns","tag":"namespace","code":"0xb49910","status":"draft","description":"Kumandra Network Namespace"}, +{"name":"es256","tag":"varsig","code":"0xd01200","status":"draft","description":"ES256 Signature Algorithm"}, +{"name":"es284","tag":"varsig","code":"0xd01201","status":"draft","description":"ES384 Signature Algorithm"}, +{"name":"es512","tag":"varsig","code":"0xd01202","status":"draft","description":"ES512 Signature Algorithm"}, +{"name":"rs256","tag":"varsig","code":"0xd01205","status":"draft","description":"RS256 Signature Algorithm"} +] diff --git a/src/types.d.ts b/src/types.d.ts new file mode 100644 index 0000000..6db0554 --- /dev/null +++ b/src/types.d.ts @@ -0,0 +1,11 @@ +export type Multicodec = { + name: string; + tag: Tag; + code: string; + status: Status; + description: string; +} + +export type Status = "permanent" | "draft" | "deprecated"; + +export type Tag = "multihash" | "cid" | "multiaddr" | "hash" | "namespace" | "multiformat" | "serialization" | "ipld" | "key" | "libp2p" | "transport" | "encryption" | "softhash" | "zeroxcert" | "varsig" | "filecoin" | "holochain"; From 245b7b24a61b7935859692a9e746b4eaf9147683 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:32:07 -0700 Subject: [PATCH 08/13] Export multicodecs and types from package --- src/index.ts | 32 ++++++++++++++++++++++++++++++++ tsconfig.json | 1 + 2 files changed, 33 insertions(+) create mode 100644 src/index.ts diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..b0dd1b5 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,32 @@ +import type { Tag, Status } from './types' + +import multicodecsJson from './multicodecs.json' + + +export const multicodecs = multicodecsJson.map(({ + name, + tag, + code, + status, + description +}) => ({ + name, + tag: tag as Tag, + code: Number(code), + status: status as Status, + description, +})) + +export default multicodecs + + +export const multicodecsByName = Object.fromEntries(multicodecs.map((codec) => [codec.name, codec])) + +export const multicodecsByCode = Object.fromEntries(multicodecs.map((codec) => [codec.code, codec])) + + +export type Multicodec = typeof multicodecs[number] + +export type MulticodecTag = Tag + +export type MulticodecStatus = Status diff --git a/tsconfig.json b/tsconfig.json index ec163b1..abb9ae3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ }, "include": [ "src", + "src/**/*.json", "test" ] } \ No newline at end of file From 10192bec83f1cd4aa2f687edd2389fc6d3996f67 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:35:40 -0700 Subject: [PATCH 09/13] Update workflow --- .github/workflows/main.yml | 181 +++++++++++++++++++++++++++++-------- 1 file changed, 141 insertions(+), 40 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70f4a76..44b38f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,80 +1,181 @@ -name: ci +name: test & maybe release on: push: branches: - master pull_request: - branches: - - master jobs: + check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - - run: npm install - - run: npx aegir lint - - uses: gozala/typescript-error-reporter-action@v1.0.8 - - run: npx aegir build - - run: npx aegir dep-check - - uses: ipfs/aegir/actions/bundle-size@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present lint + - run: npm run --if-present dep-check + test-node: needs: check runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - node: [12, 14] + node: [lts/*] fail-fast: true steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - run: npm install - - run: npx aegir test -t node --bail --cov - - uses: codecov/codecov-action@v1 + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:node + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: node + test-chrome: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: microsoft/playwright-github-action@v1 - - run: npm install - - run: npx aegir test -t browser -t webworker --bail --cov - - uses: codecov/codecov-action@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:chrome + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: chrome + + test-chrome-webworker: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:chrome-webworker + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: chrome-webworker + test-firefox: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: microsoft/playwright-github-action@v1 - - run: npm install - - run: npx aegir test -t browser -t webworker --bail -- --browser firefox - test-webkit: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:firefox + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: firefox + + test-firefox-webworker: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: microsoft/playwright-github-action@v1 - - run: npm install - - run: npx aegir test -t browser -t webworker --bail -- --browser webkit + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:firefox-webworker + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: firefox-webworker + + test-webkit: + needs: check + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + node: [lts/*] + fail-fast: true + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:webkit + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: webkit + + test-webkit-webworker: + needs: check + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + node: [lts/*] + fail-fast: true + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present test:webkit-webworker + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: webkit-webworker + test-electron-main: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npx xvfb-maybe aegir test -t electron-main --bail + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npx xvfb-maybe npm run --if-present test:electron-main + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: electron-main + test-electron-renderer: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npx xvfb-maybe aegir test -t electron-renderer --bail \ No newline at end of file + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npx xvfb-maybe npm run --if-present test:electron-renderer + - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + with: + flags: electron-renderer + + release: + needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-webkit, test-webkit-webworker, test-electron-main, test-electron-renderer] + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - uses: ipfs/aegir/actions/docker-login@master + with: + docker-token: ${{ secrets.DOCKER_TOKEN }} + docker-username: ${{ secrets.DOCKER_USERNAME }} + - run: npm run --if-present release + env: + GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN || github.token }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file From 97cc669b2e6cd985db520974741e6ab5d86fa2c3 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:36:56 -0700 Subject: [PATCH 10/13] Update contributors --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b59ec36..2ea1b69 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "multicodec", "version": "3.2.1", "description": "JavaScript implementation of the multicodec specification", - "leadMaintainer": "Henrique Dias ", "main": "src/index.js", "files": [ "src", @@ -69,6 +68,7 @@ "Marcin Rataj ", "Mitrasish Mukherjee <34746546+rekpero@users.noreply.github.com>", "Peter-Jan Brone ", - "Łukasz Magiera " + "Łukasz Magiera ", + "Darryl Yeo " ] } From c14da749a2984e12d09a1a07b3cd7bdd00063f3e Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:37:03 -0700 Subject: [PATCH 11/13] Bump package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2ea1b69..7285999 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "multicodec", - "version": "3.2.1", + "version": "4.0.0", "description": "JavaScript implementation of the multicodec specification", "main": "src/index.js", "files": [ From 6a7bc55f5e611a71fb84db9553e968fbf258efa3 Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 22:54:57 -0700 Subject: [PATCH 12/13] Add "Generate" workflow --- .github/workflows/generate.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/generate.yml diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 0000000..d4d2a6b --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,24 @@ +Generate +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - run: git submodule update --init --recursive --remote + - run: npm run generate + - uses: peter-evans/create-pull-request@v5 + with: + commit-message: "chore: update submodules and npm run generate" + branch: generate + title: "Changes by ${{ github.workflow }} workflow" + body: "Automated changes by [${{ github.workflow }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run" \ No newline at end of file From 22bbc1dc10db0ca74eb1040552ecade15bbc075e Mon Sep 17 00:00:00 2001 From: Darryl Yeo Date: Thu, 8 Jun 2023 23:16:24 -0700 Subject: [PATCH 13/13] Remove .npmignore --- .npmignore | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index f6c52f5..0000000 --- a/.npmignore +++ /dev/null @@ -1,35 +0,0 @@ -**/node_modules/ -**/*.log -test/repo-tests* - -# Logs -logs -*.log - -coverage - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -build - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules - -test -docs \ No newline at end of file