Skip to content

src/crdt/globaldb/keypair_file_storage.hpp

Namespaces

Name
sgns
sgns::crdt

Classes

Name
class sgns::crdt::KeyPairFileStorage

Source code

#ifndef SUPERGENIUS_CRDT_KEYPAIR_FILE_STORAGE_HPP
#define SUPERGENIUS_CRDT_KEYPAIR_FILE_STORAGE_HPP

#include "outcome/outcome.hpp"
#include "base/logger.hpp"
#include <boost/filesystem/path.hpp>
#include <libp2p/crypto/key.hpp>

namespace sgns::crdt
{
class KeyPairFileStorage
{
public:
    KeyPairFileStorage( boost::filesystem::path keyPath );

    [[nodiscard]] outcome::result<libp2p::crypto::KeyPair> GetKeyPair() const;

private:
    boost::filesystem::path m_keyPath;
    sgns::base::Logger m_logger = sgns::base::createLogger("KeyPairFileStorage");
};
}

#endif // SUPERGENIUS_CRDT_KEYPAIR_FILE_STORAGE_HPP

Updated on 2026-03-04 at 13:10:44 -0800