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.

Implements

Constructors

Properties

child: Blocks
lock: Mortice
pins: Pins
started: boolean

Methods

  • Check for the existence of a value for the passed key

    Parameters

    Returns Promise<boolean>

    Example

    const exists = await store.has(new Key('awesome'))

    if (exists) {
    console.log('it is there')
    } else {
    console.log('it is not there')
    }