feat: Add constants for known miniprotocols
* Add constants for known miniprotocols Now consumers of the crate don't have to memorize what channel number means what * Add myself to the crate authors
This commit is contained in:
parent
d869169e68
commit
f9263a0eba
13 changed files with 122 additions and 79 deletions
|
|
@ -232,14 +232,15 @@ impl<'b> MultiEraTx<'b> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns a list of tuples of the outputs produced by the Tx with their indexes
|
||||
/// Returns a list of tuples of the outputs produced by the Tx with their
|
||||
/// indexes
|
||||
///
|
||||
/// Helper method to abstract the logic of which outputs are produced
|
||||
/// depending on the validity of the Tx. If the Tx is valid, this method
|
||||
/// will return the list of outputs. If the Tx is invalid it will return the
|
||||
/// collateral return if one is present or an empty list if not. Note that the
|
||||
/// collateral return output index is defined as the next available index after
|
||||
/// the txouts (Babbage spec, ch 4).
|
||||
/// collateral return if one is present or an empty list if not. Note that
|
||||
/// the collateral return output index is defined as the next available
|
||||
/// index after the txouts (Babbage spec, ch 4).
|
||||
pub fn produces(&self) -> Vec<(usize, MultiEraOutput)> {
|
||||
match self.is_valid() {
|
||||
true => self.outputs().into_iter().enumerate().collect(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue