A test suite and interface you can use to implement a IPFS core interface.
The primary goal of this module is to define and ensure that both IPFS core implementations and their respective HTTP client libraries offer the same interface, so that developers can quickly change between a local and a remote node without having to change their applications. In addition to the definition of the expected interface, this module offers a suite of tests that can be run in order to check if the interface is used as described.
The API is presented with both Node.js and Go primitives. However, there are no actual limitations keeping it from being extended for any other language, pushing forward cross compatibility and interoperability through different stacks.
- JavaScript IPFS implementation
- JavaScript IPFS HTTP Client Library
- Soon™, go-ipfs, go-ipfs-api, java-ipfs-api, python-ipfs-api and others will implement it as well.
Send in a PR if you find or write one!
Include this badge in your readme if you make a new module that implements interface-ipfs-core API.
[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)
In JavaScript land:
npm install interface-ipfs-core
In Go land:
# Not available
Install interface-ipfs-core
as one of the dependencies of your project and as a test file. Then, using mocha
(for Node.js) or a test runner with compatible API, do:
var test = require('interface-ipfs-core')
var common = {
setup: function (cb) {
cb(null, IPFSFactory)
},
teardown: function (cb) {
cb()
}
}
// use all of the test suits
test.all(common)
In order to be considered "valid", an IPFS core implementation must expose the API described in /SPEC. You can also use this loose spec as documentation for consuming the core APIs. Here is an outline of the contents of that directory:
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
MIT