Trait CommitmentPointProvider

Source
pub trait CommitmentPointProvider: SendSync {
    // Required methods
    fn get_holder_commitment_point(&self, commitment_number: u64) -> PublicKey;
    fn get_counterparty_commitment_point(
        &self,
        commitment_number: u64,
    ) -> Option<PublicKey>;
    fn get_transaction_parameters(&self) -> ChannelTransactionParameters;
    fn clone_box(&self) -> Box<dyn CommitmentPointProvider>;
}
Expand description

A trait for getting a commitment point for a given commitment number, if known.

Required Methods§

Source

fn get_holder_commitment_point(&self, commitment_number: u64) -> PublicKey

Get the commitment point for a holder commitment transaction

Source

fn get_counterparty_commitment_point( &self, commitment_number: u64, ) -> Option<PublicKey>

Get the commitment point for a counterparty commitment transaction, if known. It might not be known if we didn’t reach that commitment number yet or it’s a revoked commitment transaction and we don’t store revocation secrets.

Source

fn get_transaction_parameters(&self) -> ChannelTransactionParameters

Get channel transaction parameters, for decoding on-chain transactions

Source

fn clone_box(&self) -> Box<dyn CommitmentPointProvider>

Clone

Trait Implementations§

Source§

impl Clone for Box<dyn CommitmentPointProvider>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§