Struct lightning_signer::channel::Channel[][src]

pub struct Channel {
    pub node: Weak<Node>,
    pub nonce: Vec<u8>,
    pub keys: InMemorySigner,
    pub enforcement_state: EnforcementState,
    pub setup: ChannelSetup,
    pub id0: ChannelId,
    pub id: Option<ChannelId>,
    pub monitor: ChainMonitor,
    // some fields omitted
}
Expand description

Fields

node: Weak<Node>

A backpointer to the node

nonce: Vec<u8>

The channel nonce, used to derive keys

keys: InMemorySigner

The signer for this channel

enforcement_state: EnforcementState

Channel state for policy enforcement purposes

setup: ChannelSetup

The negotiated channel setup

id0: ChannelId

The initial channel ID

id: Option<ChannelId>

The optional permanent channel ID

monitor: ChainMonitor

The chain monitor

Implementations

Sign a counterparty commitment transaction after rebuilding it from the supplied arguments.

Validate the counterparty’s signatures on the holder’s commitment and HTLCs when the commitment_signed message is received. Returns the next per_commitment_point and the holder’s revocation secret for the prior commitment. This method advances the expected next holder commitment number in the signer’s state.

Sign a holder commitment when force-closing

Sign a holder commitment transaction after rebuilding it from the supplied arguments.

Build channel parameters, used to further build a commitment transaction

Get the shutdown script where our funds will go when we mutual-close

Sign a mutual close transaction after rebuilding it from the supplied arguments

Sign a delayed output that goes to us while sweeping a transaction we broadcast

Sign an offered or received HTLC output from a commitment the counterparty broadcast.

Sign a justice transaction on an old state that the counterparty broadcast

Sign a channel announcement with both the node key and the funding key

The node’s network

The node has signed our funding transaction

Phase 1

Validate the counterparty’s signatures on the holder’s commitment and HTLCs when the commitment_signed message is received. Returns the next per_commitment_point and the holder’s revocation secret for the prior commitment. This method advances the expected next holder commitment number in the signer’s state.

Process the counterparty’s revocation

When this is provided, we know that the counterparty has committed to the next state.

Phase 1

Phase 1

Phase 1

Sign a 2nd level HTLC transaction hanging off a commitment transaction

Get the unilateral close key, for sweeping the to-remote output of a counterparty’s force-close

Trait Implementations

Get the channel basepoints and public keys

Get the per-commitment point for a holder commitment transaction

Get the per-commitment secret for a holder commitment transaction

Check a future secret to support option_data_loss_protect

Get the channel nonce, used to derive the channel keys

Returns the validator for this channel

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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)

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.