solidity/webthreestubclient.h

587 lines
26 KiB
C
Raw Normal View History

2014-10-13 09:22:28 +00:00
/**
2014-11-03 15:54:03 +00:00
* This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
2014-10-13 09:22:28 +00:00
*/
2014-11-03 15:54:03 +00:00
#ifndef JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_
#define JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_
2014-10-13 09:22:28 +00:00
2014-11-03 15:54:03 +00:00
#include <jsonrpccpp/client.h>
2014-10-13 09:22:28 +00:00
2014-11-03 15:54:03 +00:00
class WebThreeStubClient : public jsonrpc::Client
2014-10-13 09:22:28 +00:00
{
public:
WebThreeStubClient(jsonrpc::IClientConnector &conn, jsonrpc::clientVersion_t type = jsonrpc::JSONRPC_CLIENT_V2) : jsonrpc::Client(conn, type) {}
2014-10-13 09:22:28 +00:00
2015-01-09 15:12:56 +00:00
std::string web3_sha3(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("web3_sha3",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-12 13:38:51 +00:00
std::string web3_clientVersion() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->CallMethod("web3_clientVersion",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
std::string net_version() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->CallMethod("net_version",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-04 23:33:44 +00:00
std::string net_peerCount() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
2015-03-04 23:33:44 +00:00
Json::Value result = this->CallMethod("net_peerCount",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-04 23:33:44 +00:00
bool net_listening() throw (jsonrpc::JsonRpcException)
2014-10-28 12:25:31 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p = Json::nullValue;
2015-03-04 23:33:44 +00:00
Json::Value result = this->CallMethod("net_listening",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 12:25:31 +00:00
}
2015-03-04 23:33:44 +00:00
std::string eth_coinbase() throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2015-03-04 23:33:44 +00:00
p = Json::nullValue;
Json::Value result = this->CallMethod("eth_coinbase",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
bool eth_mining() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p = Json::nullValue;
Json::Value result = this->CallMethod("eth_mining",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
std::string eth_gasPrice() throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p = Json::nullValue;
Json::Value result = this->CallMethod("eth_gasPrice",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
Json::Value eth_accounts() throw (jsonrpc::JsonRpcException)
2014-10-16 11:06:24 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p = Json::nullValue;
Json::Value result = this->CallMethod("eth_accounts",p);
2014-11-03 15:54:03 +00:00
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-04 23:33:44 +00:00
std::string eth_blockNumber() throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p = Json::nullValue;
2015-03-04 23:33:44 +00:00
Json::Value result = this->CallMethod("eth_blockNumber",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 00:14:31 +00:00
std::string eth_getBalance(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p.append(param1);
2015-03-05 00:14:31 +00:00
p.append(param2);
Json::Value result = this->CallMethod("eth_getBalance",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 00:14:31 +00:00
Json::Value eth_getStorage(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-28 10:39:55 +00:00
{
Json::Value p;
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
2015-03-05 00:14:31 +00:00
Json::Value result = this->CallMethod("eth_getStorage",p);
if (result.isObject())
return result;
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 10:39:55 +00:00
}
2015-03-05 00:34:02 +00:00
std::string eth_getStorageAt(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
p.append(param1);
2015-03-05 00:14:31 +00:00
p.append(param2);
2015-03-05 00:34:02 +00:00
p.append(param3);
Json::Value result = this->CallMethod("eth_getStorageAt",p);
2015-03-05 00:14:31 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 00:34:02 +00:00
std::string eth_getTransactionCount(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-16 11:06:24 +00:00
{
Json::Value p;
2014-10-23 10:04:26 +00:00
p.append(param1);
2015-03-05 00:34:02 +00:00
p.append(param2);
Json::Value result = this->CallMethod("eth_getTransactionCount",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-16 11:06:24 +00:00
}
2015-03-05 00:34:02 +00:00
std::string eth_getBlockTransactionCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
2015-03-05 00:34:02 +00:00
Json::Value result = this->CallMethod("eth_getBlockTransactionCountByHash",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-05 00:34:02 +00:00
std::string eth_getBlockTransactionCountByNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
2015-03-05 00:34:02 +00:00
Json::Value result = this->CallMethod("eth_getBlockTransactionCountByNumber",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-05 01:02:42 +00:00
std::string eth_getUncleCountByBlockHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
2015-03-05 01:02:42 +00:00
Json::Value result = this->CallMethod("eth_getUncleCountByBlockHash",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-05 01:02:42 +00:00
std::string eth_getUncleCountByBlockNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
2015-03-05 01:02:42 +00:00
Json::Value result = this->CallMethod("eth_getUncleCountByBlockNumber",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-16 11:06:24 +00:00
}
2015-03-05 01:02:42 +00:00
std::string eth_getData(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-28 10:39:55 +00:00
{
Json::Value p;
p.append(param1);
2015-03-05 01:02:42 +00:00
p.append(param2);
Json::Value result = this->CallMethod("eth_getData",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 10:39:55 +00:00
}
2015-03-05 01:02:42 +00:00
std::string eth_sendTransaction(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
2014-10-28 12:25:31 +00:00
{
Json::Value p;
p.append(param1);
2015-03-05 01:02:42 +00:00
Json::Value result = this->CallMethod("eth_sendTransaction",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 12:25:31 +00:00
}
2015-03-10 10:40:30 +00:00
std::string eth_call(const Json::Value& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-14 15:24:51 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p.append(param1);
2015-03-10 10:40:30 +00:00
p.append(param2);
Json::Value result = this->CallMethod("eth_call",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-14 15:24:51 +00:00
}
bool eth_flush() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->CallMethod("eth_flush",p);
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-05 11:19:16 +00:00
Json::Value eth_getBlockByHash(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p.append(param1);
2015-03-05 11:19:16 +00:00
p.append(param2);
2015-03-05 01:02:42 +00:00
Json::Value result = this->CallMethod("eth_getBlockByHash",p);
2014-11-03 15:54:03 +00:00
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-23 10:04:26 +00:00
}
2015-03-05 11:19:16 +00:00
Json::Value eth_getBlockByNumber(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
2014-10-23 10:04:26 +00:00
{
Json::Value p;
p.append(param1);
2015-03-05 11:19:16 +00:00
p.append(param2);
2015-03-05 01:02:42 +00:00
Json::Value result = this->CallMethod("eth_getBlockByNumber",p);
2014-11-03 15:54:03 +00:00
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-14 15:24:51 +00:00
}
2015-03-05 09:12:01 +00:00
Json::Value eth_getTransactionByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_getTransactionByHash",p);
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value eth_getTransactionByBlockHashAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-14 15:24:51 +00:00
{
Json::Value p;
2014-10-23 10:04:26 +00:00
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_getTransactionByBlockHashAndIndex",p);
2014-11-03 15:54:03 +00:00
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 09:12:01 +00:00
Json::Value eth_getTransactionByBlockNumberAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-28 12:25:31 +00:00
{
Json::Value p;
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_getTransactionByBlockNumberAndIndex",p);
2014-11-03 15:54:03 +00:00
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 12:25:31 +00:00
}
2015-03-05 09:12:01 +00:00
Json::Value eth_getUncleByBlockHashAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-28 12:25:31 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p.append(param1);
p.append(param2);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_getUncleByBlockHashAndIndex",p);
2014-11-03 15:54:03 +00:00
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 12:25:31 +00:00
}
2015-03-05 09:12:01 +00:00
Json::Value eth_getUncleByBlockNumberAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p.append(param1);
p.append(param2);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_getUncleByBlockNumberAndIndex",p);
2014-11-03 15:54:03 +00:00
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-16 15:21:26 +00:00
}
2015-03-05 09:12:01 +00:00
Json::Value eth_getCompilers() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_getCompilers",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-05 09:12:01 +00:00
std::string eth_compileLLL(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
p.append(param1);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_compileLLL",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 09:12:01 +00:00
std::string eth_compileSerpent(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p.append(param1);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_compileSerpent",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 09:12:01 +00:00
std::string eth_compileSolidity(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-28 12:25:31 +00:00
{
Json::Value p;
p.append(param1);
2015-03-05 09:12:01 +00:00
Json::Value result = this->CallMethod("eth_compileSolidity",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
std::string eth_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
2014-10-28 12:25:31 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_newFilter",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 12:25:31 +00:00
}
std::string eth_newBlockFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-28 10:39:55 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_newBlockFilter",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 10:39:55 +00:00
}
bool eth_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-28 10:39:55 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_uninstallFilter",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-28 10:39:55 +00:00
}
Json::Value eth_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p.append(param1);
Json::Value result = this->CallMethod("eth_getFilterChanges",p);
if (result.isArray())
return result;
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-14 19:53:11 +00:00
}
Json::Value eth_getFilterLogs(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-27 16:06:14 +00:00
{
Json::Value p;
p.append(param1);
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());
2014-10-27 16:06:14 +00:00
}
Json::Value eth_getLogs(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
2014-10-27 16:06:14 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_getLogs",p);
2014-11-03 15:54:03 +00:00
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-27 16:06:14 +00:00
}
2015-02-07 11:10:39 +00:00
Json::Value eth_getWork() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->CallMethod("eth_getWork",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2015-03-04 10:55:22 +00:00
bool eth_submitWork(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2015-02-07 11:10:39 +00:00
{
Json::Value p;
p.append(param1);
2015-03-04 10:55:22 +00:00
p.append(param2);
2015-02-07 11:10:39 +00:00
Json::Value result = this->CallMethod("eth_submitWork",p);
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
std::string eth_register(const std::string& param1) throw (jsonrpc::JsonRpcException)
2015-02-19 14:13:03 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_register",p);
if (result.isString())
return result.asString();
2015-02-19 14:13:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
bool eth_unregister(const std::string& param1) throw (jsonrpc::JsonRpcException)
2015-02-19 14:13:03 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_unregister",p);
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value eth_fetchQueuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException)
2015-02-19 14:13:03 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_fetchQueuedTransactions",p);
2015-02-19 14:13:03 +00:00
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
bool db_put(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
p.append(param3);
Json::Value result = this->CallMethod("db_put",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
std::string db_get(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
Json::Value result = this->CallMethod("db_get",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
bool shh_post(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
2014-10-29 10:42:15 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("shh_post",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-29 10:42:15 +00:00
}
std::string shh_newIdentity() throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-11-03 15:54:03 +00:00
p = Json::nullValue;
Json::Value result = this->CallMethod("shh_newIdentity",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
bool shh_hasIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p.append(param1);
Json::Value result = this->CallMethod("shh_hasIdentity",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
std::string shh_newGroup(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
Json::Value result = this->CallMethod("shh_newGroup",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
std::string shh_addToGroup(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
2014-11-03 15:54:03 +00:00
p.append(param2);
Json::Value result = this->CallMethod("shh_addToGroup",p);
2014-11-03 15:54:03 +00:00
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
std::string shh_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p.append(param1);
Json::Value result = this->CallMethod("shh_newFilter",p);
if (result.isString())
return result.asString();
2014-11-03 15:54:03 +00:00
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
bool shh_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-22 09:47:45 +00:00
p.append(param1);
Json::Value result = this->CallMethod("shh_uninstallFilter",p);
2014-11-03 15:54:03 +00:00
if (result.isBool())
return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
2015-03-05 19:32:18 +00:00
Json::Value shh_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
2014-10-13 09:22:28 +00:00
{
Json::Value p;
2014-10-23 10:04:26 +00:00
p.append(param1);
2015-03-05 19:32:18 +00:00
Json::Value result = this->CallMethod("shh_getFilterChanges",p);
2014-11-03 15:54:03 +00:00
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
2014-10-13 09:22:28 +00:00
}
Json::Value shh_getMessages(const std::string& param1) throw (jsonrpc::JsonRpcException)
2015-02-16 17:03:40 +00:00
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("shh_getMessages",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
2014-10-13 09:22:28 +00:00
};
2014-11-03 15:54:03 +00:00
#endif //JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_