PersonalFace.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
  3. */
  4. #ifndef JSONRPC_CPP_STUB_DEV_RPC_PERSONALFACE_H_
  5. #define JSONRPC_CPP_STUB_DEV_RPC_PERSONALFACE_H_
  6. #include "ModularServer.h"
  7. namespace dev {
  8. namespace rpc {
  9. class PersonalFace : public ServerInterface<PersonalFace>
  10. {
  11. public:
  12. PersonalFace()
  13. {
  14. this->bindAndAddMethod(jsonrpc::Procedure("personal_newAccount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::PersonalFace::personal_newAccountI);
  15. this->bindAndAddMethod(jsonrpc::Procedure("personal_unlockAccount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING,"param3",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::PersonalFace::personal_unlockAccountI);
  16. this->bindAndAddMethod(jsonrpc::Procedure("personal_signAndSendTransaction", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_OBJECT,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::PersonalFace::personal_signAndSendTransactionI);
  17. this->bindAndAddMethod(jsonrpc::Procedure("personal_sendTransaction", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_OBJECT,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::PersonalFace::personal_sendTransactionI);
  18. this->bindAndAddMethod(jsonrpc::Procedure("personal_listAccounts", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, NULL), &dev::rpc::PersonalFace::personal_listAccountsI);
  19. }
  20. inline virtual void personal_newAccountI(const Json::Value &request, Json::Value &response)
  21. {
  22. response = this->personal_newAccount(request[0u].asString());
  23. }
  24. inline virtual void personal_unlockAccountI(const Json::Value &request, Json::Value &response)
  25. {
  26. response = this->personal_unlockAccount(request[0u].asString(), request[1u].asString(), request[2u].asInt());
  27. }
  28. inline virtual void personal_signAndSendTransactionI(const Json::Value &request, Json::Value &response)
  29. {
  30. response = this->personal_signAndSendTransaction(request[0u], request[1u].asString());
  31. }
  32. inline virtual void personal_sendTransactionI(const Json::Value &request, Json::Value &response)
  33. {
  34. response = this->personal_sendTransaction(request[0u], request[1u].asString());
  35. }
  36. inline virtual void personal_listAccountsI(const Json::Value &request, Json::Value &response)
  37. {
  38. (void)request;
  39. response = this->personal_listAccounts();
  40. }
  41. virtual std::string personal_newAccount(const std::string& param1) = 0;
  42. virtual bool personal_unlockAccount(const std::string& param1, const std::string& param2, int param3) = 0;
  43. virtual std::string personal_signAndSendTransaction(const Json::Value& param1, const std::string& param2) = 0;
  44. virtual std::string personal_sendTransaction(const Json::Value& param1, const std::string& param2) = 0;
  45. virtual Json::Value personal_listAccounts() = 0;
  46. };
  47. }
  48. }
  49. #endif //JSONRPC_CPP_STUB_DEV_RPC_PERSONALFACE_H_