Mention Script::is_v1_p2tr above Witness::tapscript

This commit is contained in:
Casey Rodarmor 2022-12-17 16:32:14 -08:00
parent 0203107360
commit 67ca3463c0
1 changed files with 5 additions and 3 deletions

View File

@ -312,9 +312,11 @@ impl Witness {
/// Get Tapscript following BIP341 rules regarding accounting for an annex. /// Get Tapscript following BIP341 rules regarding accounting for an annex.
/// ///
/// This does not guarantee that this represents a P2TR [`Witness`]. /// This does not guarantee that this represents a P2TR [`Witness`]. It
/// It merely gets the second to last or third to last element depending /// merely gets the second to last or third to last element depending on
/// on the first byte of the last element being equal to 0x50. /// the first byte of the last element being equal to 0x50. See
/// [Script::is_v1_p2tr](crate::blockdata::script::Script::is_v1_p2tr) to
/// check whether this is actually a Taproot witness.
pub fn tapscript(&self) -> Option<&[u8]> { pub fn tapscript(&self) -> Option<&[u8]> {
let len = self.len(); let len = self.len();
self self