2020-05-23 21:13:18 +02:00
|
|
|
using BTCPayServer.Client.Models;
|
2018-08-30 11:50:39 +09:00
|
|
|
using BTCPayServer.Lightning;
|
|
|
|
using BTCPayServer.Lightning.JsonConverters;
|
2018-02-26 00:48:12 +09:00
|
|
|
using BTCPayServer.Services.Invoices;
|
2019-01-27 13:06:55 +09:00
|
|
|
using NBitcoin;
|
2018-02-26 00:48:12 +09:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Payments.Lightning
|
|
|
|
{
|
|
|
|
public class LightningLikePaymentData : CryptoPaymentData
|
|
|
|
{
|
2023-04-10 11:07:03 +09:00
|
|
|
|
2019-01-27 13:06:55 +09:00
|
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
|
|
|
|
public uint256 PaymentHash { get; set; }
|
2023-04-10 11:07:03 +09:00
|
|
|
|
2023-01-13 09:29:41 +01:00
|
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
|
|
|
|
public uint256 Preimage { get; set; }
|
2023-04-10 11:07:03 +09:00
|
|
|
|
2023-04-10 16:38:49 +09:00
|
|
|
public string GetPaymentProof()
|
|
|
|
{
|
2023-04-17 00:08:40 +02:00
|
|
|
return Preimage?.ToString();
|
2023-04-10 16:38:49 +09:00
|
|
|
}
|
2018-02-26 00:48:12 +09:00
|
|
|
}
|
|
|
|
}
|