public void MnemonicSeedAndMiniSecretTest() { foreach (var vector in Vectors) { var mnemonic = vector[0]; var expected_entropy = vector[1]; var expected_seed = vector[2]; var entropy = Mnemonic.GetEntropy(mnemonic, BIP39Wordlist.English); Assert.AreEqual(expected_entropy, entropy); var seed = Mnemonic.SeedFromEntropy(Utils.HexToByteArray(entropy), "Substrate"); var seedAsHexString = Utils.Bytes2HexString(seed, Utils.HexStringFormat.Pure); Assert.AreEqual(expected_seed, seedAsHexString.ToLower()); var miniSecret = Mnemonic.GetSecretKeyFromMnemonic(mnemonic, "Substrate", BIP39Wordlist.English); Assert.AreEqual(expected_seed.Substring(0, 64), Utils.Bytes2HexString(miniSecret, Utils.HexStringFormat.Pure).ToLower()); } }