coinbase_mesh/models/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
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TransactionIdentifier : The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TransactionIdentifier {
17 /// 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.
18 #[serde(rename = "hash")]
19 pub hash: String,
20}
21
22impl TransactionIdentifier {
23 /// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
24 pub fn new(hash: String) -> TransactionIdentifier {
25 TransactionIdentifier {
26 hash,
27 }
28 }
29}
30