예제 #1
0
 public async Task <ILightningInvoiceListener> Listen(CancellationToken cancellation = default(CancellationToken))
 {
     return(new EclairSession(
                await WebsocketHelper.CreateClientWebSocket(_address.AbsoluteUri,
                                                            new AuthenticationHeaderValue("Basic",
                                                                                          Convert.ToBase64String(Encoding.Default.GetBytes($":{_password}"))).ToString(), cancellation), this));
 }
예제 #2
0
 public async Task <ChargeSession> Listen(CancellationToken cancellation = default(CancellationToken))
 {
     return(new ChargeSession(
                await WebsocketHelper.CreateClientWebSocket(Uri.ToString(),
                                                            $"Basic {ChargeAuthentication.GetBase64Creds()}", cancellation)));
 }
 public async Task <ILightningInvoiceListener> Listen(CancellationToken cancellation = default(CancellationToken))
 {
     return(new PtarmiganSession(
                await WebsocketHelper.CreateClientWebSocket(_address.ToString(), "Bearer " + _apiToken, cancellation), _network, this));
 }