Table of Contents

Interface ICommitmentKeyDerivationService

Namespace
NLightning.Domain.Protocol.Interfaces
Assembly
NLightning.Domain.dll
public interface ICommitmentKeyDerivationService

Methods

DeriveLocalCommitmentKeys(uint, ChannelBasepoints, ChannelBasepoints, ulong)

Derives the local commitment keys based on the provided parameters, including local and remote basepoints and the commitment number.

CommitmentKeys DeriveLocalCommitmentKeys(uint localChannelKeyIndex, ChannelBasepoints localBasepoints, ChannelBasepoints remoteBasepoints, ulong commitmentNumber)

Parameters

localChannelKeyIndex uint

An index representing the local channel key for deriving commitment keys.

localBasepoints ChannelBasepoints

The set of cryptographic basepoints associated with the local channel.

remoteBasepoints ChannelBasepoints

The set of cryptographic basepoints associated with the remote channel.

commitmentNumber ulong

A numeric identifier representing the specific commitment.

Returns

CommitmentKeys

A CommitmentKeys instance containing the derived keys for the local commitment.

DeriveRemoteCommitmentKeys(uint, ChannelBasepoints, ChannelBasepoints, CompactPubKey, ulong)

Derives the remote commitment keys based on the provided parameters, including local and remote basepoints, the remote per-commitment point, and the commitment number.

CommitmentKeys DeriveRemoteCommitmentKeys(uint localChannelKeyIndex, ChannelBasepoints localBasepoints, ChannelBasepoints remoteBasepoints, CompactPubKey remotePerCommitmentPoint, ulong commitmentNumber)

Parameters

localChannelKeyIndex uint

An index representing the local channel key for deriving remote commitment keys.

localBasepoints ChannelBasepoints

The set of cryptographic basepoints associated with the local channel.

remoteBasepoints ChannelBasepoints

The set of cryptographic basepoints associated with the remote channel.

remotePerCommitmentPoint CompactPubKey

The per-commitment point provided by the remote party, used for key derivation.

commitmentNumber ulong

A numeric identifier representing the specific commitment.

Returns

CommitmentKeys

A CommitmentKeys instance containing the derived keys for the remote commitment.