pub struct WalletVtxo {
pub vtxo: Vtxo,
pub state: VtxoState,
}Expand description
A wallet-owned Vtxo paired with its current tracked state.
Fields§
§vtxo: VtxoThe underlying Vtxo.
state: VtxoStateThe current tracked state for WalletVtxo::vtxo.
Methods from Deref<Target = Vtxo>§
Sourcepub fn id(&self) -> VtxoId
pub fn id(&self) -> VtxoId
Get the identifier for this Vtxo.
This is the same as Vtxo::point but encoded as a byte array.
Sourcepub fn point(&self) -> OutPoint
pub fn point(&self) -> OutPoint
The outpoint from which to build forfeit or arkoor txs.
This can be an on-chain utxo or an off-chain vtxo.
Sourcepub fn chain_anchor(&self) -> OutPoint
pub fn chain_anchor(&self) -> OutPoint
The UTXO that should be confirmed for this Vtxo to be valid.
It is the very root of the VTXO.
Sourcepub fn policy(&self) -> &VtxoPolicy
pub fn policy(&self) -> &VtxoPolicy
The output policy of this VTXO.
Sourcepub fn policy_type(&self) -> VtxoPolicyKind
pub fn policy_type(&self) -> VtxoPolicyKind
The output policy type of this VTXO.
Sourcepub fn expiry_height(&self) -> u32
pub fn expiry_height(&self) -> u32
The expiry height of the Vtxo.
Sourcepub fn server_pubkey(&self) -> PublicKey
pub fn server_pubkey(&self) -> PublicKey
The server pubkey used in arkoor transitions.
Sourcepub fn exit_delta(&self) -> u16
pub fn exit_delta(&self) -> u16
The relative timelock block delta used for exits.
Sourcepub fn exit_depth(&self) -> u16
pub fn exit_depth(&self) -> u16
Returns the total exit depth (including OOR depth) of the vtxo.
Sourcepub fn server_htlc_out_payment_hash(&self) -> Option<PaymentHash>
pub fn server_htlc_out_payment_hash(&self) -> Option<PaymentHash>
Get the payment hash if this vtxo is an HTLC send arkoor vtxo.
Sourcepub fn arkoor_pubkey(&self) -> Option<PublicKey>
pub fn arkoor_pubkey(&self) -> Option<PublicKey>
Sourcepub fn past_arkoor_pubkeys(&self) -> impl Iterator<Item = PublicKey>
pub fn past_arkoor_pubkeys(&self) -> impl Iterator<Item = PublicKey>
Iterate over all arkoor pubkeys in the arkoor chain of this vtxo.
This does not include the current arkoor pubkey, for that use Vtxo::arkoor_pubkey.
Sourcepub fn user_pubkey(&self) -> PublicKey
pub fn user_pubkey(&self) -> PublicKey
Returns the user pubkey associated with this Vtxo.
Sourcepub fn output_taproot(&self) -> TaprootSpendInfo
pub fn output_taproot(&self) -> TaprootSpendInfo
The taproot spend info for the output of this Vtxo.
Sourcepub fn output_script_pubkey(&self) -> ScriptBuf
pub fn output_script_pubkey(&self) -> ScriptBuf
The scriptPubkey of the output of this Vtxo.
Sourcepub fn is_fully_signed(&self) -> bool
pub fn is_fully_signed(&self) -> bool
Whether this VTXO is fully signed
It is possible to represent unsigned VTXOs, for which this method will return false.
Sourcepub fn transactions(&self) -> VtxoTxIter<'_>
pub fn transactions(&self) -> VtxoTxIter<'_>
Iterator that constructs all the exit txs for this Vtxo.
Sourcepub fn claim_satisfaction_weight(&self) -> Weight
pub fn claim_satisfaction_weight(&self) -> Weight
The satisfaction weight required to spend the output when doing a unilateral exit.
Sourcepub fn arkoor_pubkeys(&self) -> HashSet<PublicKey>
pub fn arkoor_pubkeys(&self) -> HashSet<PublicKey>
The set of all arkoor pubkeys present in the arkoor part of the VTXO exit path.
Sourcepub fn validate(
&self,
chain_anchor_tx: &Transaction,
) -> Result<(), VtxoValidationError>
pub fn validate( &self, chain_anchor_tx: &Transaction, ) -> Result<(), VtxoValidationError>
Fully validate this VTXO and its entire transaction chain.
The chain_anchor_tx must be the tx with txid matching
Vtxo::chain_anchor.
Trait Implementations§
Source§impl Clone for WalletVtxo
impl Clone for WalletVtxo
Source§fn clone(&self) -> WalletVtxo
fn clone(&self) -> WalletVtxo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WalletVtxo
impl Debug for WalletVtxo
Source§impl PartialEq for WalletVtxo
impl PartialEq for WalletVtxo
Source§impl<'a> VtxoRef for &'a WalletVtxo
impl<'a> VtxoRef for &'a WalletVtxo
Source§impl VtxoRef for WalletVtxo
impl VtxoRef for WalletVtxo
Source§impl Deref for WalletVtxo
impl Deref for WalletVtxo
impl Eq for WalletVtxo
impl StructuralPartialEq for WalletVtxo
Auto Trait Implementations§
impl Freeze for WalletVtxo
impl RefUnwindSafe for WalletVtxo
impl Send for WalletVtxo
impl Sync for WalletVtxo
impl Unpin for WalletVtxo
impl UnwindSafe for WalletVtxo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request