pub struct VtxoList { /* private fields */ }Implementations§
Source§impl VtxoList
impl VtxoList
pub fn new(dust: Amount, virtual_tx_outpoints: Vec<VirtualTxOutPoint>) -> Self
pub fn all(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
pub fn all_unspent(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
Sourcepub fn could_exit_unilaterally(
&self,
) -> impl Iterator<Item = &VirtualTxOutPoint>
pub fn could_exit_unilaterally( &self, ) -> impl Iterator<Item = &VirtualTxOutPoint>
VTXOs that are in a state that allows for unilateral exit.
This does not mean that the VTXOs are readily spendable on-chain, just that their ancestor chain can still be published.
Sourcepub fn spendable_offchain(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
pub fn spendable_offchain(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
VTXOs that can be spent in an offchain transaction.
pub fn pre_confirmed(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
pub fn confirmed(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
Sourcepub fn recoverable(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
pub fn recoverable(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
Returns the list of recoverable VTXOs
A VTXO is recoverable if it:
- has expired;
- was swept already; or
- is sub-dust.
Sourcepub fn exit_ready(
&self,
now: Duration,
explorer_utxos: Vec<ExplorerUtxo>,
vtxos: HashMap<ScriptBuf, Vtxo>,
) -> impl Iterator<Item = &VirtualTxOutPoint>
pub fn exit_ready( &self, now: Duration, explorer_utxos: Vec<ExplorerUtxo>, vtxos: HashMap<ScriptBuf, Vtxo>, ) -> impl Iterator<Item = &VirtualTxOutPoint>
VTXOs that are already on-chain and can be spent unilaterally (the exit path is active).
pub fn spent(&self) -> impl Iterator<Item = &VirtualTxOutPoint>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VtxoList
impl RefUnwindSafe for VtxoList
impl Send for VtxoList
impl Sync for VtxoList
impl Unpin for VtxoList
impl UnsafeUnpin for VtxoList
impl UnwindSafe for VtxoList
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