From db71d5c6ce427fd701886c605a8e4c57081888fb Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 28 May 2019 00:30:21 +0200 Subject: [PATCH] feat: add libp2p-key This updates the lookup table to match multiformats/multicodec/master/table.csv and adds libp2p-key multicodec added in https://github.com/multiformats/multicodec/issues/130 License: MIT Signed-off-by: Marcin Rataj --- src/base-table.js | 2 ++ src/constants.js | 2 ++ src/print.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/base-table.js b/src/base-table.js index aaedfb3..a1118c6 100644 --- a/src/base-table.js +++ b/src/base-table.js @@ -383,6 +383,7 @@ exports['https'] = Buffer.from('01bb', 'hex') exports['onion'] = Buffer.from('01bc', 'hex') exports['onion3'] = Buffer.from('01bd', 'hex') exports['garlic64'] = Buffer.from('01be', 'hex') +exports['garlic32'] = Buffer.from('01bf', 'hex') exports['quic'] = Buffer.from('01cc', 'hex') exports['ws'] = Buffer.from('01dd', 'hex') exports['wss'] = Buffer.from('01de', 'hex') @@ -393,6 +394,7 @@ exports['http'] = Buffer.from('01e0', 'hex') exports['raw'] = Buffer.from('55', 'hex') exports['dag-pb'] = Buffer.from('70', 'hex') exports['dag-cbor'] = Buffer.from('71', 'hex') +exports['libp2p-key'] = Buffer.from('72', 'hex') exports['git-raw'] = Buffer.from('78', 'hex') exports['torrent-info'] = Buffer.from('7b', 'hex') exports['torrent-file'] = Buffer.from('7c', 'hex') diff --git a/src/constants.js b/src/constants.js index 5092410..87d50e9 100644 --- a/src/constants.js +++ b/src/constants.js @@ -384,6 +384,7 @@ module.exports = Object.freeze({ ONION: 0x01bc, ONION3: 0x01bd, GARLIC64: 0x01be, + GARLIC32: 0x01bf, QUIC: 0x01cc, WS: 0x01dd, WSS: 0x01de, @@ -394,6 +395,7 @@ module.exports = Object.freeze({ RAW: 0x55, DAG_PB: 0x70, DAG_CBOR: 0x71, + LIBP2P_KEY: 0x72, GIT_RAW: 0x78, TORRENT_INFO: 0x7b, TORRENT_FILE: 0x7c, diff --git a/src/print.js b/src/print.js index 336599f..829129c 100644 --- a/src/print.js +++ b/src/print.js @@ -383,6 +383,7 @@ module.exports = Object.freeze({ 0x01bc: 'onion', 0x01bd: 'onion3', 0x01be: 'garlic64', + 0x01bf: 'garlic32', 0x01cc: 'quic', 0x01dd: 'ws', 0x01de: 'wss', @@ -393,6 +394,7 @@ module.exports = Object.freeze({ 0x55: 'raw', 0x70: 'dag-pb', 0x71: 'dag-cbor', + 0x72: 'libp2p-key', 0x78: 'git-raw', 0x7b: 'torrent-info', 0x7c: 'torrent-file',