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§
Sourcefn get_holder_commitment_point(&self, commitment_number: u64) -> PublicKey
fn get_holder_commitment_point(&self, commitment_number: u64) -> PublicKey
Get the commitment point for a holder commitment transaction
Sourcefn get_counterparty_commitment_point(
&self,
commitment_number: u64,
) -> Option<PublicKey>
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.
Sourcefn get_transaction_parameters(&self) -> ChannelTransactionParameters
fn get_transaction_parameters(&self) -> ChannelTransactionParameters
Get channel transaction parameters, for decoding on-chain transactions
Sourcefn clone_box(&self) -> Box<dyn CommitmentPointProvider>
fn clone_box(&self) -> Box<dyn CommitmentPointProvider>
Clone