aboutsummaryrefslogtreecommitdiffstats
path: root/webthreestubclient.h
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-03-05 18:16:54 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-03-05 18:16:54 +0800
commit4aaa414a83dcf3345c42381d233f960598eba11e (patch)
tree032509a7fda699c2883d931874d20ab3599220a9 /webthreestubclient.h
parent46d40d399d235f048eb6454d4f76bc482bf012bc (diff)
downloaddexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.tar
dexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.tar.gz
dexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.tar.bz2
dexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.tar.lz
dexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.tar.xz
dexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.tar.zst
dexon-solidity-4aaa414a83dcf3345c42381d233f960598eba11e.zip
jsonrpc api changes in progress6, almost finished
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r--webthreestubclient.h77
1 files changed, 27 insertions, 50 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h
index a13744bf..050207f2 100644
--- a/webthreestubclient.h
+++ b/webthreestubclient.h
@@ -332,27 +332,27 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- int eth_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
+ std::string eth_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_newFilter",p);
- if (result.isInt())
- return result.asInt();
+ if (result.isString())
+ return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- int eth_newFilterString(const std::string& param1) throw (jsonrpc::JsonRpcException)
+ std::string eth_newBlockFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
- Json::Value result = this->CallMethod("eth_newFilterString",p);
- if (result.isInt())
- return result.asInt();
+ Json::Value result = this->CallMethod("eth_newBlockFilter",p);
+ if (result.isString())
+ return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- bool eth_uninstallFilter(int param1) throw (jsonrpc::JsonRpcException)
+ bool eth_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
@@ -362,31 +362,31 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value eth_changed(int param1) throw (jsonrpc::JsonRpcException)
+ Json::Value eth_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
- Json::Value result = this->CallMethod("eth_changed",p);
+ Json::Value result = this->CallMethod("eth_getFilterChanges",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value eth_filterLogs(int param1) throw (jsonrpc::JsonRpcException)
+ Json::Value eth_getFilterLogs(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
- Json::Value result = this->CallMethod("eth_filterLogs",p);
+ Json::Value result = this->CallMethod("eth_getFilterLogs",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value eth_logs(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
+ Json::Value eth_getLogs(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
- Json::Value result = this->CallMethod("eth_logs",p);
+ Json::Value result = this->CallMethod("eth_getLogs",p);
if (result.isArray())
return result;
else
@@ -412,17 +412,17 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- int eth_register(const std::string& param1) throw (jsonrpc::JsonRpcException)
+ std::string eth_register(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_register",p);
- if (result.isInt())
- return result.asInt();
+ if (result.isString())
+ return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- bool eth_unregister(int param1) throw (jsonrpc::JsonRpcException)
+ bool eth_unregister(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
@@ -432,7 +432,7 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value eth_queuedTransactions(int param1) throw (jsonrpc::JsonRpcException)
+ Json::Value eth_queuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
@@ -465,29 +465,6 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- bool db_putString(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
- {
- Json::Value p;
- p.append(param1);
- p.append(param2);
- p.append(param3);
- Json::Value result = this->CallMethod("db_putString",p);
- if (result.isBool())
- return result.asBool();
- else
- throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
- }
- std::string db_getString(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
- {
- Json::Value p;
- p.append(param1);
- p.append(param2);
- Json::Value result = this->CallMethod("db_getString",p);
- if (result.isString())
- return result.asString();
- else
- throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
- }
bool shh_post(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
@@ -508,11 +485,11 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- bool shh_haveIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
+ bool shh_hasIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
- Json::Value result = this->CallMethod("shh_haveIdentity",p);
+ Json::Value result = this->CallMethod("shh_hasIdentity",p);
if (result.isBool())
return result.asBool();
else
@@ -540,17 +517,17 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- int shh_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
+ std::string shh_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("shh_newFilter",p);
- if (result.isInt())
- return result.asInt();
+ if (result.isString())
+ return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- bool shh_uninstallFilter(int param1) throw (jsonrpc::JsonRpcException)
+ bool shh_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
@@ -560,7 +537,7 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value shh_changed(int param1) throw (jsonrpc::JsonRpcException)
+ Json::Value shh_changed(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
@@ -570,7 +547,7 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value shh_getMessages(int param1) throw (jsonrpc::JsonRpcException)
+ Json::Value shh_getMessages(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);