pub struct HarkForfeitVtxoPolicy {
pub user_pubkey: PublicKey,
pub unlock_hash: UnlockHash,
}Expand description
The server-only VTXO policy on hArk forfeit txs
This policy allows the server to claim the forfeited coins by revealing the hArk unlock preimage or allow the user to recover its money in case the server doesn’t.
Fields§
§user_pubkey: PublicKey§unlock_hash: UnlockHashImplementations§
Source§impl HarkForfeitVtxoPolicy
impl HarkForfeitVtxoPolicy
Sourcepub fn server_claim_clause(&self, server_pubkey: PublicKey) -> HashSignClause
pub fn server_claim_clause(&self, server_pubkey: PublicKey) -> HashSignClause
Server claims the forfeit revealing the unlock preimage
Sourcepub fn user_exit_clause(&self, exit_delta: BlockDelta) -> DelayedSignClause
pub fn user_exit_clause(&self, exit_delta: BlockDelta) -> DelayedSignClause
If the server doesn’t reveal the preimage, the user can claim the funds
pub fn clauses( &self, exit_delta: BlockDelta, server_pubkey: PublicKey, ) -> Vec<VtxoClause>
pub fn taproot( &self, server_pubkey: PublicKey, exit_delta: BlockDelta, ) -> TaprootSpendInfo
Trait Implementations§
Source§impl Clone for HarkForfeitVtxoPolicy
impl Clone for HarkForfeitVtxoPolicy
Source§fn clone(&self) -> HarkForfeitVtxoPolicy
fn clone(&self) -> HarkForfeitVtxoPolicy
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 HarkForfeitVtxoPolicy
impl Debug for HarkForfeitVtxoPolicy
Source§impl From<HarkForfeitVtxoPolicy> for ServerVtxoPolicy
impl From<HarkForfeitVtxoPolicy> for ServerVtxoPolicy
Source§fn from(v: HarkForfeitVtxoPolicy) -> Self
fn from(v: HarkForfeitVtxoPolicy) -> Self
Converts to this type from the input type.
Source§impl Hash for HarkForfeitVtxoPolicy
impl Hash for HarkForfeitVtxoPolicy
Source§impl Ord for HarkForfeitVtxoPolicy
impl Ord for HarkForfeitVtxoPolicy
Source§fn cmp(&self, other: &HarkForfeitVtxoPolicy) -> Ordering
fn cmp(&self, other: &HarkForfeitVtxoPolicy) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HarkForfeitVtxoPolicy
impl PartialEq for HarkForfeitVtxoPolicy
Source§impl PartialOrd for HarkForfeitVtxoPolicy
impl PartialOrd for HarkForfeitVtxoPolicy
impl Eq for HarkForfeitVtxoPolicy
impl StructuralPartialEq for HarkForfeitVtxoPolicy
Auto Trait Implementations§
impl Freeze for HarkForfeitVtxoPolicy
impl RefUnwindSafe for HarkForfeitVtxoPolicy
impl Send for HarkForfeitVtxoPolicy
impl Sync for HarkForfeitVtxoPolicy
impl Unpin for HarkForfeitVtxoPolicy
impl UnwindSafe for HarkForfeitVtxoPolicy
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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§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
Compare self to
key and return true if they are equal.