1#include <xrpld/app/misc/Manifest.h> 
    2#include <xrpld/app/misc/ValidatorKeys.h> 
    3#include <xrpld/core/Config.h> 
    4#include <xrpld/core/ConfigSections.h> 
    6#include <xrpl/basics/Log.h> 
    7#include <xrpl/basics/base64.h> 
   12    if (config.
exists(SECTION_VALIDATOR_TOKEN) &&
 
   13        config.
exists(SECTION_VALIDATION_SEED))
 
   16        JLOG(j.
fatal()) << 
"Cannot specify both [" SECTION_VALIDATION_SEED
 
   17                           "] and [" SECTION_VALIDATOR_TOKEN 
"]";
 
   21    if (config.
exists(SECTION_VALIDATOR_TOKEN))
 
   31            if (!m || pk != m->signingKey)
 
   35                    << 
"Invalid token specified in [" SECTION_VALIDATOR_TOKEN
 
   40                keys.emplace(m->masterKey, pk, token->validationSecret);
 
   43                manifest = std::move(token->manifest);
 
   50                << 
"Invalid token specified in [" SECTION_VALIDATOR_TOKEN 
"]";
 
   53    else if (config.
exists(SECTION_VALIDATION_SEED))
 
   55        auto const seed = parseBase58<Seed>(
 
   61                << 
"Invalid seed specified in [" SECTION_VALIDATION_SEED 
"]";
 
   67            keys.emplace(pk, pk, sk);
 
 
A generic endpoint for log messages.
 
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.
 
std::vector< std::string > const & lines() const
Returns all the lines in the section.
 
std::optional< Keys > keys
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::optional< Manifest > deserializeManifest(Slice s, beast::Journal journal)
Constructs Manifest from serialized string.
 
std::string base64_decode(std::string_view data)
 
PublicKey derivePublicKey(KeyType type, SecretKey const &sk)
Derive the public key from a secret key.
 
SecretKey generateSecretKey(KeyType type, Seed const &seed)
Generate a new secret key deterministically.
 
NodeID calcNodeID(PublicKey const &)
Calculate the 160-bit node ID from a node public key.
 
std::optional< ValidatorToken > loadValidatorToken(std::vector< std::string > const &blob, beast::Journal journal)