pub struct SignedVtxoTreeSpec {
pub spec: VtxoTreeSpec,
pub utxo: OutPoint,
pub cosign_sigs: Vec<Signature>,
}Expand description
All the information needed to uniquely specify a fully signed VTXO tree.
Fields§
§spec: VtxoTreeSpec§utxo: OutPoint§cosign_sigs: Vec<Signature>The signatures for the internal txs, from leaves to root.
Implementations§
Source§impl SignedVtxoTreeSpec
impl SignedVtxoTreeSpec
Sourcepub fn new(
spec: VtxoTreeSpec,
utxo: OutPoint,
cosign_signatures: Vec<Signature>,
) -> SignedVtxoTreeSpec
pub fn new( spec: VtxoTreeSpec, utxo: OutPoint, cosign_signatures: Vec<Signature>, ) -> SignedVtxoTreeSpec
Signatures expected for internal nodes ordered from leaves to root.
pub fn nb_leaves(&self) -> usize
Sourcepub fn exit_branch(&self, leaf_idx: usize) -> Vec<Transaction>
pub fn exit_branch(&self, leaf_idx: usize) -> Vec<Transaction>
Construct the exit branch starting from the root ending in the leaf.
Panics if leaf_idx is out of range.
This call is quite inefficient and if you want to make repeated calls, it is advised to use CachedSignedVtxoTree::exit_branch instead.
Sourcepub fn all_final_txs(&self) -> Vec<Transaction>
pub fn all_final_txs(&self) -> Vec<Transaction>
Get all final txs in this tree, starting with the leaves, towards the root
pub fn into_cached_tree(self) -> CachedSignedVtxoTree
Trait Implementations§
Source§impl Clone for SignedVtxoTreeSpec
impl Clone for SignedVtxoTreeSpec
Source§fn clone(&self) -> SignedVtxoTreeSpec
fn clone(&self) -> SignedVtxoTreeSpec
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 SignedVtxoTreeSpec
impl Debug for SignedVtxoTreeSpec
Source§impl PartialEq for SignedVtxoTreeSpec
impl PartialEq for SignedVtxoTreeSpec
Source§impl ProtocolEncoding for SignedVtxoTreeSpec
impl ProtocolEncoding for SignedVtxoTreeSpec
Source§fn encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<(), Error>
fn encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<(), Error>
Encode the object into the writer.
Source§fn decode<R: Read + ?Sized>(r: &mut R) -> Result<Self, ProtocolDecodingError>
fn decode<R: Read + ?Sized>(r: &mut R) -> Result<Self, ProtocolDecodingError>
Decode the object from the writer.
Source§fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
Deserialize object from the given byte slice.
Source§fn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serialize the object to a lowercase hex string.
Source§fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
Deserialize object from hex slice.
impl StructuralPartialEq for SignedVtxoTreeSpec
Auto Trait Implementations§
impl Freeze for SignedVtxoTreeSpec
impl RefUnwindSafe for SignedVtxoTreeSpec
impl Send for SignedVtxoTreeSpec
impl Sync for SignedVtxoTreeSpec
impl Unpin for SignedVtxoTreeSpec
impl UnwindSafe for SignedVtxoTreeSpec
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