Table of Contents

Struct CommitmentKeys

Namespace
NLightning.Domain.Channels.ValueObjects
Assembly
NLightning.Domain.dll
public record struct CommitmentKeys : IEquatable<CommitmentKeys>
Implements
Inherited Members

Constructors

CommitmentKeys(CompactPubKey, CompactPubKey, CompactPubKey, CompactPubKey, CompactPubKey, CompactPubKey, Secret?)

public CommitmentKeys(CompactPubKey localPubKey, CompactPubKey localDelayedPubKey, CompactPubKey revocationPubKey, CompactPubKey localHtlcPubKey, CompactPubKey remoteHtlcPubKey, CompactPubKey perCommitmentPoint, Secret? perCommitmentSecret)

Parameters

localPubKey CompactPubKey
localDelayedPubKey CompactPubKey
revocationPubKey CompactPubKey
localHtlcPubKey CompactPubKey
remoteHtlcPubKey CompactPubKey
perCommitmentPoint CompactPubKey
perCommitmentSecret Secret?

Properties

LocalDelayedPubKey

The local_delayedpubkey from the commitment owner's perspective. Derived as: delayed_payment_basepoint + SHA256(per_commitment_point || delayed_payment_basepoint) * G Used for to_local outputs (the commitment owner can spend after a delay).

public CompactPubKey LocalDelayedPubKey { readonly get; init; }

Property Value

CompactPubKey

LocalHtlcPubKey

The local_htlcpubkey from the commitment owner's perspective. Derived as: htlc_basepoint + SHA256(per_commitment_point || htlc_basepoint) * G Used for HTLC outputs owned by the commitment owner.

public CompactPubKey LocalHtlcPubKey { readonly get; init; }

Property Value

CompactPubKey

LocalPubKey

The localpubkey from the commitment owner's perspective. Derived as: payment_basepoint + SHA256(per_commitment_point || payment_basepoint) * G Used for to_remote outputs (the other party can spend immediately).

public CompactPubKey LocalPubKey { readonly get; init; }

Property Value

CompactPubKey

PerCommitmentPoint

The per-commitment point used to derive all the above keys. Generated as: per_commitment_secret * G

public CompactPubKey PerCommitmentPoint { readonly get; init; }

Property Value

CompactPubKey

PerCommitmentSecret

The per-commitment secret used to generate the per-commitment point. Only available for our own commitments, not for remote commitments.

public Secret? PerCommitmentSecret { readonly get; init; }

Property Value

Secret?

RemoteHtlcPubKey

The remote_htlcpubkey from the commitment owner's perspective. Derived as: remote_htlc_basepoint + SHA256(per_commitment_point || remote_htlc_basepoint) * G Used for HTLC outputs owned by the other party.

public CompactPubKey RemoteHtlcPubKey { readonly get; init; }

Property Value

CompactPubKey

RevocationPubKey

The revocationpubkey that allows the other party to revoke this commitment. Complex derivation involving both parties' keys to ensure neither can compute the private key alone.

public CompactPubKey RevocationPubKey { readonly get; init; }

Property Value

CompactPubKey