Пример #1
0
        public KeyPair LoadFromPrivate(string privKey)
        {
            var ethEcKey = new Nethereum.Signer.EthECKey(privKey);

            return(new KeyPair()
            {
                Address = ethEcKey.GetPublicAddress(),
                Private = ethEcKey.GetPrivateKey()
            });
        }
Пример #2
0
        public static string GetPublicAddress(string privateKey)
        {
            var key = new EthECKey(privateKey.HexToByteArray(), true);

            return(key.GetPublicAddress());
        }