Closed achingbrain closed 5 years ago
It seems weird to me that you can do this sort of thing, where there's no guarentee that the passed CID has any relation to the node we're trying to store:
const cid = new CID('QmTmxQfEHbQzntsXPTU4ae2ZgBGwseBmS12AkZnKCkuf2G') resolver.put(Buffer.from('Hello world'), { cid }, cb)
How about deprecating/removing the cid argument in favour of requiring version, hashAlg and format and letting the resolvers decide on the CID used?
cid
version
hashAlg
format
Maybe also accept codec in place of format too in order to be more consistent with other terminology around ipld?
codec
That's the case with the newest release of js-ipld 0.23.
It seems weird to me that you can do this sort of thing, where there's no guarentee that the passed CID has any relation to the node we're trying to store:
How about deprecating/removing the
cid
argument in favour of requiringversion
,hashAlg
andformat
and letting the resolvers decide on the CID used?Maybe also accept
codec
in place offormat
too in order to be more consistent with other terminology around ipld?