< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Bitcoin.Transactions.Outputs.ToRemoteOutputInfo
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/Transactions/Outputs/ToRemoteOutputInfo.cs
Tag: 36_15743069263
Line coverage
63%
Covered lines: 7
Uncovered lines: 4
Coverable lines: 11
Total lines: 54
Line coverage: 63.6%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Amount()100%11100%
get_OutputType()100%210%
get_RemotePaymentPubKey()100%11100%
get_UseAnchors()100%210%
get_TransactionId()100%210%
get_Index()100%210%
.ctor(...)100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/Transactions/Outputs/ToRemoteOutputInfo.cs

#LineLine coverage
 1using NLightning.Domain.Bitcoin.Transactions.Enums;
 2using NLightning.Domain.Bitcoin.Transactions.Interfaces;
 3using NLightning.Domain.Bitcoin.ValueObjects;
 4using NLightning.Domain.Crypto.ValueObjects;
 5using NLightning.Domain.Money;
 6
 7namespace NLightning.Domain.Bitcoin.Transactions.Outputs;
 8
 9/// <summary>
 10/// Represents the information needed to construct a to_remote output in a commitment transaction.
 11/// This follows the BOLT #3 specification for to_remote outputs.
 12/// </summary>
 13public class ToRemoteOutputInfo : IOutputInfo
 14{
 15    /// <summary>
 16    /// Gets the amount of the output.
 17    /// </summary>
 7218    public LightningMoney Amount { get; }
 19
 20    /// <summary>
 21    /// Gets the type of the output.
 22    /// </summary>
 023    public OutputType OutputType => OutputType.ToRemote;
 24
 25    /// <summary>
 26    /// Gets the remote's payment public key.
 27    /// </summary>
 6828    public CompactPubKey RemotePaymentPubKey { get; }
 29
 30    /// <summary>
 31    /// Gets whether this to_remote output should use anchors.
 32    /// </summary>
 033    public bool UseAnchors { get; }
 34
 35    /// <summary>
 36    /// Gets or sets the transaction ID of the output once it's created.
 37    /// </summary>
 038    public TxId? TransactionId { get; set; }
 39
 40    /// <summary>
 41    /// Gets or sets the index of the output in the transaction once it's created.
 42    /// </summary>
 043    public ushort? Index { get; set; }
 44
 45    /// <summary>
 46    /// Creates a new instance of ToRemoteOutputInfo.
 47    /// </summary>
 7248    public ToRemoteOutputInfo(LightningMoney amount, CompactPubKey remotePaymentPubKey, bool useAnchors = false)
 49    {
 7250        Amount = amount;
 7251        RemotePaymentPubKey = remotePaymentPubKey;
 7252        UseAnchors = useAnchors;
 7253    }
 54}