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<T: Signing>(
&self,
funding_key: &SecretKey,
funding_redeemscript: &Script,
channel_value_satoshis: u64,
secp_ctx: &Secp256k1<T>
) -> Signature
pub fn sign<T: Signing>( &self, funding_key: &SecretKey, funding_redeemscript: &Script, channel_value_satoshis: u64, secp_ctx: &Secp256k1<T> ) -> Signature
Sign a transaction, either because we are counter-signing the counterparty’s transaction or because we are about to broadcast a holder transaction.
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 more