Struct vls_protocol_client::DynSigner
source · pub struct DynSigner {
pub inner: Box<dyn InnerSign>,
}
Expand description
A ChannelSigner derived struct allowing run-time selection of a signer
Fields§
§inner: Box<dyn InnerSign>
Implementations§
Trait Implementations§
source§impl ChannelSigner for DynSigner
impl ChannelSigner for DynSigner
source§fn get_per_commitment_point(
&self,
idx: u64,
secp_ctx: &Secp256k1<All>
) -> PublicKey
fn get_per_commitment_point( &self, idx: u64, secp_ctx: &Secp256k1<All> ) -> PublicKey
Gets the per-commitment point for a specific commitment number Read more
source§fn release_commitment_secret(&self, idx: u64) -> [u8; 32]
fn release_commitment_secret(&self, idx: u64) -> [u8; 32]
Gets the commitment secret for a specific commitment number as part of the revocation process Read more
source§fn validate_holder_commitment(
&self,
holder_tx: &HolderCommitmentTransaction,
preimages: Vec<PaymentPreimage>
) -> Result<(), ()>
fn validate_holder_commitment( &self, holder_tx: &HolderCommitmentTransaction, preimages: Vec<PaymentPreimage> ) -> Result<(), ()>
Validate the counterparty’s signatures on the holder commitment transaction and HTLCs. Read more
source§fn pubkeys(&self) -> &ChannelPublicKeys
fn pubkeys(&self) -> &ChannelPublicKeys
Returns the holder’s channel public keys and basepoints.
source§fn channel_keys_id(&self) -> [u8; 32]
fn channel_keys_id(&self) -> [u8; 32]
Returns an arbitrary identifier describing the set of keys which are provided back to you in
some [
SpendableOutputDescriptor
] types. This should be sufficient to identify this
[EcdsaChannelSigner
] object uniquely and lookup or re-derive its keys.source§fn provide_channel_parameters(
&mut self,
channel_parameters: &ChannelTransactionParameters
)
fn provide_channel_parameters( &mut self, channel_parameters: &ChannelTransactionParameters )
Set the counterparty static channel data, including basepoints,
counterparty_selected
/holder_selected_contest_delay
and funding outpoint. Read moresource§impl EcdsaChannelSigner for DynSigner
impl EcdsaChannelSigner for DynSigner
source§fn sign_counterparty_commitment(
&self,
commitment_tx: &CommitmentTransaction,
preimages: Vec<PaymentPreimage>,
secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
fn sign_counterparty_commitment( &self, commitment_tx: &CommitmentTransaction, preimages: Vec<PaymentPreimage>, secp_ctx: &Secp256k1<All> ) -> Result<(Signature, Vec<Signature>), ()>
Create a signature for a counterparty’s commitment transaction and associated HTLC transactions. Read more
source§fn validate_counterparty_revocation(
&self,
idx: u64,
secret: &SecretKey
) -> Result<(), ()>
fn validate_counterparty_revocation( &self, idx: u64, secret: &SecretKey ) -> Result<(), ()>
Validate the counterparty’s revocation. Read more
source§fn sign_holder_commitment_and_htlcs(
&self,
commitment_tx: &HolderCommitmentTransaction,
secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
fn sign_holder_commitment_and_htlcs( &self, commitment_tx: &HolderCommitmentTransaction, secp_ctx: &Secp256k1<All> ) -> Result<(Signature, Vec<Signature>), ()>
Creates a signature for a holder’s commitment transaction and its claiming HTLC transactions. Read more
source§fn unsafe_sign_holder_commitment_and_htlcs(
&self,
commitment_tx: &HolderCommitmentTransaction,
secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
fn unsafe_sign_holder_commitment_and_htlcs( &self, commitment_tx: &HolderCommitmentTransaction, secp_ctx: &Secp256k1<All> ) -> Result<(Signature, Vec<Signature>), ()>
Same as [
sign_holder_commitment_and_htlcs
], but exists only for tests to get access to
holder commitment transactions which will be broadcasted later, after the channel has moved
on to a newer state. Thus, needs its own method as [sign_holder_commitment_and_htlcs
] may
enforce that we only ever get called once.source§fn sign_justice_revoked_output(
&self,
justice_tx: &Transaction,
input: usize,
amount: u64,
per_commitment_key: &SecretKey,
secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
fn sign_justice_revoked_output( &self, justice_tx: &Transaction, input: usize, amount: u64, per_commitment_key: &SecretKey, secp_ctx: &Secp256k1<All> ) -> Result<Signature, ()>
Create a signature for the given input in a transaction spending an HTLC transaction output
or a commitment transaction
to_local
output when our counterparty broadcasts an old state. Read moresource§fn sign_justice_revoked_htlc(
&self,
justice_tx: &Transaction,
input: usize,
amount: u64,
per_commitment_key: &SecretKey,
htlc: &HTLCOutputInCommitment,
secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
fn sign_justice_revoked_htlc( &self, justice_tx: &Transaction, input: usize, amount: u64, per_commitment_key: &SecretKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<All> ) -> Result<Signature, ()>
Create a signature for the given input in a transaction spending a commitment transaction
HTLC output when our counterparty broadcasts an old state. Read more
source§fn sign_counterparty_htlc_transaction(
&self,
htlc_tx: &Transaction,
input: usize,
amount: u64,
per_commitment_point: &PublicKey,
htlc: &HTLCOutputInCommitment,
secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
fn sign_counterparty_htlc_transaction( &self, htlc_tx: &Transaction, input: usize, amount: u64, per_commitment_point: &PublicKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<All> ) -> Result<Signature, ()>
Create a signature for a claiming transaction for a HTLC output on a counterparty’s commitment
transaction, either offered or received. Read more
source§fn sign_closing_transaction(
&self,
closing_tx: &ClosingTransaction,
secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
fn sign_closing_transaction( &self, closing_tx: &ClosingTransaction, secp_ctx: &Secp256k1<All> ) -> Result<Signature, ()>
Create a signature for a (proposed) closing transaction. Read more
source§impl Writeable for DynSigner
impl Writeable for DynSigner
impl WriteableEcdsaChannelSigner for DynSigner
Auto Trait Implementations§
impl !RefUnwindSafe for DynSigner
impl Send for DynSigner
impl Sync for DynSigner
impl Unpin for DynSigner
impl !UnwindSafe for DynSigner
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
§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,
Forward to the method defined on the type
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,
Forward to the method defined on the type
Any
.