20 #include <ripple/protocol/AccountID.h>
21 #include <ripple/protocol/PublicKey.h>
22 #include <ripple/protocol/digest.h>
23 #include <ripple/protocol/tokens.h>
35 boost::optional<AccountID>
92 static AccountID const account(beast::zero);
108 auto const account = parseBase58<AccountID>(s);
137 auto iter =
m1_.find(
id);
138 if (iter !=
m1_.end())
142 if (iter !=
m0_.end())
144 result = iter->second;
159 m1_.emplace(
id, result);
std::uint8_t const * data() const noexcept
AccountIDCache(AccountIDCache const &)=delete
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
std::string decodeBase58Token(std::string const &s, TokenType type)
Decode a token of given type encoded using Base58Check and the XRPL alphabet.
constexpr static std::size_t size()
Integers of any length that is a multiple of 32-bits.
hash_map< AccountID, std::string > m1_
static constexpr std::size_t bytes
Returns the RIPEMD-160 digest of the SHA256 hash of the message.
std::size_t size() const noexcept
AccountID calcAccountID(PublicKey const &pk)
AccountID const & xrpAccount()
Compute AccountID from public key.
hash_map< AccountID, std::string > m0_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
std::string encodeBase58Token(TokenType type, void const *token, std::size_t size)
Encode data in Base58Check format using XRPL alphabet.
boost::optional< AccountID > parseBase58(std::string const &s)
Parse AccountID from checked, base58 string.
AccountID const & noAccount()
A placeholder for empty accounts.
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
std::string toBase58(AccountID const &) const
Return ripple::toBase58 for the AccountID.
bool to_issuer(AccountID &, std::string const &)
Convert hex or base58 string to AccountID.