@@ -58,15 +58,9 @@ const (
58
58
DagJSON = 0x0129 // https://ipld.io/docs/codecs/known/dag-json/
59
59
Libp2pKey = 0x72 // https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#peer-ids
60
60
61
- // generic, non-dag variants
62
- Protobuf = 0x50
63
- CBOR = 0x51
64
- JSON = 0x0200
65
-
66
61
// other
67
62
GitRaw = 0x78
68
63
DagJOSE = 0x85 // https://ipld.io/specs/codecs/dag-jose/spec/
69
- DagCOSE = 0x86
70
64
EthBlock = 0x90
71
65
EthBlockList = 0x91
72
66
EthTxTrie = 0x92
@@ -88,75 +82,6 @@ const (
88
82
FilCommitmentSealed = 0xf102
89
83
)
90
84
91
- // Codecs maps the name of a codec to its type
92
- var Codecs = map [string ]uint64 {
93
- "v0" : DagProtobuf , // TODO: remove?
94
- "raw" : Raw ,
95
- "dag-pb" : DagProtobuf ,
96
- "dag-cbor" : DagCBOR ,
97
- "dag-json" : DagJSON ,
98
- "libp2p-key" : Libp2pKey ,
99
- "protobuf" : Protobuf ,
100
- "cbor" : CBOR ,
101
- "json" : JSON ,
102
- "git-raw" : GitRaw ,
103
- "eth-block" : EthBlock ,
104
- "eth-block-list" : EthBlockList ,
105
- "eth-tx-trie" : EthTxTrie ,
106
- "eth-tx" : EthTx ,
107
- "eth-tx-receipt-trie" : EthTxReceiptTrie ,
108
- "eth-tx-receipt" : EthTxReceipt ,
109
- "eth-state-trie" : EthStateTrie ,
110
- "eth-account-snapshot" : EthAccountSnapshot ,
111
- "eth-storage-trie" : EthStorageTrie ,
112
- "bitcoin-block" : BitcoinBlock ,
113
- "bitcoin-tx" : BitcoinTx ,
114
- "zcash-block" : ZcashBlock ,
115
- "zcash-tx" : ZcashTx ,
116
- "decred-block" : DecredBlock ,
117
- "decred-tx" : DecredTx ,
118
- "dash-block" : DashBlock ,
119
- "dash-tx" : DashTx ,
120
- "fil-commitment-unsealed" : FilCommitmentUnsealed ,
121
- "fil-commitment-sealed" : FilCommitmentSealed ,
122
- "dag-jose" : DagJOSE ,
123
- "dag-cose" : DagCOSE ,
124
- }
125
-
126
- // CodecToStr maps the numeric codec to its name
127
- var CodecToStr = map [uint64 ]string {
128
- Raw : "raw" ,
129
- DagProtobuf : "dag-pb" ,
130
- DagCBOR : "dag-cbor" ,
131
- DagJSON : "dag-json" ,
132
- Libp2pKey : "libp2p-key" ,
133
- Protobuf : "protobuf" ,
134
- CBOR : "cbor" ,
135
- JSON : "json" ,
136
- GitRaw : "git-raw" ,
137
- EthBlock : "eth-block" ,
138
- EthBlockList : "eth-block-list" ,
139
- EthTxTrie : "eth-tx-trie" ,
140
- EthTx : "eth-tx" ,
141
- EthTxReceiptTrie : "eth-tx-receipt-trie" ,
142
- EthTxReceipt : "eth-tx-receipt" ,
143
- EthStateTrie : "eth-state-trie" ,
144
- EthAccountSnapshot : "eth-account-snapshot" ,
145
- EthStorageTrie : "eth-storage-trie" ,
146
- BitcoinBlock : "bitcoin-block" ,
147
- BitcoinTx : "bitcoin-tx" ,
148
- ZcashBlock : "zcash-block" ,
149
- ZcashTx : "zcash-tx" ,
150
- DecredBlock : "decred-block" ,
151
- DecredTx : "decred-tx" ,
152
- DashBlock : "dash-block" ,
153
- DashTx : "dash-tx" ,
154
- FilCommitmentUnsealed : "fil-commitment-unsealed" ,
155
- FilCommitmentSealed : "fil-commitment-sealed" ,
156
- DagJOSE : "dag-jose" ,
157
- DagCOSE : "dag-cose" ,
158
- }
159
-
160
85
// tryNewCidV0 tries to convert a multihash into a CIDv0 CID and returns an
161
86
// error on failure.
162
87
func tryNewCidV0 (mhash mh.Multihash ) (Cid , error ) {
0 commit comments