Add the dagjose multiformat

This commit is contained in:
Alex Good
2020-09-12 16:02:04 +01:00
committed by Rod Vagg
parent 8b9ff3906e
commit de49849130
2 changed files with 4 additions and 0 deletions

3
cid.go
View File

@@ -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

View File

@@ -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) {