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('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
    BlockRetrievalOptions
    Blocks
    CodecLoader
    CreateSessionOptions
    DefaultLibp2pHTTPServices
    GCOptions
    GetOfflineOptions
    HasherLoader
    Helia
    HeliaEvents
    InputPair
    IsPinnedOptions
    Libp2pHTTPDefaultOptions
    LsOptions
    Pair
    Pin
    Pins
    Provider
    ProviderOptions
    RmOptions
    Routing
    RoutingOptions
    SessionBlockstore

    Type Aliases

    AddPinEvents
    Await
    AwaitIterable
    DeleteBlockProgressEvents
    DeleteManyBlocksProgressEvents
    GcEvents
    GetAllBlocksProgressEvents
    GetBlockProgressEvents
    GetManyBlocksProgressEvents
    HasBlockProgressEvents
    HeliaHTTPInit
    PinType
    PutBlockProgressEvents
    PutManyBlocksProgressEvents

    Variables

    DEFAULT_SESSION_MAX_PROVIDERS
    DEFAULT_SESSION_MIN_PROVIDERS

    Functions

    createHeliaHTTP
    heliaDefaults