20 #include <ripple/protocol/UintTypes.h>
21 #include <test/jtx/Account.h>
22 #include <test/jtx/amount.h>
34 Account::privateCtorTag{});
40 : name_(
std::move(name))
52 auto const iter =
cache_.find(p);
56 auto const keys = [stringType, &
name, type]() {
62 Throw<std::runtime_error>(
"Account:: invalid base58 seed");
69 std::piecewise_construct,
72 return r.first->second;
83 std::move(base58SeedStr),
93 return IOU(*
this, currency);
std::string const & name() const
Return the name.
bool to_currency(Currency ¤cy, std::string const &code)
Tries to convert a string to a Currency, returns true on success.
Currency const & noCurrency()
A placeholder for empty currencies.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
std::pair< PublicKey, SecretKey > generateKeyPair(KeyType type, Seed const &seed)
Generate a key pair deterministically.
AccountID calcAccountID(PublicKey const &pk)
static const Account master
The master account.
T forward_as_tuple(T... args)
IOU operator[](std::string const &s) const
Returns an IOU for the specified gateway currency.
Seed generateSeed(std::string const &passPhrase)
Generate a seed deterministically.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Converts to IOU Issue or STAmount.
static std::unordered_map< std::pair< std::string, KeyType >, Account, beast::uhash<> > cache_
Immutable cryptographic account descriptor.
static Account fromCache(AcctStringType stringType, std::string name, KeyType type)