static void Main(string[] args) { var path = Path.Combine(Directory.GetCurrentDirectory()); path = Path.GetFullPath(path) + "/.env"; DotEnv.Config(true, path); DotEnv.Config(true, path, Encoding.Unicode, false); EnvReader envReader = new EnvReader(); BlockIo blockIo = new BlockIo(envReader.GetStringValue("API_KEY")); var res = blockIo.SweepFromAddress(new { to_address = envReader.GetStringValue("TO_ADDRESS"), private_key = envReader.GetStringValue("PRIVATE_KEY_FROM_ADDRESS"), from_address = envReader.GetStringValue("FROM_ADDRESS") }); if (res.Status == "success") { Console.WriteLine("Sweep Res: " + res.Data); return; } Console.WriteLine("Error occurred: " + res.Data); }
public void Sweep() { blockIo = new BlockIo(api_key, null, 2, new Options(baseUrl)); var response = blockIo.SweepFromAddress(sweepRequestBodyContent); Assert.AreEqual("success", response.Status); Assert.IsNotNull(response.Data); }
public void RunSweeperExample() { var res = blockIo.SweepFromAddress("{" + " to_address: '" + envReader.GetStringValue("TO_ADDRESS") + "', private_key: '" + envReader.GetStringValue("PRIVATE_KEY_FROM_ADDRESS") + "', from_addresss: '" + envReader.GetStringValue("FROM_ADDRESS") + "'}"); if (res.Status == "success") { Console.WriteLine("Sweep Res: " + res.Data); return; } Console.WriteLine("Error occurred: " + res.Data); }