2017-11-18 14:32:50 +01:00
|
|
|
// Copyright (c) 2017 The Bitcoin Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-04-02 00:30:17 +02:00
|
|
|
#ifndef BITCOIN_WALLET_WALLETUTIL_H
|
|
|
|
#define BITCOIN_WALLET_WALLETUTIL_H
|
2017-11-18 14:32:50 +01:00
|
|
|
|
2021-08-12 08:02:09 +02:00
|
|
|
#include <fs.h>
|
|
|
|
|
|
|
|
#include <vector>
|
2017-11-18 14:32:50 +01:00
|
|
|
|
|
|
|
//! Get the path of the wallet directory.
|
|
|
|
fs::path GetWalletDir();
|
|
|
|
|
2021-08-12 08:02:09 +02:00
|
|
|
//! Get wallets in wallet directory.
|
|
|
|
std::vector<fs::path> ListWalletDir();
|
|
|
|
|
2018-11-05 13:17:01 +01:00
|
|
|
//! The WalletLocation class provides wallet information.
|
|
|
|
class WalletLocation final
|
|
|
|
{
|
|
|
|
std::string m_name;
|
|
|
|
fs::path m_path;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit WalletLocation() {}
|
|
|
|
explicit WalletLocation(const std::string& name);
|
|
|
|
|
|
|
|
//! Get wallet name.
|
|
|
|
const std::string& GetName() const { return m_name; }
|
|
|
|
|
|
|
|
//! Get wallet absolute path.
|
|
|
|
const fs::path& GetPath() const { return m_path; }
|
|
|
|
|
|
|
|
//! Return whether the wallet exists.
|
|
|
|
bool Exists() const;
|
|
|
|
};
|
|
|
|
|
2018-04-02 00:30:17 +02:00
|
|
|
#endif // BITCOIN_WALLET_WALLETUTIL_H
|