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
sourceimpl 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
sourceimpl Clone for BuiltCommitmentTransaction
impl Clone for BuiltCommitmentTransaction
sourcefn clone(&self) -> BuiltCommitmentTransaction
fn clone(&self) -> BuiltCommitmentTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Readable for BuiltCommitmentTransaction
impl Readable for BuiltCommitmentTransaction
sourceimpl Writeable for BuiltCommitmentTransaction
impl Writeable for BuiltCommitmentTransaction
sourcefn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
Writes self out to the given Writer
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> MaybeReadable for T where
T: Readable,
impl<T> MaybeReadable for T where
T: Readable,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more