use serde::Deserialize; use serde::Serialize; #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct GQLPageInfoInterface { pub has_next_page: bool, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLOwnerInterface { pub address: String, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub key: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLAmountInterface { #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub winston: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub ar: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLMetaDataInterface { #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub size: Option, #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub ty: Option, } #[derive(Serialize, Deserialize, Default, Debug, Clone)] pub struct GQLTagInterface { pub name: String, pub value: String, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLBlockInterface { pub id: String, pub timestamp: usize, pub height: usize, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub previous: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLNodeParent { pub id: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLBundled { pub id: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLNodeInterface { pub id: String, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub anchor: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub signature: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub recipient: Option, pub owner: GQLOwnerInterface, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub fee: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub quantity: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub data: Option, pub tags: Vec, pub block: GQLBlockInterface, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub parent: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] pub bundledIn: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLEdgeInterface { pub cursor: String, pub node: GQLNodeInterface, } #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct GQLTransactionsResultInterface { pub page_info: GQLPageInfoInterface, pub edges: Vec, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLDataResultInterface { pub transactions: GQLTransactionsResultInterface, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GQLResultInterface { pub data: GQLDataResultInterface, }