using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using BTCPayServer.Payments.Lightning.Charge; namespace BTCPayServer.Payments.Lightning { public class LightningInvoice { public string Id { get; set; } public string Status { get; set; } public string BOLT11 { get; set; } public DateTimeOffset? PaidAt { get; set; } public LightMoney Amount { get; set; } } public class LightningNodeInformation { public string NodeId { get; set; } public string Address { get; internal set; } public int P2PPort { get; internal set; } public int BlockHeight { get; set; } } public interface ILightningInvoiceClient { Task GetInvoice(string invoiceId, CancellationToken cancellation = default(CancellationToken)); Task CreateInvoice(LightMoney amount, string description, TimeSpan expiry, CancellationToken cancellation = default(CancellationToken)); Task Listen(CancellationToken cancellation = default(CancellationToken)); Task GetInfo(CancellationToken cancellation = default(CancellationToken)); } public interface ILightningListenInvoiceSession : IDisposable { Task WaitInvoice(CancellationToken cancellation); } }