blockfrost_openapi/models/script_cbor.rs
1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct ScriptCbor {
6 /// CBOR contents of the `plutus` script, null for `timelocks`
7 #[serde(rename = "cbor", deserialize_with = "Option::deserialize")]
8 pub cbor: Option<String>,
9}
10
11impl ScriptCbor {
12 pub fn new(cbor: Option<String>) -> ScriptCbor {
13 ScriptCbor {
14 cbor,
15 }
16 }
17}
18