Skip to content

Commit 3f17777

Browse files
committed
Add libp2p-key multicodec
Context: multiformats/multicodec#130 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
1 parent b1cc3e4 commit 3f17777

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

_rsrch/cidiface/enums.go

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const (
88

99
DagProtobuf = 0x70
1010
DagCBOR = 0x71
11+
Libp2pKey = 0x72
1112

1213
GitRaw = 0x78
1314

@@ -34,6 +35,7 @@ var Codecs = map[string]uint64{
3435
"raw": Raw,
3536
"protobuf": DagProtobuf,
3637
"cbor": DagCBOR,
38+
"libp2p-key": Libp2pKey,
3739
"git-raw": GitRaw,
3840
"eth-block": EthBlock,
3941
"eth-block-list": EthBlockList,
@@ -57,6 +59,7 @@ var CodecToStr = map[uint64]string{
5759
Raw: "raw",
5860
DagProtobuf: "protobuf",
5961
DagCBOR: "cbor",
62+
Libp2pKey: "libp2p-key",
6063
GitRaw: "git-raw",
6164
EthBlock: "eth-block",
6265
EthBlockList: "eth-block-list",

cid.go

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const (
6262

6363
DagProtobuf = 0x70
6464
DagCBOR = 0x71
65+
Libp2pKey = 0x72
6566

6667
GitRaw = 0x78
6768

@@ -90,6 +91,7 @@ var Codecs = map[string]uint64{
9091
"raw": Raw,
9192
"protobuf": DagProtobuf,
9293
"cbor": DagCBOR,
94+
"libp2p-key": Libp2pKey,
9395
"git-raw": GitRaw,
9496
"eth-block": EthBlock,
9597
"eth-block-list": EthBlockList,

cid_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var tCodecs = map[uint64]string{
1919
Raw: "raw",
2020
DagProtobuf: "protobuf",
2121
DagCBOR: "cbor",
22+
Libp2pKey: "libp2p-key",
2223
GitRaw: "git-raw",
2324
EthBlock: "eth-block",
2425
EthBlockList: "eth-block-list",

0 commit comments

Comments
 (0)