createCID = async (value, codec, hasher, version = 1) => {
  try {
    const digest = await hasher.digest(codec.encode(value))
    return CID.create(version, codec.code, digest)
  } catch (err) {
    console.log('Failed to create CID', value, err)
    return null
  }
}
@template {number} Code
@param {any} value
@param {import('multiformats/block').BlockEncoder<Code, any>} codec
@param {import('multiformats/hashes/interface').MultihashHasher<Code>} hasher
@param {import('multiformats/cid').Version} version
@returns {Promise<CID | null>}