Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
dev::eth::SimpleAccountHolder Class Reference

#include <AccountHolder.h>

Inheritance diagram for dev::eth::SimpleAccountHolder:
[legend]
Collaboration diagram for dev::eth::SimpleAccountHolder:
[legend]

Public Member Functions

 SimpleAccountHolder (std::function< Interface *()> const &_client, std::function< std::string(Address)> const &_getPassword, KeyManager &_keyman, std::function< bool(TransactionSkeleton const &, bool)> _getAuthorisation=std::function< bool(TransactionSkeleton const &, bool)>())
 
AddressHash realAccounts () const override
 
TransactionNotification authenticate (dev::eth::TransactionSkeleton const &_t) override
 
virtual bool unlockAccount (Address const &_account, std::string const &_password, unsigned _duration) override
 Automatically authenticate all transactions for the given account for the next _duration seconds. More...
 

Private Attributes

std::function< std::string(Address)> m_getPassword
 
std::function< bool(TransactionSkeleton const &, bool)> m_getAuthorisation
 
KeyManagerm_keyManager
 
std::map< Address, std::pair< std::chrono::steady_clock::time_point, unsigned > > m_unlockedAccounts
 

Additional Inherited Members

Detailed Description

Definition at line 108 of file AccountHolder.h.

Constructor & Destructor Documentation

dev::eth::SimpleAccountHolder::SimpleAccountHolder ( std::function< Interface *()> const &  _client,
std::function< std::string(Address)> const &  _getPassword,
KeyManager _keyman,
std::function< bool(TransactionSkeleton const &, bool)>  _getAuthorisation = std::function<bool(TransactionSkeleton const&, bool)>() 
)
inline

Definition at line 111 of file AccountHolder.h.

Member Function Documentation

TransactionNotification SimpleAccountHolder::authenticate ( dev::eth::TransactionSkeleton const &  _t)
overridevirtual

Implements dev::eth::AccountHolder.

Definition at line 108 of file AccountHolder.cpp.

AddressHash SimpleAccountHolder::realAccounts ( ) const
overridevirtual

Implements dev::eth::AccountHolder.

Definition at line 103 of file AccountHolder.cpp.

bool SimpleAccountHolder::unlockAccount ( Address const &  ,
std::string const &  ,
unsigned   
)
overridevirtual

Automatically authenticate all transactions for the given account for the next _duration seconds.

Decrypt the key with _password if needed.

Returns
true on success. Only works for direct accounts.

Reimplemented from dev::eth::AccountHolder.

Definition at line 150 of file AccountHolder.cpp.

Member Data Documentation

std::function<bool(TransactionSkeleton const&, bool)> dev::eth::SimpleAccountHolder::m_getAuthorisation
private

Definition at line 125 of file AccountHolder.h.

std::function<std::string(Address)> dev::eth::SimpleAccountHolder::m_getPassword
private

Definition at line 124 of file AccountHolder.h.

KeyManager& dev::eth::SimpleAccountHolder::m_keyManager
private

Definition at line 126 of file AccountHolder.h.

std::map<Address, std::pair<std::chrono::steady_clock::time_point, unsigned> > dev::eth::SimpleAccountHolder::m_unlockedAccounts
private

Definition at line 127 of file AccountHolder.h.


The documentation for this class was generated from the following files: