Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: use ipfs-unixfs final release instead of fork #56

Merged
merged 4 commits into from
Jul 13, 2021

Conversation

vasco-santos
Copy link
Collaborator

@vasco-santos vasco-santos commented Jul 12, 2021

This PR uses the ipfs-unixfs final release instead of our own fork. Includes changes to fulfil the new Blockstore API expected by unixfs and a new VerifyingGetOnlyBlockStore class to avoid type complains from unixfs expectations.

This PR also updated the dependencies.

BREAKING CHANGE: We rely now on an extended version of the new ipfs blockstore interface to be compatible with the new ipfs-unixfs. Previously unixfs was using a simple block API from ipld which returned blocks everywhere, while now put returns a void Promise and get returns the bytes instead of the Block. Destroy was also renamed to close to be the same as the interface. The only addition in the interface is the blocks async iterator function. All the blocktore implementations extend BlockstoreAdapter to have all the API expected by the interface.

@vasco-santos vasco-santos marked this pull request as ready for review July 12, 2021 12:42
BREAKING CHANGE: We rely now on an extended version of the new ipfs blockstore interface to be compatible with the new ipfs-unixfs. Previously unixfs was using a simple block API from ipld which returned blocks everywhere, while now put returns a void Promise and get returns the bytes instead of the Block. Destroy was also renamed to close to be the same as the interface. The only addition in the interface is the blocks async iterator function. All the blocktore implementations extend BlockstoreAdapter to have all the API expected by the interface.
@vasco-santos vasco-santos merged commit 21b3791 into main Jul 13, 2021
@vasco-santos vasco-santos deleted the chore/use-unixfs branch July 13, 2021 15:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant