private string GetLanguage(Language lang)
        {
            string name   = Wordlist.GetLanguageFileName(lang);
            var    client = new System.Net.Http.HttpClient();
            string data   = client.GetAsync("https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/" + name + ".txt").Result.Content.ReadAsStringAsync().Result;

            return(data.Replace("\n", "\\n"));
        }
Beispiel #2
0
        //[Fact]
        public void GenerateHardcodedBIP39Dictionary()
        {
            StringBuilder builder = new StringBuilder();

            foreach (var lang in new[] { Language.ChineseSimplified, Language.ChineseTraditional, Language.English, Language.Japanese, Language.Spanish, Language.French })
            {
                string name = Wordlist.GetLanguageFileName(lang);
                builder.AppendLine("dico.Add(\"" + name + "\",\"" + GetLanguage(lang) + "\");");
            }
            var dico = builder.ToString();
        }