From b0665890eec9507ad315da94fd8866855d0cf313 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 27 Dec 2023 10:52:36 +0100 Subject: [PATCH] psbt: add Output::vout --- psbt/src/data.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/psbt/src/data.rs b/psbt/src/data.rs index 8a0b36b..3174a53 100644 --- a/psbt/src/data.rs +++ b/psbt/src/data.rs @@ -877,6 +877,9 @@ impl Output { #[inline] pub fn index(&self) -> usize { self.index } + #[inline] + pub fn vout(&self) -> Vout { Vout::from_u32(self.index as u32) } + pub fn terminal_derivation(&self) -> Option { if self.bip32_derivation.is_empty() && self.tap_bip32_derivation.is_empty() { return None;