rosetta-types 0.4.0

Rosetta API request and response structs.
Documentation
/*
 * Rosetta
 *
 * Build Once. Integrate Your Blockchain Everywhere.
 *
 * The version of the OpenAPI document: 1.4.13
 *
 * Generated by: https://openapi-generator.tech
 */

/// RelatedTransaction : The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network.

#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct RelatedTransaction {
    #[serde(rename = "network_identifier", skip_serializing_if = "Option::is_none")]
    pub network_identifier: Option<crate::NetworkIdentifier>,
    #[serde(rename = "transaction_identifier")]
    pub transaction_identifier: crate::TransactionIdentifier,
    #[serde(rename = "direction")]
    pub direction: crate::Direction,
}

impl RelatedTransaction {
    /// The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network.
    pub fn new(
        transaction_identifier: crate::TransactionIdentifier,
        direction: crate::Direction,
    ) -> RelatedTransaction {
        RelatedTransaction {
            network_identifier: None,
            transaction_identifier,
            direction,
        }
    }
}