libp2p
    Preparing search index...

    Module @libp2p/interop

    This repository holds interop tests for testing compatibility between different libp2p implementations.

    Create a js file that configures the different types of daemon:

    import { interopTests } from '@libp2p/interop'
    import type { Daemon, DaemonFactory } from '@libp2p/interop'

    async function createGoPeer (options: SpawnOptions): Promise<Daemon> {
    // your implementation here
    }

    async function createJsPeer (options: SpawnOptions): Promise<Daemon> {
    // your implementation here
    }

    async function main () {
    const factory: DaemonFactory = {
    async spawn (options: SpawnOptions) {
    if (options.type === 'go') {
    return createGoPeer(options)
    }

    return createJsPeer(options)
    }
    }

    interopTests(factory)
    }

    main().catch(err => {
    console.error(err)
    process.exit(1)
    })

    For an example, see the js-libp2p interop test runner.

    Classes

    UnsupportedError

    Interfaces

    Daemon
    DaemonFactory
    SpawnOptions

    Type Aliases

    Encryption
    Muxer
    NodeType
    PeerIdType
    PubSubRouter
    TransportType

    Functions

    connectInteropTests
    dhtInteropTests
    interopTests
    pubsubInteropTests
    relayInteropTests
    streamInteropTests