Skip to content

not compatible with ipfs-http-client #29

@onichandame

Description

@onichandame

Problem

The ipfs-http-client package is now shipped with types, and those types seem to conflict with the IPFS type we are using in this package.

Steps to Reproduce

import createIpfs from 'ipfs-http-client'
import OrbitDb from 'orbit-db'

type IPFS = ReturnType<typeof createIpfs>

// This line does not pass ts check
const createOrbitDbInstance = (ipfs:IPFS) => OrbitDb.createInstance(ipfs)

Possible Solutions

Since orbit db is able to consume an ipfs-http-client instance, this problem should be considered as a bug. Possible solutions are:

  1. change the IPFS type to the minimum so that it does not cover anything non-compatible with the official IPFS types

Any more thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions