2024-04-04 16:31:04 +09:00
|
|
|
using BTCPayServer.Client.JsonConverters;
|
2020-05-23 21:13:18 +02:00
|
|
|
using BTCPayServer.Client.Models;
|
2018-02-19 02:38:03 +09:00
|
|
|
using BTCPayServer.Services.Invoices;
|
|
|
|
using NBitcoin;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
2018-02-19 11:06:08 +09:00
|
|
|
namespace BTCPayServer.Payments.Bitcoin
|
2018-02-19 02:38:03 +09:00
|
|
|
{
|
|
|
|
|
2024-10-16 16:25:16 +09:00
|
|
|
public class BitcoinLikePaymentData
|
2018-02-19 02:38:03 +09:00
|
|
|
{
|
|
|
|
public BitcoinLikePaymentData()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2020-06-28 17:55:27 +09:00
|
|
|
|
2024-04-04 16:31:04 +09:00
|
|
|
public BitcoinLikePaymentData(OutPoint outpoint, bool rbf, KeyPath keyPath)
|
2018-02-19 02:38:03 +09:00
|
|
|
{
|
2019-12-01 15:30:56 +01:00
|
|
|
Outpoint = outpoint;
|
2018-02-19 02:38:03 +09:00
|
|
|
ConfirmationCount = 0;
|
|
|
|
RBF = rbf;
|
2020-08-09 16:00:58 +02:00
|
|
|
KeyPath = keyPath;
|
2018-02-19 02:38:03 +09:00
|
|
|
}
|
2024-04-04 16:31:04 +09:00
|
|
|
[JsonConverter(typeof(SaneOutpointJsonConverter))]
|
2018-02-19 02:38:03 +09:00
|
|
|
public OutPoint Outpoint { get; set; }
|
2022-04-05 14:46:42 +09:00
|
|
|
public long ConfirmationCount { get; set; }
|
2024-04-04 16:31:04 +09:00
|
|
|
[JsonProperty("RBF")]
|
2018-02-19 02:38:03 +09:00
|
|
|
public bool RBF { get; set; }
|
2020-08-09 16:00:58 +02:00
|
|
|
[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
|
|
|
|
2020-04-05 23:57:43 +09:00
|
|
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-03-30 00:28:22 +09:00
|
|
|
public PayjoinInformation PayjoinInformation { get; set; }
|
2018-02-19 02:38:03 +09:00
|
|
|
}
|
2020-03-30 00:28:22 +09:00
|
|
|
|
|
|
|
|
|
|
|
public class PayjoinInformation
|
|
|
|
{
|
2020-04-05 22:44:34 +09:00
|
|
|
public uint256 CoinjoinTransactionHash { get; set; }
|
|
|
|
public Money CoinjoinValue { get; set; }
|
2020-03-30 00:28:22 +09:00
|
|
|
public OutPoint[] ContributedOutPoints { get; set; }
|
|
|
|
}
|
2018-02-19 02:38:03 +09:00
|
|
|
}
|