This project is a Rust-based utility for listening to messages on Pythnet, processing, and signing them.
cargo build --releaseOr for development:
cargo buildYou can run the project using cargo run by passing the required flags:
Make sure to set RUST_LOG=INFO to enable logs from tracing:
RUST_LOG=INFO cargo run -- run \
--pythnet-url wss://api2.pythnet.pyth.network \
--server-url https://quorum.pyth.network \
--secret-key /path/to/secret.key \
--wormhole-pid H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjUInstead of CLI flags, you can also set environment variables:
export PYTHNET_URL=wss://api2.pythnet.pyth.network
export SERVER_URL=https://quorum.pyth.network
export SECRET_KEY=/path/to/secret.key
export WORMHOLE_PID=H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU
export RUST_LOG=INFO
cargo runTo generate a new secp256k1 secret key and write it to a file:
RUST_LOG=INFO cargo run -- generate-key --output-file .secretThis will save the key in raw byte format to the file named .secret.
To test in a non-production environment (e.g. with devnet or a local Pythnet fork), just provide a different --pythnet-url, and --server-url, and optionally use custom --wormhole-pid.