| | 1 | | namespace NLightning.Domain.Protocol.Payloads; |
| | 2 | |
|
| | 3 | | using Bitcoin.ValueObjects; |
| | 4 | | using Channels.ValueObjects; |
| | 5 | | using Crypto.ValueObjects; |
| | 6 | | using Interfaces; |
| | 7 | |
|
| | 8 | | /// <summary> |
| | 9 | | /// Represents the payload for the funding_created message. |
| | 10 | | /// </summary> |
| | 11 | | /// <remarks> |
| | 12 | | /// Initializes a new instance of the FundingCreatedPayload class. |
| | 13 | | /// </remarks> |
| | 14 | | public class FundingCreatedPayload : IChannelMessagePayload |
| | 15 | | { |
| | 16 | | /// <summary> |
| | 17 | | /// The temporary_channel_id is used to identify this channel on a per-peer basis until the funding transaction |
| | 18 | | /// is established, at which point it is replaced by the channel_id, which is derived from the funding transaction. |
| | 19 | | /// </summary> |
| 88 | 20 | | public ChannelId ChannelId { get; } |
| | 21 | |
|
| | 22 | | /// <summary> |
| | 23 | | /// The funding transaction id. |
| | 24 | | /// </summary> |
| 20 | 25 | | public TxId FundingTxId { get; } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// The funding transaction output index. |
| | 29 | | /// </summary> |
| 16 | 30 | | public ushort FundingOutputIndex { get; } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// The signature of the funding transaction. |
| | 34 | | /// </summary> |
| 8 | 35 | | public CompactSignature Signature { get; } |
| | 36 | |
|
| 24 | 37 | | public FundingCreatedPayload(ChannelId channelId, TxId fundingTxId, ushort fundingOutputIndex, |
| 24 | 38 | | CompactSignature signature) |
| | 39 | | { |
| 24 | 40 | | ChannelId = channelId; |
| 24 | 41 | | FundingTxId = fundingTxId; |
| 24 | 42 | | FundingOutputIndex = fundingOutputIndex; |
| 24 | 43 | | Signature = signature; |
| 24 | 44 | | } |
| | 45 | | } |