From de498491301924573eda99369268369649a94e62 Mon Sep 17 00:00:00 2001 From: Alex Good Date: Sat, 12 Sep 2020 16:02:04 +0100 Subject: [PATCH] Add the dagjose multiformat --- cid.go | 3 +++ cid_test.go | 1 + 2 files changed, 4 insertions(+) diff --git a/cid.go b/cid.go index 1268f39..2c4fd22 100644 --- a/cid.go +++ b/cid.go @@ -58,6 +58,7 @@ const ( GitRaw = 0x78 + DagJOSE = 0x85 EthBlock = 0x90 EthBlockList = 0x91 EthTxTrie = 0x92 @@ -106,6 +107,7 @@ var Codecs = map[string]uint64{ "dash-tx": DashTx, "fil-commitment-unsealed": FilCommitmentUnsealed, "fil-commitment-sealed": FilCommitmentSealed, + "dag-jose": DagJOSE, } // CodecToStr maps the numeric codec to its name @@ -133,6 +135,7 @@ var CodecToStr = map[uint64]string{ DashTx: "dash-tx", FilCommitmentUnsealed: "fil-commitment-unsealed", FilCommitmentSealed: "fil-commitment-sealed", + DagJOSE: "dag-jose", } // tryNewCidV0 tries to convert a multihash into a CIDv0 CID and returns an diff --git a/cid_test.go b/cid_test.go index 73ede66..16008d0 100644 --- a/cid_test.go +++ b/cid_test.go @@ -40,6 +40,7 @@ var tCodecs = map[uint64]string{ DashTx: "dash-tx", FilCommitmentUnsealed: "fil-commitment-unsealed", FilCommitmentSealed: "fil-commitment-sealed", + DagJOSE: "dag-jose", } func assertEqual(t *testing.T, a, b Cid) {