Skip to content

Commit c9f700b

Browse files
committed
refactor: rename, remove doctest
1 parent 4160bc8 commit c9f700b

File tree

5 files changed

+20
-43
lines changed

5 files changed

+20
-43
lines changed

lazer/Cargo.lock

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

lazer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
resolver = "2"
33
members = [
44
"sdk/rust/protocol",
5-
"sdk/rust/sdk",
5+
"sdk/rust/client",
66
"contracts/solana/programs/pyth-lazer-solana-contract",
77
]
88

lazer/sdk/rust/sdk/Cargo.toml renamed to lazer/sdk/rust/client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
2-
name = "pyth-lazer-sdk"
2+
name = "pyth-lazer-client"
33
version = "0.1.0"
44
edition = "2021"
5-
description = "A Rust SDK for Pyth Lazer"
5+
description = "A Rust client for Pyth Lazer"
66
license = "Apache-2.0"
77

88
[dependencies]

lazer/sdk/rust/sdk/examples/subscribe_price_feeds.rs renamed to lazer/sdk/rust/client/examples/subscribe_price_feeds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use futures_util::StreamExt;
2+
use pyth_lazer_client::LazerClient;
23
use pyth_lazer_protocol::router::{
34
Chain, Channel, DeliveryFormat, FixedRate, JsonBinaryEncoding, PriceFeedId, PriceFeedProperty,
45
SubscriptionParams, SubscriptionParamsRepr,
56
};
67
use pyth_lazer_protocol::subscription::{Request, SubscribeRequest, SubscriptionId};
7-
use pyth_lazer_sdk::LazerClient;
88

99
#[tokio::main]
1010
async fn main() -> anyhow::Result<()> {

lazer/sdk/rust/sdk/src/lib.rs renamed to lazer/sdk/rust/client/src/lib.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,6 @@ pub enum BinaryResponse {
3232
/// - Subscribe to price feed updates
3333
/// - Receive updates as a stream of messages
3434
///
35-
/// # Example
36-
/// ```no_run
37-
/// use pyth_lazer_sdk::LazerClient;
38-
/// use pyth_lazer_protocol::subscription::{Request, SubscribeRequest, SubscriptionParams};
39-
///
40-
/// #[tokio::main]
41-
/// async fn main() -> anyhow::Result<()> {
42-
/// let mut client = LazerClient::new("wss://endpoint", "YOUR_ACCESS_TOKEN".to_string())?;
43-
/// let mut stream = client.start().await?;
44-
///
45-
/// // Subscribe to price feeds
46-
/// client.subscribe(Request::Subscribe(SubscribeRequest {
47-
/// subscription_id: SubscriptionId(1),
48-
/// params: SubscriptionParams { /* ... */ },
49-
/// })).await?;
50-
///
51-
/// // Process updates
52-
/// while let Some(msg) = stream.next().await {
53-
/// println!("Received: {:?}", msg?);
54-
/// }
55-
/// Ok(())
56-
/// }
57-
/// ```
5835
pub struct LazerClient {
5936
endpoint: Url,
6037
access_token: String,

0 commit comments

Comments
 (0)