mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using BTCPayServer.Client.JsonConverters;
|
|
using BTCPayServer.Lightning;
|
|
using NBitcoin;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
{
|
|
public class LightningNodeBalanceData
|
|
{
|
|
[JsonProperty("onchain")]
|
|
public OnchainBalanceData OnchainBalance { get; set; }
|
|
|
|
[JsonProperty("offchain")]
|
|
public OffchainBalanceData OffchainBalance { get; set; }
|
|
|
|
public LightningNodeBalanceData()
|
|
{
|
|
}
|
|
|
|
public LightningNodeBalanceData(OnchainBalanceData onchain, OffchainBalanceData offchain)
|
|
{
|
|
OnchainBalance = onchain;
|
|
OffchainBalance = offchain;
|
|
}
|
|
}
|
|
|
|
public class OnchainBalanceData
|
|
{
|
|
[JsonConverter(typeof(JsonConverters.MoneyJsonConverter))]
|
|
public Money Confirmed { get; set; }
|
|
|
|
[JsonConverter(typeof(JsonConverters.MoneyJsonConverter))]
|
|
public Money Unconfirmed { get; set; }
|
|
|
|
[JsonConverter(typeof(JsonConverters.MoneyJsonConverter))]
|
|
public Money Reserved { get; set; }
|
|
}
|
|
|
|
public class OffchainBalanceData
|
|
{
|
|
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
|
public LightMoney Opening { get; set; }
|
|
|
|
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
|
public LightMoney Local { get; set; }
|
|
|
|
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
|
public LightMoney Remote { get; set; }
|
|
|
|
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
|
public LightMoney Closing { get; set; }
|
|
}
|
|
}
|