aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ethstubclient.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/ethstubclient.h b/ethstubclient.h
index a9c46a0b..3989c665 100644
--- a/ethstubclient.h
+++ b/ethstubclient.h
@@ -59,6 +59,19 @@ p["block"] = block;
}
+ bool check(const int& id) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p["id"] = id;
+
+ Json::Value result = this->client->CallMethod("check",p);
+ if (result.isBool())
+ return result.asBool();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
std::string codeAt(const std::string& address, const int& block) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
@@ -174,6 +187,19 @@ p["s"] = s;
}
+ bool killWatch(const int& id) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p["id"] = id;
+
+ Json::Value result = this->client->CallMethod("killWatch",p);
+ if (result.isBool())
+ return result.asBool();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
bool listening() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
@@ -408,14 +434,14 @@ p["params"] = params;
}
- std::string watch(const std::string& params) throw (jsonrpc::JsonRpcException)
+ int watch(const std::string& params) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p["params"] = params;
Json::Value result = this->client->CallMethod("watch",p);
- if (result.isString())
- return result.asString();
+ if (result.isInt())
+ return result.asInt();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());