Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Deprecate passing a CID to ipld.put? #175

Closed
@achingbrain

Description

@achingbrain

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?

Maybe also accept codec in place of format too in order to be more consistent with other terminology around ipld?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions