Fix lightning implementation, docs and tests

This commit is contained in:
nicolas.dorier
2020-06-08 23:40:58 +09:00
parent a9dbbe1955
commit 8dd6ecc0b8
36 changed files with 615 additions and 528 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Security.Cryptography;
using BTCPayServer.Lightning;
using BTCPayServer.Lightning.JsonConverters;
using Newtonsoft.Json;
@@ -7,9 +8,20 @@ namespace BTCPayServer.Client.Models
{
public class CreateLightningInvoiceRequest
{
[JsonProperty(ItemConverterType = typeof(LightMoneyJsonConverter))]
public CreateLightningInvoiceRequest()
{
}
public CreateLightningInvoiceRequest(LightMoney amount, string description, TimeSpan expiry)
{
Amount = amount;
Description = description;
Expiry = expiry;
}
[JsonConverter(typeof(LightMoneyJsonConverter))]
public LightMoney Amount { get; set; }
public string Description { get; set; }
[JsonConverter(typeof(JsonConverters.TimeSpanJsonConverter))]
public TimeSpan Expiry { get; set; }
public bool PrivateRouteHints { get; set; }