Exemplo n.º 1
0
        public static Credentials Create(string copayerName, Network network)
        {
            var newCopayerKey   = new NBitcoin.ExtKey();
            var walletKey       = new NBitcoin.Key();
            var copayerXPrivKey = newCopayerKey.ToString(network);

            return(Credentials.FromExtendedPrivateKey(copayerXPrivKey, walletKey, copayerName, network));
        }
Exemplo n.º 2
0
        static void Generate()
        {
            var k = new NBitcoin.ExtKey();

            Console.Out.WriteLine("Ext priv");
            Console.Out.WriteLine(k.ToString(NBitcoin.Network.TestNet));

            Console.Out.WriteLine("Ext pub");
            Console.Out.WriteLine(k.Neuter());

            var pk = k.PrivateKey;

            Console.Out.WriteLine("PrivK");
            Console.Out.WriteLine(pk.ToString(NBitcoin.Network.TestNet));

            Console.Out.WriteLine("Public");
            Console.Out.WriteLine(pk.PubKey.ToString());
        }