Skip to main content
The Message library helps you format and parse interchain messages for use with the Hyperlane Mailbox contract.
  • Construct Messages: formatMessage lets you pack all the key fields into a single, ready-to-send message.
  • Extract Fields: Functions like version, nonce, origin, senderAddress, recipientAddress, and body help you pull out specific parts of a message for processing.
  • Get Message ID: id generates a unique identifier for each message using keccak256.

Message Library