pub struct LoopbackChannelSigner {
pub node_id: PublicKey,
pub channel_id: ChannelId,
pub signer: Arc<MultiSigner>,
pub pubkeys: ChannelPublicKeys,
pub channel_value_sat: u64,
}
Fields§
§node_id: PublicKey
§channel_id: ChannelId
§signer: Arc<MultiSigner>
§pubkeys: ChannelPublicKeys
§channel_value_sat: u64
Trait Implementations§
Source§impl ChannelSigner for LoopbackChannelSigner
impl ChannelSigner for LoopbackChannelSigner
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 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, commitment_number: u64) -> [u8; 32]
fn release_commitment_secret(&self, commitment_number: 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,
parameters: &ChannelTransactionParameters,
)
fn provide_channel_parameters( &mut self, parameters: &ChannelTransactionParameters, )
Set the counterparty static channel data, including basepoints,
counterparty_selected
/holder_selected_contest_delay
and funding outpoint. Read moreSource§impl Clone for LoopbackChannelSigner
impl Clone for LoopbackChannelSigner
Source§fn clone(&self) -> LoopbackChannelSigner
fn clone(&self) -> LoopbackChannelSigner
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl EcdsaChannelSigner for LoopbackChannelSigner
impl EcdsaChannelSigner for LoopbackChannelSigner
Source§fn sign_counterparty_commitment(
&self,
commitment_tx: &CommitmentTransaction,
inbound_htlc_preimages: Vec<PaymentPreimage>,
outbound_htlc_preimages: Vec<PaymentPreimage>,
_secp_ctx: &Secp256k1<All>,
) -> Result<(Signature, Vec<Signature>), ()>
fn sign_counterparty_commitment( &self, commitment_tx: &CommitmentTransaction, inbound_htlc_preimages: Vec<PaymentPreimage>, outbound_htlc_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 sign_holder_commitment(
&self,
hct: &HolderCommitmentTransaction,
_secp_ctx: &Secp256k1<All>,
) -> Result<Signature, ()>
fn sign_holder_commitment( &self, hct: &HolderCommitmentTransaction, _secp_ctx: &Secp256k1<All>, ) -> Result<Signature, ()>
Creates a signature for a holder’s commitment transaction. Read more
Source§fn unsafe_sign_holder_commitment(
&self,
hct: &HolderCommitmentTransaction,
secp_ctx: &Secp256k1<All>,
) -> Result<Signature, ()>
fn unsafe_sign_holder_commitment( &self, hct: &HolderCommitmentTransaction, secp_ctx: &Secp256k1<All>, ) -> Result<Signature, ()>
Same as [
sign_holder_commitment
], 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
] 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_holder_htlc_transaction(
&self,
htlc_tx: &Transaction,
_input: usize,
htlc_descriptor: &HTLCDescriptor,
secp_ctx: &Secp256k1<All>,
) -> Result<Signature, ()>
fn sign_holder_htlc_transaction( &self, htlc_tx: &Transaction, _input: usize, htlc_descriptor: &HTLCDescriptor, secp_ctx: &Secp256k1<All>, ) -> Result<Signature, ()>
Computes the signature for a commitment transaction’s HTLC output used as an input within
htlc_tx
, which spends the commitment transaction at index input
. The signature returned
must be be computed using EcdsaSighashType::All
. Read moreSource§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§fn sign_holder_anchor_input(
&self,
_anchor_tx: &Transaction,
_input: usize,
_secp_ctx: &Secp256k1<All>,
) -> Result<Signature, ()>
fn sign_holder_anchor_input( &self, _anchor_tx: &Transaction, _input: usize, _secp_ctx: &Secp256k1<All>, ) -> Result<Signature, ()>
Computes the signature for a commitment transaction’s anchor output used as an
input within
anchor_tx
, which spends the commitment transaction, at index input
. Read moreSource§fn sign_channel_announcement_with_funding_key(
&self,
msg: &UnsignedChannelAnnouncement,
_secp_ctx: &Secp256k1<All>,
) -> Result<Signature, ()>
fn sign_channel_announcement_with_funding_key( &self, msg: &UnsignedChannelAnnouncement, _secp_ctx: &Secp256k1<All>, ) -> Result<Signature, ()>
Signs a channel announcement message with our funding key proving it comes from one of the
channel participants. Read more
Source§impl Writeable for LoopbackChannelSigner
impl Writeable for LoopbackChannelSigner
impl WriteableEcdsaChannelSigner for LoopbackChannelSigner
Auto Trait Implementations§
impl Freeze for LoopbackChannelSigner
impl !RefUnwindSafe for LoopbackChannelSigner
impl Send for LoopbackChannelSigner
impl Sync for LoopbackChannelSigner
impl Unpin for LoopbackChannelSigner
impl !UnwindSafe for LoopbackChannelSigner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more