Struct lightning_signer::util::loopback::LoopbackChannelSigner [−][src]
pub struct LoopbackChannelSigner {
pub node_id: PublicKey,
pub channel_id: ChannelId,
pub signer: Arc<MultiSigner>,
pub pubkeys: ChannelPublicKeys,
pub is_outbound: bool,
pub channel_value_sat: u64,
}
Fields
node_id: PublicKey
channel_id: ChannelId
signer: Arc<MultiSigner>
pubkeys: ChannelPublicKeys
is_outbound: bool
channel_value_sat: u64
Implementations
pub fn make_counterparty_tx_keys(
&self,
per_commitment_point: &PublicKey,
secp_ctx: &Secp256k1<All>
) -> Result<TxCreationKeys, ()>
Trait Implementations
Gets the per-commitment point for a specific commitment number Read more
Gets the commitment secret for a specific commitment number as part of the revocation process Read more
fn validate_holder_commitment(
&self,
holder_tx: &HolderCommitmentTransaction
) -> Result<(), ()>
fn validate_holder_commitment(
&self,
holder_tx: &HolderCommitmentTransaction
) -> Result<(), ()>
Validate the counterparty’s signatures on the holder commitment transaction and HTLCs. Read more
Gets the holder’s channel public keys and basepoints
Gets 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 Sign object uniquely and lookup or re-derive its keys. Read more
fn sign_counterparty_commitment(
&self,
commitment_tx: &CommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
fn sign_counterparty_commitment(
&self,
commitment_tx: &CommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
Create a signature for a counterparty’s commitment transaction and associated HTLC transactions. Read more
Validate the counterparty’s revocation. Read more
fn sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
fn sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
Create a signatures for a holder’s commitment transaction and its claiming HTLC transactions. This will only ever be called with a non-revoked commitment_tx. This will be called with the latest commitment_tx when we initiate a force-close. This will be called with the previous latest, just to get claiming HTLC signatures, if we are reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to the latest. This may be called multiple times for the same transaction. Read more
fn unsafe_sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
fn unsafe_sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<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. Read more
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 more
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
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
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
fn sign_channel_announcement(
&self,
msg: &UnsignedChannelAnnouncement,
_secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
fn sign_channel_announcement(
&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
Set the counterparty static channel data, including basepoints, counterparty_selected/holder_selected_contest_delay and funding outpoint. This is done as soon as the funding outpoint is known. Since these are static channel data, they MUST NOT be allowed to change to different values once set. Read more
fn persist_new_channel(
&self,
_funding_txo: OutPoint,
_data: &ChannelMonitor<LoopbackChannelSigner>,
_id: MonitorUpdateId
) -> Result<(), ChannelMonitorUpdateErr>
fn persist_new_channel(
&self,
_funding_txo: OutPoint,
_data: &ChannelMonitor<LoopbackChannelSigner>,
_id: MonitorUpdateId
) -> Result<(), ChannelMonitorUpdateErr>
Persist a new channel’s data in response to a chain::Watch::watch_channel
call. This is
called by ChannelManager
for new channels, or may be called directly, e.g. on startup. Read more
fn update_persisted_channel(
&self,
_funding_txo: OutPoint,
_update: &Option<ChannelMonitorUpdate>,
_data: &ChannelMonitor<LoopbackChannelSigner>,
_id: MonitorUpdateId
) -> Result<(), ChannelMonitorUpdateErr>
fn update_persisted_channel(
&self,
_funding_txo: OutPoint,
_update: &Option<ChannelMonitorUpdate>,
_data: &ChannelMonitor<LoopbackChannelSigner>,
_id: MonitorUpdateId
) -> Result<(), ChannelMonitorUpdateErr>
Update one channel’s data. The provided ChannelMonitor
has already applied the given
update. Read more
fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
Watches a channel identified by funding_txo
using monitor
. Read more
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
Updates a channel identified by funding_txo
by applying update
to its monitor. Read more
Writes self out to the given Writer
Writes self out to a Vec
Writes self out to a Vec
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
Auto Trait Implementations
impl !RefUnwindSafe for LoopbackChannelSigner
impl Send for LoopbackChannelSigner
impl Sync for LoopbackChannelSigner
impl Unpin for LoopbackChannelSigner
impl !UnwindSafe for LoopbackChannelSigner
Blanket Implementations
Mutably borrows from an owned value. Read more