btcpayserver/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs

47 lines
1.4 KiB
C#
Raw Normal View History

using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Client.Models;
using BTCPayServer.Services.Invoices;
using NBitcoin;
using Newtonsoft.Json;
namespace BTCPayServer.Payments.Bitcoin
{
2024-10-16 16:25:16 +09:00
public class BitcoinLikePaymentData
{
public BitcoinLikePaymentData()
{
}
2020-06-28 17:55:27 +09:00
public BitcoinLikePaymentData(OutPoint outpoint, bool rbf, KeyPath keyPath)
{
Outpoint = outpoint;
ConfirmationCount = 0;
RBF = rbf;
KeyPath = keyPath;
}
[JsonConverter(typeof(SaneOutpointJsonConverter))]
public OutPoint Outpoint { get; set; }
2022-04-05 14:46:42 +09:00
public long ConfirmationCount { get; set; }
[JsonProperty("RBF")]
public bool RBF { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.KeyPathJsonConverter))]
public KeyPath KeyPath { get; set; }
2024-10-16 19:05:07 +09:00
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public uint256 AssetId { get; set; }
2020-03-30 00:28:22 +09:00
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-03-30 00:28:22 +09:00
public PayjoinInformation PayjoinInformation { get; set; }
}
2020-03-30 00:28:22 +09:00
public class PayjoinInformation
{
public uint256 CoinjoinTransactionHash { get; set; }
public Money CoinjoinValue { get; set; }
2020-03-30 00:28:22 +09:00
public OutPoint[] ContributedOutPoints { get; set; }
}
}