Struct breez_sdk_core::lightning::ln::chan_utils::ClosingTransaction
pub struct ClosingTransaction { /* private fields */ }
Expand description
This class tracks the per-transaction information needed to build a closing transaction and will actually build it and sign.
This class can be used inside a signer implementation to generate a signature given the relevant secret key.
Implementations§
§impl ClosingTransaction
impl ClosingTransaction
pub fn new(
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
to_holder_script: Script,
to_counterparty_script: Script,
funding_outpoint: OutPoint,
) -> ClosingTransaction
pub fn new( to_holder_value_sat: u64, to_counterparty_value_sat: u64, to_holder_script: Script, to_counterparty_script: Script, funding_outpoint: OutPoint, ) -> ClosingTransaction
Construct an object of the class
pub fn trust(&self) -> TrustedClosingTransaction<'_>
pub fn trust(&self) -> TrustedClosingTransaction<'_>
Trust our pre-built transaction.
Applies a wrapper which allows access to the transaction.
This should only be used if you fully trust the builder of this object. It should not be used by an external signer - instead use the verify function.
pub fn verify(
&self,
funding_outpoint: OutPoint,
) -> Result<TrustedClosingTransaction<'_>, ()>
pub fn verify( &self, funding_outpoint: OutPoint, ) -> Result<TrustedClosingTransaction<'_>, ()>
Verify our pre-built transaction.
Applies a wrapper which allows access to the transaction.
An external validating signer must call this method before signing or using the built transaction.
pub fn to_holder_value_sat(&self) -> u64
pub fn to_holder_value_sat(&self) -> u64
The value to be sent to the holder, or zero if the output will be omitted
pub fn to_counterparty_value_sat(&self) -> u64
pub fn to_counterparty_value_sat(&self) -> u64
The value to be sent to the counterparty, or zero if the output will be omitted
pub fn to_holder_script(&self) -> &Script
pub fn to_holder_script(&self) -> &Script
The destination of the holder’s output
pub fn to_counterparty_script(&self) -> &Script
pub fn to_counterparty_script(&self) -> &Script
The destination of the counterparty’s output
Trait Implementations§
§impl Clone for ClosingTransaction
impl Clone for ClosingTransaction
§fn clone(&self) -> ClosingTransaction
fn clone(&self) -> ClosingTransaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Hash for ClosingTransaction
impl Hash for ClosingTransaction
§impl PartialEq for ClosingTransaction
impl PartialEq for ClosingTransaction
impl Eq for ClosingTransaction
impl StructuralPartialEq for ClosingTransaction
Auto Trait Implementations§
impl Freeze for ClosingTransaction
impl RefUnwindSafe for ClosingTransaction
impl Send for ClosingTransaction
impl Sync for ClosingTransaction
impl Unpin for ClosingTransaction
impl UnwindSafe for ClosingTransaction
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§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
)§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.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