Table of Contents

Class AcceptChannel2Payload

Namespace
NLightning.Bolts.BOLT2.Payloads
Assembly
NLightning.Bolts.dll

Represents the payload for the accept_channel2 message.

public class AcceptChannel2Payload : IMessagePayload
Inheritance
AcceptChannel2Payload
Implements
Inherited Members

Remarks

Initializes a new instance of the AcceptChannel2Payload class. This class depends on the initialized singleton class ConfigManager.

Constructors

AcceptChannel2Payload(ChannelId, ulong, PubKey, PubKey, PubKey, PubKey, PubKey, PubKey)

public AcceptChannel2Payload(ChannelId temporaryChannelId, ulong fundingSatoshis, PubKey fundingPubKey, PubKey revocationBasepoint, PubKey paymentBasepoint, PubKey delayedPaymentBasepoint, PubKey htlcBasepoint, PubKey firstPerCommitmentPoint)

Parameters

temporaryChannelId ChannelId
fundingSatoshis ulong
fundingPubKey PubKey
revocationBasepoint PubKey
paymentBasepoint PubKey
delayedPaymentBasepoint PubKey
htlcBasepoint PubKey
firstPerCommitmentPoint PubKey

Properties

DelayedPaymentBasepoint

delayed_payment_basepoint is used to regenerate the scripts required for the penalty transaction

public PubKey DelayedPaymentBasepoint { get; set; }

Property Value

PubKey

DustLimitSatoshis

dust_limit_satoshis is the threshold below which outputs should not be generated for this node's commitment or HTLC transactions

public ulong DustLimitSatoshis { get; }

Property Value

ulong

FirstPerCommitmentPoint

first_per_commitment_point is the per-commitment point used for the first commitment transaction

public PubKey FirstPerCommitmentPoint { get; set; }

Property Value

PubKey

FundingPubKey

funding_pubkey is the public key in the 2-of-2 multisig script of the funding transaction output.

public PubKey FundingPubKey { get; set; }

Property Value

PubKey

FundingSatoshis

funding_satoshis is the amount the acceptor is putting into the channel.

public ulong FundingSatoshis { get; set; }

Property Value

ulong

HtlcBasepoint

htlc_basepoint is used to produce HTLC signatures for the protocol

public PubKey HtlcBasepoint { get; set; }

Property Value

PubKey

HtlcMinimumMsat

htlc_minimum_msat indicates the smallest value HTLC this node will accept.

public ulong HtlcMinimumMsat { get; }

Property Value

ulong

MaxAcceptedHtlcs

max_accepted_htlcs limits the number of outstanding HTLCs the remote node can offer.

public ushort MaxAcceptedHtlcs { get; }

Property Value

ushort

MaxHtlcValueInFlightMsat

max_htlc_value_in_flight_msat is a cap on total value of outstanding HTLCs offered by the remote node, which allows the local node to limit its exposure to HTLCs

public ulong MaxHtlcValueInFlightMsat { get; }

Property Value

ulong

MinimumDepth

minimum_depth is the number of blocks we consider reasonable to avoid double-spending of the funding transaction. In case channel_type includes option_zeroconf this MUST be 0

public uint MinimumDepth { get; set; }

Property Value

uint

PaymentBasepoint

payment_basepoint is used to produce payment signatures for the protocol

public PubKey PaymentBasepoint { get; set; }

Property Value

PubKey

RevocationBasepoint

revocation_basepoint is used to regenerate the scripts required for the penalty transaction

public PubKey RevocationBasepoint { get; set; }

Property Value

PubKey

TemporaryChannelId

The temporary_channel_id is used to identify this channel on a per-peer basis until the funding transaction is established, at which point it is replaced by the channel_id, which is derived from the funding transaction.

public ChannelId TemporaryChannelId { get; set; }

Property Value

ChannelId

ToSelfDelay

to_self_delay is how long (in blocks) the other node will have to wait in case of breakdown before redeeming its own funds.

public ushort ToSelfDelay { get; }

Property Value

ushort

Methods

DeserializeAsync(Stream)

Deserializes the payload from a stream.

public static Task<AcceptChannel2Payload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<AcceptChannel2Payload>

The deserialized payload.

Exceptions

PayloadSerializationException

Error deserializing Payload

SerializeAsync(Stream)

Serializes the message payload to a stream.

public Task SerializeAsync(Stream stream)

Parameters

stream Stream

The stream to serialize to.

Returns

Task

A task that represents the asynchronous operation.