2.0.1 • Published 8 months ago

@helia/http v2.0.1

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
8 months ago

@helia/http

ipfs.tech Discuss codecov CI

A lightweight implementation of IPFS over HTTP in JavaScript

About

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.

Example

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'))

Example - with custom gateways and delegated routing endpoints

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'))

Install

$ npm i @helia/http

Browser <script> tag

Loading this module through a script tag will make its exports available as HeliaHttp in the global namespace.

<script src="https://unpkg.com/@helia/http/dist/index.min.js"></script>

Helia-http

API Docs

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

npm.io

2.0.1-dff82ec

8 months ago

2.0.0-0238ed4

9 months ago

2.0.0-8364296

9 months ago

2.0.1

9 months ago

2.0.0-efc47fa

9 months ago

2.0.0-693c82d

9 months ago

2.0.0-23ebae1

9 months ago

2.0.0-460853f

9 months ago

2.0.0-1b2934b

9 months ago

1.0.11-bc64f47

9 months ago

2.0.0

9 months ago

1.0.11-60d8c8a

9 months ago

1.0.11-efdefc1

9 months ago

1.0.11-2f88fc8

9 months ago

1.0.11-c04dbf5

9 months ago

1.0.9-461d219

11 months ago

1.0.9-5643b1d

12 months ago

1.0.11-ec8bf66

10 months ago

1.0.9-e6bca0b

1 year ago

1.0.11-4f14996

10 months ago

1.0.10-acd876b

10 months ago

1.0.9-b4877b5

1 year ago

1.0.9-3577d3d

1 year ago

1.0.9-f16c9ea

12 months ago

1.0.11-f5a03fc

10 months ago

1.0.11-3bf5ab0

10 months ago

1.0.10-ac4bdb8

11 months ago

1.0.9-6952f05

11 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.10-c9c644c

10 months ago

1.0.9-117198f

1 year ago

1.0.9-155e24d

1 year ago

1.0.11-5ff6998

10 months ago

1.0.9-5fab3a3

12 months ago

1.0.8-21ef20c

1 year ago

1.0.11-8805202

10 months ago

1.0.9-74ccc92

1 year ago

1.0.11-9de08ef

10 months ago

1.0.8-011fa92

1 year ago

1.0.11-23e62e1

10 months ago

1.0.10-e567717

10 months ago

1.0.11

10 months ago

1.0.10

11 months ago

1.0.9-62f77df

1 year ago

1.0.7-f46700f

1 year ago

1.0.7-e6b976a

1 year ago

1.0.7

1 year ago

1.0.6-9fa2427

1 year ago

1.0.6-a8fdfc2

1 year ago

1.0.6-55b9650

1 year ago

1.0.6

1 year ago

1.0.5-b0d50e9

1 year ago

1.0.5-7419dfc

1 year ago

1.0.5-fa9bd4b

1 year ago

1.0.5-36081e0

1 year ago

1.0.5-6a62d1c

1 year ago

1.0.5-2d070b9

1 year ago

1.0.5-361fbd3

1 year ago

1.0.5-e4e67d0

1 year ago

1.0.5-f6bcbd4

1 year ago

1.0.5-0a528bb

1 year ago

1.0.5-f7f71bb

1 year ago

1.0.5-0ecb529

1 year ago

1.0.5-5e98950

1 year ago

1.0.5-52dbcf2

1 year ago

1.0.5

1 year ago

1.0.4-5d62dfb

1 year ago

1.0.4-59de059

1 year ago

1.0.4-338885f

1 year ago

1.0.4

1 year ago

1.0.3-9c8a2c0

1 year ago

1.0.3-5323724

1 year ago

1.0.3-9ea934e

1 year ago

1.0.3-395cd9e

1 year ago

1.0.3-b67ac5f

1 year ago

1.0.3-7cd012a

1 year ago

1.0.3-532d6c4

1 year ago

1.0.3-ba4b7ba

1 year ago

1.0.3-b1c761d

1 year ago

1.0.3-5cf216b

1 year ago

1.0.3-329652a

1 year ago

1.0.3-1561e4a

1 year ago

1.0.3-6ddefb0

1 year ago

1.0.3-e582c63

1 year ago

1.0.3-9ac5909

1 year ago

1.0.3-d1c497b

1 year ago

1.0.3-b6765fe

1 year ago

1.0.3

1 year ago

1.0.3-ecf5394

1 year ago

1.0.2-2c71b6e

1 year ago

1.0.2-adc5589

1 year ago

1.0.2-a0d651c

1 year ago

1.0.2-a64e5de

1 year ago

1.0.2-8c9bb7d

1 year ago

1.0.2-c69913c

1 year ago

1.0.2-90c6feb

1 year ago

1.0.2

1 year ago

1.0.1-77e34fc

1 year ago

1.0.1-917a1bc

1 year ago

1.0.1-c3f2ed1

1 year ago

1.0.1-1319c61

1 year ago

1.0.1-6f8c15b

1 year ago

1.0.1-1ee6a4a

1 year ago

1.0.1-28d62f7

1 year ago

1.0.1-dc2e7a6

1 year ago

1.0.1-2d965be

1 year ago

1.0.1-7c07e11

1 year ago

1.0.1-7c3ce21

1 year ago

1.0.1-a04e041

1 year ago

1.0.1-754c7af

1 year ago

1.0.1-8db7792

1 year ago

1.0.1-31cdfa8

1 year ago

1.0.1-75d0a5b

1 year ago

1.0.1-9b1ddf8

1 year ago

1.0.1-7a7c0c1

1 year ago

1.0.1-3283a5c

1 year ago

1.0.1-f58d467

1 year ago

1.0.1-3851fe2

1 year ago

1.0.1-5c0c39c

1 year ago

1.0.1-6c88ee1

1 year ago

1.0.1-8a5bc6f

1 year ago

1.0.1-f243de2

1 year ago

1.0.0-ca8d5eb

1 year ago

1.0.1

1 year ago

1.0.0-94b0cd1

1 year ago

1.0.0-44f4e88

1 year ago

1.0.0-e554493

1 year ago

1.0.0

1 year ago

0.9.0-99c94f4

1 year ago

0.9.0-4836d52

1 year ago

0.9.0-4943c5b

1 year ago

0.9.0-19bf9ce

1 year ago

0.9.0-f2853f8

1 year ago

0.9.0-db7d091

1 year ago

0.9.0-031519c

1 year ago

0.9.0-5a87bbd

1 year ago

0.9.0-163df38

1 year ago

0.9.0-76220cd

1 year ago

0.9.0-843fba4

1 year ago

0.9.0-3477b27

1 year ago

0.9.0-ce74026

1 year ago

0.9.0-a966706

1 year ago

0.9.0-a2229bd

1 year ago

0.9.0

1 year ago