1#include <xrpld/app/main/NodeIdentity.h>
3#include <xrpld/app/main/Application.h>
4#include <xrpld/core/Config.h>
6#include <xrpl/basics/contract.h>
7#include <xrpl/config/Constants.h>
8#include <xrpl/protocol/KeyType.h>
9#include <xrpl/protocol/SecretKey.h>
10#include <xrpl/protocol/Seed.h>
11#include <xrpl/server/Wallet.h>
13#include <boost/program_options/variables_map.hpp>
22std::pair<PublicKey, SecretKey>
27 if (cmdline.contains(
"nodeid"))
50 return {publicKey, secretKey};
55 if (cmdline.contains(
"newnodeid"))
virtual Config & config()=0
bool exists(std::string const &name) const
Returns true if a section with the given name exists.
Section & section(std::string const &name)
Returns the section with the given name.
LockedSociSession checkoutDb()
std::vector< std::string > const & lines() const
Returns all the lines in the section.
virtual DatabaseCon & getWalletDB()=0
Retrieve the "wallet database".
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
PublicKey derivePublicKey(KeyType type, SecretKey const &sk)
Derive the public key from a secret key.
std::optional< AccountID > parseBase58(std::string const &s)
Parse AccountID from checked, base58 string.
std::pair< PublicKey, SecretKey > getNodeIdentity(soci::session &session)
Returns a stable public and private key for this node.
SecretKey generateSecretKey(KeyType type, Seed const &seed)
Generate a new secret key deterministically.
void clearNodeIdentity(soci::session &session)
Delete any saved public/private key associated with this node.
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)
std::optional< Seed > parseGenericSeed(std::string const &str, bool rfc1751=true)
Attempt to parse a string as a seed.
static constexpr auto kNodeSeed