Struct BuiltCommitmentTransaction
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§
§impl BuiltCommitmentTransaction
impl BuiltCommitmentTransaction
pub 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.
pub fn sign_counterparty_commitment<T>(
&self,
funding_key: &SecretKey,
funding_redeemscript: &Script,
channel_value_satoshis: u64,
secp_ctx: &Secp256k1<T>,
) -> Signaturewhere
T: Signing,
pub fn sign_counterparty_commitment<T>(
&self,
funding_key: &SecretKey,
funding_redeemscript: &Script,
channel_value_satoshis: u64,
secp_ctx: &Secp256k1<T>,
) -> Signaturewhere
T: Signing,
Signs the counterparty’s commitment transaction.
Trait Implementations§
§impl Clone for BuiltCommitmentTransaction
impl Clone for BuiltCommitmentTransaction
§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§impl Debug for BuiltCommitmentTransaction
impl Debug for BuiltCommitmentTransaction
§impl Readable for BuiltCommitmentTransaction
impl Readable for BuiltCommitmentTransaction
§fn read<R>(reader: &mut R) -> Result<BuiltCommitmentTransaction, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<BuiltCommitmentTransaction, DecodeError>where
R: Read,
Reads a
Self
in from the given Read
.§impl Writeable for BuiltCommitmentTransaction
impl Writeable for BuiltCommitmentTransaction
Auto Trait Implementations§
impl Freeze for BuiltCommitmentTransaction
impl RefUnwindSafe for BuiltCommitmentTransaction
impl Send for BuiltCommitmentTransaction
impl Sync for BuiltCommitmentTransaction
impl Unpin for BuiltCommitmentTransaction
impl UnwindSafe for BuiltCommitmentTransaction
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
Wrap the input message
T
in a tonic::Request