Example #1
0
        public static string GetGlobalAddress(IMicheline value)
        {
            var bytes = LocalForge.ForgeMicheline(value);
            var hash  = Blake2b.GetDigest(bytes);

            return(Base58.Convert(hash, Prefix.expr));
        }
Example #2
0
        public string GetKeyHash(IMicheline key)
        {
            var optimized = Key.Optimize(Micheline.FromBytes(key.ToBytes()));
            var packed = new byte[] { 5 }.Concat(LocalForge.ForgeMicheline(optimized));
            var hash = Blake2b.GetDigest(packed);

            return(Base58.Convert(hash, Prefix.expr));
        }