lighter-sdk 0.1.1

Rust SDK for interacting with the Lighter exchange over REST, WebSocket, and signer-backed transaction flows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::error::Result;
use crate::models::asset::AssetDetails;
use crate::models::info::*;
use crate::rest::client::LighterRestClient;

impl LighterRestClient {
    pub async fn get_exchange_stats(&self) -> Result<ExchangeStats> {
        self.get("/api/v1/exchangeStats").await
    }

    pub async fn get_asset_details(&self) -> Result<AssetDetails> {
        self.get("/api/v1/assetDetails").await
    }

    pub async fn get_zk_lighter_info(&self) -> Result<ValidatorInfo> {
        self.get("/info").await
    }
}