1 #include <jsonrpccpp/common/exception.h> 17 m_keyManager(_keyManager),
18 m_accountHolder(_accountHolder),
25 KeyPair p = KeyManager::newKeyPair(KeyManager::NewKeyType::NoVanity);
39 BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS));
47 BOOST_THROW_EXCEPTION(JsonRpcException(
"Invalid password or account."));
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
virtual bool personal_unlockAccount(std::string const &_address, std::string const &_password, int _duration) override
Manages real accounts (where we know the secret key) and proxy accounts (where transactions to be sen...
Simple class that represents a "key pair".
h160 Address
An Ethereum address: 20 bytes.
virtual std::pair< h256, Address > submitTransaction(TransactionSkeleton const &_t, Secret const &_secret)=0
Submits a new transaction.
virtual bool unlockAccount(Address const &, std::string const &, unsigned)
Automatically authenticate all transactions for the given account for the next _duration seconds...
std::hash for asio::adress
Secret const & secret() const
TransactionSkeleton toTransactionSkeleton(Json::Value const &_json)
Secret secret(Address const &_address, std::function< std::string()> const &_pass=DontKnowThrow, bool _usePasswordCache=true) const
h128 import(Secret const &_s, std::string const &_accountName, std::string const &_pass, std::string const &_passwordHint)
dev::eth::KeyManager & m_keyManager
bytes fromHex(std::string const &_s, WhenError _throw=WhenError::DontThrow)
dev::eth::AccountHolder & m_accountHolder
High-level manager of password-encrypted keys for Ethereum.
std::string toJS(FixedHash< S > const &_h)
dev::eth::Interface & m_eth
virtual std::string personal_signAndSendTransaction(Json::Value const &_transaction, std::string const &_password) override
Main API hub for interfacing with Ethereum.
Address const & address() const
Retrieve the associated address of the public key.
Json::Value toJson(unordered_map< u256, u256 > const &_storage)
virtual std::string personal_sendTransaction(Json::Value const &_transaction, std::string const &_password) override
Addresses accounts() const
virtual std::string personal_newAccount(std::string const &_password) override
virtual Json::Value personal_listAccounts() override