• This repository has been archived on 10/Mar/2020
  • Stars
    star
    192
  • Rank 202,019 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[ARCHIVED] now part of the https://github.com/ipfs/js-ipfs repo

πŸ”’ Archived

The contents of this repo have been merged into ipfs/js-ipfs.

Please open issues or submit PRs there.

interface-ipfs-core

standard-readme compliant

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

Lead Maintainer

Alan Shaw.

Table of Contents

Background

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.

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.

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

Install

In JavaScript land:

npm install interface-ipfs-core

If you want to run these tests against a go-ipfs 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:

const tests = require('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 by command

tests.repo.version(createCommon)

Skipping tests

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

// OR, at the subsystem level

// 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'] })

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'] })

API

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:

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

Want to hack on IPFS?

License

Copyright (c) Protocol Labs, Inc. under the MIT License. See LICENSE.md for details.

More Repositories

1

js-ipfs-http-client

[ARCHIVED] now part of the https://github.com/ipfs/js-ipfs repo
JavaScript
1,050
star
2

research-CRDT

[ARCHIVED] Repo to organize our ideas about research implementations of CRDTs.
484
star
3

reading-list

[ARCHIVED] Moved to https://docs.ipfs.io β€” papers to read to understand IPFS
TeX
225
star
4

examples

[ARCHIVED] DEPRECATED β€” merged into IPFS docs
185
star
5

archives

[ARCHIVED] Repo to coordinate archival efforts with IPFS
183
star
6

website

This repo has been replaced by https://github.com/ipfs/ipfs-website/
Less
182
star
7

faq

[ARCHIVED] DEPRECATED, please use https://discuss.ipfs.io! Frequently Asked Questions
164
star
8

blog

[ARCHIVED] Source for the IPFS Blog
CSS
98
star
9

package-managers

[ARCHIVED] πŸ“¦ IPFS Package Managers Task Force
97
star
10

docs

[ARCHIVED] πŸ€– πŸ“š IPFS documentation working group, plus IPFS docs site code
HTML
87
star
11

kubernetes-ipfs

[ARCHIVED] kubernetes-ipfs
Go
60
star
12

dynamic-data-and-capabilities

[ARCHIVED] Dynamic Data and Capabilities in IPFS Working Group
59
star
13

js-libp2p-ipfs-nodejs

[ARCHIVED] DEPRECATED β€” libp2p build (module) used in js-ipfs
JavaScript
42
star
14

bifrost-gateway

Experimental gateway with delegated backend. No longer maintained, consider migrating to https://github.com/ipfs/rainbow/
Go
41
star
15

http-api-docs

Documentation on IPFS HTTP API endpoints.
Go
39
star
16

js-libp2p-ipfs-browser

[ARCHIVED] DEPRECATED β€” libp2p build (module) used in js-ipfs when running it on the browser
JavaScript
37
star
17

old-js-ipfs-website

The Website for the JavaScript implementation of the IPFS protocol
HTML
35
star
18

ipfs.js

[ARCHIVED] See https://github.com/ipfs/js-ipfs
33
star
19

starlog

[ARCHIVED] [DEPRECATED] logging the development of an interplanetary filesystem
HTML
33
star
20

http-api-spec

[ARCHIVED] DEPRECATED β€” Apiary IPFS HTTP API description
API Blueprint
32
star
21

sig-blockchain-data

[ARCHIVED] Using IPFS for storing data for Blockchain apps.
32
star
22

conf

[ARCHIVED] IPFS Conf [PLACEHOLDER REPOSITORY]
28
star
23

js-ipfs-mfs

[ARCHIVED] now part of the https://github.com/ipfs/js-ipfs repo
JavaScript
28
star
24

POST

[ARCHIVED] POST - a datastructure for human communication
24
star
25

ipfs-postmsg-proxy

[DEPRECATED] Use ipfs-message-port-server/client instead:
JavaScript
24
star
26

ipfs-ui-style-guide

A UI style guide for IPFS Apps
JavaScript
22
star
27

support

[ARCHIVED] For questions on how to get IPFS up and running smoothly
22
star
28

js-ipfs-unixfs-engine

[ARCHIVED] JavaScript implementation of the layout and chunking mechanisms used by IPFS
JavaScript
22
star
29

ipfs-web-app

[ARCHIVED] DEPRECATED β€” ipfs-web-app tool
JavaScript
19
star
30

developer-meetings

[ARCHIVED] 2018 IPFS Developers Meeting in Berlin
17
star
31

npm-go-ipfs-dep

DEPRECATED by https://github.com/ipfs/npm-go-ipfs
JavaScript
16
star
32

file-browser

[ARCHIVED] generic-ipfs-file-browser-ui-thing
JavaScript
16
star
33

research-p2p-video

[ARCHIVED] Repo to organize our ideas about research and implementations Video applications on top of IPFS and libp2p
16
star
34

research-bitswap

[ARCHIVED] repo to organize research on bitswap
15
star
35

research

[ARCHIVED] Moved to https://github.com/ipfs/notes
14
star
36

ipfs-redux-bundle

[DEPRECATED] Use ipfs-provider instead:
JavaScript
13
star
37

logo

[ARCHIVED] IPFS logo
HTML
13
star
38

refs

[ARCHIVED] DMCA notices, and tools for publishing them
Go
12
star
39

2016-IPFS-Workshop-Lisbon

[ARCHIVED] Repo for the 2016 Q3 Workshop, in Lisbon and remote
12
star
40

go-iprs

[ARCHIVED] go-ipfs records
Go
12
star
41

pdd

[ARCHIVED] Protocol Driven Development
12
star
42

archive-format

[ARCHIVED] DEPRECATED β€” car - Certified ARchives
12
star
43

gx-workspace

[ARCHIVED] A gx tool for working with a big bunch of repositories/packages
Go
12
star
44

window.ipfs-fallback

[DEPRECATED] Use ipfs-provider instead:
JavaScript
11
star
45

RFC

[ARCHIVED] RFCs for changes to IPFS and its surrounding projects
11
star
46

user-research

[ARCHIVED] User research for the IPFS Project.
10
star
47

glossary

[ARCHIVED] A collection of descriptions for terms related to ipfs and surrounding techs
10
star
48

pm-test-lab

[ARCHIVED] DEPRECATED β€” check https://github.com/ipfs/testground/ for the latest
10
star
49

fs-stress-test

[ARCHIVED] IPFS Stress tests
Shell
10
star
50

benchmark-js.ipfs.io

[ARCHIVED] Benchmarking interface for js-ipfs
JavaScript
9
star
51

window.ipfs-is-required

Show a download link for IPFS Companion when window.ipfs is not detected.
JavaScript
8
star
52

ipfs-performance-profiling

[ARCHIVED] Benchmarking tests for js-ipfs, using go-ipfs as a baseline.
JavaScript
8
star
53

jenkins

[ARCHIVED] Configuration for IPFS's build system
HCL
8
star
54

project-operations

[ARCHIVED] The IPFS Project Operations Working Group
7
star
55

project-repos

[ARCHIVED] Project health metrics
CoffeeScript
7
star
56

js-ipfs-name

Publishing and resolving IPNS records
JavaScript
6
star
57

connections-globe

[ARCHIVED] An interactive globe to view all your IPFS peers
JavaScript
6
star
58

interface-pull-blob-store

[ARCHIVED] Test suite for pull-blob-stores
JavaScript
6
star
59

websiter

[ARCHIVED] Foundation and tool for managing websites around IPFS
HTML
5
star
60

ops-requests

[ARCHIVED] Requests about infrastructure operations
5
star
61

dweblink-infra

[ARCHIVED] DEPRECATED β€” Infrastructure for dweb.link
HCL
5
star
62

ipfs-pages

[ARCHIVED] Easy publishing of static web content on IPFS
5
star
63

js-ipfs-multipart

[ARCHIVED] A set of utilities to help dealing with IPFS multipart
JavaScript
5
star
64

bitswap-ml

[ARCHIVED] bitswap + ml
5
star
65

go-commands

[ARCHIVED] DEPRECATED β€” Commands library for go-ipfs
Go
5
star
66

go-blocks

[ARCHIVED] DEPRECATED β€” Blockservice and blockstore for go-ipfs
Go
5
star
67

js-ipfs-unixfs-importer

[ARCHIVED] JavaScript implementation of the UnixFs importer used by IPFS
JavaScript
5
star
68

go-ipfs-addr

[ARCHIVED] DEPRECATED - Parsing utility for ipfs multiaddrs
Go
5
star
69

community-call-helper

[ARCHIVED] Schedule a Community Sync Up via Github Issues
Vue
4
star
70

ci-sync

[ARCHIVED] CI dashboard for Protocol Labs projects
Go
4
star
71

js-docker-base

[ARCHIVED] Base image for JS projects
Shell
4
star
72

sprint-helper-bot

[ARCHIVED] A helper for sprints
JavaScript
4
star
73

dev-team-enablement

[ARCHIVED] Dev Team Enablement Working Group
3
star
74

ipfs-mans

[ARCHIVED] DEPRECATED: The IPFS CLI Manuals
JavaScript
3
star
75

ipfs-metrics

[ARCHIVED] ipfs-metrics is a tool for managing ipfs event log streams
Go
3
star
76

conf.ipfs.io

[ARCHIVED] The IPFS Conference & Developer Meetings Website
3
star
77

go-key

[ARCHIVED] DEPRECATED β€” ipfs block keys and related utilities
Go
2
star
78

go-ds-lru

[ARCHIVED] A datastore implementation that uses an lru to cache results from a different backing datastore
Go
2
star
79

ipfs-nodeschool

[ARCHIVED] The workshoper to go InterPlanetary πŸŒπŸš€βœ¨πŸŒŒ
JavaScript
2
star
80

go-waffle

[ARCHIVED] Repo used to create a overview of all the Golang repos in waffle
2
star
81

jest-environment-aegir

[ARCHIVED] Jest Environment used in Aegir
JavaScript
2
star
82

jenkins-libs

[ARCHIVED] Reusable pipelines to be run on Jenkins
Groovy
2
star
83

badgerds-upgrade

[ARCHIVED] Badger datastore upgrade tool
Go
2
star
84

eslint-config-aegir

[ARCHIVED] Eslint Shareable Config for Aegir
JavaScript
2
star
85

node-github-issue-bot

[ARCHIVED] DEPRECATED β€” Automatically schedule and create GitHub issues
JavaScript
2
star
86

js-ipfs-unixfs-exporter

[ARCHIVED] JavaScript implementation of the UnixFs exporter used by IPFS
JavaScript
2
star
87

datatogether

[ARCHIVED] Old website for datatogether.org
HTML
2
star
88

ipfs-sharness-tests

[ARCHIVED] Sharness tests to test IPFS implementations
Shell
2
star
89

community-calls-reminder

[ARCHIVED] A script that reminds folks to sign up for community calls
JavaScript
1
star
90

aegir-test-repo

[ARCHIVED] A clone of js-ipfs-api that we use for testing aegir.
JavaScript
1
star
91

browser-process-platform

[ARCHIVED] Browser shim for Node.js process.platform.
JavaScript
1
star
92

go-ipfs-flags

[ARCHIVED] DEPRECATED - go-ipfs-flags groups go-ipfs configuration options used by several modules
Go
1
star
93

js-waffle

[ARCHIVED] Repo used to create a overview of all the JS repos in waffle
1
star