1#include <xrpld/app/main/Application.h>
2#include <xrpld/app/main/NodeIdentity.h>
3#include <xrpld/core/Config.h>
4#include <xrpld/core/ConfigSections.h>
6#include <xrpl/server/Wallet.h>
15 if (cmdline.count(
"nodeid"))
20 Throw<std::runtime_error>(
"Invalid 'nodeid' in command line");
27 Throw<std::runtime_error>(
"Invalid [" SECTION_NODE_SEED
"] in configuration file");
35 return {publicKey, secretKey};
40 if (cmdline.count(
"newnodeid") != 0)
virtual Config & config()=0
virtual DatabaseCon & getWalletDB()=0
Retrieve the "wallet database".
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.
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::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.
std::optional< Seed > parseGenericSeed(std::string const &str, bool rfc1751=true)
Attempt to parse a string as a seed.