Exemple #1
0
 public string GetFormatted()
 {
     if (_formatted != null)
     {
         return(_formatted);
     }
     return(_formatted = (TypeConsts.AElfAddressPrefix + "_") + Address.GetFormatted() +
                         ("_" + Base58CheckEncoding.Encode(ChainId.DumpByteArray())));
 }
Exemple #2
0
        public string GetFormatted()
        {
            if (_formattedAddress != null)
            {
                return(_formattedAddress);
            }

            if (Value.Length != TypeConsts.AddressHashLength)
            {
                throw new ArgumentOutOfRangeException(
                          $"Serialized value does not represent a valid address. The input is {Value.Length} bytes long.");
            }

            var pubKeyHash = Base58CheckEncoding.Encode(Value.ToByteArray());

            return(_formattedAddress = pubKeyHash);
        }