3#include <xrpl/basics/Buffer.h>
4#include <xrpl/basics/StringUtilities.h>
5#include <xrpl/basics/contract.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/protocol/SField.h>
20 char const*
const key;
26 what() const noexcept
override
38 char const*
const key;
46 what() const noexcept
override
61 static_assert(
sizeof(T) == -1,
"This function must be specialized");
94 return inner.
asInt() != 0;
101 using namespace xrpl;
110 auto const r = inner.
asInt();
121 auto [p, ec] =
std::from_chars(s.data(), s.data() + s.size(), val, 16);
123 if (ec !=
std::errc() || (p != s.data() + s.size()))
134 using namespace xrpl;
139 return Buffer{r->data(), r->size()};
Lightweight wrapper to tag static string.
std::string asString() const
Returns the unquoted string value.
bool isMember(char const *key) const
Return true if the object has a member named key.
Like std::vector<char> but better.
json::StaticString const & getJsonName() const
JSON (JavaScript Object Notation).
std::optional< T > getOptional(json::Value const &v, xrpl::SField const &field)
xrpl::AccountID getOrThrow(json::Value const &v, xrpl::SField const &field)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::optional< Blob > strUnHex(std::size_t strSize, Iterator begin, Iterator end)
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)
JsonMissingKeyError(json::StaticString const &k)
char const * what() const noexcept override
JsonTypeMismatchError(json::StaticString const &k, std::string et)
char const * what() const noexcept override
std::string const expectedType