Trait lightning_signer::channel::ChannelBase [−][src]
pub trait ChannelBase: Any {
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 nonce(&self) -> Vec<u8>ⓘ;
fn validator(&self) -> Box<dyn Validator>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
;
fn set_next_holder_commit_num_for_testing(&mut self, _num: u64) { ... }
}
Expand description
A trait implemented by both channel states. See ChannelSlot
Required methods
fn get_channel_basepoints(&self) -> ChannelPublicKeys
fn get_channel_basepoints(&self) -> ChannelPublicKeys
Get the channel basepoints and public keys
fn 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
fn 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
Check a future secret to support option_data_loss_protect
Get the channel nonce, used to derive the channel keys
fn validator(&self) -> Box<dyn Validator>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
fn validator(&self) -> Box<dyn Validator>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Returns the validator for this channel