Пример #1
0
        public static string GetBitcoinAddress(this ECPoint publicKey, bool compressed = true)
        {
            var pubKeyHash = Hash160.Hash(publicKey.EncodePoint(compressed));

            byte[] addressBytes = new byte[pubKeyHash.Length + 1];
            Buffer.BlockCopy(pubKeyHash, 0, addressBytes, 1, pubKeyHash.Length);
            return(Base58.EncodeWithCheckSum(addressBytes));
        }