Skip to content

Commit

Permalink
Add libp2p-key multicodec
Browse files Browse the repository at this point in the history
Context: multiformats/multicodec#130

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
lidel committed May 27, 2019
1 parent b1cc3e4 commit 3f17777
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _rsrch/cidiface/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const (

DagProtobuf = 0x70
DagCBOR = 0x71
Libp2pKey = 0x72

GitRaw = 0x78

Expand All @@ -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,
Expand All @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions cid.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const (

DagProtobuf = 0x70
DagCBOR = 0x71
Libp2pKey = 0x72

GitRaw = 0x78

Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions cid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3f17777

Please sign in to comment.