This package has been deprecated

Author message:

js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details

ipfs-client
TypeScript icon, indicating that this package has built-in type declarations

0.10.1 • Public • Published

⛔️ DEPRECATED: js-IPFS has been superseded by Helia

📚 Learn more about this deprecation or how to migrate

⚠️ If you continue using this repo, please note that security fixes will not be provided

ipfs-client

ipfs.tech Discuss codecov CI

A client library to talk to local IPFS daemons

Table of contents

Install

$ 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, 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 undefined A http.Agent used to control HTTP client behaviour (node.js only)

Returns

Type Description
object An instance of the client

Example

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

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.

Readme

Keywords

Package Sidebar

Install

npm i ipfs-client

Weekly Downloads

628

Version

0.10.1

License

Apache-2.0 OR MIT

Unpacked Size

295 kB

Total Files

7

Last publish

Collaborators

  • achingbrain
  • npm-service-account-ipfs