Validates the base58 literals of Michelson's address-like types and decodes them into the binary forms the protocol compares them by.
Prefixes are Octez's: src/lib_crypto/base58.ml, plus contract_hash.ml (KT1) and zk_rollup_repr.ml (epx1) in the protocol.
Summary
Functions
An address is compared by destination, then by entrypoint name, where no
entrypoint means "default" (script_comparable.ml, compare_address).
Destinations are tagged like their binary encoding (destination_repr.ml), so
their byte order is the protocol's: implicit (tz1 < tz2 < tz3 < tz4) < KT1 <
sr1 < epx1.
A key is compared by curve (ed25519 < secp256k1 < p256 < bls), then by key
bytes (signature_v1.ml). The bytes here are the encoded ones; p256 keys need
decompressing before they're compared, see Tezex.Michelson.Comparable.
A signature is compared by its raw bytes, whatever its prefix
(signature_v1.ml), so edsig… and sig… with the same bytes are equal.
Functions
An address is compared by destination, then by entrypoint name, where no
entrypoint means "default" (script_comparable.ml, compare_address).
Destinations are tagged like their binary encoding (destination_repr.ml), so
their byte order is the protocol's: implicit (tz1 < tz2 < tz3 < tz4) < KT1 <
sr1 < epx1.
A key is compared by curve (ed25519 < secp256k1 < p256 < bls), then by key
bytes (signature_v1.ml). The bytes here are the encoded ones; p256 keys need
decompressing before they're compared, see Tezex.Michelson.Comparable.
A signature is compared by its raw bytes, whatever its prefix
(signature_v1.ml), so edsig… and sig… with the same bytes are equal.