1.0.7 • Published 3 days ago

@helia/http v1.0.7

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
3 days 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 } from '@helia/routers'
import { unixfs } from '@helia/unixfs'
import { CID } from 'multiformats/cid'

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

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 it's 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

1.0.7

3 days ago

1.0.6-9fa2427

3 days ago

1.0.6-a8fdfc2

3 days ago

1.0.6-55b9650

4 days ago

1.0.6

4 days ago

1.0.5-b0d50e9

4 days ago

1.0.5-7419dfc

5 days ago

1.0.5-fa9bd4b

6 days ago

1.0.5-36081e0

9 days ago

1.0.5-6a62d1c

9 days ago

1.0.5-2d070b9

10 days ago

1.0.5-361fbd3

11 days ago

1.0.5-e4e67d0

11 days ago

1.0.5-f6bcbd4

12 days ago

1.0.5-0a528bb

12 days ago

1.0.5-f7f71bb

13 days ago

1.0.5-0ecb529

13 days ago

1.0.5-5e98950

13 days ago

1.0.5-52dbcf2

13 days ago

1.0.5

13 days ago

1.0.4-5d62dfb

13 days ago

1.0.4-59de059

15 days ago

1.0.4-338885f

15 days ago

1.0.4

20 days ago

1.0.3-9c8a2c0

20 days ago

1.0.3-5323724

20 days ago

1.0.3-9ea934e

20 days ago

1.0.3-395cd9e

26 days ago

1.0.3-b67ac5f

26 days ago

1.0.3-7cd012a

26 days ago

1.0.3-532d6c4

26 days ago

1.0.3-ba4b7ba

26 days ago

1.0.3-b1c761d

26 days ago

1.0.3-5cf216b

1 month ago

1.0.3-329652a

1 month ago

1.0.3-1561e4a

1 month ago

1.0.3-6ddefb0

1 month ago

1.0.3-e582c63

1 month ago

1.0.3-9ac5909

1 month ago

1.0.3-d1c497b

1 month ago

1.0.3-b6765fe

2 months ago

1.0.3

2 months ago

1.0.3-ecf5394

2 months ago

1.0.2-2c71b6e

2 months ago

1.0.2-adc5589

2 months ago

1.0.2-a0d651c

2 months ago

1.0.2-a64e5de

2 months ago

1.0.2-8c9bb7d

2 months ago

1.0.2-c69913c

2 months ago

1.0.2-90c6feb

2 months ago

1.0.2

2 months ago

1.0.1-77e34fc

2 months ago

1.0.1-917a1bc

2 months ago

1.0.1-c3f2ed1

2 months ago

1.0.1-1319c61

2 months ago

1.0.1-6f8c15b

2 months ago

1.0.1-1ee6a4a

2 months ago

1.0.1-28d62f7

2 months ago

1.0.1-dc2e7a6

2 months ago

1.0.1-2d965be

2 months ago

1.0.1-7c07e11

2 months ago

1.0.1-7c3ce21

2 months ago

1.0.1-a04e041

2 months ago

1.0.1-754c7af

3 months ago

1.0.1-8db7792

3 months ago

1.0.1-31cdfa8

3 months ago

1.0.1-75d0a5b

3 months ago

1.0.1-9b1ddf8

3 months ago

1.0.1-7a7c0c1

3 months ago

1.0.1-3283a5c

3 months ago

1.0.1-f58d467

3 months ago

1.0.1-3851fe2

3 months ago

1.0.1-5c0c39c

3 months ago

1.0.1-6c88ee1

3 months ago

1.0.1-8a5bc6f

3 months ago

1.0.1-f243de2

3 months ago

1.0.0-ca8d5eb

3 months ago

1.0.1

3 months ago

1.0.0-94b0cd1

3 months ago

1.0.0-44f4e88

3 months ago

1.0.0-e554493

3 months ago

1.0.0

3 months ago

0.9.0-99c94f4

3 months ago

0.9.0-4836d52

4 months ago

0.9.0-4943c5b

4 months ago

0.9.0-19bf9ce

4 months ago

0.9.0-f2853f8

4 months ago

0.9.0-db7d091

4 months ago

0.9.0-031519c

4 months ago

0.9.0-5a87bbd

4 months ago

0.9.0-163df38

4 months ago

0.9.0-76220cd

4 months ago

0.9.0-843fba4

4 months ago

0.9.0-3477b27

4 months ago

0.9.0-ce74026

4 months ago

0.9.0-a966706

4 months ago

0.9.0-a2229bd

4 months ago

0.9.0

4 months ago