aboutsummaryrefslogtreecommitdiffstats
path: root/webthreestubclient.h
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-28 20:25:31 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-28 20:25:31 +0800
commit7f0440e7104a241aff4cc3092f4dc6c4be2c1a8b (patch)
tree4b69234fc5ea7d83dad9db64cf1530d38f3c5436 /webthreestubclient.h
parent79bb03513bb191cb570c3bde4283626e2e6e5b58 (diff)
downloaddexon-solidity-7f0440e7104a241aff4cc3092f4dc6c4be2c1a8b.tar.gz
dexon-solidity-7f0440e7104a241aff4cc3092f4dc6c4be2c1a8b.tar.zst
dexon-solidity-7f0440e7104a241aff4cc3092f4dc6c4be2c1a8b.zip
whisper in web3jsonrpc
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r--webthreestubclient.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h
index c25ea0d9..1d4592e9 100644
--- a/webthreestubclient.h
+++ b/webthreestubclient.h
@@ -31,6 +31,20 @@ class WebThreeStubClient
}
+ std::string addToGroup(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p.append(param1);
+p.append(param2);
+
+ Json::Value result = this->client->CallMethod("addToGroup",p);
+ if (result.isString())
+ return result.asString();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
std::string balanceAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
@@ -212,6 +226,19 @@ p.append(param2);
}
+ bool haveIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p.append(param1);
+
+ Json::Value result = this->client->CallMethod("haveIdentity",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;
@@ -262,6 +289,32 @@ p.append(param2);
}
+ std::string newGroup(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p.append(param1);
+p.append(param2);
+
+ Json::Value result = this->client->CallMethod("newGroup",p);
+ if (result.isString())
+ return result.asString();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
+ std::string newIdentity() throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p = Json::nullValue;
+ Json::Value result = this->client->CallMethod("newIdentity",p);
+ if (result.isString())
+ return result.asString();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
int number() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
@@ -286,6 +339,19 @@ p.append(param2);
}
+ bool post(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p.append(param1);
+
+ Json::Value result = this->client->CallMethod("post",p);
+ if (result.isBool())
+ return result.asBool();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
bool put(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
{
Json::Value p;