Helia
    Preparing search index...

    Interface CreateSessionOptions<ProgressEvents>

    interface CreateSessionOptions<
        ProgressEvents extends ProgressEvent<any, any> = ProgressEvent<any, any>,
    > {
        maxProviders?: number;
        minProviders?: number;
        onProgress?: (evt: ProgressEvents) => void;
        providers?: (PeerId | Multiaddr | Multiaddr[])[];
        signal?: AbortSignal;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    maxProviders?: number

    The maximum number of providers for the root CID to be added to a session.

    5
    
    minProviders?: number

    The minimum number of providers for the root CID that are required for successful session creation.

    The session will become usable once this many providers have been discovered, up to maxProviders providers will continue to be added.

    1
    
    onProgress?: (evt: ProgressEvents) => void
    providers?: (PeerId | Multiaddr | Multiaddr[])[]

    An optional list of peers known to host at least the root block of the DAG that will be fetched.

    If this list is omitted, or if the peers cannot supply the root or any child blocks, a findProviders routing query will be run to find peers that can supply the blocks.

    signal?: AbortSignal