4#include <boost/asio/deadline_timer.hpp>
5#include <boost/filesystem/path.hpp>
6#include <boost/interprocess/sync/file_lock.hpp>
29 void set_dir(
const boost::filesystem::path&
p) {
80 map<public_key_type,private_key_type>
list_keys(
const string&
name,
const string& pw);
99 void unlock(
const std::string&
name,
const std::string& password);
107 void import_key(
const std::string&
name,
const std::string& wif_key);
115 void remove_key(
const std::string&
name,
const std::string& password,
const std::string& key);
131 void check_timeout();
134 using timepoint_t = std::chrono::time_point<std::chrono::system_clock>;
135 std::map<std::string, std::unique_ptr<wallet_api>> wallets;
136 std::chrono::seconds timeout = std::chrono::seconds::max();
137 mutable timepoint_t timeout_time = timepoint_t::max();
138 boost::filesystem::path dir =
".";
139 boost::filesystem::path lock_path = dir /
"wallet.lock";
140 std::unique_ptr<boost::interprocess::file_lock> wallet_dir_lock;
142 void start_lock_watch(std::shared_ptr<boost::asio::deadline_timer> t);
143 void initialize_lock();
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
void unlock(const std::string &name, const std::string &password)
void own_and_use_wallet(const string &name, std::unique_ptr< wallet_api > &&wallet)
Takes ownership of a wallet to use.
map< public_key_type, private_key_type > list_keys(const string &name, const string &pw)
void set_timeout(const std::chrono::seconds &t)
void lock_all()
Locks all the unlocked wallets.
wallet_manager(const wallet_manager &)=delete
chain::signed_transaction sign_transaction(const chain::signed_transaction &txn, const flat_set< public_key_type > &keys, const chain::chain_id_type &id)
wallet_manager(wallet_manager &&)=delete
flat_set< public_key_type > get_public_keys()
void import_key(const std::string &name, const std::string &wif_key)
std::string create(const std::string &name)
void set_timeout(int64_t secs)
void open(const std::string &name)
wallet_manager & operator=(wallet_manager &&)=delete
void remove_key(const std::string &name, const std::string &password, const std::string &key)
string create_key(const std::string &name, const std::string &key_type)
chain::signature_type sign_digest(const chain::digest_type &digest, const public_key_type &key)
void set_dir(const boost::filesystem::path &p)
wallet_manager & operator=(const wallet_manager &)=delete
std::vector< std::string > list_wallets()
fc::sha256 digest(const T &value)
Immutable except for fc::from_variant.