Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[Types] ipfs-http-server HttpApi requires JSIPFS type #3639

Closed
rvagg opened this issue Apr 26, 2021 · 0 comments · Fixed by #3660
Closed

[Types] ipfs-http-server HttpApi requires JSIPFS type #3639

rvagg opened this issue Apr 26, 2021 · 0 comments · Fixed by #3660
Assignees
Labels
need/triage Needs initial labeling and prioritization

Comments

@rvagg
Copy link
Member

rvagg commented Apr 26, 2021

Ref: ceramicnetwork/js-ceramic#1194

a418a52 introduced this beast to the HttpApi constructor: @typedef {IPFS & { ipld: IPLD, libp2p: libp2p }} JSIPFS. How do we expect users to get one of these things. The two places we use HttpApi in the test don't seem to have types coverage. Is a @ts-ignore just how it has to be for now or is there an alternative that wraps up this little beasty from an existing ipfs instance?

@rvagg rvagg added the need/triage Needs initial labeling and prioritization label Apr 26, 2021
achingbrain added a commit that referenced this issue Apr 30, 2021
We needed to reach into ipld in order to get at the formats so we can
deserialize the data.

Instead, put the data as a block and then read it out using ipfs.dag.get.

Slightly inefficient but better to use the public API.

Fixes #3639
achingbrain added a commit that referenced this issue Apr 30, 2021
We needed to reach into ipld in order to get at the formats so we can deserialize the data.

Instead, put the data as a block and then read it out using ipfs.dag.get.

Slightly inefficient but better to use the public API.

Fixes #3639
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants