tensor_trade_stream/
queries.rs1use graphql_client::GraphQLQuery;
2use serde::Deserialize;
3
4#[derive(Debug, Clone, Deserialize)]
5pub struct Decimal(pub String);
6
7impl Decimal {
8 pub fn new(decimal: String) -> Self {
9 Self(decimal)
10 }
11}
12
13impl From<String> for Decimal {
14 fn from(item: String) -> Self {
15 Self::new(item)
16 }
17}
18
19#[derive(Debug, Clone, Deserialize)]
20pub struct Timestamp(pub i64);
21
22impl Timestamp {
23 pub fn new(timestamp: i64) -> Self {
24 Self(timestamp)
25 }
26}
27
28impl From<i64> for Timestamp {
29 fn from(item: i64) -> Self {
30 Self::new(item)
31 }
32}
33
34#[derive(Debug, Clone, Deserialize)]
35pub struct BigInt(pub String);
36
37impl BigInt {
38 pub fn new(big_int: String) -> Self {
39 Self(big_int)
40 }
41}
42
43impl From<String> for BigInt {
44 fn from(item: String) -> Self {
45 Self::new(item)
46 }
47}
48
49#[derive(GraphQLQuery, Debug, Clone, Deserialize)]
50#[graphql(
51 schema_path = "graphql/schema.json",
52 query_path = "graphql/subscriptions/tswap_order_update_all.graphql",
53 response_derives = "Debug, Clone"
54)]
55pub struct TswapOrderUpdateAll;
56
57#[derive(GraphQLQuery, Debug, Clone, Deserialize)]
58#[graphql(
59 schema_path = "graphql/schema.json",
60 query_path = "graphql/subscriptions/tswap_order_update.graphql",
61 response_derives = "Debug, Clone"
62)]
63pub struct TswapOrderUpdate;
64
65#[derive(GraphQLQuery, Debug, Clone, Deserialize)]
66#[graphql(
67 schema_path = "graphql/schema.json",
68 query_path = "graphql/subscriptions/new_transaction_t_v2.graphql",
69 response_derives = "Debug, Clone"
70)]
71pub struct NewTransactionTV2;