#[derive(Serialize, Deserialize, Debug, Clone)] pub struct RPCParams { pub hash: Option, pub txs_hashes: Option>, pub height: Option } impl Default for RPCParams { fn default() -> RPCParams { RPCParams { hash: None, txs_hashes: None, height: None } } } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GetTransactionPool { pub credits: u32, pub spent_key_images: Option>, pub status: String, pub top_hash: String, pub transactions: Option> } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct SpentKeyImages { pub id_hash: String, pub txs_hashes: Vec } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Transaction { pub blob_size: u32, pub do_not_relay: bool, pub double_spend_seen: bool, pub fee: u64, pub id_hash: String, pub kept_by_block: bool, pub last_failed_height: u32, pub last_failed_id_hash: String, pub last_relayed_time: i64, pub max_used_block_height: u32, pub max_used_block_id_hash: String, pub receive_time: i64, pub relayed: bool, pub tx_blob: String, pub tx_json: String, pub tx_json_full: Option, pub weight: u32 } impl Transaction { pub fn process(&mut self) { self.tx_json_full = Some(serde_json::from_str(&self.tx_json).unwrap()) } } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TransactionJSON { pub version: u32, pub unlock_time: u64, pub vin: Option>, pub vout: Vec, pub extra: Vec, pub rct_signatures: Option } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TransactionInputs { pub key: Option } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct PreviousTransactionKey { pub amount: u64, pub key_offsets: Vec, pub k_image: String } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TransactionOutputs { pub amount: u64, pub target: OutputStealthAddress } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct OutputStealthAddress { pub key: Option } #[allow(non_snake_case)] #[derive(Serialize, Deserialize, Debug, Clone)] pub struct RingSignatures { pub r#type: u32, pub txnFee: Option, pub outPk: Option> } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct QRData { pub tx_amount: String, pub tx_description: String, pub recipient_name: String, pub tx_payment_id: String } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct CheckTxKeyResponse { pub jsonrpc: String, pub id: u32, pub result: Option } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct CheckTxKeyResult { pub confirmations: u32, pub in_pool: bool, pub received: u64, }