Skip to content

Commit

Permalink
Merge pull request #86 from lidel/feat/libp2p-key
Browse files Browse the repository at this point in the history
Add support for libp2p-key multicodec to go-cid
  • Loading branch information
Stebalien committed May 27, 2019
2 parents b1cc3e4 + 3f17777 commit 9bb7ea6
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 9bb7ea6

Please sign in to comment.