Struct jormungandr_lib::interfaces::UTxOInfo
source · pub struct UTxOInfo {
transaction_id: Hash,
index_in_transaction: u8,
address: Address,
associated_fund: Value,
}
Expand description
the Unspent Transaction Output information.
This object contains all the information we know about a UTxO.
This data is different from the AccountState
which represents
the state of an account in the ledger.
Fields§
§transaction_id: Hash
§index_in_transaction: u8
§address: Address
§associated_fund: Value
Implementations§
source§impl UTxOInfo
impl UTxOInfo
pub fn new( transaction_id: Hash, index_in_transaction: u8, address: Address, associated_fund: Value ) -> Self
sourcepub fn transaction_id(&self) -> &Hash
pub fn transaction_id(&self) -> &Hash
the Transaction identifier (its hash) that will be used to reference to this UTxO as an input in a new transaction.
Along with the index_in_transaction
this uniquely identifies an UTxO
sourcepub fn index_in_transaction(&self) -> u8
pub fn index_in_transaction(&self) -> u8
the output index, will be needed as an input in a new transaction.
Along with the transaction_id
this uniquely identifies an UTxO
sourcepub fn address(&self) -> &Address
pub fn address(&self) -> &Address
the address to identify who can spend the UTxO. This is part of the data actually present as output of the source transaction.
sourcepub fn associated_fund(&self) -> &Value
pub fn associated_fund(&self) -> &Value
the associated funds in this UTxO. This will be used in a new transaction input to guarantee self validation of the transaction’s balance.