Trait lightning_signer::channel::ChannelBase
source · pub trait ChannelBase: Any {
// Required methods
fn get_channel_basepoints(&self) -> ChannelPublicKeys;
fn get_per_commitment_point(
&self,
commitment_number: u64
) -> Result<PublicKey, Status>;
fn get_per_commitment_secret(
&self,
commitment_number: u64
) -> Result<SecretKey, Status>;
fn check_future_secret(
&self,
commit_num: u64,
suggested: &SecretKey
) -> Result<bool, Status>;
fn validator(&self) -> Arc<dyn Validator>;
}
Expand description
A trait implemented by both channel states. See ChannelSlot
Required Methods§
sourcefn get_channel_basepoints(&self) -> ChannelPublicKeys
fn get_channel_basepoints(&self) -> ChannelPublicKeys
Get the channel basepoints and public keys
sourcefn get_per_commitment_point(
&self,
commitment_number: u64
) -> Result<PublicKey, Status>
fn get_per_commitment_point( &self, commitment_number: u64 ) -> Result<PublicKey, Status>
Get the per-commitment point for a holder commitment transaction
sourcefn get_per_commitment_secret(
&self,
commitment_number: u64
) -> Result<SecretKey, Status>
fn get_per_commitment_secret( &self, commitment_number: u64 ) -> Result<SecretKey, Status>
Get the per-commitment secret for a holder commitment transaction