示例#1
0
        public async Task <AddressModel> GenerateAddress(string userId, string ipAddress, int port, string username, string password)
        {
            try
            {
                var wallerConnector = new WalletConnector(ipAddress, port, username, password);
                var address         = wallerConnector.GenerateAddress(userId, true);
                var privateKey      = await wallerConnector.DumpPrivKeyAsync(address);

                return(new AddressModel
                {
                    Address = address,
                    PrivateKey = privateKey
                });
            }
            catch (Exception)
            {
                return(null);
            }
        }