Helia
    Preparing search index...

    Interface HeliaLibp2p<T>

    The API presented by a Helia node

    interface HeliaLibp2p<T extends Libp2p = Libp2p<DefaultLibp2pServices>> {
        blockstore: Blocks;
        datastore: Datastore;
        dns: DNS;
        getCodec: CodecLoader;
        getHasher: HasherLoader;
        libp2p: T;
        logger: ComponentLogger;
        metrics?: Metrics;
        pins: Pins;
        routing: Routing;
        gc(options?: GCOptions): Promise<void>;
        start(): Promise<void>;
        stop(): Promise<void>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    blockstore: Blocks

    Where the blocks are stored

    datastore: Datastore

    A key/value store

    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.

    libp2p: T

    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>