helia
    Preparing search index...

    Module @helia/http

    Exports a createHeliaHTTP function that returns an object that implements a lightweight version of the Helia API that functions only over HTTP.

    By default, content and peer routing are requests are resolved using the Delegated HTTP Routing API and blocks are fetched from Trustless Gateways.

    Pass it to other modules like @helia/unixfs to fetch files from the distributed web.

    import { createHeliaHTTP } from '@helia/http'
    import { unixfs } from '@helia/unixfs'
    import { CID } from 'multiformats/cid'

    const helia = await createHeliaHTTP()

    const fs = unixfs(helia)
    fs.cat(CID.parse('bafyFoo'))
    import { createHeliaHTTP } from '@helia/http'
    import { trustlessGateway } from '@helia/block-brokers'
    import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
    import { unixfs } from '@helia/unixfs'
    import { CID } from 'multiformats/cid'

    const helia = await createHeliaHTTP({
    blockBrokers: [
    trustlessGateway()
    ],
    routers: [
    delegatedHTTPRouting({
    url: 'https://delegated-ipfs.dev'
    }),
    httpGatewayRouting({
    gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io']
    })
    ]
    })

    const fs = unixfs(helia)
    fs.cat(CID.parse('bafyFoo'))

    Classes

    InsufficientProvidersError
    InvalidCodecError
    NoRoutersAvailableError
    UnknownCodecError
    UnknownHashAlgorithmError

    Interfaces

    AddOptions
    BlockAnnounceOptions
    BlockBroker
    BlockBrokerConnectedProgressEvent
    BlockBrokerConnectProgressEvent
    BlockBrokerReceiveBlockProgressEvent
    BlockBrokerRequestBlockProgressEvent
    BlockRetrievalOptions
    Blocks
    CodecLoader
    CreateSessionOptions
    DefaultLibp2pHTTPServices
    GCOptions
    GetOfflineOptions
    HasherLoader
    Helia
    HeliaEvents
    InputPair
    IsPinnedOptions
    Libp2pHTTPDefaultOptions
    LsOptions
    Pair
    Pin
    Pins
    Provider
    ProviderOptions
    RmOptions
    Routing
    RoutingCancelReprovideEndEvent
    RoutingCancelReprovideStartEvent
    RoutingFindPeerEndEvent
    RoutingFindPeerStartEvent
    RoutingFindProvidersDelegatedHttpRoutingProvider
    RoutingFindProvidersEndEvent
    RoutingFindProvidersHttpGatewayProvider
    RoutingFindProvidersLibp2pProvider
    RoutingFindProvidersStartEvent
    RoutingGetClosestPeersEndEvent
    RoutingGetClosestPeersStartEvent
    RoutingGetEndEvent
    RoutingGetStartEvent
    RoutingOptions
    RoutingProvideEndEvent
    RoutingProvideStartEvent
    RoutingPutEndEvent
    RoutingPutStartEvent
    SessionBlockBroker
    SessionBlockstore

    Type Aliases

    AddPinEvents
    Await
    AwaitIterable
    BlockBrokerGetBlockProgressEvents
    DeleteBlockProgressEvents
    DeleteManyBlocksProgressEvents
    GcEvents
    GetAllBlocksProgressEvents
    GetBlockProgressEvents
    GetManyBlocksProgressEvents
    HasBlockProgressEvents
    HeliaHTTPInit
    PinType
    PutBlockProgressEvents
    PutManyBlocksProgressEvents
    RoutingCancelReprovideProgressEvents
    RoutingFindPeerProgressEvents
    RoutingFindProvidersProgressEvents
    RoutingFindProvidersProviderEvent
    RoutingGetClosestPeersProgressEvents
    RoutingGetProgressEvents
    RoutingProvideProgressEvents
    RoutingPutProgressEvents

    Variables

    DEFAULT_CID_PEER_FILTER_SIZE
    DEFAULT_SESSION_MAX_PROVIDERS
    DEFAULT_SESSION_MIN_PROVIDERS

    Functions

    createHeliaHTTP
    heliaDefaults