| | | 1 | | using MessagePack; |
| | | 2 | | |
| | | 3 | | namespace NLightning.Transport.Ipc.Responses; |
| | | 4 | | |
| | | 5 | | using Domain.Bitcoin.ValueObjects; |
| | | 6 | | using Domain.Channels.Enums; |
| | | 7 | | using Domain.Channels.ValueObjects; |
| | | 8 | | using Domain.Client.Responses; |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Response for OpenChannelSubscription command |
| | | 12 | | /// </summary> |
| | | 13 | | [MessagePackObject] |
| | | 14 | | public sealed class OpenChannelSubscriptionIpcResponse |
| | | 15 | | { |
| | 0 | 16 | | [Key(0)] public required ChannelId ChannelId { get; init; } |
| | 0 | 17 | | [Key(1)] public required ChannelState ChannelState { get; init; } |
| | 0 | 18 | | [Key(2)] public TxId? TxId { get; init; } |
| | 0 | 19 | | [Key(3)] public uint? Index { get; init; } |
| | | 20 | | |
| | | 21 | | public static OpenChannelSubscriptionIpcResponse FromClientResponse( |
| | | 22 | | OpenChannelClientSubscriptionResponse clientResponse) |
| | 0 | 23 | | { |
| | 0 | 24 | | return new OpenChannelSubscriptionIpcResponse |
| | 0 | 25 | | { |
| | 0 | 26 | | ChannelId = clientResponse.ChannelId, |
| | 0 | 27 | | ChannelState = clientResponse.ChannelState, |
| | 0 | 28 | | TxId = clientResponse.TxId, |
| | 0 | 29 | | Index = clientResponse.Index |
| | 0 | 30 | | }; |
| | 0 | 31 | | } |
| | | 32 | | } |