pub trait Transaction: Serialize + Deserialize {
type Input;
type Output;
type Inputs: ?Sized;
type Outputs: ?Sized;
fn inputs(&self) -> &Self::Inputs;
fn outputs(&self) -> &Self::Outputs;
}
Expand description
define a transaction within the blockchain. This transaction can be used for the UTxO model. However it can also be used for any other elements that the blockchain has (a transaction type to add Stacking Pools and so on…).
Required Associated Types
The iterable type of transaction inputs (if none use Option<()>
and return None
).
Required Methods
Returns a reference that can be used to iterate over transaction’s inputs.