You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The process of converting to a CID involves reversing the hash (to little-endian form), encoding as a `dbl-sha2-256` multihash and encoding as a `bitcoin-block` multicodec. This process is reversable, see {@link cidToHash}.
75
75
*
76
76
* @param {string} blockHash a string form of a block hash
77
-
* @returns {CID} a CID object representing this block identifier.
77
+
* @returns {BitcoinBlockCID} a CID object representing this block identifier.
* The process of converting to a CID involves reversing the hash (to little-endian form), encoding as a `dbl-sha2-256` multihash and encoding as a `bitcoin-tx` multicodec. This process is reversable, see {@link cidToHash}.
261
263
*
262
264
* @param {string} txHash a string form of a transaction hash
263
-
* @returns {CID} A CID (`multiformats.CID`) object representing this transaction identifier.
265
+
* @returns {BitcoinTxCID} A CID (`multiformats.CID`) object representing this transaction identifier.
@@ -135,7 +139,7 @@ export function * encodeAll (block) {
135
139
* `bitcoin-tx` and `bitcoin-witness-commitment` CIDs.
136
140
*
137
141
* @param {IPLDLoader} loader an IPLD block loader function that takes a CID argument and returns a `Uint8Array` containing the binary block data for that CID
138
-
* @param {CID} blockCid a CID of type `bitcoin-block` pointing to the Bitcoin block header for the block to be assembled
142
+
* @param {BitcoinBlockCID} blockCid a CID of type `bitcoin-block` pointing to the Bitcoin block header for the block to be assembled
139
143
* @returns {Promise<{deserialized:BlockPorcelain, bytes:Uint8Array}>} an object containing two properties, `deserialized` and `bytes` where `deserialized` contains a full JavaScript instantiation of the Bitcoin block graph and `bytes` contains a `Uint8Array` with the binary representation of the graph.
0 commit comments