diff --git a/README.md b/README.md index 3b68c75ecf..a8fcc0a5e6 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ Commands: ### IPFS Daemon -The IPFS Daemon exposes the API defined [`http-api-spec`](https://github.com/ipfs/http-api-spec). You can use any of the IPFS HTTP-API client libraries with it, such as: [js-ipfs-api](https://github.com/ipfs/js-ipfs-api). +The IPFS Daemon exposes the API defined [`http-api-spec`](https://github.com/ipfs/http-api-spec). You can use any of the IPFS HTTP-API client libraries with it, such as: [js-ipfs-http-client](https://github.com/ipfs/js-ipfs-http-client). If you want a programmatic way to spawn a IPFS Daemon using JavaScript, check out [ipfsd-ctl module](https://github.com/ipfs/js-ipfsd-ctl) @@ -884,7 +884,7 @@ Listing of the main packages used in the IPFS ecosystem. There are also three sp | [`libp2p-crypto`](//github.com/libp2p/js-libp2p-crypto) | [![npm](https://img.shields.io/npm/v/libp2p-crypto.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-crypto/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-crypto.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-crypto) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=libp2p/js-libp2p-crypto/master)](https://ci.ipfs.team/job/libp2p/job/js-libp2p-crypto/job/master/) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-crypto/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-crypto) | [Friedel Ziegelmayer](mailto:dignifiedquire@gmail.com) | | [`libp2p-keychain`](//github.com/libp2p/js-libp2p-keychain) | [![npm](https://img.shields.io/npm/v/libp2p-keychain.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-keychain/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-keychain.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-keychain) | N/A | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-keychain/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-keychain) | [Vasco Santos](mailto:vasco.santos@moxy.studio) | | **Generics/Utils** | -| [`ipfs-api`](//github.com/ipfs/js-ipfs-api) | [![npm](https://img.shields.io/npm/v/ipfs-api.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-api/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-api.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-api) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=ipfs/js-ipfs-api/master)](https://ci.ipfs.team/job/ipfs/job/js-ipfs-api/job/master/) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-api/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-api) | [Alan Shaw](mailto:alan@tableflip.io) | +| [`ipfs-http-client`](//github.com/ipfs/js-ipfs-http-client) | [![npm](https://img.shields.io/npm/v/ipfs-http-client.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-http-client/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-http-client) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=ipfs/js-ipfs-http-client/master)](https://ci.ipfs.team/job/ipfs/job/js-ipfs-http-client/job/master/) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-http-client/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-http-client) | [Alan Shaw](mailto:alan@tableflip.io) | | [`ipfs-multipart`](//github.com/ipfs/ipfs-multipart) | [![npm](https://img.shields.io/npm/v/ipfs-multipart.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/ipfs-multipart/releases) | [![Deps](https://david-dm.org/ipfs/ipfs-multipart.svg?style=flat-square)](https://david-dm.org/ipfs/ipfs-multipart) | N/A | [![codecov](https://codecov.io/gh/ipfs/ipfs-multipart/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/ipfs-multipart) | N/A | | [`is-ipfs`](//github.com/ipfs/is-ipfs) | [![npm](https://img.shields.io/npm/v/is-ipfs.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/is-ipfs/releases) | [![Deps](https://david-dm.org/ipfs/is-ipfs.svg?style=flat-square)](https://david-dm.org/ipfs/is-ipfs) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=ipfs/is-ipfs/master)](https://ci.ipfs.team/job/ipfs/job/is-ipfs/job/master/) | [![codecov](https://codecov.io/gh/ipfs/is-ipfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/is-ipfs) | [Marcin Rataj](mailto:lidel@lidel.org) | | [`multihashing`](//github.com/multiformats/js-multihashing) | [![npm](https://img.shields.io/npm/v/multihashing.svg?maxAge=86400&style=flat-square)](//github.com/multiformats/js-multihashing/releases) | [![Deps](https://david-dm.org/multiformats/js-multihashing.svg?style=flat-square)](https://david-dm.org/multiformats/js-multihashing) | [![jenkins](https://ci.ipfs.team/buildStatus/icon?job=multiformats/js-multihashing/master)](https://ci.ipfs.team/job/multiformats/job/js-multihashing/job/master/) | [![codecov](https://codecov.io/gh/multiformats/js-multihashing/branch/master/graph/badge.svg)](https://codecov.io/gh/multiformats/js-multihashing) | N/A | diff --git a/img/overview.txt b/img/overview.txt index 5dd7a5a275..a617543bb2 100644 --- a/img/overview.txt +++ b/img/overview.txt @@ -1,17 +1,17 @@ - - offline mode - uses IPFS core directly - ┌───────────────────────────────────────────┐ - │ │ - │ │ - │ online mode - uses IPFS through http-api │ - ┌────────────┐ │ ┌────────────────────┐ │ ┌──────────┐ - │ │ │ ┌ ─ ─ ─ ─ ─ ─ │ │ │ │ │ - │ CLI │───┴── ipfs-api ├──▶│ HTTP-API │───┴───▶│IPFS Core │ - │ │ └ ─ ─ ─ ─ ─ ─ │ │ │ │ - └────────────┘ └────────────────────┘ └──────────┘ - △ △ △ - ├───────────────────────────────────────┴────────────────────────┘ - │ - ┌────────────┐ - │ Tests │ - └────────────┘ \ No newline at end of file + + offline mode - uses IPFS core directly + ┌────────────────────────────────────────────┐ + │ │ + │ │ + │ online mode - uses IPFS through http-api │ + ┌────────────┐ │ ┌─────────────┐ │ ┌─────────┐ + │ │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │ │ │ + │ CLI │───┴── ipfs-http-client ├──▶│ HTTP-API │───┴───▶│IPFS Core│ + │ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │ │ + └────────────┘ └─────────────┘ └─────────┘ + △ △ △ + ├───────────────────────────────────────────┴────────────────────┘ + │ + ┌────────────┐ + │ Tests │ + └────────────┘ diff --git a/package-list.json b/package-list.json index a71d743611..17278277a9 100644 --- a/package-list.json +++ b/package-list.json @@ -50,7 +50,7 @@ ["libp2p/js-libp2p-keychain", "libp2p-keychain"], "Generics/Utils", - ["ipfs/js-ipfs-api", "ipfs-api"], + ["ipfs/js-ipfs-http-client", "ipfs-http-client"], ["ipfs/ipfs-multipart", "ipfs-multipart"], ["ipfs/is-ipfs", "is-ipfs"], ["multiformats/js-multihashing", "multihashing"], diff --git a/package.json b/package.json index d8948e910d..723da697c4 100644 --- a/package.json +++ b/package.json @@ -69,8 +69,8 @@ "execa": "^1.0.0", "form-data": "^2.3.3", "hat": "0.0.3", - "interface-ipfs-core": "~0.86.0", - "ipfsd-ctl": "ipfs/js-ipfsd-ctl#update-dag-pb-to-not-have-cid-property", + "interface-ipfs-core": "~0.88.0", + "ipfsd-ctl": "~0.40.1", "ncp": "^2.0.0", "qs": "^6.5.2", "rimraf": "^2.6.2", @@ -86,7 +86,7 @@ "boom": "^7.2.0", "bs58": "^4.0.1", "byteman": "^1.3.5", - "cid-tool": "~0.1.0", + "cid-tool": "~0.2.0", "cids": "~0.5.5", "datastore-core": "~0.6.0", "debug": "^4.1.0", @@ -102,10 +102,10 @@ "hoek": "^5.0.4", "human-to-milliseconds": "^1.0.0", "interface-datastore": "~0.6.0", - "ipfs-api": "ipfs/js-ipfs-api", "ipfs-bitswap": "~0.21.0", "ipfs-block": "~0.8.0", "ipfs-block-service": "~0.15.1", + "ipfs-http-client": "^27.0.0", "ipfs-http-response": "~0.2.1", "ipfs-mfs": "~0.5.2", "ipfs-multipart": "~0.1.0", @@ -124,7 +124,7 @@ "is-stream": "^1.1.0", "joi": "^13.4.0", "joi-browser": "^13.4.0", - "joi-multiaddr": "^2.0.0", + "joi-multiaddr": "^3.0.0", "libp2p": "~0.24.0", "libp2p-bootstrap": "~0.9.3", "libp2p-crypto": "~0.14.1", @@ -144,7 +144,7 @@ "mkdirp": "~0.5.1", "multiaddr": "^5.0.0", "multiaddr-to-uri": "^4.0.0", - "multibase": "~0.5.0", + "multibase": "~0.6.0", "multihashes": "~0.4.14", "multihashing-async": "~0.5.1", "once": "^1.4.0", diff --git a/src/cli/commands/block/rm.js b/src/cli/commands/block/rm.js index c9c9a78987..40e1951058 100644 --- a/src/cli/commands/block/rm.js +++ b/src/cli/commands/block/rm.js @@ -13,7 +13,7 @@ module.exports = { handler (argv) { if (utils.isDaemonOn()) { - // TODO implement this once `js-ipfs-api` supports it + // TODO implement this once `js-ipfs-http-client` supports it throw new Error('rm block with daemon running is not yet implemented') } diff --git a/src/cli/commands/object/get.js b/src/cli/commands/object/get.js index ccc4b466ab..548ae4f508 100644 --- a/src/cli/commands/object/get.js +++ b/src/cli/commands/object/get.js @@ -1,11 +1,7 @@ 'use strict' const print = require('../../utils').print -const { - util: { - cid - } -} = require('ipld-dag-pb') +const dagPB = require('ipld-dag-pb') module.exports = { command: 'get ', @@ -29,7 +25,7 @@ module.exports = { throw err } - cid(node, (err, result) => { + dagPB.util.cid(node, (err, result) => { if (err) { throw err } diff --git a/src/cli/commands/object/new.js b/src/cli/commands/object/new.js index 36ab5a3659..fc8543fd25 100644 --- a/src/cli/commands/object/new.js +++ b/src/cli/commands/object/new.js @@ -4,11 +4,6 @@ const debug = require('debug') const log = debug('cli:object') log.error = debug('cli:object:error') const print = require('../../utils').print -const { - util: { - cid - } -} = require('ipld-dag-pb') module.exports = { command: 'new [