forked from bcosorg/bcos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Personal.h
38 lines (32 loc) · 1.07 KB
/
Personal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "PersonalFace.h"
namespace dev
{
namespace eth
{
class KeyManager;
class AccountHolder;
class Interface;
}
namespace rpc
{
class Personal: public dev::rpc::PersonalFace
{
public:
Personal(dev::eth::KeyManager& _keyManager, dev::eth::AccountHolder& _accountHolder, eth::Interface& _eth);
virtual RPCModules implementedModules() const override
{
return RPCModules{RPCModule{"personal", "1.0"}};
}
virtual std::string personal_newAccount(std::string const& _password) override;
virtual bool personal_unlockAccount(std::string const& _address, std::string const& _password, int _duration) override;
virtual std::string personal_signAndSendTransaction(Json::Value const& _transaction, std::string const& _password) override;
virtual std::string personal_sendTransaction(Json::Value const& _transaction, std::string const& _password) override;
virtual Json::Value personal_listAccounts() override;
private:
dev::eth::KeyManager& m_keyManager;
dev::eth::AccountHolder& m_accountHolder;
dev::eth::Interface& m_eth;
};
}
}