pub struct HTLCOutputInCommitment {
pub offered: bool,
pub amount_msat: u64,
pub cltv_expiry: u32,
pub payment_hash: PaymentHash,
pub transaction_output_index: Option<u32>,
}Expand description
Information about an HTLC as it appears in a commitment transaction
Fields§
§offered: boolWhether the HTLC was “offered” (ie outbound in relation to this commitment transaction). Note that this is not the same as whether it is ountbound from us. To determine that you need to compare this value to whether the commitment transaction in question is that of the counterparty or our own.
amount_msat: u64The value, in msat, of the HTLC. The value as it appears in the commitment transaction is this divided by 1000.
cltv_expiry: u32The CLTV lock-time at which this HTLC expires.
payment_hash: PaymentHashThe hash of the preimage which unlocks this HTLC.
transaction_output_index: Option<u32>The position within the commitment transactions’ outputs. This may be None if the value is below the dust limit (in which case no output appears in the commitment transaction and the value is spent to additional transaction fees).
Implementations§
Source§impl HTLCOutputInCommitment
impl HTLCOutputInCommitment
Sourcepub const fn to_bitcoin_amount(&self) -> Amount
pub const fn to_bitcoin_amount(&self) -> Amount
Converts HTLC’s value with millisatoshi precision into bitcoin::Amount with satoshi precision. Typically this conversion is needed when transitioning from LN into base-layer Bitcoin, e. g. in commitment transactions.
Trait Implementations§
Source§impl Clone for HTLCOutputInCommitment
impl Clone for HTLCOutputInCommitment
Source§fn clone(&self) -> HTLCOutputInCommitment
fn clone(&self) -> HTLCOutputInCommitment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HTLCOutputInCommitment
impl Debug for HTLCOutputInCommitment
Source§impl PartialEq for HTLCOutputInCommitment
impl PartialEq for HTLCOutputInCommitment
Source§impl Readable for HTLCOutputInCommitment
impl Readable for HTLCOutputInCommitment
Source§impl Writeable for HTLCOutputInCommitment
impl Writeable for HTLCOutputInCommitment
impl Eq for HTLCOutputInCommitment
impl StructuralPartialEq for HTLCOutputInCommitment
Auto Trait Implementations§
impl Freeze for HTLCOutputInCommitment
impl RefUnwindSafe for HTLCOutputInCommitment
impl Send for HTLCOutputInCommitment
impl Sync for HTLCOutputInCommitment
impl Unpin for HTLCOutputInCommitment
impl UnwindSafe for HTLCOutputInCommitment
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<T> LengthReadable for Twhere
T: Readable,
impl<T> LengthReadable for Twhere
T: Readable,
Source§fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
Self in from the given LengthLimitedRead.