Skip to content

Commit 685d223

Browse files
authored
feat(pyth-lazer) Implement JRPC endpoint for the lazer agent (#2837)
1 parent 619c87a commit 685d223

File tree

10 files changed

+495
-48
lines changed

10 files changed

+495
-48
lines changed

Cargo.lock

Lines changed: 105 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pyth-lazer-agent/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version = "0.1.3"
44
edition = "2024"
55

66
[dependencies]
7-
pyth-lazer-publisher-sdk = "0.1.5"
8-
pyth-lazer-protocol = "0.7.2"
7+
pyth-lazer-publisher-sdk = "0.1.7"
8+
pyth-lazer-protocol = "0.8.1"
99

1010
anyhow = "1.0.98"
1111
backoff = "0.4.0"
@@ -20,7 +20,7 @@ futures-util = "0.3.31"
2020
http = "1.3.1"
2121
http-body-util = "0.1.3"
2222
humantime-serde = "1.1.1"
23-
hyper = { version = "1.6.0", features = ["http1", "server"] }
23+
hyper = { version = "1.6.0", features = ["http1", "server", "client"] }
2424
hyper-util = { version = "0.1.10", features = ["tokio"] }
2525
protobuf = "3.7.2"
2626
serde = { version = "1.0.219", features = ["derive"] }
@@ -33,6 +33,7 @@ tokio-util = { version = "0.7.14", features = ["compat"] }
3333
tracing = "0.1.41"
3434
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
3535
url = { version = "2.5.4", features = ["serde"] }
36+
reqwest = "0.12.22"
3637

3738
[dev-dependencies]
3839
tempfile = "3.20.0"

apps/pyth-lazer-agent/config/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ relayer_urls = ["ws://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "ws://
22
publish_keypair_path = "/path/to/solana/id.json"
33
listen_address = "0.0.0.0:8910"
44
publish_interval_duration = "25ms"
5+
authorization_token="token1"

apps/pyth-lazer-agent/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub struct Config {
1717
pub publish_keypair_path: PathBuf,
1818
#[serde(with = "humantime_serde", default = "default_publish_interval")]
1919
pub publish_interval_duration: Duration,
20+
pub history_service_url: Option<Url>,
2021
}
2122

2223
fn default_publish_interval() -> Duration {

0 commit comments

Comments
 (0)