Remove DsKeyToCid() and CidToDsKey(). Add DsKeyToCidV1Raw()
We are deprecating these functions as ipfs strives to store multihashes directly on the datastore, rather than CIDs. Thus multiple CIDs might map to the same multihash. Making this functions reflect that behaviour might cause silent breakage in users. We prefer loud breakage. Users using CidToDsKey(c) should move to MultihashToDsKey(c.Hash()). Users using DsKeyToCid() should move to DsKeyToCidV1Raw() or DsKeyToMultihash(). Note that datastore should handle migrations to replace existing CID-encoded keys with raw multihashes, or preserve DsKeyToCid() and CidToDsKey() in their own codebases.
Showing
Please register or sign in to comment