# ipfs-core

> JavaScript implementation of the IPFS specification

Latest version **0.18.1** (published 2023-05-25) · Apache-2.0 OR MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ipfs-core
pnpm add ipfs-core
yarn add ipfs-core
bun add ipfs-core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.18.1 |
| Published | 2023-05-25 |
| First published | 2020-05-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.0.0 |
| Dependencies | 72 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7393 |
| Maintainers | achingbrain, ipfs-npm-publisher-bot, npm-service-account-ipfs |
| Keywords | IPFS |

## Links

- npm: https://www.npmjs.com/package/ipfs-core
- Repository: https://github.com/ipfs/js-ipfs
- Homepage: https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-core#readme
- Issues: https://github.com/ipfs/js-ipfs/issues
- npm.io page: https://npm.io/package/ipfs-core

## Dependencies (72)

- [dlv](https://npm.io/package/dlv.md) ^1.1.3
- [ipns](https://npm.io/package/ipns.md) ^5.0.1
- [pako](https://npm.io/package/pako.md) ^2.0.4
- [it-map](https://npm.io/package/it-map.md) ^2.0.0
- [it-tar](https://npm.io/package/it-tar.md) ^6.0.0
- [libp2p](https://npm.io/package/libp2p.md) ^0.42.0
- [hashlru](https://npm.io/package/hashlru.md) ^2.3.0
- [is-ipfs](https://npm.io/package/is-ipfs.md) ^8.0.0
- [it-last](https://npm.io/package/it-last.md) ^2.0.0
- [it-pipe](https://npm.io/package/it-pipe.md) ^2.0.3
- [mortice](https://npm.io/package/mortice.md) ^3.0.0
- [dag-jose](https://npm.io/package/dag-jose.md) ^4.0.0
- [err-code](https://npm.io/package/err-code.md) ^3.0.1
- [it-drain](https://npm.io/package/it-drain.md) ^2.0.0
- [it-first](https://npm.io/package/it-first.md) ^2.0.0
- [it-merge](https://npm.io/package/it-merge.md) ^2.0.0
- [@ipld/car](https://npm.io/package/@ipld/car.md) ^5.0.0
- [ipfs-repo](https://npm.io/package/ipfs-repo.md) ^17.0.0
- [it-filter](https://npm.io/package/it-filter.md) ^2.0.0
- [any-signal](https://npm.io/package/any-signal.md) ^3.0.0
- [ipfs-utils](https://npm.io/package/ipfs-utils.md) ^9.0.13
- [ipfs-unixfs](https://npm.io/package/ipfs-unixfs.md) ^9.0.0
- [it-parallel](https://npm.io/package/it-parallel.md) ^3.0.0
- [it-peekable](https://npm.io/package/it-peekable.md) ^2.0.0
- [it-pushable](https://npm.io/package/it-pushable.md) ^3.0.0
- [uint8arrays](https://npm.io/package/uint8arrays.md) ^4.0.2
- [@ipld/dag-pb](https://npm.io/package/@ipld/dag-pb.md) ^4.0.0
- [ipfs-bitswap](https://npm.io/package/ipfs-bitswap.md) ^15.0.0
- [it-to-buffer](https://npm.io/package/it-to-buffer.md) ^3.0.0
- [multiformats](https://npm.io/package/multiformats.md) ^11.0.0
- [@libp2p/mplex](https://npm.io/package/@libp2p/mplex.md) ^7.1.1
- [array-shuffle](https://npm.io/package/array-shuffle.md) ^3.0.0
- [hamt-sharding](https://npm.io/package/hamt-sharding.md) ^3.0.0
- [just-safe-set](https://npm.io/package/just-safe-set.md) ^4.0.2
- [merge-options](https://npm.io/package/merge-options.md) ^3.0.4
- [@ipld/dag-cbor](https://npm.io/package/@ipld/dag-cbor.md) ^9.0.0
- [@ipld/dag-json](https://npm.io/package/@ipld/dag-json.md) ^10.0.0
- [@libp2p/crypto](https://npm.io/package/@libp2p/crypto.md) ^1.0.7
- [@libp2p/logger](https://npm.io/package/@libp2p/logger.md) ^2.0.5
- [@libp2p/record](https://npm.io/package/@libp2p/record.md) ^3.0.0
- [datastore-core](https://npm.io/package/datastore-core.md) ^8.0.1
- [is-domain-name](https://npm.io/package/is-domain-name.md) ^1.0.1
- [parse-duration](https://npm.io/package/parse-duration.md) ^1.0.0
- [@libp2p/kad-dht](https://npm.io/package/@libp2p/kad-dht.md) ^7.0.0
- [@libp2p/peer-id](https://npm.io/package/@libp2p/peer-id.md) ^2.0.0
- [blockstore-core](https://npm.io/package/blockstore-core.md) ^3.0.0
- [ipfs-core-types](https://npm.io/package/ipfs-core-types.md) ^0.14.1
- [ipfs-core-utils](https://npm.io/package/ipfs-core-utils.md) ^0.18.1
- [datastore-pubsub](https://npm.io/package/datastore-pubsub.md) ^7.0.0
- [ipfs-core-config](https://npm.io/package/ipfs-core-config.md) ^0.7.1
- [ipfs-http-client](https://npm.io/package/ipfs-http-client.md) ^60.0.1
- [@libp2p/bootstrap](https://npm.io/package/@libp2p/bootstrap.md) ^6.0.0
- [@libp2p/interfaces](https://npm.io/package/@libp2p/interfaces.md) ^3.2.0
- [@libp2p/websockets](https://npm.io/package/@libp2p/websockets.md) ^5.0.0
- [@multiformats/mafmt](https://npm.io/package/@multiformats/mafmt.md) ^11.0.2
- [interface-datastore](https://npm.io/package/interface-datastore.md) ^7.0.0
- [interface-blockstore](https://npm.io/package/interface-blockstore.md) ^4.0.0
- [ipfs-unixfs-exporter](https://npm.io/package/ipfs-unixfs-exporter.md) ^10.0.0
- [ipfs-unixfs-importer](https://npm.io/package/ipfs-unixfs-importer.md) ^12.0.0
- [@libp2p/interface-dht](https://npm.io/package/@libp2p/interface-dht.md) ^2.0.0
- [@multiformats/murmur3](https://npm.io/package/@multiformats/murmur3.md) ^2.0.0
- [@libp2p/interface-keys](https://npm.io/package/@libp2p/interface-keys.md) ^1.0.6
- [@chainsafe/libp2p-noise](https://npm.io/package/@chainsafe/libp2p-noise.md) ^11.0.0
- [@libp2p/peer-id-factory](https://npm.io/package/@libp2p/peer-id-factory.md) ^2.0.0
- [@multiformats/multiaddr](https://npm.io/package/@multiformats/multiaddr.md) ^11.1.5
- [timeout-abort-controller](https://npm.io/package/timeout-abort-controller.md) ^3.0.0
- [@libp2p/interface-peer-id](https://npm.io/package/@libp2p/interface-peer-id.md) ^2.0.0
- [@libp2p/interface-transport](https://npm.io/package/@libp2p/interface-transport.md) ^2.1.0
- [browser-readablestream-to-it](https://npm.io/package/browser-readablestream-to-it.md) ^2.0.0
- [@libp2p/delegated-peer-routing](https://npm.io/package/@libp2p/delegated-peer-routing.md) ^4.0.0
- [@multiformats/multiaddr-to-uri](https://npm.io/package/@multiformats/multiaddr-to-uri.md) ^9.0.1
- [@libp2p/delegated-content-routing](https://npm.io/package/@libp2p/delegated-content-routing.md) ^4.0.0

## Recent versions

- 0.18.1 (latest) — 2023-05-25
- 0.18.0-7b79c1b8 (next) — 2023-05-25
- 0.18.0-6d95ce08 — 2023-05-25
- 0.18.0-4694e806 — 2023-05-25
- 0.18.0-e64813f6 — 2023-05-24
- 0.18.0-b64d4af0 — 2023-02-01
- 0.18.0-3bcabe38 — 2023-01-17
- 0.18.0-ab02e8f8 — 2023-01-17
- 0.18.0-6eeb1be5 — 2023-01-13
- 0.18.0 — 2023-01-12
- 0.17.0-d1c3abb3 — 2023-01-11
- 0.17.0-fa578bac — 2023-01-11
- 0.17.0-789ee585 — 2023-01-11
- 0.17.0-4b4c124c — 2023-01-11
- 0.17.0-5f73ecad — 2023-01-10
- … 264 more at https://npm.io/package/ipfs-core/versions

## README

> # ⛔️ DEPRECATED: [js-IPFS](https://github.com/ipfs/js-ipfs) has been superseded by [Helia](https://github.com/ipfs/helia)
>
> 📚 [Learn more about this deprecation](https://github.com/ipfs/js-ipfs/issues/4336) or [how to migrate](https://github.com/ipfs/helia/wiki/Migrating-from-js-IPFS)
>
> ⚠️ If you continue using this repo, please note that security fixes will not be provided

# ipfs-core <!-- omit in toc -->

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master\&style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster)

> JavaScript implementation of the IPFS specification

## Table of contents <!-- omit in toc -->

- - [Install](#install)
    - [Browser `<script>` tag](#browser-script-tag)
- [ipfs-core <!-- omit in toc -->](#ipfs-core----omit-in-toc---)
  - [Getting Started](#getting-started)
  - [Next Steps](#next-steps)
    - [Browser CDN](#browser-cdn)
    - [Browser bundle](#browser-bundle)
  - [Want to hack on IPFS?](#want-to-hack-on-ipfs)
  - [License](#license)
  - [Contribute](#contribute)

## Install

```console
$ npm i ipfs-core
```

### Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `IpfsCore` in the global namespace.

```html
<script src="https://unpkg.com/ipfs-core/dist/index.min.js"></script>
```

<p align="center">
<a href="https://js.ipfs.io" title="JS IPFS">
  <img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" />
</a>
</p>

<h3 align="center">The JavaScript implementation of the IPFS protocol</h3>

<p align="center">
<a href="https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core"><img src="https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg"></a>
<a href="https://travis-ci.com/ipfs/js-ipfs?branch=master"><img src="https://badgen.net/travis/ipfs/js-ipfs?branch=master" /></a>
<a href="https://codecov.io/gh/ipfs/js-ipfs"><img src="https://badgen.net/codecov/c/github/ipfs/js-ipfs" /></a>
<a href="https://bundlephobia.com/result?p=ipfs"><img src="https://badgen.net/bundlephobia/minzip/ipfs"></a>
<a href="https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-core"><img src="https://david-dm.org/ipfs/js-ipfs.svg?style=flat&path=packages/ipfs-core" /></a>
<a href="https://github.com/feross/standard"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat"></a>
<a href=""><img src="https://img.shields.io/badge/npm-%3E%3D6.0.0-orange.svg?style=flat" /></a>
<a href=""><img src="https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat" /></a>
<a href="https://www.npmjs.com/package/ipfs"><img src="https://img.shields.io/npm/dm/ipfs.svg" /></a>
<a href="https://www.jsdelivr.com/package/npm/ipfs"><img src="https://data.jsdelivr.com/v1/package/npm/ipfs/badge"/></a>
<br>
</p>

# ipfs-core <!-- omit in toc -->

`ipfs-core` is the implementation of the IPFS Core API written in JavaScript without depending on other languages/implementations. It contains all you need to integrate IPFS into your application.

If you want to run IPFS as a standalone daemon process, see the [ipfs](https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs) module.

## Getting Started

The `ipfs-core` package contains all the features of `ipfs` but in a lighter package without the CLI or HTTP servers:

```console
$ npm install ipfs-core
```

Then start a node in your app:

```javascript
import * as IPFS from 'ipfs-core'

const ipfs = await IPFS.create()
const { cid } = await ipfs.add('Hello world')
console.info(cid)
// QmXXY5ZxbtuYj6DnfApLiGstzPN7fvSyigrRee3hDWPCaf
```

## Next Steps

- Look into the [js-ipfs-examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser
- Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node
- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs
- Check out <https://docs.ipfs.io> for tips, how-tos and more
- See <https://blog.ipfs.io> for news and more
- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>

### Browser CDN

You can load IPFS right in your browser by adding the following to your page using the super fast [jsdelivr](https://www.jsdelivr.com) CDN:

```html
<!-- loading the minified version using jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/ipfs-core/dist/index.min.js"></script>

<!-- loading the human-readable (not minified) version jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/ipfs-core/dist/index.min.js"></script>
```

Inserting one of the above lines will make an `IpfsCore` object available in the global namespace:

```html
<script>
async function main () {
const node = await window.IpfsCore.create()
// Ready to use!
// See https://github.com/ipfs/js-ipfs#core-api
}
main()
</script>
```

### Browser bundle

Learn how to bundle IPFS into your application with webpack, parceljs and browserify in the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples).

## Want to hack on IPFS?

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

The IPFS implementation in JavaScript needs your help!  There are a few things you can do right now to help out:

Read the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md).

- **Check out existing issues** The [issue list](https://github.com/ipfs/js-ipfs/issues) has many that are marked as ['help wanted'](https://github.com/ipfs/js-ipfs/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) or ['difficulty:easy'](https://github.com/ipfs/js-ipfs/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Adifficulty%3Aeasy) which make great starting points for development, many of which can be tackled with no prior IPFS knowledge
- **Perform code reviews** More eyes will help
  a. speed the project along
  b. ensure quality, and
  c. reduce possible future bugs.
- **Add tests**. There can never be enough tests.

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribute

Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-ipfs/issues).

Also see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) 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](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

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.

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

---
_Source: https://npm.io/package/ipfs-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
