Exemple #1
0
        private async void Entropy_OnChecked(object sender, RoutedEventArgs e)
        {
            var dew = new DrawEntropyWindow();

            userEntropy = await dew.ShowDialog <byte[]>(this);

            seedTb.Text = Tech.RandomSeed(userEntropy);
            NewAddrWif();
        }
Exemple #2
0
        private static void NewAddress(string[] command)
        {
            Console.ForegroundColor = ConsoleColor.Green;
            if (command.Length >= 2 && (command[1] == "m" || command[1] == "t"))
            {
                var net = command[1] == "m" ? "main" : "test3";
                int t   = 2;
                if (command.Length == 3)
                {
                    Int32.TryParse(command[2], out t);
                }

                byte[] customEntropy = null;
                Console.WriteLine("do yo want enter custom entropy? 'y/n'");
                if (Console.ReadKey().KeyChar == 'y')
                {
                    customEntropy = KeyboardEntropy();
                }

                var seed = Tech.RandomSeed(customEntropy);
                Console.WriteLine($"\nseed phrase:");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(seed);
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine($"WIF and address:");
                Console.ForegroundColor = ConsoleColor.Red;
                var aw = WalletTools.NewWifAddr(seed, net, t);
                Console.WriteLine($"{aw.wif} {aw.address}");

                Console.ForegroundColor = ConsoleColor.Green;
            }
            else
            {
                Console.WriteLine("n net['m|t'] type[0|1|2](optional)");
            }
        }
Exemple #3
0
 private async void Entropy_UnChecked(object sender, RoutedEventArgs e)
 {
     userEntropy = null;
     seedTb.Text = Tech.RandomSeed(userEntropy);
     NewAddrWif();
 }
Exemple #4
0
 private void NewAddress_Click(object sender, RoutedEventArgs e)
 {
     seedTb.Text = Tech.RandomSeed(userEntropy);
     NewAddrWif();
 }