예제 #1
0
        public static async Task <string> ProcessElectrum(string ticker, Server[] servers)
        {
            var req = new ElectrumRequest
            {
                Coin     = ticker,
                Servers  = servers,
                Method   = "electrum",
                Userpass = "******"
            };

            var response = await Client.PostAsync("http://127.0.0.1:7783",
                                                  new StringContent(req.ToJson(), Encoding.UTF8, "application/json"));

            var s = await response.Content.ReadAsStringAsync();

            return(s);
        }
 public static string ToJson(this ElectrumRequest self) => JsonConvert.SerializeObject(self, Converter.Settings);