コード例 #1
0
        public async Task ResponseStreaming(Google.Protobuf.ByteString RHash)
        {
            var         request     = new InvoiceSubscription();
            PaymentHash paymentHash = new PaymentHash();

            paymentHash.RHash = RHash;

            using (var call = client.SubscribeInvoices(request))
            {
                while (await call.ResponseStream.MoveNext())
                {
                    var invoice = call.ResponseStream.Current;
                    Console.WriteLine(invoice.ToString());
                    var lookup = client.LookupInvoice(paymentHash);
                    if (lookup.Settled)
                    {
                        break;
                    }
                }
            }
        }
コード例 #2
0
 public string GetPaymentId()
 {
     // Legacy, some old payments don't have the PaymentHash set
     return(PaymentHash?.ToString() ?? BOLT11);
 }