We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8656cda commit 8cdbf75Copy full SHA for 8cdbf75
src/blockdata/script.rs
@@ -410,8 +410,9 @@ impl Script {
410
Script::new_v1_p2tr(&secp, internal_key, Some(merkle_root))
411
}
412
413
+ /// Returns witness version of the script, if any, assuming the script is a `scriptPubkey`.
414
#[inline]
- fn witness_version(&self) -> Option<WitnessVersion> {
415
+ pub fn witness_version(&self) -> Option<WitnessVersion> {
416
self.0.get(0).and_then(|opcode| WitnessVersion::from_opcode(opcodes::All::from(*opcode)).ok())
417
418
0 commit comments