Struct lightning::chain::keysinterface::InMemorySigner[][src]

pub struct InMemorySigner {
    pub funding_key: SecretKey,
    pub revocation_base_key: SecretKey,
    pub payment_key: SecretKey,
    pub delayed_payment_base_key: SecretKey,
    pub htlc_base_key: SecretKey,
    pub commitment_seed: [u8; 32],
    // some fields omitted
}
Expand description

A simple implementation of Sign that just keeps the private keys in memory.

This implementation performs no policy checks and is insufficient by itself as a secure external signer.

Fields

funding_key: SecretKey

Private key of anchor tx

revocation_base_key: SecretKey

Holder secret key for blinded revocation pubkey

payment_key: SecretKey

Holder secret key used for our balance in counterparty-broadcasted commitment transactions

delayed_payment_base_key: SecretKey

Holder secret key used in HTLC tx

htlc_base_key: SecretKey

Holder htlc secret key used in commitment tx htlc outputs

commitment_seed: [u8; 32]

Commitment seed

Implementations

Create a new InMemorySigner

Counterparty pubkeys. Will panic if ready_channel wasn’t called.

The contest_delay value specified by our counterparty and applied on holder-broadcastable transactions, ie the amount of time that we have to wait to recover our funds if we broadcast a transaction. Will panic if ready_channel wasn’t called.

The contest_delay value specified by us and applied on transactions broadcastable by our counterparty, ie the amount of time that they have to wait to recover their funds if they broadcast a transaction. Will panic if ready_channel wasn’t called.

Whether the holder is the initiator Will panic if ready_channel wasn’t called.

Funding outpoint Will panic if ready_channel wasn’t called.

Obtain a ChannelTransactionParameters for this channel, to be used when verifying or building transactions.

Will panic if ready_channel wasn’t called.

Sign the single input of spend_tx at index input_idx which spends the output described by descriptor, returning the witness stack for the input.

Returns an Err if the input at input_idx does not exist, has a non-empty script_sig, or is not spending the outpoint described by descriptor.outpoint.

Sign the single input of spend_tx at index input_idx which spends the output described by descriptor, returning the witness stack for the input.

Returns an Err if the input at input_idx does not exist, has a non-empty script_sig, is not spending the outpoint described by descriptor.outpoint, or does not have a sequence set to descriptor.to_self_delay.

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

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

Create a signature for a counterparty’s commitment transaction and associated HTLC transactions. Read more

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

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

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

Create a signature for a claiming transaction for a HTLC output on a counterparty’s commitment transaction, either offered or received. Read more

Create a signature for a (proposed) closing transaction. Read more

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Reads a Self in from the given Read

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.