Helia
    Preparing search index...

    Interface BlockRetrievalOptions<ProgressEvents>

    interface BlockRetrievalOptions<
        ProgressEvents extends ProgressEvent<any, any> = ProgressEvent<any, any>,
    > {
        onProgress?: (evt: ProgressEvents) => void;
        providers?: (PeerId | Multiaddr | Multiaddr[])[];
        signal?: AbortSignal;
        validateFn(block: Uint8Array): Promise<void>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    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

    Methods

    • A function that blockBrokers should call prior to returning a block to ensure it can maintain control of the block request flow. e.g. TrustedGatewayBlockBroker will use this to ensure that the block is valid from one of the gateways before assuming its work is done. If the block is not valid, it should try another gateway and WILL consider the gateway that returned the invalid blocks completely unreliable.

      Parameters

      Returns Promise<void>