feat(traverse): Add reference inputs to Tx (#161)
This commit is contained in:
parent
60a6e99189
commit
dde9f96595
1 changed files with 17 additions and 0 deletions
|
|
@ -134,6 +134,23 @@ impl<'b> MultiEraTx<'b> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn reference_inputs(&self) -> Vec<MultiEraInput> {
|
||||
match self {
|
||||
MultiEraTx::Babbage(x) => x
|
||||
.transaction_body
|
||||
.reference_inputs
|
||||
.as_ref()
|
||||
.map(|inputs|
|
||||
inputs
|
||||
.iter()
|
||||
.map(MultiEraInput::from_alonzo_compatible)
|
||||
.collect()
|
||||
)
|
||||
.unwrap_or_default(),
|
||||
_ => vec![]
|
||||
}
|
||||
}
|
||||
|
||||
pub fn certs(&self) -> Vec<MultiEraCert> {
|
||||
match self {
|
||||
MultiEraTx::AlonzoCompatible(x, _) => x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue