public void SendPaymentTest() { LndClient lndClient = new LndClient(); // Todo: query a testnet lapp for a payment request //var response = lndClient.SendPayment("", 30); // Assert.IsNotNull(response); }
public void ListPaymentsTest() { LndClient lndClient = new LndClient(); var response = lndClient.ListPayments(); Assert.IsNotNull(response); }
public void UnlockWalletTestWrongPassword() { // Arrange LndClient lndClient = new LndClient("test_password"); // Act and Assert Assert.ThrowsException <RpcException>(() => lndClient.UnlockWallet("wrong_password")); }
public Clients(RPCClient bitcoinRPCClient, LndClient lndClient, CLightningClient cLightningClient, NRustLightningClient nRustLightningHttpClient, NBXplorer.ExplorerClient nbxClient) { BitcoinRPCClient = bitcoinRPCClient ?? throw new ArgumentNullException(nameof(bitcoinRPCClient)); LndClient = lndClient ?? throw new ArgumentNullException(nameof(lndClient)); CLightningClient = cLightningClient ?? throw new ArgumentNullException(nameof(cLightningClient)); NRustLightningHttpClient = nRustLightningHttpClient ?? throw new ArgumentNullException(nameof(nRustLightningHttpClient)); NBXClient = nbxClient ?? throw new ArgumentNullException(nameof(nbxClient)); }
public void ListChannelsTest() { // Arrange LndClient lndClient = new LndClient(); // Act ListChannelsResponse response = lndClient.ListChannels(); Assert.IsNotNull(response); }
public void NewAddressTest() { // Arrange LndClient lndClient = new LndClient(); // Act NewAddressResponse response = lndClient.NewAddress(); Assert.IsNotNull(response.Address); }
public void GetInfoTest() { // Arrange LndClient lndClient = new LndClient(); // Act GetInfoResponse response = lndClient.GetInfo(); Assert.AreEqual("0.5.0-beta commit=3b2c807288b1b7f40d609533c1e96a510ac5fa6d", response.Version); }
private async Task <LnrpcNetworkInfo> GetNetworkInfoAfterTenfoldWaitingTime(LndClient lndClient, CancellationToken ct) { if ((DateTime.Now - this.lastNetworkInfoPollingTime).TotalMinutes >= this.configuration.IntervalSeconds) { this.lastNetworkInfoPollingTime = DateTime.Now; return(await lndClient.SwaggerClient.GetNetworkInfoAsync(ct).ConfigureAwait(false)); } return(null); }
public LndMockTester(ServerTester serverTester, string environmentName, string defaultValue, string defaultHost, Network network) { this._Parent = serverTester; var url = serverTester.GetEnvironment(environmentName, defaultValue); Swagger = new LndSwaggerClient(new LndRestSettings(new Uri(url)) { AllowInsecure = true }); Client = new LndClient(Swagger, network); P2PHost = _Parent.GetEnvironment(environmentName + "_HOST", defaultHost); }
public void UnlockWalletTestRightPassword() { // Arrange LndClient lndClient = new LndClient("test_password"); // Act and Assert try { UnlockWalletResponse response = lndClient.UnlockWallet("test_password"); } catch (RpcException e) { // Wallet is already unlocked Assert.AreEqual("unknown service lnrpc.WalletUnlocker", e.Status.Detail); } }
public void Setup() { LndClient = new LndClient(); LndClient.Config.Network = "testnet"; }
public NodeAliasCache(LndClient client) { this.client = client; this.nodeAliasCache = new Dictionary <string, string>(); }
public AsyncLightningApp(ThisAddIn excelAddIn) { _excelAddIn = excelAddIn; LndClient = new LndClient(); }