-
Notifications
You must be signed in to change notification settings - Fork 54
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
Proposal: Make Link
and Block
interfaces compatible
#227
Comments
I think possible solutions here are:
|
@Gozala I agree that this is worth fixing, but I can't bring myself to prefer a solution. Both of these things have |
My current plan is to idea that motivated and make more informed and proposal based on that experience. I thought starting this thread in parallel was a good idea to gather input from collaborators. I've been also trying to get some ideas from Node interface but so far I have failed to borrow much. But here is some rough plan:
|
Personally I'm leaning towards option 2, which I'd re-frame as:
Note that if |
Just looking through my ipld js folders and I'm seeing Do you have a proposal for a new interface for CID that gives access to the bytes? Am I going to have to |
As things stand today it is impossible to satisfy both
Link
andBlock
interfaces with a same instance, because both they collide onbytes
field:js-multiformats/src/block/interface.ts
Lines 47 to 55 in 15c52c8
js-multiformats/src/link/interface.ts
Lines 21 to 42 in 15c52c8
This is unfortunate because we're finding ourselves in a position where we would like to satisfy both interfaces along with following
DAG
interface:More broadly speaking we would like an ability to give a link with it's data attached (when we have it).
The text was updated successfully, but these errors were encountered: