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
*`block` should be of type [Block](https://github.com/ipfs/js-ipfs-block#readme).
198
187
199
-
#### `repo.blocks.putMany (blocks, callback)`
188
+
#### `Promise repo.blocks.putMany (blocks)`
200
189
201
190
Put many blocks.
202
191
203
192
*`block` should be an array of type [Block](https://github.com/ipfs/js-ipfs-block#readme).
204
193
205
-
#### `repo.blocks.get (cid, callback)`
194
+
#### `Promise<Buffer> repo.blocks.get (cid)`
206
195
207
196
Get block.
208
197
209
198
*`cid` is the content id of [type CID](https://github.com/ipld/js-cid#readme).
210
-
*`callback` is a callback function `function (err, result:Buffer)`
211
199
212
200
Datastore:
213
201
214
202
#### `repo.datastore`
215
203
216
-
This is contains a full implementation of [the `interface-datastore` API](https://github.com/ipfs/interface-datastore#api).
204
+
This contains a full implementation of [the `interface-datastore` API](https://github.com/ipfs/interface-datastore#api).
217
205
218
206
219
207
### Utils
@@ -222,77 +210,70 @@ This is contains a full implementation of [the `interface-datastore` API](https:
222
210
223
211
Instead of using `repo.set('config')` this exposes an API that allows you to set and get a decoded config object, as well as, in a safe manner, change any of the config values individually.
*`value` should be a [Multiaddr](https://github.com/multiformats/js-multiaddr) or a String representing a valid one.
288
269
289
-
### `repo.stat ([options], callback)`
270
+
### `Promise<Object> repo.stat ([options])`
290
271
291
272
Gets the repo status.
292
273
293
274
`options` is an object which might contain the key `human`, which is a boolean indicating whether or not the `repoSize` should be displayed in MiB or not.
294
275
295
-
`callback` is a function with the signature `function (err, stats)`, where `stats` is an Object with the following keys:
276
+
Returned promise resolves to an `Object` with the following keys:
0 commit comments