rosetta_types/
transaction_identifier.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/// TransactionIdentifier : The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct TransactionIdentifier {
15    /// Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier.  This should be normalized according to the case specified in the transaction_hash_case in network options.
16    #[serde(rename = "hash")]
17    pub hash: String,
18}
19
20impl TransactionIdentifier {
21    /// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
22    pub fn new(hash: String) -> TransactionIdentifier {
23        TransactionIdentifier { hash }
24    }
25}