diff --git a/primitives/src/taproot.rs b/primitives/src/taproot.rs index 2fc4b5a0..fba58f83 100644 --- a/primitives/src/taproot.rs +++ b/primitives/src/taproot.rs @@ -417,7 +417,11 @@ impl From for LeafScript { } impl LeafScript { + #[inline] + pub fn with(version: LeafVer, script: ScriptBytes) -> Self { LeafScript { version, script } } + #[inline] pub fn from_tap_script(tap_script: TapScript) -> Self { Self::from(tap_script) } + #[inline] pub fn tap_leaf_hash(&self) -> TapLeafHash { TapLeafHash::with_leaf_script(self) } }