| | | 1 | | namespace NLightning.Domain.Bitcoin.Transactions.Models; |
| | | 2 | | |
| | | 3 | | using Money; |
| | | 4 | | using Outputs; |
| | | 5 | | using ValueObjects; |
| | | 6 | | using Wallet.Models; |
| | | 7 | | |
| | | 8 | | /// <summary> |
| | | 9 | | /// Represents a funding transaction in the domain model. |
| | | 10 | | /// This class encapsulates the logical structure of a Lightning Network funding transaction |
| | | 11 | | /// as defined by BOLT specifications, without dependencies on specific Bitcoin libraries. |
| | | 12 | | /// </summary> |
| | | 13 | | public class FundingTransactionModel |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Gets the outputs to be spent by this transaction. |
| | | 17 | | /// </summary> |
| | 0 | 18 | | public IEnumerable<UtxoModel> Utxos { get; } |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Gets the funding output that this transaction pays to. |
| | | 22 | | /// </summary> |
| | 0 | 23 | | public FundingOutputInfo FundingOutput { get; } |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// Gets or sets the transaction ID after the transaction is constructed. |
| | | 27 | | /// </summary> |
| | 0 | 28 | | public TxId? TransactionId { get; set; } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Gets the total fee for this transaction. |
| | | 32 | | /// </summary> |
| | 0 | 33 | | public LightningMoney Fee { get; } |
| | | 34 | | |
| | 0 | 35 | | public WalletAddressModel? ChangeAddress { get; set; } |
| | 0 | 36 | | public LightningMoney? ChangeAmount { get; set; } |
| | | 37 | | |
| | 0 | 38 | | public FundingTransactionModel(IEnumerable<UtxoModel> utxos, FundingOutputInfo fundingOutput, LightningMoney fee) |
| | | 39 | | { |
| | 0 | 40 | | Utxos = utxos; |
| | 0 | 41 | | FundingOutput = fundingOutput; |
| | 0 | 42 | | Fee = fee; |
| | 0 | 43 | | } |
| | | 44 | | } |