Skip to content
A test suite and interface you can use to implement a Content Routing for libp2p.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
img first pass on this spec Feb 20, 2018
tests first pass on this spec Feb 20, 2018
.gitignore Initial commit Feb 20, 2018
LICENSE first pass on this spec Feb 20, 2018 chore: add discourse badge (#4) Apr 23, 2019
package.json docs: add lead-maintainer Oct 31, 2018


Discourse posts

A test suite and interface you can use to implement a Content Routing module for libp2p.

The primary goal of this module is to enable developers to pick and swap their Content Routing module as they see fit for their libp2p installation, without having to go through shims or compatibility issues. This module and test suite were heavily inspired by abstract-blob-store and interface-stream-muxer.

Publishing a test suite as a module lets multiple modules all ensure compatibility since they use the same test suite.

The API is presented with both Node.js and Go primitives, however, there is not actual limitations for it to be extended for any other language, pushing forward the cross compatibility and interop through diferent stacks.

Lead Maintainer

Vasco Santos.

Modules that implement the interface


Include this badge in your readme if you make a module that is compatible with the interface-content-routing API. You can validate this by running the tests.

How to use the battery of tests


var tape = require('tape')
var tests = require('interface-content-routing/tests')
var yourImpl = require('../src')

var common = {
    setup: function (t, cb) {
      cb(null, yourImpl)
    teardown: function (t, cb) {

tests(tape, common)


WIP - The go-libp2p implementation does not have a test suite to be used, yet.


A valid (read: that follows this abstraction) Content Routing module must implement the following API.


  • JavaScript peerRouting.findProviders


  • JavaScript peerRouting.provide
You can’t perform that action at this time.