pub enum TaprootWitness {
PubkeySpending {
sig: SchnorrSig,
annex: Option<Box<[u8]>>,
},
ScriptSpending {
control_block: ControlBlock,
annex: Option<Box<[u8]>>,
script: LeafScript,
script_input: Vec<Box<[u8]>>,
},
}Expand description
Parsed witness stack for Taproot inputs
Variants§
PubkeySpending
Public key path spending
Fields
§
sig: SchnorrSigBIP-341 signature
ScriptSpending
Script path spending
Trait Implementations§
Source§impl Clone for TaprootWitness
impl Clone for TaprootWitness
Source§fn clone(&self) -> TaprootWitness
fn clone(&self) -> TaprootWitness
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaprootWitness
impl Debug for TaprootWitness
Source§impl Decodable for TaprootWitness
impl Decodable for TaprootWitness
Source§impl Encodable for TaprootWitness
impl Encodable for TaprootWitness
Source§impl From<&TaprootWitness> for Witness
impl From<&TaprootWitness> for Witness
Source§fn from(tw: &TaprootWitness) -> Self
fn from(tw: &TaprootWitness) -> Self
Converts to this type from the input type.
Source§impl From<TaprootWitness> for Witness
impl From<TaprootWitness> for Witness
Source§fn from(tw: TaprootWitness) -> Self
fn from(tw: TaprootWitness) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TaprootWitness
impl PartialEq for TaprootWitness
Source§impl Strategy for TaprootWitness
impl Strategy for TaprootWitness
Source§type Strategy = BitcoinConsensus
type Strategy = BitcoinConsensus
Specific strategy. List of supported strategies: Read more
Source§impl TryFrom<Witness> for TaprootWitness
impl TryFrom<Witness> for TaprootWitness
impl Eq for TaprootWitness
impl StructuralPartialEq for TaprootWitness
Auto Trait Implementations§
impl Freeze for TaprootWitness
impl RefUnwindSafe for TaprootWitness
impl Send for TaprootWitness
impl Sync for TaprootWitness
impl Unpin for TaprootWitness
impl UnwindSafe for TaprootWitness
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StrictDecode for T
impl<T> StrictDecode for T
Source§fn strict_decode<D>(d: D) -> Result<T, Error>where
D: Read,
fn strict_decode<D>(d: D) -> Result<T, Error>where
D: Read,
Decode with the given
std::io::Read instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed. Use io::Cursor over the buffer and
StrictDecode::strict_decode to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed if file contains remaining
data after the object reconstruction.Source§impl<T> StrictEncode for T
impl<T> StrictEncode for T
Source§fn strict_encode<E>(&self, e: E) -> Result<usize, Error>where
E: Write,
fn strict_encode<E>(&self, e: E) -> Result<usize, Error>where
E: Write,
Encode with the given
std::io::Write instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
function