The rpc method l1_handler_tx_receipt contains a message_hash field:
https://github.com/starkware-libs/starknet-specs/blob/76bdde23c7dae370a3340e40f7ca2ef2520e75b9/api/starknet_api_openrpc.json#L3072
Therefore it seems to be part of the protocol. Maybe a method should be available for the users of this lib to easily compute it, rather than having everyone reimplement it manually.
Here is pathfinder impl:
https://github.com/eqlabs/pathfinder/blob/03f8a58c40c69e60ad29ac6e97d7782aeccad4b4/crates/common/src/transaction.rs#L435