feat(traverse): Add reference inputs to Tx (#161)
This commit is contained in:
parent
8f38834a1d
commit
abcde9d46b
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> {
|
pub fn certs(&self) -> Vec<MultiEraCert> {
|
||||||
match self {
|
match self {
|
||||||
MultiEraTx::AlonzoCompatible(x, _) => x
|
MultiEraTx::AlonzoCompatible(x, _) => x
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue