# ipfs-client

> A client library to talk to local IPFS daemons

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

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

## Install

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

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.10.1 |
| Published | 2023-05-25 |
| First published | 2015-11-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.0.0 |
| Dependencies | 3 |
| Unpacked size | 288 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7388 |
| Maintainers | achingbrain, ipfs-npm-publisher-bot, npm-service-account-ipfs |
| Keywords | ipfs |

## Links

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

## Dependencies (3)

- [merge-options](https://npm.io/package/merge-options.md) ^3.0.4
- [ipfs-grpc-client](https://npm.io/package/ipfs-grpc-client.md) ^0.13.1
- [ipfs-http-client](https://npm.io/package/ipfs-http-client.md) ^60.0.1

## Recent versions

- 0.10.1 (latest) — 2023-05-25
- 0.10.0-7b79c1b8 (next) — 2023-05-25
- 0.10.0-6d95ce08 — 2023-05-25
- 0.10.0-4694e806 — 2023-05-25
- 0.10.0-e64813f6 — 2023-05-24
- 0.10.0-b64d4af0 — 2023-02-01
- 0.10.0-3bcabe38 — 2023-01-17
- 0.10.0-ab02e8f8 — 2023-01-17
- 0.10.0-6eeb1be5 — 2023-01-13
- 0.10.0 — 2023-01-12
- 0.9.2-d1c3abb3 — 2023-01-11
- 0.9.2-fa578bac — 2023-01-11
- 0.9.2-789ee585 — 2023-01-11
- 0.9.2-4b4c124c — 2023-01-11
- 0.9.2-5f73ecad — 2023-01-10
- … 217 more at https://npm.io/package/ipfs-client/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-client <!-- 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)

> A client library to talk to local IPFS daemons

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

- [Install](#install)
- [API](#api)
  - [`create([options])`](#createoptions)
  - [Parameters](#parameters)
  - [Options](#options)
  - [Returns](#returns)
  - [Example](#example)
- [License](#license)
- [Contribute](#contribute)

## Install

```console
$ npm i ipfs-client
```

This module combines the [ipfs-grpc-client][] and [ipfs-http-client][] modules to give you a client that is capable of bidirectional streaming in the browser as well as node.

## API

The client object created by the `createClient` function supports the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api), see the docs for more.

### `create([options])`

### Parameters

None

### Options

An optional object which may have the following keys:

| Name  | Type                                                                 | Default     | Description                                                       |
| ----- | -------------------------------------------------------------------- | ----------- | ----------------------------------------------------------------- |
| grpc  | `Multiaddr` or `string` or `URL`                                     | `undefined` | The address of a [ipfs-grpc-server][] to connect to               |
| http  | `Multiaddr` or `string` or `URL`                                     | `undefined` | The address of a [ipfs-http-server][] to connect to               |
| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `undefined` | A http.Agent used to control HTTP client behaviour (node.js only) |

### Returns

| Type     | Description               |
| -------- | ------------------------- |
| `object` | An instance of the client |

### Example

```js
import { create } from 'ipfs-client'

const client = create({
  grpc: '/ipv4/127.0.0.1/tcp/5003/ws',
  http: '/ipv4/127.0.0.1/tcp/5002/http'
})

const id = await client.id()
```

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

[ipfs]: https://www.npmjs.com/package/ipfs

[ipfs-grpc-client]: https://www.npmjs.com/package/ipfs-grpc-client

[ipfs-http-client]: https://www.npmjs.com/package/ipfs-http-client

[ipfs-grpc-server]: https://www.npmjs.com/package/ipfs-grpc-server

[ipfs-http-server]: https://www.npmjs.com/package/ipfs-http-server

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