Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

RFC: Do not return string CIDs from core #394

Closed
@alanshaw

Description

@alanshaw

The following core API functions (in JS at least) return multibase encoded string CIDs:

  • bitswap.wantlist
  • bitswap.stat
  • block.stat
  • block.rm
  • add
  • files.ls
  • files.stat
  • object.stat
  • pin.add
  • pin.rm
  • pin.ls

Core should not make any assumptions about the what base encoding we'd like our CIDs in or even if we want them encoded as strings. They should all return CID instances.

This would make these APIs consistent with the other APIs and would save a bunch of CID -> string -> CID conversion that's happening at the moment and all the overhead that brings with it.

Thoughts? @achingbrain @hugomrdias @daviddias @Stebalien

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