btcpayserver/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs

49 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
{
public class BitcoinLikePaymentData : CryptoPaymentData
{
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; }
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; }
string CryptoPaymentData.GetPaymentProof()
{
return Outpoint?.ToString();
}
}
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; }
}
}