Helia
    Preparing search index...

    Interface SessionBlockstore

    A session blockstore is a special blockstore that only pulls content from a subset of network peers which respond as having the block for the initial root CID.

    Any blocks written to the blockstore as part of the session will propagate to the blockstore the session was created from.

    interface SessionBlockstore {
        close(): void;
        delete(
            key: CID,
            options?: AbortOptions & ProgressOptions<DeleteBlockProgressEvents>,
        ): Await<void>;
        deleteMany(
            source: AwaitIterable<CID<unknown, number, number, Version>>,
            options?: AbortOptions & ProgressOptions<DeleteManyBlocksProgressEvents>,
        ): AwaitIterable<CID<unknown, number, number, Version>>;
        get(
            key: CID,
            options?: AbortOptions & GetOfflineOptions & ProgressOptions<
                GetBlockProgressEvents,
            >,
        ): Await<Uint8Array<ArrayBufferLike>>;
        getAll(
            options?: AbortOptions & ProgressOptions<GetAllBlocksProgressEvents>,
        ): AwaitIterable<Pair>;
        getMany(
            source: AwaitIterable<CID<unknown, number, number, Version>>,
            options?: AbortOptions & GetOfflineOptions & ProgressOptions<
                GetManyBlocksProgressEvents,
            >,
        ): AwaitIterable<Pair>;
        has(
            key: CID,
            options?: AbortOptions & ProgressOptions<HasBlockProgressEvents>,
        ): Await<boolean>;
        put(
            key: CID,
            val: Uint8Array,
            options?: AbortOptions & ProgressOptions<PutBlockProgressEvents>,
        ): Await<CID<unknown, number, number, Version>>;
        putMany(
            source: AwaitIterable<Pair>,
            options?: AbortOptions & ProgressOptions<PutManyBlocksProgressEvents>,
        ): AwaitIterable<CID<unknown, number, number, Version>>;
    }

    Hierarchy

    Index

    Methods

    • Any in-progress operations will be aborted.

      Returns void