Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

util.deserialize() should return an IPLD-friendly object, not BitcoinjsBlock #26

Closed
Mr0grog opened this issue Aug 7, 2018 · 2 comments

Comments

@Mr0grog
Copy link

Mr0grog commented Aug 7, 2018

See also ipld/js-ipld#141.

util.deserialize(), which is what provides results to ipld.get(cid), should return an object where the keys represent the same set of paths that can be resolved with ipld.get(cid, path). Instead, it’s currently returning a BitcoinjsBlock instance, which is very different.

The exact format of the object depends on how we resolve the open question at the end of the original post in ipld/js-ipld#141.

@vmx
Copy link
Member

vmx commented Aug 7, 2018

I disagree. If you want a IPLD-friendly object use resolve.resolve(binaryBlob, '/').

@Mr0grog
Copy link
Author

Mr0grog commented Aug 8, 2018

Closing this issue — this was a misunderstanding between @vmx and I about the intended behavior. Instead, the real issue is a combination of ipld/interface-ipld-format#34 (which needs to be fixed in this resolver) and ipld/js-ipld#142 (which needs to be fixed in js-ipld).

@Mr0grog Mr0grog closed this as completed Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants