Struct sapio::template::Template [−][src]
pub struct Template {
pub ctv: Hash,
pub ctv_index: u32,
pub max: Amount,
pub min_feerate_sats_vbyte: Option<Amount>,
pub metadata_map_s2s: TemplateMetadata,
pub tx: Transaction,
pub outputs: Vec<Output>,
}
Expand description
Template holds the data needed to construct a Transaction for CTV Purposes, along with relevant metadata
Fields
ctv: Hash
the precomputed template hash for this Template
ctv_index: u32
the index used for the template hash. (TODO: currently always 0, although future version may support other indexes)
max: Amount
the amount being sent to this Template (TODO: currently computed via tx.total_amount())
min_feerate_sats_vbyte: Option<Amount>
the amount being sent to this Template (TODO: currently computed via tx.total_amount())
metadata_map_s2s: TemplateMetadata
any metadata fields attached to this template
tx: Transaction
The actual transaction this template will create
outputs: Vec<Output>
sapio specific information about all the outputs in the tx
.
Implementations
recompute the total amount spent in this template. This is the total amount required to be sent to this template for this transaction to succeed.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Template
impl UnwindSafe for Template
Blanket Implementations
Mutably borrows from an owned value. Read more