nash-protocol 0.3.0

state management and cryptography for interacting with nash exchange protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::graphql;
use graphql::updated_ticker;
use graphql_client::GraphQLQuery;

// Subscribe to ticker updates on `Market`.
#[derive(Clone, Debug)]
pub struct SubscribeTicker {
    pub market: String,
}

impl SubscribeTicker {
    pub fn make_query(&self) -> graphql_client::QueryBody<updated_ticker::Variables> {
        graphql::UpdatedTicker::build_query(updated_ticker::Variables {
            market_name: self.market.clone(),
        })
    }
}