Struct breez_sdk_liquid::lightning::sign::HTLCDescriptor
pub struct HTLCDescriptor {
pub channel_derivation_parameters: ChannelDerivationParameters,
pub commitment_txid: Txid,
pub per_commitment_number: u64,
pub per_commitment_point: PublicKey,
pub feerate_per_kw: u32,
pub htlc: HTLCOutputInCommitment,
pub preimage: Option<PaymentPreimage>,
pub counterparty_sig: Signature,
}
Expand description
A descriptor used to sign for a commitment transaction’s HTLC output.
Fields§
§channel_derivation_parameters: ChannelDerivationParameters
The parameters required to derive the signer for the HTLC input.
commitment_txid: Txid
The txid of the commitment transaction in which the HTLC output lives.
per_commitment_number: u64
The number of the commitment transaction in which the HTLC output lives.
per_commitment_point: PublicKey
The key tweak corresponding to the number of the commitment transaction in which the HTLC output lives. This tweak is applied to all the basepoints for both parties in the channel to arrive at unique keys per commitment.
See https://github.com/lightning/bolts/blob/master/03-transactions.md#keys for more info.
feerate_per_kw: u32
The feerate to use on the HTLC claiming transaction. This is always 0
for HTLCs
originating from a channel supporting anchor outputs, otherwise it is the channel’s
negotiated feerate at the time the commitment transaction was built.
htlc: HTLCOutputInCommitment
The details of the HTLC as it appears in the commitment transaction.
preimage: Option<PaymentPreimage>
The preimage, if Some
, to claim the HTLC output with. If None
, the timeout path must be
taken.
counterparty_sig: Signature
The counterparty’s signature required to spend the HTLC output.
Implementations§
§impl HTLCDescriptor
impl HTLCDescriptor
pub fn outpoint(&self) -> OutPoint
pub fn outpoint(&self) -> OutPoint
Returns the outpoint of the HTLC output in the commitment transaction. This is the outpoint being spent by the HTLC input in the HTLC transaction.
pub fn previous_utxo<C>(&self, secp: &Secp256k1<C>) -> TxOutwhere
C: Signing + Verification,
pub fn previous_utxo<C>(&self, secp: &Secp256k1<C>) -> TxOutwhere
C: Signing + Verification,
Returns the UTXO to be spent by the HTLC input, which can be obtained via
Self::unsigned_tx_input
.
pub fn unsigned_tx_input(&self) -> TxIn
pub fn unsigned_tx_input(&self) -> TxIn
Returns the unsigned transaction input spending the HTLC output in the commitment transaction.
pub fn tx_output<C>(&self, secp: &Secp256k1<C>) -> TxOutwhere
C: Signing + Verification,
pub fn tx_output<C>(&self, secp: &Secp256k1<C>) -> TxOutwhere
C: Signing + Verification,
Returns the delayed output created as a result of spending the HTLC output in the commitment transaction.
pub fn witness_script<C>(&self, secp: &Secp256k1<C>) -> Scriptwhere
C: Signing + Verification,
pub fn witness_script<C>(&self, secp: &Secp256k1<C>) -> Scriptwhere
C: Signing + Verification,
Returns the witness script of the HTLC output in the commitment transaction.
pub fn tx_input_witness(
&self,
signature: &Signature,
witness_script: &Script,
) -> Witness
pub fn tx_input_witness( &self, signature: &Signature, witness_script: &Script, ) -> Witness
Returns the fully signed witness required to spend the HTLC output in the commitment transaction.
pub fn derive_channel_signer<S, SP>(&self, signer_provider: &SP) -> S
pub fn derive_channel_signer<S, SP>(&self, signer_provider: &SP) -> S
Derives the channel signer required to sign the HTLC input.
Trait Implementations§
§impl Clone for HTLCDescriptor
impl Clone for HTLCDescriptor
§fn clone(&self) -> HTLCDescriptor
fn clone(&self) -> HTLCDescriptor
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for HTLCDescriptor
impl Debug for HTLCDescriptor
§impl PartialEq for HTLCDescriptor
impl PartialEq for HTLCDescriptor
§impl Readable for HTLCDescriptor
impl Readable for HTLCDescriptor
§fn read<R>(reader: &mut R) -> Result<HTLCDescriptor, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<HTLCDescriptor, DecodeError>where
R: Read,
Self
in from the given Read
.§impl Writeable for HTLCDescriptor
impl Writeable for HTLCDescriptor
impl Eq for HTLCDescriptor
impl StructuralPartialEq for HTLCDescriptor
Auto Trait Implementations§
impl Freeze for HTLCDescriptor
impl RefUnwindSafe for HTLCDescriptor
impl Send for HTLCDescriptor
impl Sync for HTLCDescriptor
impl Unpin for HTLCDescriptor
impl UnwindSafe for HTLCDescriptor
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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