Exemplo n.º 1
0
        public void ShouldFindPublicKeysAccountUsingIndexInitialisingWithWif(string address, int index)
        {
            var wallet    = new Wallet(Words, Password);
            var wif       = wallet.GetMasterExtPubKey().GetWif(Network.Main).ToWif();
            var extPubKey = ExtPubKey.Parse(wif, Network.Main);

            Console.WriteLine(wif);
            var publicWallet = new PublicWallet(extPubKey);

            var account = publicWallet.GetAddress(index);

            Assert.Equal(address, account);
        }
Exemplo n.º 2
0
        public void ShouldFindPublicKeysAccountUsingIndexInitialisingWithPublicKey(string address, int index)
        {
            var wallet = new Wallet(Words, Password);
            var bytes  = wallet.GetMasterExtPubKey().ToBytes();
            var hex    = bytes.ToHex();

            Console.WriteLine(hex);
            var publicWallet = new PublicWallet(hex);

            var account = publicWallet.GetAddress(index);

            Assert.Equal(address, account);
        }