1#include <test/jtx/Account.h>
3#include <test/jtx/amount.h>
5#include <xrpl/basics/contract.h>
6#include <xrpl/beast/hash/uhash.h>
7#include <xrpl/protocol/AccountID.h>
8#include <xrpl/protocol/KeyType.h>
9#include <xrpl/protocol/PublicKey.h>
10#include <xrpl/protocol/SecretKey.h>
11#include <xrpl/protocol/Seed.h>
12#include <xrpl/protocol/UintTypes.h>
47 auto const iter =
cache.find(p);
48 if (iter !=
cache.end())
51 auto const keys = [stringType, &
name, type]() {
63 auto r =
cache.emplace(
67 return r.first->second;
78 std::move(base58SeedStr),
96 return IOU(*
this, currency);
Immutable cryptographic account descriptor.
static Account fromCache(AcctStringType stringType, std::string name, KeyType type)
static std::unordered_map< std::pair< std::string, KeyType >, Account, beast::Uhash<> > cache
std::string const & name() const
Return the name.
static Account const kMaster
The master account.
IOU operator[](std::string const &s) const
Returns an IOU for the specified gateway currency.
AccountID id() const
Returns the Account ID.
Converts to IOU Issue or STAmount.
T forward_as_tuple(T... args)
std::pair< PublicKey, SecretKey > randomKeyPair(KeyType type)
Create a key pair using secure random numbers.
std::optional< AccountID > parseBase58(std::string const &s)
Parse AccountID from checked, base58 string.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
bool toCurrency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
Seed generateSeed(std::string const &passPhrase)
Generate a seed deterministically.
std::pair< PublicKey, SecretKey > generateKeyPair(KeyType type, Seed const &seed)
Generate a key pair deterministically.
AccountID calcAccountID(PublicKey const &pk)
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Currency const & noCurrency()
A placeholder for empty currencies.
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)