Struct SignerClient

Source
pub struct SignerClient { /* private fields */ }

Trait Implementations§

Source§

impl ChannelSigner for SignerClient

Source§

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 validate_counterparty_revocation( &self, idx: u64, secret: &SecretKey, ) -> Result<(), ()>

Validate the counterparty’s revocation. Read more
Source§

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<(), ()>

Validate the counterparty’s signatures on the holder commitment transaction and HTLCs. Read more
Source§

fn pubkeys(&self) -> &ChannelPublicKeys

Returns the holder’s channel public keys and basepoints.
Source§

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, p: &ChannelTransactionParameters)

Set the counterparty static channel data, including basepoints, counterparty_selected/holder_selected_contest_delay and funding outpoint. Read more
Source§

impl Clone for SignerClient

Source§

fn clone(&self) -> SignerClient

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl EcdsaChannelSigner for SignerClient

Source§

fn sign_counterparty_commitment( &self, commitment_tx: &CommitmentTransaction, _preimages: Vec<PaymentPreimage>, _preimages_ount: 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, commitment_tx: &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, _commitment_tx: &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, ()>

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
Source§

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, ()>

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 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, ()>

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, 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, ()>

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 more
Source§

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 InnerSign for SignerClient

Source§

fn box_clone(&self) -> Box<dyn InnerSign>

Source§

fn as_any(&self) -> &dyn Any

Source§

fn vwrite(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Source§

impl Writeable for SignerClient

Source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

Writes self out to the given Writer.
Source§

fn encode(&self) -> Vec<u8>

Writes self out to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

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.
Source§

impl WriteableEcdsaChannelSigner for SignerClient

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn type_name(&self) -> &'static str

Gets the type name of self
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: AsAny + ?Sized,

Source§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more