Add libp2p-key multicodec

Context: https://github.com/multiformats/multicodec/issues/130

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
This commit is contained in:
Marcin Rataj
2019-05-28 01:35:41 +02:00
parent b1cc3e404d
commit 3f1777738f
3 changed files with 6 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ const (
DagProtobuf = 0x70
DagCBOR = 0x71
Libp2pKey = 0x72
GitRaw = 0x78
@@ -34,6 +35,7 @@ var Codecs = map[string]uint64{
"raw": Raw,
"protobuf": DagProtobuf,
"cbor": DagCBOR,
"libp2p-key": Libp2pKey,
"git-raw": GitRaw,
"eth-block": EthBlock,
"eth-block-list": EthBlockList,
@@ -57,6 +59,7 @@ var CodecToStr = map[uint64]string{
Raw: "raw",
DagProtobuf: "protobuf",
DagCBOR: "cbor",
Libp2pKey: "libp2p-key",
GitRaw: "git-raw",
EthBlock: "eth-block",
EthBlockList: "eth-block-list",

2
cid.go
View File

@@ -62,6 +62,7 @@ const (
DagProtobuf = 0x70
DagCBOR = 0x71
Libp2pKey = 0x72
GitRaw = 0x78
@@ -90,6 +91,7 @@ var Codecs = map[string]uint64{
"raw": Raw,
"protobuf": DagProtobuf,
"cbor": DagCBOR,
"libp2p-key": Libp2pKey,
"git-raw": GitRaw,
"eth-block": EthBlock,
"eth-block-list": EthBlockList,

View File

@@ -19,6 +19,7 @@ var tCodecs = map[uint64]string{
Raw: "raw",
DagProtobuf: "protobuf",
DagCBOR: "cbor",
Libp2pKey: "libp2p-key",
GitRaw: "git-raw",
EthBlock: "eth-block",
EthBlockList: "eth-block-list",