mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
f9498d0051
d56a0689354fb814510c6c393f3e07ac9362dc1f docs: Add release notes for listwalletdir RPC (João Barbosa) 0cb3cad166bbeb75e9cc1512286453f8e7d4f717 qa: Add tests for listwalletdir RPC (João Barbosa) cc3377360c417780f5cbd7bd69b438817a9d60be rpc: Add listwalletdir RPC (João Barbosa) d1b03b8e5f04a2cc9ebb985bd9a1aebd2068f757 interfaces: Add getWalletDir and listWalletDir to Node (João Barbosa) fc4db35bfd78d85d6b52d5da3d89696160658450 wallet: Add ListWalletDir utility (João Barbosa) Pull request description: `ListWalletDir` returns all available wallets in the current wallet directory. Based on MeshCollider work in pull #11485. Tree-SHA512: 5843e3dbd1e0449f55bb8ea7c241a536078ff6ffcaad88ce5fcf8963971d48c78600fbc4f44919523b8a92329d5d8a5f567a3e0ccb0270fdd27366e19603a716
39 lines
956 B
C++
39 lines
956 B
C++
// 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.
|
|
|
|
#ifndef BITCOIN_WALLET_WALLETUTIL_H
|
|
#define BITCOIN_WALLET_WALLETUTIL_H
|
|
|
|
#include <fs.h>
|
|
|
|
#include <vector>
|
|
|
|
//! Get the path of the wallet directory.
|
|
fs::path GetWalletDir();
|
|
|
|
//! Get wallets in wallet directory.
|
|
std::vector<fs::path> ListWalletDir();
|
|
|
|
//! 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;
|
|
};
|
|
|
|
#endif // BITCOIN_WALLET_WALLETUTIL_H
|