Skip to content

Commit

Permalink
Make Plan::template pub(crate)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielabrozzoni committed Aug 18, 2023
1 parent becea42 commit 1bb08f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ where
#[derive(Debug, Clone)]
pub struct Plan {
/// This plan's witness template
pub template: Vec<Placeholder<DefiniteDescriptorKey>>,
pub(crate) template: Vec<Placeholder<DefiniteDescriptorKey>>,
/// The absolute timelock this plan uses
pub absolute_timelock: Option<LockTime>,
/// The relative timelock this plan uses
Expand All @@ -257,6 +257,11 @@ pub struct Plan {
}

impl Plan {
/// Returns the witness template
pub fn witness_template(&self) -> &Vec<Placeholder<DefiniteDescriptorKey>> {
&self.template
}

/// Returns the witness version
pub fn witness_version(&self) -> Option<WitnessVersion> {
self.descriptor.desc_type().segwit_version()
Expand Down

0 comments on commit 1bb08f2

Please sign in to comment.