[types] Use ByteString as key