Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not compatible with ipfs-http-client #29

Open
onichandame opened this issue Jan 29, 2021 · 2 comments
Open

not compatible with ipfs-http-client #29

onichandame opened this issue Jan 29, 2021 · 2 comments

Comments

@onichandame
Copy link

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?

@mboogerd
Copy link

@onichandame and @lmarianski . I have added a PR with a potential fix for this issue. Please let me know whether this looks okay to you and how to proceed from here.

@onichandame
Copy link
Author

Great work! But I am not using OrbitDB anymore so probably a maintainer could better help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants