Create a new BlockStorage
A blockstore session only fetches blocks from a subset of network peers to reduce network traffic and improve performance.
The initial set of peers can be specified, alternatively a findProviders
routing query will occur to populate the set instead.
Optional
options: AbortOptionsDelete a block from the blockstore
Delete multiple blocks from the blockstore
Get a block by cid
Retrieve all cid/block pairs from the blockstore as an unordered iterable
Get multiple blocks back from an (async) iterable of cids
Check for the existence of a value for the passed key
Put a block to the underlying datastore
Put a multiple blocks to the underlying datastore
This method will be invoked to start the component.
It should not assume that any other components have been started.
This method will be invoked to stop the component.
It should not assume any other components are running when it is called.
BlockStorage is a hybrid blockstore that puts/gets blocks from a configured blockstore (that may be on disk, s3, or something else). If the blocks are not present Bitswap will be used to fetch them from network peers.