Add convenience method TapTree:to_builder

This commit is contained in:
Dr Maxim Orlovsky 2022-04-06 13:51:51 +02:00
parent a12e7c73b6
commit 4cdff06b1e
No known key found for this signature in database
GPG Key ID: FFC0250947E5C6F7
1 changed files with 6 additions and 0 deletions

View File

@ -162,6 +162,12 @@ impl TapTree {
self.0
}
/// Constructs [`TaprootBuilder`] by internally cloning the `self`. The builder is guaranteed
/// to be finalized.
pub fn to_builder(&self) -> TaprootBuilder {
self.0.clone()
}
/// Returns [`TapTreeIter`] iterator for a taproot script tree, operating in DFS order over
/// tree [`ScriptLeaf`]s.
pub fn script_leaves(&self) -> TapTreeIter {