Skip to main content

blockfrost_openapi/models/
nutlink_address_ticker_inner.rs

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