Table of Contents

Class ErrorPayload

Namespace
NLightning.Bolts.BOLT1.Payloads
Assembly
NLightning.Bolts.dll

Represents an error payload.

public class ErrorPayload : IMessagePayload
Inheritance
ErrorPayload
Implements
Inherited Members

Remarks

An error payload is used to communicate an error to the other party.

Constructors

ErrorPayload(ChannelId, byte[])

public ErrorPayload(ChannelId channelId, byte[] data)

Parameters

channelId ChannelId
data byte[]

ErrorPayload(ChannelId, string)

public ErrorPayload(ChannelId channelId, string message)

Parameters

channelId ChannelId
message string

ErrorPayload(byte[])

Represents an error payload.

public ErrorPayload(byte[] data)

Parameters

data byte[]

The error data.

Remarks

An error payload is used to communicate an error to the other party.

See Also

ErrorPayload(string)

public ErrorPayload(string message)

Parameters

message string

Properties

ChannelId

The channel id.

public ChannelId ChannelId { get; }

Property Value

ChannelId

Remarks

The channel id is used to identify the channel the error is related to.

Data

The error data.

public byte[]? Data { get; }

Property Value

byte[]

Remarks

The error data is used to communicate the error.

Methods

DeserializeAsync(Stream)

Deserialize an ErrorPayload from a stream.

public static Task<ErrorPayload> DeserializeAsync(Stream stream)

Parameters

stream Stream

The stream to deserialize from.

Returns

Task<ErrorPayload>

The deserialized ErrorPayload.

Exceptions

SerializationException

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.

See Also