validate method

bool validate()

Validates the CID.

Implementation

bool validate() {
  if (version != 0 && version != 1) return false;
  if (version == 0 && codec != 'dag-pb') return false;
  if (multihash.size <= 0) return false;
  return true;
}