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
{{ message }}
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
`multihash` is a [multihash][multihash] which can be passed as:
12
+
`cid` is a [cid][cid] which can be passed as:
13
13
14
-
- Buffer, the raw Buffer of the multihash
14
+
- Buffer, the raw Buffer of the cid
15
+
- CID, a CID instance
15
16
- String, the base58 encoded version of the multihash
16
17
17
18
`callback` must follow `function (err, block) {}` signature, where `err` is an error if the operation was not successful and `block` is a [Block][block] type object, containing both the data and the hash of the block.
18
19
19
20
```js
20
-
ipfs.block.get(multihash, function (err, block) {
21
+
ipfs.block.get(cid, function (err, block) {
21
22
if (err) {
22
23
throw err
23
24
}
@@ -38,13 +39,19 @@ If no `callback` is passed, a promise is returned.
- String, the base58 encoded version of the multihash
54
+
48
55
`callback` has the signature `function (err, block) {}`, where `err` is an error if the operation was not successful and `block` is a [Block][block] type object, containing both the data and the hash of the block.
49
56
50
57
If no `callback` is passed, a promise is returned.
@@ -55,18 +62,19 @@ If no `callback` is passed, a promise is returned.
`multihash` is a [multihash][multihash] which can be passed as:
67
+
`cid` is a [cid][cid] which can be passed as:
61
68
62
69
-`Buffer`, the raw Buffer of the multihash (or of and encoded version)
63
70
-`String`, the toString version of the multihash (or of an encoded version)
71
+
- CID, a CID instance
64
72
65
73
`callback` must follow the signature `function (err, stats) {}`, where `err` is an error if the operation was not successful and `stats` is an object with the format:`
0 commit comments