Skip to main content

blockfrost_openapi/models/
address_transactions_content_inner.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct AddressTransactionsContentInner {
6    /// Hash of the transaction
7    #[serde(rename = "tx_hash")]
8    pub tx_hash: String,
9    /// Transaction index within the block
10    #[serde(rename = "tx_index")]
11    pub tx_index: i32,
12    /// Block height
13    #[serde(rename = "block_height")]
14    pub block_height: i32,
15    /// Block creation time in UNIX time
16    #[serde(rename = "block_time")]
17    pub block_time: i32,
18}
19
20impl AddressTransactionsContentInner {
21    pub fn new(tx_hash: String, tx_index: i32, block_height: i32, block_time: i32) -> AddressTransactionsContentInner {
22        AddressTransactionsContentInner {
23            tx_hash,
24            tx_index,
25            block_height,
26            block_time,
27        }
28    }
29}
30