Hyperlane-Messaging is a command-line tool that enables users to send and query messages via Hyperlane using Ethereum-based operations.
- Send a message via Hyperlane.
- Query for messages sent from a specified chain.
- Clone the repository:
git clone https://github.com/hefgi/hyperlane-messaging.git
cd hyperlane-messaging
- Install the required packages:
npm install
- Ensure the index.ts includes execution permission.
chmod u+x ./src/index.ts
The file (CLI) can now be executed directly as if it was a binary.
npm run start
- Optional: Making the Command Available Globally
npm install -g
hyperlane-messaging-cli
Important: Only Ethereum, Sepolia and Goerli are supported in this version. You can add more chains by modifying the configuration files.
To send a message, you will need the following:
privateKey: string;
rpc: string;
origin: ChainValue;
destination: ChainValue;
destinationAddress: string;
message: string;
You will get as a result a txHash
and a link to Hyperlane explorer
To search for messages, you will need the following:
rpc: string;
origin: ChainValue;
The search is limited to the last 2000 blocks.
Our CLI tool is designed to provide descriptive error messages to help identify issues. Always check the output for any error messages before troubleshooting.
- Missing Chains: Always ensure that your configuration file inside
config/chains
is present and contains the correct chain configurations. For more information check https://docs.hyperlane.xyz/docs/resources/addresses - Invalid Command: If you encounter an "Unsupported command" error, double-check the command syntax in the Usage section.
Feel free to fork this project and submit your PRs for any improvements or bug fixes. We appreciate all the help we can get!
MIT License. See LICENSE for more information.