Interface Helia

The API presented by a Helia node

interface Helia {
    blockstore: Blocks;
    datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
    dns: DNS;
    getCodec: CodecLoader;
    getHasher: HasherLoader;
    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

    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.

                        getCodec: CodecLoader

                        Load an IPLD codec. Implementations may return a promise if, for example, the codec is being fetched from the network.

                        getHasher: HasherLoader

                        Hashers can be used to hash a piece of data with the specified hashing algorithm. Implementations may return a promise if, for example, the hasher is being fetched from the network.

                        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>