mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-03 22:24:27 +01:00
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Payments.Lightning;
|
|
using BTCPayServer.Services.Invoices;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace BTCPayServer.Payments
|
|
{
|
|
public class LightningPaymentType : PaymentType
|
|
{
|
|
public static LightningPaymentType Instance { get; } = new LightningPaymentType();
|
|
private LightningPaymentType()
|
|
{
|
|
|
|
}
|
|
|
|
public override string ToPrettyString() => "Off-Chain";
|
|
public override string GetId() => "LightningLike";
|
|
|
|
public override CryptoPaymentData DeserializePaymentData(string str)
|
|
{
|
|
return JsonConvert.DeserializeObject<Payments.Lightning.LightningLikePaymentData>(str);
|
|
}
|
|
|
|
public override IPaymentMethodDetails DeserializePaymentMethodDetails(string str)
|
|
{
|
|
return JsonConvert.DeserializeObject<Payments.Lightning.LightningLikePaymentMethodDetails>(str);
|
|
}
|
|
|
|
public override ISupportedPaymentMethod DeserializeSupportedPaymentMethod(BTCPayNetworkBase network, JToken value)
|
|
{
|
|
return JsonConvert.DeserializeObject<LightningSupportedPaymentMethod>(value.ToString());
|
|
}
|
|
|
|
public override string GetTransactionLink(BTCPayNetworkBase network, string txId)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|