Skip to content

Commit 36b4ad9

Browse files
committed
Add accessor to Simplicity's leaf version
1 parent dfa267e commit 36b4ad9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ pub use crate::value::Value;
7171
pub use simplicity_sys as ffi;
7272
use std::fmt;
7373

74+
/// Return the version of Simplicity leaves inside a tap tree.
75+
#[cfg(feature = "elements")]
76+
pub fn leaf_version() -> elements::taproot::LeafVersion {
77+
elements::taproot::LeafVersion::from_u8(0xbe).expect("constant leaf version")
78+
}
79+
7480
/// Error type for simplicity
7581
#[non_exhaustive]
7682
#[derive(Debug)]

0 commit comments

Comments
 (0)