Moved canonicalisation from mint to datatypes