rosetta_types/mempool_transaction_response.rs
1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// MempoolTransactionResponse : A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid).
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct MempoolTransactionResponse {
15 #[serde(rename = "transaction")]
16 pub transaction: crate::Transaction,
17 #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
18 pub metadata: Option<serde_json::Value>,
19}
20
21impl MempoolTransactionResponse {
22 /// A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid).
23 pub fn new(transaction: crate::Transaction) -> MempoolTransactionResponse {
24 MempoolTransactionResponse {
25 transaction,
26 metadata: None,
27 }
28 }
29}