Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
a46e2251
Unverified
Commit
a46e2251
authored
Sep 10, 2019
by
kladkogex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SGXWalletServer.hpp
parent
fdb3d9b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
35 deletions
+49
-35
SGXWalletServer.cpp
SGXWalletServer.cpp
+1
-35
SGXWalletServer.h
SGXWalletServer.h
+6
-0
SGXWalletServer.hpp
SGXWalletServer.hpp
+42
-0
No files found.
SGXWalletServer.cpp
View file @
a46e2251
...
...
@@ -23,47 +23,13 @@
#include "RPCException.h"
#include "LevelDB.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
,
serverVersion_t
type
)
:
AbstractStubServer
(
connector
,
type
)
{}
...
...
SGXWalletServer.h
View file @
a46e2251
...
...
@@ -15,4 +15,10 @@
EXTERNC
int
init_server
();
#endif //SGXWALLET_SGXWALLETSERVER_H
SGXWalletServer.hpp
0 → 100644
View file @
a46e2251
#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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment