0.158.1 • Published 2 years ago

interface-ipfs-core v0.158.1

Weekly downloads
559
License
Apache-2.0 OR MIT
Repository
github
Last release
2 years ago

⛔️ 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

interface-ipfs-core

ipfs.tech Discuss codecov CI

A test suite and interface you can use to implement a IPFS core interface.

Table of contents

Install

$ npm i interface-ipfs-core

Background

The primary goal of this module is to define and ensure that 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.

It offers a suite of tests that can be run in order to check if the interface is implemented as described.

Core API

In order to be considered "valid", an IPFS implementation must expose the Core API as described in /docs/core-api. You can also use this loose spec as documentation for consuming the core APIs.

Modules that implement the interface

Send in a PR if you find or write one!

Badge

Include this badge in your readme if you make a new module that implements interface-ipfs-core API.

npm.io

[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)
$ npm install interface-ipfs-core

If you want to run these tests against a Kubo daemon, checkout ipfs-http-client and run test tests:

$ git clone https://github.com/ipfs/js-ipfs-http-client
$ npm install
$ npm test

Usage

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:

import * as tests from 'interface-ipfs-core'
const nodes = []

// Create common setup and teardown
const createCommon = () => ({
  // Do some setup common to all tests
  setup: async () => {
    // Use ipfsd-ctl or other to spawn an IPFS node for testing
    const node = await spawnNode()
    nodes.push(node)

    return node.api
  },
  // Dispose of nodes created by the IPFS factory and any other teardown
  teardown: () => {
    return Promise.all(nodes.map(n => n.stop()))
  }
})

tests.block(createCommon)
tests.config(createCommon)
tests.dag(createCommon)
// ...etc. (see src/index.js)

Running tests

// run all the tests for the repo subsystem
tests.repo(createCommon)

Running tests by command

tests.repo.version(createCommon)

Running only some tests

tests.repo.gc(createCommon, { only: true }) // pass an options object to run only these tests

// OR, at the subsystem level

// runs only ALL the repo.gc tests
tests.repo(createCommon, { only: ['gc'] })
// runs only ALL the object.patch.addLink tests
tests.object(createCommon, { only: ['patch.addLink'] })

Running only specific tests

tests.repo.gc(createCommon, { only: ['should do a thing'] }) // only run these named test(s)

// OR, at the subsystem level
tests.repo(createCommon, { only: ['should do a thing'] })

Skipping tests

tests.repo.gc(createCommon, { skip: true }) // pass an options object to skip these tests

// skips ALL the repo.gc tests
tests.repo(createCommon, { skip: ['gc'] })
// skips ALL the object.patch.addLink tests
tests.object(createCommon, { skip: ['patch.addLink'] })

Skipping specific tests

tests.repo.gc(createCommon, { skip: ['should do a thing'] }) // named test(s) to skip

// OR, at the subsystem level
tests.repo(createCommon, { skip: ['should do a thing'] })

// Optionally specify a reason
tests.repo(createCommon, {
  skip: [{
    name: 'should do a thing',
    reason: 'Thing is not implemented yet'
  }]
})

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.

npm.io

0.158.0-4694e806

2 years ago

0.158.0-6d95ce08

2 years ago

0.158.0-e64813f6

2 years ago

0.158.0-7b79c1b8

2 years ago

0.158.1

2 years ago

0.158.0-b64d4af0

2 years ago

0.157.0-4b4c124c

2 years ago

0.158.0-3bcabe38

2 years ago

0.158.0-6eeb1be5

2 years ago

0.158.0-ab02e8f8

2 years ago

0.0.1-563806f1.0

2 years ago

0.0.1-2a6fede5.0

2 years ago

0.157.0-789ee585

2 years ago

0.157.0-5f73ecad

2 years ago

0.157.0-fa578bac

2 years ago

0.158.0

2 years ago

0.0.1-e85e5b6e.0

2 years ago

0.157.0-d1c3abb3

2 years ago

0.157.0

2 years ago

0.156.0

2 years ago

0.156.1

2 years ago

0.155.1

3 years ago

0.155.2

3 years ago

0.155.0

3 years ago

0.154.3

3 years ago

0.154.2

3 years ago

0.152.3-rc.4

3 years ago

0.152.3-rc.3

3 years ago

0.152.3-rc.2

3 years ago

0.152.3-rc.1

3 years ago

0.152.3-rc.9

3 years ago

0.152.3-rc.8

3 years ago

0.152.3-rc.7

3 years ago

0.152.3-rc.6

3 years ago

0.152.3-rc.5

3 years ago

0.152.3-rc.10

3 years ago

0.152.3-rc.11

3 years ago

0.152.3-rc.12

3 years ago

0.152.3-rc.13

3 years ago

0.154.0

3 years ago

0.154.1

3 years ago

0.153.0

3 years ago

0.153.1-rc.5

3 years ago

0.153.1-rc.4

3 years ago

0.153.1-rc.3

3 years ago

0.153.1-rc.2

3 years ago

0.153.1-rc.1

3 years ago

0.153.1-rc.0

3 years ago

0.152.1-rc.0

3 years ago

0.152.1-rc.1

3 years ago

0.152.3-rc.0

3 years ago

0.152.0

3 years ago

0.152.1

3 years ago

0.152.2

3 years ago

0.152.2-rc.0

3 years ago

0.152.2-rc.1

3 years ago

0.152.2-rc.2

3 years ago

0.152.2-rc.3

3 years ago

0.151.2-rc.6

3 years ago

0.151.2-rc.5

3 years ago

0.151.2-rc.4

3 years ago

0.151.2-rc.3

3 years ago

0.151.2-rc.2

3 years ago

0.151.2-rc.1

3 years ago

0.151.1-rc.5

3 years ago

0.151.1

3 years ago

0.151.2-rc.0

3 years ago

0.151.1-rc.4

3 years ago

0.151.1-rc.3

3 years ago

0.151.1-rc.2

3 years ago

0.151.1-rc.1

3 years ago

0.150.5-rc.18

3 years ago

0.150.5-rc.17

3 years ago

0.151.1-rc.0

3 years ago

0.151.0

3 years ago

0.150.5-rc.13

3 years ago

0.150.5-rc.12

3 years ago

0.150.5-rc.15

3 years ago

0.150.5-rc.14

3 years ago

0.150.5-rc.16

3 years ago

0.150.5-rc.1

3 years ago

0.150.5-rc.0

3 years ago

0.150.3-rc.11

3 years ago

0.150.4-rc.0

3 years ago

0.150.3

3 years ago

0.150.4

3 years ago

0.150.3-rc.8

3 years ago

0.150.3-rc.4

3 years ago

0.150.3-rc.5

3 years ago

0.150.3-rc.2

3 years ago

0.150.3-rc.1

3 years ago

0.150.2

3 years ago

0.150.2-rc.8

3 years ago

0.150.2-rc.7

3 years ago

0.150.2-rc.6

3 years ago

0.150.2-rc.5

3 years ago

0.150.1

3 years ago

0.150.1-rc.7

3 years ago

0.150.1-rc.6

3 years ago

0.150.2-rc.4

3 years ago

0.150.2-rc.2

3 years ago

0.150.2-rc.3

3 years ago

0.150.0

3 years ago

0.149.1-rc.7

3 years ago

0.149.1-rc.9

3 years ago

0.150.1-rc.4

3 years ago

0.150.1-rc.1

3 years ago

0.149.1-rc.10

3 years ago

0.149.0

3 years ago

0.148.1-rc.20

3 years ago

0.149.1-rc.4

3 years ago

0.149.1-rc.6

3 years ago

0.149.1-rc.5

3 years ago

0.148.1-rc.19

3 years ago

0.148.1-rc.17

3 years ago

0.148.1-rc.15

3 years ago

0.148.1-rc.12

3 years ago

0.148.1-rc.11

3 years ago

0.148.1-rc.10

3 years ago

0.148.1-rc.7

3 years ago

0.148.1-rc.1

3 years ago

0.148.1-rc.5

3 years ago

0.148.1-rc.2

3 years ago

0.148.0

3 years ago

0.147.1-rc.9

3 years ago

0.147.1-rc.8

3 years ago

0.147.1-rc.11

3 years ago

0.147.1-rc.14

3 years ago

0.147.1-rc.17

3 years ago

0.147.1-rc.6

3 years ago

0.147.1-rc.3

3 years ago

0.147.1-rc.2

3 years ago

0.147.0

4 years ago

0.147.1-rc.1

4 years ago

0.146.2-rc.4

4 years ago

0.146.2-rc.3

4 years ago

0.146.2-rc.2

4 years ago

0.146.1-rc.1

4 years ago

0.146.1-rc.3

4 years ago

0.146.1-rc.4

4 years ago

0.145.2-rc.7

4 years ago

0.145.2-rc.3

4 years ago

0.146.2-rc.1

4 years ago

0.146.1

4 years ago

0.146.0

4 years ago

0.144.3-rc.23

4 years ago

0.144.3-rc.22

4 years ago

0.144.3-rc.25

4 years ago

0.144.3-rc.24

4 years ago

0.144.3-rc.27

4 years ago

0.144.3-rc.29

4 years ago

0.144.3-rc.28

4 years ago

0.144.3-rc.21

4 years ago

0.144.3-rc.20

4 years ago

0.144.3-rc.34

4 years ago

0.144.3-rc.33

4 years ago

0.144.3-rc.35

4 years ago

0.144.3-rc.30

4 years ago

0.144.3-rc.32

4 years ago

0.144.3-rc.31

4 years ago

0.144.3-rc.14

4 years ago

0.144.3-rc.17

4 years ago

0.145.2-rc.1

4 years ago

0.145.2-rc.2

4 years ago

0.145.1-rc.1

4 years ago

0.145.1

4 years ago

0.145.0

4 years ago

0.144.3-rc.6

4 years ago

0.144.2

4 years ago

0.144.2-rc.5

4 years ago

0.144.2-rc.4

4 years ago

0.144.1

4 years ago

0.144.0

4 years ago

0.143.2-rc.7

4 years ago

0.143.1

4 years ago

0.142.4-rc.6

4 years ago

0.143.0

4 years ago

0.142.4-rc.5

4 years ago

0.142.4-rc.4

4 years ago

0.142.4-rc.3

4 years ago

0.142.4-rc.1

4 years ago

0.142.3

4 years ago

0.142.3-rc.13

4 years ago

0.142.3-rc.11

4 years ago

0.142.3-rc.8

4 years ago

0.142.3-rc.7

4 years ago

0.142.3-rc.4

4 years ago

0.142.3-rc.3

4 years ago

0.142.3-rc.2

4 years ago

0.142.3-rc.1

4 years ago

0.142.2

4 years ago

0.142.2-rc.8

4 years ago

0.142.2-rc.6

4 years ago

0.142.2-rc.3

4 years ago

0.142.1

4 years ago

0.142.2-rc.2

4 years ago

0.142.1-rc.8

4 years ago

0.142.1-rc.7

4 years ago

0.142.1-rc.5

4 years ago

0.142.1-rc.3

4 years ago

0.142.1-rc.1

4 years ago

0.142.0

4 years ago

0.141.1-rc.13

4 years ago

0.141.1-rc.12

4 years ago

0.141.1-rc.10

4 years ago

0.141.1-rc.8

4 years ago

0.141.1-rc.5

4 years ago

0.141.1-rc.6

4 years ago

0.141.1-rc.4

4 years ago

0.141.1-rc.2

4 years ago

0.141.0

4 years ago

0.140.1-rc.65

4 years ago

0.140.1-rc.63

4 years ago

0.140.1-rc.62

4 years ago

0.140.1-rc.60

4 years ago

0.140.1-rc.59

4 years ago

0.140.1-rc.58

4 years ago

0.140.1-rc.56

4 years ago

0.140.1-rc.50

4 years ago

0.140.1-rc.49

4 years ago

0.140.1-rc.48

4 years ago

0.140.1-rc.46

4 years ago

0.140.1-rc.45

4 years ago

0.140.1-rc.44

4 years ago

0.140.1-rc.43

4 years ago

0.140.1-rc.41

4 years ago

0.140.1-rc.40

4 years ago

0.140.1-rc.38

4 years ago

0.140.1-rc.37

4 years ago

0.140.1-rc.36

4 years ago

0.140.1-rc.35

4 years ago

0.140.1-rc.31

4 years ago

0.140.1-rc.25

4 years ago

0.140.0

4 years ago

0.139.2-rc.5

4 years ago

0.139.2-rc.3

4 years ago

0.139.2-rc.0

4 years ago

0.139.1

4 years ago

0.139.1-rc.2

4 years ago

0.136.1

4 years ago

0.139.0

4 years ago

0.138.0

4 years ago

0.137.1-rc.26

4 years ago

0.137.1-rc.7

4 years ago

0.137.1-rc.5

4 years ago

0.137.1-rc.6

4 years ago

0.137.1-rc.2

4 years ago

0.137.0

5 years ago

0.136.1-rc.32

5 years ago

0.136.1-rc.11

5 years ago

0.136.1-rc.2

5 years ago

0.136.0

5 years ago

0.135.2-rc.2

5 years ago

0.135.1

5 years ago

0.135.1-rc.7

5 years ago

0.135.0

5 years ago

0.134.4-rc.3

5 years ago

0.134.3

5 years ago

0.134.2

5 years ago

0.134.1

5 years ago

0.134.0

5 years ago

0.133.2-rc.5

5 years ago

0.133.2-rc.4

5 years ago

0.133.1

5 years ago

0.133.0

5 years ago

0.132.1-rc.5619

5 years ago

0.132.1-rc.5616

5 years ago

0.132.1-rc.49

5 years ago

0.132.1-rc.55

5 years ago

0.132.1-rc.74

5 years ago

0.132.1-rc.91

5 years ago

0.132.1-rc.115

5 years ago

0.132.1-rc.145

5 years ago

0.132.1-rc.151

5 years ago

0.132.0

5 years ago

0.131.7

5 years ago

0.131.6

5 years ago

0.131.5

5 years ago

0.131.4

5 years ago

0.131.3

5 years ago

0.131.2

5 years ago

0.131.1

5 years ago

0.131.0

5 years ago

0.130.0

5 years ago

0.129.0

5 years ago

0.128.0

5 years ago

0.127.0

5 years ago

0.126.0

5 years ago

0.125.0

5 years ago

0.124.1

5 years ago

0.124.0

5 years ago

0.123.0

5 years ago

0.122.0

5 years ago

0.121.0

5 years ago

0.120.0

5 years ago

0.119.0

5 years ago

0.118.0

5 years ago

0.117.2

5 years ago

0.117.1

5 years ago

0.117.0

5 years ago

0.116.0

5 years ago

0.115.3

5 years ago

0.115.2

5 years ago

0.115.1

5 years ago

0.115.0

5 years ago

0.114.0

5 years ago

0.113.1

5 years ago

0.113.0

5 years ago

0.112.0

5 years ago

0.111.1

5 years ago

0.111.0

5 years ago

0.110.0

5 years ago

0.109.1

5 years ago

0.109.0

5 years ago

0.108.1

5 years ago

0.108.0

5 years ago

0.107.3

5 years ago

0.107.2

5 years ago

0.107.1

5 years ago

0.107.0

5 years ago

0.106.0

5 years ago

0.105.1

5 years ago

0.105.0

6 years ago

0.104.2

6 years ago

0.104.1

6 years ago

0.104.0

6 years ago

0.103.0

6 years ago

0.102.0

6 years ago

0.101.1

6 years ago

0.101.0

6 years ago

0.100.1

6 years ago

0.100.0

6 years ago

0.99.2

6 years ago

0.99.1

6 years ago

0.99.0

6 years ago

0.98.1

6 years ago

0.98.0

6 years ago

0.97.1

6 years ago

0.97.0

6 years ago

0.96.1

6 years ago

0.96.0

6 years ago

0.95.0

6 years ago

0.94.0

6 years ago

0.93.0

6 years ago

0.92.0

6 years ago

0.91.1

6 years ago

0.91.0

6 years ago

0.90.0

6 years ago

0.89.0

6 years ago

0.88.0

6 years ago

0.87.0

6 years ago

0.86.0

6 years ago

0.85.0

6 years ago

0.84.3

6 years ago

0.84.2

6 years ago

0.84.1

6 years ago

0.84.0

6 years ago

0.83.0

6 years ago

0.81.0

6 years ago

0.80.0

6 years ago

0.79.0

6 years ago

0.78.0

6 years ago

0.77.1

6 years ago

0.77.0

6 years ago

0.76.1

6 years ago

0.76.0

6 years ago

0.75.2

6 years ago

0.75.1

6 years ago

0.75.0

6 years ago

0.74.1

6 years ago

0.74.0

6 years ago

0.73.0

6 years ago

0.72.1

6 years ago

0.72.0

6 years ago

0.71.0

6 years ago

0.70.3

6 years ago

0.69.2

6 years ago

0.70.2

6 years ago

0.70.1

6 years ago

0.70.0

6 years ago

0.69.1

6 years ago

0.69.0

7 years ago

0.68.2

7 years ago

0.68.1

7 years ago

0.68.0

7 years ago

0.67.0

7 years ago

0.66.4

7 years ago

0.66.3

7 years ago

0.66.2

7 years ago

0.66.1

7 years ago

0.66.0

7 years ago

0.65.9

7 years ago

0.65.8

7 years ago

0.65.7

7 years ago

0.65.6

7 years ago

0.65.5

7 years ago

0.64.3

7 years ago

0.64.2

7 years ago

0.64.0

7 years ago

0.62.0

7 years ago

0.61.0

7 years ago

0.60.1

7 years ago

0.60.0

7 years ago

0.59.0

7 years ago

0.58.0

7 years ago

0.57.0

7 years ago

0.56.5

7 years ago

0.56.4

7 years ago

0.56.3

7 years ago

0.56.2

7 years ago

0.56.1

7 years ago

0.56.0

7 years ago

0.55.1

7 years ago

0.55.0

7 years ago

0.54.0

7 years ago

0.53.0

7 years ago

0.52.0

7 years ago

0.51.0

7 years ago

0.50.1

7 years ago

0.50.0

7 years ago

0.49.2

7 years ago

0.49.1

7 years ago

0.49.0

7 years ago

0.48.0

7 years ago

0.47.0

7 years ago

0.46.0

7 years ago

0.43.0

7 years ago

0.42.1

7 years ago

0.42.0

7 years ago

0.41.1

7 years ago

0.41.0

7 years ago

0.40.0

7 years ago

0.39.0

7 years ago

0.38.0

7 years ago

0.37.0

7 years ago

0.36.16

7 years ago

0.36.15

7 years ago

0.36.14

7 years ago

0.36.13

7 years ago

0.36.12

7 years ago

0.36.11

7 years ago

0.36.10

7 years ago

0.36.9

7 years ago

0.36.8

7 years ago

0.36.7

7 years ago

0.36.6

7 years ago

0.36.4

7 years ago

0.36.3

7 years ago

0.36.2

7 years ago

0.36.1

7 years ago

0.36.0

7 years ago

0.35.0

7 years ago

0.34.3

7 years ago

0.34.2

7 years ago

0.34.0

7 years ago

0.33.2

7 years ago

0.33.1

7 years ago

0.33.0

7 years ago

0.32.1

7 years ago

0.32.0

7 years ago

0.31.19

7 years ago

0.31.18

7 years ago

0.31.17

7 years ago

0.31.16

7 years ago

0.31.15

7 years ago

0.31.14

7 years ago

0.31.13

7 years ago

0.31.12

7 years ago

0.31.11

7 years ago

0.31.10

7 years ago

0.31.9

7 years ago

0.31.8

7 years ago

0.31.7

7 years ago

0.31.6

7 years ago

0.31.5

7 years ago

0.31.4

7 years ago

0.31.3

7 years ago

0.31.2

7 years ago

0.30.1

7 years ago

0.30.0

7 years ago

0.29.1

8 years ago

0.29.0

8 years ago

0.28.0

8 years ago

0.27.2

8 years ago

0.27.1

8 years ago

0.27.0

8 years ago

0.26.2

8 years ago

0.26.1

8 years ago

0.26.0

8 years ago

0.25.1

8 years ago

0.25.0

8 years ago

0.24.1

8 years ago

0.24.0

8 years ago

0.23.8

8 years ago

0.23.7

8 years ago

0.23.6

8 years ago

0.23.5

8 years ago

0.23.4

8 years ago

0.23.3

8 years ago

0.23.2

8 years ago

0.23.1

8 years ago

0.23.0

8 years ago

0.22.1

8 years ago

0.22.0

8 years ago

0.21.0

8 years ago

0.20.1

8 years ago

0.20.0

8 years ago

0.19.0

8 years ago

0.18.4

8 years ago

0.18.3

8 years ago

0.18.2

8 years ago

0.18.1

8 years ago

0.18.0

8 years ago

0.17.0

8 years ago

0.16.6

8 years ago

0.16.4

8 years ago

0.16.3

8 years ago

0.16.2

8 years ago

0.16.1

8 years ago

0.16.0

8 years ago

0.15.0

8 years ago

0.14.6

8 years ago

0.14.5

8 years ago

0.14.4

8 years ago

0.14.3

8 years ago

0.14.2

8 years ago

0.14.1

8 years ago

0.14.0

8 years ago

0.13.0

8 years ago

0.12.0

8 years ago

0.11.0

8 years ago

0.9.0

8 years ago

0.8.0

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.5

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago