Fabcoin Core  0.16.2
P2P Digital Currency
WebThreeStubClient.h
Go to the documentation of this file.
1 
5 #ifndef JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_
6 #define JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_
7 
8 #include <jsonrpccpp/client.h>
9 
10 class WebThreeStubClient : public jsonrpc::Client
11 {
12  public:
13  WebThreeStubClient(jsonrpc::IClientConnector &conn, jsonrpc::clientVersion_t type = jsonrpc::JSONRPC_CLIENT_V2) : jsonrpc::Client(conn, type) {}
14 
15  std::string web3_sha3(const std::string& param1) throw (jsonrpc::JsonRpcException)
16  {
17  Json::Value p;
18  p.append(param1);
19  Json::Value result = this->CallMethod("web3_sha3",p);
20  if (result.isString())
21  return result.asString();
22  else
23  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
24  }
25  std::string web3_clientVersion() throw (jsonrpc::JsonRpcException)
26  {
27  Json::Value p;
28  p = Json::nullValue;
29  Json::Value result = this->CallMethod("web3_clientVersion",p);
30  if (result.isString())
31  return result.asString();
32  else
33  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
34  }
35  std::string net_version() throw (jsonrpc::JsonRpcException)
36  {
37  Json::Value p;
38  p = Json::nullValue;
39  Json::Value result = this->CallMethod("net_version",p);
40  if (result.isString())
41  return result.asString();
42  else
43  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
44  }
45  std::string net_peerCount() throw (jsonrpc::JsonRpcException)
46  {
47  Json::Value p;
48  p = Json::nullValue;
49  Json::Value result = this->CallMethod("net_peerCount",p);
50  if (result.isString())
51  return result.asString();
52  else
53  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
54  }
55  bool net_listening() throw (jsonrpc::JsonRpcException)
56  {
57  Json::Value p;
58  p = Json::nullValue;
59  Json::Value result = this->CallMethod("net_listening",p);
60  if (result.isBool())
61  return result.asBool();
62  else
63  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
64  }
65  std::string eth_protocolVersion() throw (jsonrpc::JsonRpcException)
66  {
67  Json::Value p;
68  p = Json::nullValue;
69  Json::Value result = this->CallMethod("eth_protocolVersion",p);
70  if (result.isString())
71  return result.asString();
72  else
73  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
74  }
75  std::string eth_hashrate() throw (jsonrpc::JsonRpcException)
76  {
77  Json::Value p;
78  p = Json::nullValue;
79  Json::Value result = this->CallMethod("eth_hashrate",p);
80  if (result.isString())
81  return result.asString();
82  else
83  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
84  }
85  std::string eth_coinbase() throw (jsonrpc::JsonRpcException)
86  {
87  Json::Value p;
88  p = Json::nullValue;
89  Json::Value result = this->CallMethod("eth_coinbase",p);
90  if (result.isString())
91  return result.asString();
92  else
93  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
94  }
95  bool eth_mining() throw (jsonrpc::JsonRpcException)
96  {
97  Json::Value p;
98  p = Json::nullValue;
99  Json::Value result = this->CallMethod("eth_mining",p);
100  if (result.isBool())
101  return result.asBool();
102  else
103  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
104  }
105  std::string eth_gasPrice() throw (jsonrpc::JsonRpcException)
106  {
107  Json::Value p;
108  p = Json::nullValue;
109  Json::Value result = this->CallMethod("eth_gasPrice",p);
110  if (result.isString())
111  return result.asString();
112  else
113  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
114  }
115  Json::Value eth_accounts() throw (jsonrpc::JsonRpcException)
116  {
117  Json::Value p;
118  p = Json::nullValue;
119  Json::Value result = this->CallMethod("eth_accounts",p);
120  if (result.isArray())
121  return result;
122  else
123  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
124  }
125  std::string eth_blockNumber() throw (jsonrpc::JsonRpcException)
126  {
127  Json::Value p;
128  p = Json::nullValue;
129  Json::Value result = this->CallMethod("eth_blockNumber",p);
130  if (result.isString())
131  return result.asString();
132  else
133  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
134  }
135  std::string eth_getBalance(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
136  {
137  Json::Value p;
138  p.append(param1);
139  p.append(param2);
140  Json::Value result = this->CallMethod("eth_getBalance",p);
141  if (result.isString())
142  return result.asString();
143  else
144  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
145  }
146  std::string eth_getStorageAt(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
147  {
148  Json::Value p;
149  p.append(param1);
150  p.append(param2);
151  p.append(param3);
152  Json::Value result = this->CallMethod("eth_getStorageAt",p);
153  if (result.isString())
154  return result.asString();
155  else
156  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
157  }
158  std::string eth_getTransactionCount(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
159  {
160  Json::Value p;
161  p.append(param1);
162  p.append(param2);
163  Json::Value result = this->CallMethod("eth_getTransactionCount",p);
164  if (result.isString())
165  return result.asString();
166  else
167  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
168  }
169  Json::Value eth_getBlockTransactionCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
170  {
171  Json::Value p;
172  p.append(param1);
173  Json::Value result = this->CallMethod("eth_getBlockTransactionCountByHash",p);
174  if (result.isObject())
175  return result;
176  else
177  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
178  }
179  Json::Value eth_getBlockTransactionCountByNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
180  {
181  Json::Value p;
182  p.append(param1);
183  Json::Value result = this->CallMethod("eth_getBlockTransactionCountByNumber",p);
184  if (result.isObject())
185  return result;
186  else
187  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
188  }
189  Json::Value eth_getUncleCountByBlockHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
190  {
191  Json::Value p;
192  p.append(param1);
193  Json::Value result = this->CallMethod("eth_getUncleCountByBlockHash",p);
194  if (result.isObject())
195  return result;
196  else
197  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
198  }
199  Json::Value eth_getUncleCountByBlockNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
200  {
201  Json::Value p;
202  p.append(param1);
203  Json::Value result = this->CallMethod("eth_getUncleCountByBlockNumber",p);
204  if (result.isObject())
205  return result;
206  else
207  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
208  }
209  std::string eth_getCode(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
210  {
211  Json::Value p;
212  p.append(param1);
213  p.append(param2);
214  Json::Value result = this->CallMethod("eth_getCode",p);
215  if (result.isString())
216  return result.asString();
217  else
218  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
219  }
220  std::string eth_sendTransaction(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
221  {
222  Json::Value p;
223  p.append(param1);
224  Json::Value result = this->CallMethod("eth_sendTransaction",p);
225  if (result.isString())
226  return result.asString();
227  else
228  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
229  }
230  std::string eth_call(const Json::Value& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
231  {
232  Json::Value p;
233  p.append(param1);
234  p.append(param2);
235  Json::Value result = this->CallMethod("eth_call",p);
236  if (result.isString())
237  return result.asString();
238  else
239  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
240  }
241  bool eth_flush() throw (jsonrpc::JsonRpcException)
242  {
243  Json::Value p;
244  p = Json::nullValue;
245  Json::Value result = this->CallMethod("eth_flush",p);
246  if (result.isBool())
247  return result.asBool();
248  else
249  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
250  }
251  Json::Value eth_getBlockByHash(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
252  {
253  Json::Value p;
254  p.append(param1);
255  p.append(param2);
256  Json::Value result = this->CallMethod("eth_getBlockByHash",p);
257  if (result.isObject())
258  return result;
259  else
260  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
261  }
262  Json::Value eth_getBlockByNumber(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
263  {
264  Json::Value p;
265  p.append(param1);
266  p.append(param2);
267  Json::Value result = this->CallMethod("eth_getBlockByNumber",p);
268  if (result.isObject())
269  return result;
270  else
271  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
272  }
273  Json::Value eth_getTransactionByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
274  {
275  Json::Value p;
276  p.append(param1);
277  Json::Value result = this->CallMethod("eth_getTransactionByHash",p);
278  if (result.isObject())
279  return result;
280  else
281  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
282  }
283  Json::Value eth_getTransactionByBlockHashAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
284  {
285  Json::Value p;
286  p.append(param1);
287  p.append(param2);
288  Json::Value result = this->CallMethod("eth_getTransactionByBlockHashAndIndex",p);
289  if (result.isObject())
290  return result;
291  else
292  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
293  }
294  Json::Value eth_getTransactionByBlockNumberAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
295  {
296  Json::Value p;
297  p.append(param1);
298  p.append(param2);
299  Json::Value result = this->CallMethod("eth_getTransactionByBlockNumberAndIndex",p);
300  if (result.isObject())
301  return result;
302  else
303  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
304  }
305  Json::Value eth_getTransactionReceipt(const std::string& param1) throw (jsonrpc::JsonRpcException)
306  {
307  Json::Value p;
308  p.append(param1);
309  Json::Value result = this->CallMethod("eth_getTransactionReceipt",p);
310  if (result.isObject())
311  return result;
312  else
313  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
314  }
315  Json::Value eth_getUncleByBlockHashAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
316  {
317  Json::Value p;
318  p.append(param1);
319  p.append(param2);
320  Json::Value result = this->CallMethod("eth_getUncleByBlockHashAndIndex",p);
321  if (result.isObject())
322  return result;
323  else
324  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
325  }
326  Json::Value eth_getUncleByBlockNumberAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
327  {
328  Json::Value p;
329  p.append(param1);
330  p.append(param2);
331  Json::Value result = this->CallMethod("eth_getUncleByBlockNumberAndIndex",p);
332  if (result.isObject())
333  return result;
334  else
335  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
336  }
337  std::string eth_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
338  {
339  Json::Value p;
340  p.append(param1);
341  Json::Value result = this->CallMethod("eth_newFilter",p);
342  if (result.isString())
343  return result.asString();
344  else
345  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
346  }
347  std::string eth_newFilterEx(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
348  {
349  Json::Value p;
350  p.append(param1);
351  Json::Value result = this->CallMethod("eth_newFilterEx",p);
352  if (result.isString())
353  return result.asString();
354  else
355  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
356  }
357  std::string eth_newBlockFilter() throw (jsonrpc::JsonRpcException)
358  {
359  Json::Value p;
360  p = Json::nullValue;
361  Json::Value result = this->CallMethod("eth_newBlockFilter",p);
362  if (result.isString())
363  return result.asString();
364  else
365  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
366  }
367  std::string eth_newPendingTransactionFilter() throw (jsonrpc::JsonRpcException)
368  {
369  Json::Value p;
370  p = Json::nullValue;
371  Json::Value result = this->CallMethod("eth_newPendingTransactionFilter",p);
372  if (result.isString())
373  return result.asString();
374  else
375  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
376  }
377  bool eth_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
378  {
379  Json::Value p;
380  p.append(param1);
381  Json::Value result = this->CallMethod("eth_uninstallFilter",p);
382  if (result.isBool())
383  return result.asBool();
384  else
385  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
386  }
387  Json::Value eth_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
388  {
389  Json::Value p;
390  p.append(param1);
391  Json::Value result = this->CallMethod("eth_getFilterChanges",p);
392  if (result.isArray())
393  return result;
394  else
395  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
396  }
397  Json::Value eth_getFilterChangesEx(const std::string& param1) throw (jsonrpc::JsonRpcException)
398  {
399  Json::Value p;
400  p.append(param1);
401  Json::Value result = this->CallMethod("eth_getFilterChangesEx",p);
402  if (result.isArray())
403  return result;
404  else
405  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
406  }
407  Json::Value eth_getFilterLogs(const std::string& param1) throw (jsonrpc::JsonRpcException)
408  {
409  Json::Value p;
410  p.append(param1);
411  Json::Value result = this->CallMethod("eth_getFilterLogs",p);
412  if (result.isArray())
413  return result;
414  else
415  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
416  }
417  Json::Value eth_getFilterLogsEx(const std::string& param1) throw (jsonrpc::JsonRpcException)
418  {
419  Json::Value p;
420  p.append(param1);
421  Json::Value result = this->CallMethod("eth_getFilterLogsEx",p);
422  if (result.isArray())
423  return result;
424  else
425  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
426  }
427  Json::Value eth_getLogs(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
428  {
429  Json::Value p;
430  p.append(param1);
431  Json::Value result = this->CallMethod("eth_getLogs",p);
432  if (result.isArray())
433  return result;
434  else
435  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
436  }
437  Json::Value eth_getLogsEx(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
438  {
439  Json::Value p;
440  p.append(param1);
441  Json::Value result = this->CallMethod("eth_getLogsEx",p);
442  if (result.isArray())
443  return result;
444  else
445  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
446  }
447  Json::Value eth_getWork() throw (jsonrpc::JsonRpcException)
448  {
449  Json::Value p;
450  p = Json::nullValue;
451  Json::Value result = this->CallMethod("eth_getWork",p);
452  if (result.isArray())
453  return result;
454  else
455  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
456  }
457  bool eth_submitWork(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
458  {
459  Json::Value p;
460  p.append(param1);
461  p.append(param2);
462  p.append(param3);
463  Json::Value result = this->CallMethod("eth_submitWork",p);
464  if (result.isBool())
465  return result.asBool();
466  else
467  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
468  }
469  bool eth_submitHashrate(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
470  {
471  Json::Value p;
472  p.append(param1);
473  p.append(param2);
474  Json::Value result = this->CallMethod("eth_submitHashrate",p);
475  if (result.isBool())
476  return result.asBool();
477  else
478  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
479  }
480  std::string eth_register(const std::string& param1) throw (jsonrpc::JsonRpcException)
481  {
482  Json::Value p;
483  p.append(param1);
484  Json::Value result = this->CallMethod("eth_register",p);
485  if (result.isString())
486  return result.asString();
487  else
488  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
489  }
490  bool eth_unregister(const std::string& param1) throw (jsonrpc::JsonRpcException)
491  {
492  Json::Value p;
493  p.append(param1);
494  Json::Value result = this->CallMethod("eth_unregister",p);
495  if (result.isBool())
496  return result.asBool();
497  else
498  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
499  }
500  Json::Value eth_fetchQueuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException)
501  {
502  Json::Value p;
503  p.append(param1);
504  Json::Value result = this->CallMethod("eth_fetchQueuedTransactions",p);
505  if (result.isArray())
506  return result;
507  else
508  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
509  }
510  std::string eth_signTransaction(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
511  {
512  Json::Value p;
513  p.append(param1);
514  Json::Value result = this->CallMethod("eth_signTransaction",p);
515  if (result.isString())
516  return result.asString();
517  else
518  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
519  }
520  Json::Value eth_inspectTransaction(const std::string& param1) throw (jsonrpc::JsonRpcException)
521  {
522  Json::Value p;
523  p.append(param1);
524  Json::Value result = this->CallMethod("eth_inspectTransaction",p);
525  if (result.isObject())
526  return result;
527  else
528  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
529  }
530  std::string eth_sendRawTransaction(const std::string& param1) throw (jsonrpc::JsonRpcException)
531  {
532  Json::Value p;
533  p.append(param1);
534  Json::Value result = this->CallMethod("eth_sendRawTransaction",p);
535  if (result.isString())
536  return result.asString();
537  else
538  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
539  }
540  bool eth_notePassword(const std::string& param1) throw (jsonrpc::JsonRpcException)
541  {
542  Json::Value p;
543  p.append(param1);
544  Json::Value result = this->CallMethod("eth_notePassword",p);
545  if (result.isBool())
546  return result.asBool();
547  else
548  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
549  }
550  bool db_put(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
551  {
552  Json::Value p;
553  p.append(param1);
554  p.append(param2);
555  p.append(param3);
556  Json::Value result = this->CallMethod("db_put",p);
557  if (result.isBool())
558  return result.asBool();
559  else
560  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
561  }
562  std::string db_get(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
563  {
564  Json::Value p;
565  p.append(param1);
566  p.append(param2);
567  Json::Value result = this->CallMethod("db_get",p);
568  if (result.isString())
569  return result.asString();
570  else
571  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
572  }
573  bool shh_post(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
574  {
575  Json::Value p;
576  p.append(param1);
577  Json::Value result = this->CallMethod("shh_post",p);
578  if (result.isBool())
579  return result.asBool();
580  else
581  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
582  }
583  std::string shh_newIdentity() throw (jsonrpc::JsonRpcException)
584  {
585  Json::Value p;
586  p = Json::nullValue;
587  Json::Value result = this->CallMethod("shh_newIdentity",p);
588  if (result.isString())
589  return result.asString();
590  else
591  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
592  }
593  bool shh_hasIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
594  {
595  Json::Value p;
596  p.append(param1);
597  Json::Value result = this->CallMethod("shh_hasIdentity",p);
598  if (result.isBool())
599  return result.asBool();
600  else
601  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
602  }
603  std::string shh_newGroup(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
604  {
605  Json::Value p;
606  p.append(param1);
607  p.append(param2);
608  Json::Value result = this->CallMethod("shh_newGroup",p);
609  if (result.isString())
610  return result.asString();
611  else
612  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
613  }
614  std::string shh_addToGroup(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
615  {
616  Json::Value p;
617  p.append(param1);
618  p.append(param2);
619  Json::Value result = this->CallMethod("shh_addToGroup",p);
620  if (result.isString())
621  return result.asString();
622  else
623  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
624  }
625  std::string shh_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
626  {
627  Json::Value p;
628  p.append(param1);
629  Json::Value result = this->CallMethod("shh_newFilter",p);
630  if (result.isString())
631  return result.asString();
632  else
633  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
634  }
635  bool shh_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
636  {
637  Json::Value p;
638  p.append(param1);
639  Json::Value result = this->CallMethod("shh_uninstallFilter",p);
640  if (result.isBool())
641  return result.asBool();
642  else
643  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
644  }
645  Json::Value shh_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
646  {
647  Json::Value p;
648  p.append(param1);
649  Json::Value result = this->CallMethod("shh_getFilterChanges",p);
650  if (result.isArray())
651  return result;
652  else
653  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
654  }
655  Json::Value shh_getMessages(const std::string& param1) throw (jsonrpc::JsonRpcException)
656  {
657  Json::Value p;
658  p.append(param1);
659  Json::Value result = this->CallMethod("shh_getMessages",p);
660  if (result.isArray())
661  return result;
662  else
663  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
664  }
665  bool admin_web3_setVerbosity(int param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
666  {
667  Json::Value p;
668  p.append(param1);
669  p.append(param2);
670  Json::Value result = this->CallMethod("admin_web3_setVerbosity",p);
671  if (result.isBool())
672  return result.asBool();
673  else
674  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
675  }
676  bool admin_net_start(const std::string& param1) throw (jsonrpc::JsonRpcException)
677  {
678  Json::Value p;
679  p.append(param1);
680  Json::Value result = this->CallMethod("admin_net_start",p);
681  if (result.isBool())
682  return result.asBool();
683  else
684  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
685  }
686  bool admin_net_stop(const std::string& param1) throw (jsonrpc::JsonRpcException)
687  {
688  Json::Value p;
689  p.append(param1);
690  Json::Value result = this->CallMethod("admin_net_stop",p);
691  if (result.isBool())
692  return result.asBool();
693  else
694  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
695  }
696  bool admin_net_connect(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
697  {
698  Json::Value p;
699  p.append(param1);
700  p.append(param2);
701  Json::Value result = this->CallMethod("admin_net_connect",p);
702  if (result.isBool())
703  return result.asBool();
704  else
705  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
706  }
707  Json::Value admin_net_peers(const std::string& param1) throw (jsonrpc::JsonRpcException)
708  {
709  Json::Value p;
710  p.append(param1);
711  Json::Value result = this->CallMethod("admin_net_peers",p);
712  if (result.isArray())
713  return result;
714  else
715  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
716  }
717  Json::Value admin_eth_blockQueueStatus(const std::string& param1) throw (jsonrpc::JsonRpcException)
718  {
719  Json::Value p;
720  p.append(param1);
721  Json::Value result = this->CallMethod("admin_eth_blockQueueStatus",p);
722  if (result.isObject())
723  return result;
724  else
725  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
726  }
727  Json::Value admin_net_nodeInfo(const std::string& param1) throw (jsonrpc::JsonRpcException)
728  {
729  Json::Value p;
730  p.append(param1);
731  Json::Value result = this->CallMethod("admin_net_nodeInfo",p);
732  if (result.isObject())
733  return result;
734  else
735  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
736  }
737  bool admin_eth_exit(const std::string& param1) throw (jsonrpc::JsonRpcException)
738  {
739  Json::Value p;
740  p.append(param1);
741  Json::Value result = this->CallMethod("admin_eth_exit",p);
742  if (result.isBool())
743  return result.asBool();
744  else
745  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
746  }
747  bool admin_eth_setAskPrice(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
748  {
749  Json::Value p;
750  p.append(param1);
751  p.append(param2);
752  Json::Value result = this->CallMethod("admin_eth_setAskPrice",p);
753  if (result.isBool())
754  return result.asBool();
755  else
756  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
757  }
758  bool admin_eth_setBidPrice(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
759  {
760  Json::Value p;
761  p.append(param1);
762  p.append(param2);
763  Json::Value result = this->CallMethod("admin_eth_setBidPrice",p);
764  if (result.isBool())
765  return result.asBool();
766  else
767  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
768  }
769  bool admin_eth_setReferencePrice(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
770  {
771  Json::Value p;
772  p.append(param1);
773  p.append(param2);
774  Json::Value result = this->CallMethod("admin_eth_setReferencePrice",p);
775  if (result.isBool())
776  return result.asBool();
777  else
778  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
779  }
780  bool admin_eth_setPriority(int param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
781  {
782  Json::Value p;
783  p.append(param1);
784  p.append(param2);
785  Json::Value result = this->CallMethod("admin_eth_setPriority",p);
786  if (result.isBool())
787  return result.asBool();
788  else
789  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
790  }
791  bool admin_eth_setMining(bool param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
792  {
793  Json::Value p;
794  p.append(param1);
795  p.append(param2);
796  Json::Value result = this->CallMethod("admin_eth_setMining",p);
797  if (result.isBool())
798  return result.asBool();
799  else
800  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
801  }
802  Json::Value admin_eth_findBlock(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
803  {
804  Json::Value p;
805  p.append(param1);
806  p.append(param2);
807  Json::Value result = this->CallMethod("admin_eth_findBlock",p);
808  if (result.isObject())
809  return result;
810  else
811  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
812  }
813  std::string admin_eth_blockQueueFirstUnknown(const std::string& param1) throw (jsonrpc::JsonRpcException)
814  {
815  Json::Value p;
816  p.append(param1);
817  Json::Value result = this->CallMethod("admin_eth_blockQueueFirstUnknown",p);
818  if (result.isString())
819  return result.asString();
820  else
821  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
822  }
823  bool admin_eth_blockQueueRetryUnknown(const std::string& param1) throw (jsonrpc::JsonRpcException)
824  {
825  Json::Value p;
826  p.append(param1);
827  Json::Value result = this->CallMethod("admin_eth_blockQueueRetryUnknown",p);
828  if (result.isBool())
829  return result.asBool();
830  else
831  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
832  }
833  Json::Value admin_eth_allAccounts(const std::string& param1) throw (jsonrpc::JsonRpcException)
834  {
835  Json::Value p;
836  p.append(param1);
837  Json::Value result = this->CallMethod("admin_eth_allAccounts",p);
838  if (result.isArray())
839  return result;
840  else
841  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
842  }
843  Json::Value admin_eth_newAccount(const Json::Value& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
844  {
845  Json::Value p;
846  p.append(param1);
847  p.append(param2);
848  Json::Value result = this->CallMethod("admin_eth_newAccount",p);
849  if (result.isObject())
850  return result;
851  else
852  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
853  }
854  bool admin_eth_setSigningKey(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
855  {
856  Json::Value p;
857  p.append(param1);
858  p.append(param2);
859  Json::Value result = this->CallMethod("admin_eth_setSigningKey",p);
860  if (result.isBool())
861  return result.asBool();
862  else
863  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
864  }
865  bool admin_eth_setMiningBenefactor(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
866  {
867  Json::Value p;
868  p.append(param1);
869  p.append(param2);
870  Json::Value result = this->CallMethod("admin_eth_setMiningBenefactor",p);
871  if (result.isBool())
872  return result.asBool();
873  else
874  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
875  }
876  Json::Value admin_eth_inspect(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
877  {
878  Json::Value p;
879  p.append(param1);
880  p.append(param2);
881  Json::Value result = this->CallMethod("admin_eth_inspect",p);
882  if (result.isObject())
883  return result;
884  else
885  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
886  }
887  Json::Value admin_eth_reprocess(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
888  {
889  Json::Value p;
890  p.append(param1);
891  p.append(param2);
892  Json::Value result = this->CallMethod("admin_eth_reprocess",p);
893  if (result.isObject())
894  return result;
895  else
896  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
897  }
898  Json::Value admin_eth_vmTrace(const std::string& param1, int param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
899  {
900  Json::Value p;
901  p.append(param1);
902  p.append(param2);
903  p.append(param3);
904  Json::Value result = this->CallMethod("admin_eth_vmTrace",p);
905  if (result.isObject())
906  return result;
907  else
908  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
909  }
910  Json::Value admin_eth_getReceiptByHashAndIndex(const std::string& param1, int param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
911  {
912  Json::Value p;
913  p.append(param1);
914  p.append(param2);
915  p.append(param3);
916  Json::Value result = this->CallMethod("admin_eth_getReceiptByHashAndIndex",p);
917  if (result.isObject())
918  return result;
919  else
920  throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
921  }
922 };
923 
924 #endif //JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_
Json::Value eth_getBlockByHash(const std::string &param1, bool param2)
Json::Value shh_getMessages(const std::string &param1)
std::string eth_sendRawTransaction(const std::string &param1)
Json::Value eth_getBlockTransactionCountByNumber(const std::string &param1)
std::string eth_newFilter(const Json::Value &param1)
bool admin_eth_blockQueueRetryUnknown(const std::string &param1)
std::string eth_getStorageAt(const std::string &param1, const std::string &param2, const std::string &param3)
Json::Value admin_eth_blockQueueStatus(const std::string &param1)
std::string web3_clientVersion()
std::string eth_signTransaction(const Json::Value &param1)
bool admin_eth_setMiningBenefactor(const std::string &param1, const std::string &param2)
std::string eth_coinbase()
bool shh_post(const Json::Value &param1)
bool admin_eth_exit(const std::string &param1)
Json::Value eth_getLogsEx(const Json::Value &param1)
Json::Value admin_eth_inspect(const std::string &param1, const std::string &param2)
Json::Value eth_getUncleByBlockNumberAndIndex(const std::string &param1, const std::string &param2)
Json::Value eth_getUncleByBlockHashAndIndex(const std::string &param1, const std::string &param2)
std::string eth_newBlockFilter()
bool admin_eth_setMining(bool param1, const std::string &param2)
Json::Value admin_eth_vmTrace(const std::string &param1, int param2, const std::string &param3)
std::string web3_sha3(const std::string &param1)
bool eth_submitWork(const std::string &param1, const std::string &param2, const std::string &param3)
Json::Value eth_fetchQueuedTransactions(const std::string &param1)
std::string eth_getBalance(const std::string &param1, const std::string &param2)
Json::Value eth_getTransactionByHash(const std::string &param1)
bool admin_net_start(const std::string &param1)
Config::Value_type Value
Json::Value eth_getFilterChangesEx(const std::string &param1)
bool db_put(const std::string &param1, const std::string &param2, const std::string &param3)
Json::Value admin_eth_newAccount(const Json::Value &param1, const std::string &param2)
std::string admin_eth_blockQueueFirstUnknown(const std::string &param1)
std::string shh_newFilter(const Json::Value &param1)
std::string eth_sendTransaction(const Json::Value &param1)
bool admin_eth_setReferencePrice(const std::string &param1, const std::string &param2)
std::string eth_protocolVersion()
Json::Value admin_eth_reprocess(const std::string &param1, const std::string &param2)
Json::Value eth_getBlockTransactionCountByHash(const std::string &param1)
bool admin_net_connect(const std::string &param1, const std::string &param2)
bool admin_eth_setPriority(int param1, const std::string &param2)
std::string shh_newIdentity()
Json::Value admin_net_nodeInfo(const std::string &param1)
std::string shh_addToGroup(const std::string &param1, const std::string &param2)
Json::Value eth_getWork()
std::string net_peerCount()
std::string eth_gasPrice()
std::string net_version()
bool admin_eth_setSigningKey(const std::string &param1, const std::string &param2)
Json::Value shh_getFilterChanges(const std::string &param1)
Json::Value admin_eth_findBlock(const std::string &param1, const std::string &param2)
std::string eth_call(const Json::Value &param1, const std::string &param2)
Json::Value eth_getUncleCountByBlockHash(const std::string &param1)
WebThreeStubClient(jsonrpc::IClientConnector &conn, jsonrpc::clientVersion_t type=jsonrpc::JSONRPC_CLIENT_V2)
Json::Value eth_getFilterLogs(const std::string &param1)
bool eth_submitHashrate(const std::string &param1, const std::string &param2)
std::string eth_getTransactionCount(const std::string &param1, const std::string &param2)
PlatformStyle::TableColorType type
Definition: rpcconsole.cpp:61
Json::Value eth_inspectTransaction(const std::string &param1)
This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
bool admin_net_stop(const std::string &param1)
bool eth_unregister(const std::string &param1)
bool eth_notePassword(const std::string &param1)
std::string eth_newFilterEx(const Json::Value &param1)
bool admin_eth_setAskPrice(const std::string &param1, const std::string &param2)
Json::Value eth_accounts()
Json::Value eth_getLogs(const Json::Value &param1)
Json::Value eth_getTransactionReceipt(const std::string &param1)
Json::Value admin_eth_allAccounts(const std::string &param1)
std::string shh_newGroup(const std::string &param1, const std::string &param2)
bool admin_eth_setBidPrice(const std::string &param1, const std::string &param2)
Json::Value admin_eth_getReceiptByHashAndIndex(const std::string &param1, int param2, const std::string &param3)
std::string eth_hashrate()
Json::Value eth_getBlockByNumber(const std::string &param1, bool param2)
Json::Value admin_net_peers(const std::string &param1)
bool shh_uninstallFilter(const std::string &param1)
std::string db_get(const std::string &param1, const std::string &param2)
bool eth_uninstallFilter(const std::string &param1)
Json::Value eth_getTransactionByBlockNumberAndIndex(const std::string &param1, const std::string &param2)
Json::Value eth_getTransactionByBlockHashAndIndex(const std::string &param1, const std::string &param2)
Json::Value eth_getFilterLogsEx(const std::string &param1)
std::string eth_register(const std::string &param1)
std::string eth_getCode(const std::string &param1, const std::string &param2)
bool admin_web3_setVerbosity(int param1, const std::string &param2)
Json::Value eth_getFilterChanges(const std::string &param1)
std::string eth_newPendingTransactionFilter()
bool shh_hasIdentity(const std::string &param1)
std::string eth_blockNumber()
Json::Value eth_getUncleCountByBlockNumber(const std::string &param1)