Added SGXWalletServer.hpp

parent fdb3d9b0
...@@ -23,47 +23,13 @@ ...@@ -23,47 +23,13 @@
#include "RPCException.h" #include "RPCException.h"
#include "LevelDB.h" #include "LevelDB.h"
#include "SGXWalletServer.h" #include "SGXWalletServer.h"
#include "SGXWalletServer.hpp"
using namespace jsonrpc;
using namespace std;
class SGXWalletServer : public AbstractStubServer {
public:
SGXWalletServer(AbstractServerConnector &connector, serverVersion_t type);
virtual void notifyServer();
virtual std::string sayHello(const std::string &name);
virtual int addNumbers(int param1, int param2);
virtual double addNumbers2(double param1, double param2);
virtual bool isEqual(const std::string &str1, const std::string &str2);
virtual Json::Value buildObject(const std::string &name, int age);
virtual std::string methodWithoutParameters();
virtual Json::Value importBLSKeyShare(int index, const std::string& keyShare, const std::string& keyShareName, int n, int t);
virtual Json::Value blsSignMessageHash(const std::string& keyShareName, const std::string& messageHash);
virtual Json::Value importECDSAKey(const std::string& key, const std::string& keyName);
virtual Json::Value generateECDSAKey(const std::string& keyName);
virtual Json::Value ecdsaSignMessageHash(const std::string& keyShareName, const std::string& messageHash);
void writeKeyShare(const string& _keyShare, const string& value);
shared_ptr<std::string> readKeyShare(const string& _keyShare);
void writeECDSAKey(const string& _key, const string& value);
shared_ptr<std::string> readECDSAKey(const string& _key);
};
SGXWalletServer::SGXWalletServer(AbstractServerConnector &connector, SGXWalletServer::SGXWalletServer(AbstractServerConnector &connector,
serverVersion_t type) serverVersion_t type)
: AbstractStubServer(connector, type) {} : AbstractStubServer(connector, type) {}
......
...@@ -15,4 +15,10 @@ ...@@ -15,4 +15,10 @@
EXTERNC int init_server(); EXTERNC int init_server();
#endif //SGXWALLET_SGXWALLETSERVER_H #endif //SGXWALLET_SGXWALLETSERVER_H
#ifndef SGXWALLET_SGXWALLETSERVER_HPP
#define SGXWALLET_SGXWALLETSERVER_HPP
using namespace jsonrpc;
using namespace std;
class SGXWalletServer : public AbstractStubServer {
public:
SGXWalletServer(AbstractServerConnector &connector, serverVersion_t type);
virtual void notifyServer();
virtual std::string sayHello(const std::string &name);
virtual int addNumbers(int param1, int param2);
virtual double addNumbers2(double param1, double param2);
virtual bool isEqual(const std::string &str1, const std::string &str2);
virtual Json::Value buildObject(const std::string &name, int age);
virtual std::string methodWithoutParameters();
virtual Json::Value importBLSKeyShare(int index, const std::string& keyShare, const std::string& keyShareName, int n, int t);
virtual Json::Value blsSignMessageHash(const std::string& keyShareName, const std::string& messageHash);
virtual Json::Value importECDSAKey(const std::string& key, const std::string& keyName);
virtual Json::Value generateECDSAKey(const std::string& keyName);
virtual Json::Value ecdsaSignMessageHash(const std::string& keyShareName, const std::string& messageHash);
void writeKeyShare(const string& _keyShare, const string& value);
shared_ptr<std::string> readKeyShare(const string& _keyShare);
void writeECDSAKey(const string& _key, const string& value);
shared_ptr<std::string> readECDSAKey(const string& _key);
};
#endif //SGXWALLET_SGXWALLETSERVER_HPP
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment