@@ -58,75 +58,81 @@ const (
58
58
59
59
GitRaw = 0x78
60
60
61
- EthBlock = 0x90
62
- EthBlockList = 0x91
63
- EthTxTrie = 0x92
64
- EthTx = 0x93
65
- EthTxReceiptTrie = 0x94
66
- EthTxReceipt = 0x95
67
- EthStateTrie = 0x96
68
- EthAccountSnapshot = 0x97
69
- EthStorageTrie = 0x98
70
- BitcoinBlock = 0xb0
71
- BitcoinTx = 0xb1
72
- ZcashBlock = 0xc0
73
- ZcashTx = 0xc1
74
- DecredBlock = 0xe0
75
- DecredTx = 0xe1
76
- DashBlock = 0xf0
77
- DashTx = 0xf1
61
+ EthBlock = 0x90
62
+ EthBlockList = 0x91
63
+ EthTxTrie = 0x92
64
+ EthTx = 0x93
65
+ EthTxReceiptTrie = 0x94
66
+ EthTxReceipt = 0x95
67
+ EthStateTrie = 0x96
68
+ EthAccountSnapshot = 0x97
69
+ EthStorageTrie = 0x98
70
+ BitcoinBlock = 0xb0
71
+ BitcoinTx = 0xb1
72
+ ZcashBlock = 0xc0
73
+ ZcashTx = 0xc1
74
+ DecredBlock = 0xe0
75
+ DecredTx = 0xe1
76
+ DashBlock = 0xf0
77
+ DashTx = 0xf1
78
+ FilCommitmentUnsealed = 0xf101
79
+ FilCommitmentSealed = 0xf102
78
80
)
79
81
80
82
// Codecs maps the name of a codec to its type
81
83
var Codecs = map [string ]uint64 {
82
- "v0" : DagProtobuf ,
83
- "raw" : Raw ,
84
- "protobuf" : DagProtobuf ,
85
- "cbor" : DagCBOR ,
86
- "libp2p-key" : Libp2pKey ,
87
- "git-raw" : GitRaw ,
88
- "eth-block" : EthBlock ,
89
- "eth-block-list" : EthBlockList ,
90
- "eth-tx-trie" : EthTxTrie ,
91
- "eth-tx" : EthTx ,
92
- "eth-tx-receipt-trie" : EthTxReceiptTrie ,
93
- "eth-tx-receipt" : EthTxReceipt ,
94
- "eth-state-trie" : EthStateTrie ,
95
- "eth-account-snapshot" : EthAccountSnapshot ,
96
- "eth-storage-trie" : EthStorageTrie ,
97
- "bitcoin-block" : BitcoinBlock ,
98
- "bitcoin-tx" : BitcoinTx ,
99
- "zcash-block" : ZcashBlock ,
100
- "zcash-tx" : ZcashTx ,
101
- "decred-block" : DecredBlock ,
102
- "decred-tx" : DecredTx ,
103
- "dash-block" : DashBlock ,
104
- "dash-tx" : DashTx ,
84
+ "v0" : DagProtobuf ,
85
+ "raw" : Raw ,
86
+ "protobuf" : DagProtobuf ,
87
+ "cbor" : DagCBOR ,
88
+ "libp2p-key" : Libp2pKey ,
89
+ "git-raw" : GitRaw ,
90
+ "eth-block" : EthBlock ,
91
+ "eth-block-list" : EthBlockList ,
92
+ "eth-tx-trie" : EthTxTrie ,
93
+ "eth-tx" : EthTx ,
94
+ "eth-tx-receipt-trie" : EthTxReceiptTrie ,
95
+ "eth-tx-receipt" : EthTxReceipt ,
96
+ "eth-state-trie" : EthStateTrie ,
97
+ "eth-account-snapshot" : EthAccountSnapshot ,
98
+ "eth-storage-trie" : EthStorageTrie ,
99
+ "bitcoin-block" : BitcoinBlock ,
100
+ "bitcoin-tx" : BitcoinTx ,
101
+ "zcash-block" : ZcashBlock ,
102
+ "zcash-tx" : ZcashTx ,
103
+ "decred-block" : DecredBlock ,
104
+ "decred-tx" : DecredTx ,
105
+ "dash-block" : DashBlock ,
106
+ "dash-tx" : DashTx ,
107
+ "fil-commitment-unsealed" : FilCommitmentUnsealed ,
108
+ "fil-commitment-sealed" : FilCommitmentSealed ,
105
109
}
106
110
107
111
// CodecToStr maps the numeric codec to its name
108
112
var CodecToStr = map [uint64 ]string {
109
- Raw : "raw" ,
110
- DagProtobuf : "protobuf" ,
111
- DagCBOR : "cbor" ,
112
- GitRaw : "git-raw" ,
113
- EthBlock : "eth-block" ,
114
- EthBlockList : "eth-block-list" ,
115
- EthTxTrie : "eth-tx-trie" ,
116
- EthTx : "eth-tx" ,
117
- EthTxReceiptTrie : "eth-tx-receipt-trie" ,
118
- EthTxReceipt : "eth-tx-receipt" ,
119
- EthStateTrie : "eth-state-trie" ,
120
- EthAccountSnapshot : "eth-account-snapshot" ,
121
- EthStorageTrie : "eth-storage-trie" ,
122
- BitcoinBlock : "bitcoin-block" ,
123
- BitcoinTx : "bitcoin-tx" ,
124
- ZcashBlock : "zcash-block" ,
125
- ZcashTx : "zcash-tx" ,
126
- DecredBlock : "decred-block" ,
127
- DecredTx : "decred-tx" ,
128
- DashBlock : "dash-block" ,
129
- DashTx : "dash-tx" ,
113
+ Raw : "raw" ,
114
+ DagProtobuf : "protobuf" ,
115
+ DagCBOR : "cbor" ,
116
+ GitRaw : "git-raw" ,
117
+ EthBlock : "eth-block" ,
118
+ EthBlockList : "eth-block-list" ,
119
+ EthTxTrie : "eth-tx-trie" ,
120
+ EthTx : "eth-tx" ,
121
+ EthTxReceiptTrie : "eth-tx-receipt-trie" ,
122
+ EthTxReceipt : "eth-tx-receipt" ,
123
+ EthStateTrie : "eth-state-trie" ,
124
+ EthAccountSnapshot : "eth-account-snapshot" ,
125
+ EthStorageTrie : "eth-storage-trie" ,
126
+ BitcoinBlock : "bitcoin-block" ,
127
+ BitcoinTx : "bitcoin-tx" ,
128
+ ZcashBlock : "zcash-block" ,
129
+ ZcashTx : "zcash-tx" ,
130
+ DecredBlock : "decred-block" ,
131
+ DecredTx : "decred-tx" ,
132
+ DashBlock : "dash-block" ,
133
+ DashTx : "dash-tx" ,
134
+ FilCommitmentUnsealed : "fil-commitment-unsealed" ,
135
+ FilCommitmentSealed : "fil-commitment-sealed" ,
130
136
}
131
137
132
138
// tryNewCidV0 tries to convert a multihash into a CIDv0 CID and returns an
0 commit comments