Struct lightning::ln::chan_utils::BuiltCommitmentTransaction
source · pub struct BuiltCommitmentTransaction {
pub transaction: Transaction,
pub txid: Txid,
}
Expand description
A pre-built Bitcoin commitment transaction and its txid.
Fields§
§transaction: Transaction
The commitment transaction
txid: Txid
The txid for the commitment transaction.
This is provided as a performance optimization, instead of calling transaction.txid() multiple times.
Implementations§
source§impl BuiltCommitmentTransaction
impl BuiltCommitmentTransaction
sourcepub fn get_sighash_all(
&self,
funding_redeemscript: &Script,
channel_value_satoshis: u64
) -> Message
pub fn get_sighash_all( &self, funding_redeemscript: &Script, channel_value_satoshis: u64 ) -> Message
Get the SIGHASH_ALL sighash value of the transaction.
This can be used to verify a signature.
sourcepub fn sign_counterparty_commitment<T: Signing>(
&self,
funding_key: &SecretKey,
funding_redeemscript: &Script,
channel_value_satoshis: u64,
secp_ctx: &Secp256k1<T>
) -> Signature
pub fn sign_counterparty_commitment<T: Signing>( &self, funding_key: &SecretKey, funding_redeemscript: &Script, channel_value_satoshis: u64, secp_ctx: &Secp256k1<T> ) -> Signature
Signs the counterparty’s commitment transaction.
sourcepub fn sign_holder_commitment<T: Signing, ES: Deref>(
&self,
funding_key: &SecretKey,
funding_redeemscript: &Script,
channel_value_satoshis: u64,
entropy_source: &ES,
secp_ctx: &Secp256k1<T>
) -> Signaturewhere
ES::Target: EntropySource,
pub fn sign_holder_commitment<T: Signing, ES: Deref>( &self, funding_key: &SecretKey, funding_redeemscript: &Script, channel_value_satoshis: u64, entropy_source: &ES, secp_ctx: &Secp256k1<T> ) -> Signaturewhere ES::Target: EntropySource,
Signs the holder commitment transaction because we are about to broadcast it.
Trait Implementations§
source§impl Clone for BuiltCommitmentTransaction
impl Clone for BuiltCommitmentTransaction
source§fn clone(&self) -> BuiltCommitmentTransaction
fn clone(&self) -> BuiltCommitmentTransaction
Returns a copy 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 Writeable for BuiltCommitmentTransaction
impl Writeable for BuiltCommitmentTransaction
Auto Trait Implementations§
impl RefUnwindSafe for BuiltCommitmentTransaction
impl Send for BuiltCommitmentTransaction
impl Sync for BuiltCommitmentTransaction
impl Unpin for BuiltCommitmentTransaction
impl UnwindSafe for BuiltCommitmentTransaction
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