Fully support optimized and readable formats for all types
Clarification and motivation
From tezos/tezos#843 (comment 366217883):
Yes, there are two possible formats called "Readable" and "Optimized". The types for which it makes a difference are:
timestamp
: the readable format is a RFC3999 string, the optimized one is an integer representing the number of seconds since epochsignature
,key_hash
,address
,contract
,public_key
: the readable format is a base58 string, the optimized one is a byte sequencechain_id
: idem but the readable version is affected by a small bug; it is accepted as input but is never produced (fixed in metastatedev/tezos!192 (merged)).
The documentation for this is here.
We support both formats to some extent, but not fully. In !207 (merged) we do it for addresses. But apparently we have to do it for some other types, e. g. for crypto types such as signature
.
Please don't start before !207 (merged) is merged.
Acceptance criteria
For all types that support more than one representation our typecheck function should accept all representations.