/// <summary> /// Simply unlock your encrypted wallet. /// </summary> /// <param name="data"> /// Use model to unlock wallet, and specify human readable time period params. /// </param> /// <returns></returns> public Result UnlockWallet(UnlockWalletData data) { IRestRequest req = GenerateStandardRequest(); JArray parameter = new JArray(); parameter.Add(data.passphrase); int timeForUnlock = TimeCalculator.CalculateTime(data.time); parameter.Add(timeForUnlock); JObject obj = BodySkeleton("walletpassphrase", parameter); req.AddJsonBody(obj.ToString()); var response = client.Execute(req); ValidateResponse(response); Result result = JsonConvert.DeserializeObject <Result>(response.Content); if (result.result == null) { result.result = "unlocked"; } return(result); }