Ejemplo n.º 1
0
        public static ChainAddress Parse(string str)
        {
            var arr = str.Split('_');

            if (arr[0] != TypeConsts.AElfAddressPrefix)
            {
                throw new ArgumentException("invalid chain address", nameof(str));
            }

            var address = Address.Parse(arr[1]);

            var chainId = BitConverter.ToInt32(Base58CheckEncoding.Decode(arr[2]), 0);

            return(new ChainAddress(address, chainId));
        }
Ejemplo n.º 2
0
 public static Address Base58StringToAddress(string inputStr)
 {
     return(Address.FromBytes(Base58CheckEncoding.Decode(inputStr)));
 }
Ejemplo n.º 3
0
 public static Address Parse(string inputStr)
 {
     return(new Address(Base58CheckEncoding.Decode(inputStr)));
 }