Constructors
constructor
new BlockService( ipfsRepo: IpfsRepo ) : BlockService
Parameters
Returns BlockService
Methods
delete
delete( cid: CID , options: undefined | { signal: undefined | AbortSignal } ) : Promise < void >
Parameters
cid: CID
options: undefined | { signal: undefined | AbortSignal }
Returns Promise < void >
deleteMany
deleteMany( cids: AsyncIterable < CID > | Iterable < CID > , options: undefined | { signal: undefined | AbortSignal } ) : AsyncIterable < Key >
Parameters
cids: AsyncIterable < CID > | Iterable < CID >
options: undefined | { signal: undefined | AbortSignal }
Returns AsyncIterable < Key >
get
get( cid: CID , options: undefined | { signal: undefined | AbortSignal } ) : Promise < Block >
Parameters
cid: CID
options: undefined | { signal: undefined | AbortSignal }
Returns Promise < Block >
getMany
getMany( cids: AsyncIterable < CID > | Iterable < CID > , options: undefined | { signal: undefined | AbortSignal } ) : AsyncIterable < Block >
Parameters
cids: AsyncIterable < CID > | Iterable < CID >
options: undefined | { signal: undefined | AbortSignal }
Returns AsyncIterable < Block >
put
put( block: Block , options: undefined | { signal: undefined | AbortSignal } ) : Promise < Block >
Parameters
block: Block
options: undefined | { signal: undefined | AbortSignal }
Returns Promise < Block >
putMany
putMany( blocks: AsyncIterable < Block > | Iterable < Block > , options: undefined | { signal: undefined | AbortSignal } ) : AsyncIterable < Block >
Parameters
blocks: AsyncIterable < Block > | Iterable < Block >
options: undefined | { signal: undefined | AbortSignal }
Returns AsyncIterable < Block >
setExchange
setExchange( bitswap: any ) : void
Legend
Constructor
Property
Method
BlockService is a hybrid block datastore. It stores data in a local datastore and may retrieve data from a remote Exchange. It uses an internal
datastore.Datastore
instance to store values.