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 counterparty_pubkeys: Option<ChannelPublicKeys>, pub is_outbound: bool, pub channel_value_sat: u64, pub local_to_self_delay: u16, pub counterparty_to_self_delay: u16, }
Fields
node_id: PublicKey
channel_id: ChannelId
signer: Arc<MultiSigner>
pubkeys: ChannelPublicKeys
counterparty_pubkeys: Option<ChannelPublicKeys>
is_outbound: bool
channel_value_sat: u64
local_to_self_delay: u16
counterparty_to_self_delay: u16
Implementations
impl LoopbackChannelSigner
[src]
impl LoopbackChannelSigner
[src]pub fn make_counterparty_tx_keys(
&self,
per_commitment_point: &PublicKey,
secp_ctx: &Secp256k1<All>
) -> Result<TxCreationKeys, ()>
[src]
&self,
per_commitment_point: &PublicKey,
secp_ctx: &Secp256k1<All>
) -> Result<TxCreationKeys, ()>
Trait Implementations
impl BaseSign for LoopbackChannelSigner
[src]
impl BaseSign for LoopbackChannelSigner
[src]fn get_per_commitment_point(
&self,
idx: u64,
_secp_ctx: &Secp256k1<All>
) -> PublicKey
[src]
fn get_per_commitment_point(
&self,
idx: u64,
_secp_ctx: &Secp256k1<All>
) -> PublicKey
[src]Gets the per-commitment point for a specific commitment number Read more
fn release_commitment_secret(&self, commitment_number: u64) -> [u8; 32]
[src]
fn release_commitment_secret(&self, commitment_number: u64) -> [u8; 32]
[src]Gets the commitment secret for a specific commitment number as part of the revocation process Read more
fn pubkeys(&self) -> &ChannelPublicKeys
[src]
fn pubkeys(&self) -> &ChannelPublicKeys
[src]Gets the holder’s channel public keys and basepoints
fn channel_keys_id(&self) -> [u8; 32]
[src]
fn channel_keys_id(&self) -> [u8; 32]
[src]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>), ()>
[src]
fn sign_counterparty_commitment(
&self,
commitment_tx: &CommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
[src]Create a signature for a counterparty’s commitment transaction and associated HTLC transactions. Read more
fn sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
[src]
fn sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
_secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
[src]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>), ()>
[src]
fn unsafe_sign_holder_commitment_and_htlcs(
&self,
hct: &HolderCommitmentTransaction,
secp_ctx: &Secp256k1<All>
) -> Result<(Signature, Vec<Signature>), ()>
[src]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_transaction(
&self,
justice_tx: &Transaction,
input: usize,
amount: u64,
per_commitment_key: &SecretKey,
htlc: &Option<HTLCOutputInCommitment>,
secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
[src]
fn sign_justice_transaction(
&self,
justice_tx: &Transaction,
input: usize,
amount: u64,
per_commitment_key: &SecretKey,
htlc: &Option<HTLCOutputInCommitment>,
secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
[src]Create a signature for the given input in a transaction spending an HTLC or commitment transaction 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, ()>
[src]
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, ()>
[src]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: &Transaction,
_secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
[src]
fn sign_closing_transaction(
&self,
closing_tx: &Transaction,
_secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
[src]Create a signature for a (proposed) closing transaction. Read more
fn sign_channel_announcement(
&self,
msg: &UnsignedChannelAnnouncement,
_secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
[src]
fn sign_channel_announcement(
&self,
msg: &UnsignedChannelAnnouncement,
_secp_ctx: &Secp256k1<All>
) -> Result<Signature, ()>
[src]Signs a channel announcement message with our funding key, proving it comes from one of the channel participants. Read more
fn ready_channel(&mut self, parameters: &ChannelTransactionParameters)
[src]
fn ready_channel(&mut self, parameters: &ChannelTransactionParameters)
[src]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
impl Clone for LoopbackChannelSigner
[src]
impl Clone for LoopbackChannelSigner
[src]fn clone(&self) -> LoopbackChannelSigner
[src]
fn clone(&self) -> LoopbackChannelSigner
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Persist<LoopbackChannelSigner> for TestPersister
[src]
impl Persist<LoopbackChannelSigner> for TestPersister
[src]fn persist_new_channel(
&self,
_funding_txo: OutPoint,
_data: &ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]
fn persist_new_channel(
&self,
_funding_txo: OutPoint,
_data: &ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]Persist a new channel’s data. The data can be stored any way you want, but
the identifier provided by Rust-Lightning is the channel’s outpoint (and
it is up to you to maintain a correct mapping between the outpoint and the
stored channel data). Note that you must persist every new monitor to
disk. See the Persist
trait documentation for more details. Read more
fn update_persisted_channel(
&self,
_funding_txo: OutPoint,
_update: &ChannelMonitorUpdate,
_data: &ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]
fn update_persisted_channel(
&self,
_funding_txo: OutPoint,
_update: &ChannelMonitorUpdate,
_data: &ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]Update one channel’s data. The provided ChannelMonitor
has already
applied the given update. Read more
impl<'a> Watch<LoopbackChannelSigner> for TestChainMonitor<'a>
[src]
impl<'a> Watch<LoopbackChannelSigner> for TestChainMonitor<'a>
[src]fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]
fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]Watches a channel identified by funding_txo
using monitor
. Read more
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
[src]
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
[src]Updates a channel identified by funding_txo
by applying update
to its monitor. Read more
fn release_pending_monitor_events(&self) -> Vec<MonitorEvent>
[src]
fn release_pending_monitor_events(&self) -> Vec<MonitorEvent>
[src]Returns any monitor events since the last call. Subsequent calls must only return new events. Read more
impl Writeable for LoopbackChannelSigner
[src]
impl Writeable for LoopbackChannelSigner
[src]impl Sign for LoopbackChannelSigner
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more