public bool Init(string keypath, string targetHost) { try { AppContext.SetSwitch(SwitchName, true); var channel = GrpcChannel.ForAddress("http://" + targetHost); this.client = new Pb.Xchain.XchainClient(channel); this.account = new XCAccount(); return(SetAccountByPath(keypath)); } catch (Exception e) { Console.WriteLine("Init failed, err=" + e.ToString()); return(false); } }