Table of Contents

Class ChannelEntity

Namespace
NLightning.Infrastructure.Persistence.Entities.Channel
Assembly
NLightning.Infrastructure.Persistence.dll

Represents a Lightning Network payment channel entity in the persistence layer.

public class ChannelEntity
Inheritance
ChannelEntity
Inherited Members

Properties

ChannelId

The unique channel identifier used to reference this channel on the Lightning Network.

public required ChannelId ChannelId { get; set; }

Property Value

ChannelId

Config

Represents the configuration settings associated with the Lightning Network payment channel, defining operational parameters such as limits, timeouts, and other key configurations.

public virtual ChannelConfigEntity? Config { get; set; }

Property Value

ChannelConfigEntity

FundingAmountSatoshis

The amount of satoshis locked in the funding output for this channel.

public required long FundingAmountSatoshis { get; set; }

Property Value

long

FundingCreatedAtBlockHeight

The block height at which the funding transaction for the channel was created. Used to track the blockchain state relevant to the channel's funding process.

public uint FundingCreatedAtBlockHeight { get; set; }

Property Value

uint

FundingOutputIndex

The output index in the funding transaction that contains the channel funding.

public required ushort FundingOutputIndex { get; set; }

Property Value

ushort

FundingTxId

The transaction ID of the funding transaction that established this channel.

public required TxId FundingTxId { get; set; }

Property Value

TxId

Htlcs

The collection of HTLC (Hashed TimeLock Contracts) entities associated with this payment channel. Each HTLC represents a conditional payment in the channel.

public virtual ICollection<HtlcEntity>? Htlcs { get; set; }

Property Value

ICollection<HtlcEntity>

IsInitiator

Indicates whether the local node initiated the channel opening.

public required bool IsInitiator { get; set; }

Property Value

bool

KeySets

Collection of cryptographic key sets related to the Lightning Network channel. Defines entities that store and track keys associated with different roles (local/remote) in the channel.

public virtual ICollection<ChannelKeySetEntity>? KeySets { get; set; }

Property Value

ICollection<ChannelKeySetEntity>

LastReceivedSignature

The last signature received from the remote node, stored as a byte array.

public byte[]? LastReceivedSignature { get; set; }

Property Value

byte[]

LastSentSignature

The last signature sent to the remote node, stored as a byte array.

public byte[]? LastSentSignature { get; set; }

Property Value

byte[]

LocalBalanceSatoshis

The current balance of the local node in satoshis.

public required decimal LocalBalanceSatoshis { get; set; }

Property Value

decimal

LocalNextHtlcId

The next HTLC ID to be used by the local node.

public required ulong LocalNextHtlcId { get; set; }

Property Value

ulong

LocalRevocationNumber

The current local revocation number.

public required ulong LocalRevocationNumber { get; set; }

Property Value

ulong

RemoteBalanceSatoshis

The current balance of the remote node in satoshis.

public required decimal RemoteBalanceSatoshis { get; set; }

Property Value

decimal

RemoteNextHtlcId

The next HTLC ID to be used by the remote node.

public required ulong RemoteNextHtlcId { get; set; }

Property Value

ulong

RemoteNodeId

The public key of the channel counterparty.

public required CompactPubKey RemoteNodeId { get; set; }

Property Value

CompactPubKey

RemoteRevocationNumber

The current remote revocation number.

public required ulong RemoteRevocationNumber { get; set; }

Property Value

ulong

State

The current state of the channel.

public required byte State { get; set; }

Property Value

byte

Version

Indicates the channel format version associated with this channel entity, used to handle version-specific behaviors within the persistence layer.

public required byte Version { get; set; }

Property Value

byte

WatchedTransactions

A collection of transactions that are monitored for a specific channel, typically to track and validate on-chain activity related to the channel's lifecycle.

public virtual ICollection<WatchedTransactionEntity>? WatchedTransactions { get; set; }

Property Value

ICollection<WatchedTransactionEntity>