Exemplo n.º 1
0
        public static bool ValidateAddress(string address, string networkName)
        {
            switch (networkName)
            {
            case CryptoCurrency.BTC:
                return(BlockchainHeper.IsBitcoinAddress(address));

            case CryptoCurrency.ETH:
                return(BlockchainHeper.IsEthereumAddress(address));

            case CryptoCurrency.VAKA:
                var vakacoinRpc = new VakacoinRpc(AppSettingHelper.GetVakacoinNode());
                return(vakacoinRpc.CheckAccountExist(address));

            default:
                throw new Exception("Network name not define!");
            }
        }
Exemplo n.º 2
0
 public void IsAddress(bool result, string address)
 {
     Assert.AreEqual(result, BlockchainHeper.IsEthereumAddress(address));
 }