コード例 #1
0
        private void TestHdKeyPath(string path, string seed, string chainCode, string key, string publicKey)
        {
            var derivedKey = Ed25519HdKey.DerivePath(path, seed.FromHex());


            Assert.Equal(chainCode, derivedKey.ChainCode.ToHex());
            Assert.Equal(key, derivedKey.Key.ToHex());
            Assert.Equal(publicKey, Ed25519HdKey.GetPublicKey(derivedKey.Key).ToHex());
        }
コード例 #2
0
        public void TestValidKey()
        {
            var seed              = "000102030405060708090a0b0c0d0e0f";
            var expectedKey       = "2b4be7f19ee27bbf30c667b642d5f4aa69fd169872f8fc3059c08ebae2eb19e7";
            var expectedChainCode = "90046a93de5380a72b5e45010748567d5ea02bbf6522f979e05c0d8d8ca9fffb";

            var key = Ed25519HdKey.GetMasterKeyFromSeed(seed.FromHex());

            Assert.Equal(expectedKey, key.Key.ToHex());
            Assert.Equal(expectedChainCode, key.ChainCode.ToHex());
        }