示例#1
0
        public void Kukai()
        {
            foreach (var sample in DJson.Read(@"..\..\..\Keys\HDKeys\Samples\kukai.json"))
            {
                var hdKey = HDKey.FromMnemonic(Mnemonic.Parse((string)sample.mnemonic))
                            .Derive((string)sample.path);

                Assert.Equal(sample.address, hdKey.Address);
            }
        }
示例#2
0
        public void Atomex()
        {
            foreach (var sample in DJson.Read(@"..\..\..\Keys\HDKeys\Samples\atomex.json"))
            {
                var hdKey = HDKey.FromMnemonic(Mnemonic.Parse((string)sample.mnemonic))
                            .Derive((string)sample.path);

                Assert.Equal(sample.privateKey, hdKey.Key.GetBase58());
                Assert.Equal(sample.address, hdKey.Address);
            }
        }
示例#3
0
        public void Kukai()
        {
            foreach (var sample in DJson.Read(@"..\..\..\Keys\HDKeys\Samples\kukai.json"))
            {
                var password = string.IsNullOrEmpty(sample.password) ? "" : sample.password;
                var hdKey    = HDKey.FromMnemonic(Mnemonic.Parse((string)sample.mnemonic), password)
                               .Derive((string)sample.path);

                Assert.Equal(sample.address, hdKey.Address);
            }
        }