|
|
3 settimane fa | |
|---|---|---|
| .. | ||
| proto | d3cc7dff00 chore(hermes): Remove git from build, vendor WH & Google protos (#2097) | 1 anno fa |
| src | b18d6ac910 feat(hermes): add staleness metrics (#2978) | 3 mesi fa |
| .envrc.sample | f3249d9cba feat(apps/hermes): new client package for hermes (#1653) | 1 anno fa |
| .gitignore | ab0cf6f7d8 chore: updated gitignore to excluse the built dist/ folder | 3 settimane fa |
| Cargo.lock | b18d6ac910 feat(hermes): add staleness metrics (#2978) | 3 mesi fa |
| Cargo.toml | b18d6ac910 feat(hermes): add staleness metrics (#2978) | 3 mesi fa |
| Dockerfile | a8b1fa5989 Update hermes docker base runner (#2776) | 5 mesi fa |
| README.md | 059b7b99ac feat(hermes): Add `ignore_invalid_price_ids` flag to Hermes v2 REST APIs (#2091) | 1 anno fa |
| build.rs | 870a13d78b doc, refactor(apps/hermes/server): add code guidelines, enable extra clippy lints (#2777) | 5 mesi fa |
| shell.nix | e08052c2c4 feat: set up turborepo | 1 anno fa |
Hermes is a web service designed to monitor both Pythnet and the Wormhole Network for the next generation of Pyth price updates. It supersedes the Pyth Price Service, offering these updates through a user-friendly web API. The service facilitates easy querying for recent price updates via a REST API, as well as provides the option to subscribe to a websocket for real-time updates. Hermes maintains compatibility with the price service API, allowing the Price Service JS client to seamlessly connect to an instance of Hermes and fetch on-demand price updates.
To set up and run a Hermes node, follow the steps below:
Install Rust 1.82.0: If you haven't already, you'll need to install Rust. You can do so by following the official instructions. Then, run the following command to install the required version of Rust:
rustup toolchain install 1.82.0
Install Go: If you haven't already, you'll also need to install Go. You can do so by following the official instructions. If you are on a Mac with M series chips, make sure to install the arm64 version of Go.
Clone the repository: Clone the Pyth Crosschain repository to your local machine using the following command:
git clone https://github.com/pyth-network/pyth-crosschain.git
Build the project: Navigate to the project directory and run the following command to build the project:
cd apps/hermes/server
cargo build --release
This will create a binary in the target/release directory.
Run the node: To run Hermes for Pythnet, use the following command:
cargo run --release -- run \
--pythnet-http-addr https://pythnet-rpc/ \
--pythnet-ws-addr wss://pythnet-rpc/ \
--wormhole-spy-rpc-addr https://wormhole-spy-rpc/
Your Hermes node will now start and connect to the Pythnet and Wormhole spy RPC. You can interact with the node using the REST and Websocket APIs on port 33999.
For local development, you can also run the node with cargo watch to restart it automatically when the code changes.
cargo watch -w src -x "run -- run --pythnet-http-addr https://pythnet-rpc/ --pythnet-ws-addr wss://pythnet-rpc/ --wormhole-spy-rpc-addr https://wormhole-spy-rpc/