Interface Helia

The API presented by a Helia node

interface Helia {
    blockstore: Blocks;
    dagWalkers: Record<number, DAGWalker>;
    datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
    dns: DNS;
    hashers: Record<number, MultihashHasher<number>>;
    logger: ComponentLogger;
    metrics?: Metrics;
    pins: Pins;
    routing: Routing;
    gc(options?): Promise<void>;
    start(): Promise<void>;
    stop(): Promise<void>;
}

Hierarchy (view full)

Implemented by

    Properties

    blockstore: Blocks

    Where the blocks are stored

    dagWalkers: Record<number, DAGWalker>

    DAGWalkers are codec-specific implementations that know how to yield all CIDs contained within a block that corresponds to that codec.

    datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

    A key/value store

    Type declaration

      Type declaration

        Type declaration

          Type declaration

            Type declaration

              Type declaration

                Type declaration

                  Type declaration

                    Type declaration

                      Type declaration

                        dns: DNS

                        The DNS property can be used to perform lookups of various record types and will use a resolver appropriate to the current platform.

                        hashers: Record<number, MultihashHasher<number>>

                        Hashers can be used to hash a piece of data with the specified hashing algorithm.

                        A logging component that can be reused by consumers

                        metrics?: Metrics

                        A metrics object that can be used to collected arbitrary stats about node usage.

                        pins: Pins

                        Pinning operations for blocks in the blockstore

                        routing: Routing

                        The routing component allows performing operations such as looking up content providers, information about peers, etc.

                        Methods

                        • Remove any unpinned blocks from the blockstore

                          Parameters

                          Returns Promise<void>

                        • Starts the Helia node

                          Returns Promise<void>

                        • Stops the Helia node

                          Returns Promise<void>