20 #include <ripple/protocol/Issue.h>
22 #include <ripple/protocol/AccountID.h>
23 #include <ripple/protocol/UintTypes.h>
24 #include <ripple/protocol/jss.h>
81 Throw<std::runtime_error>(
82 "issueFromJson can only be specified with a 'object' Json value");
90 Throw<std::runtime_error>(
91 "issueFromJson currency must be a string Json value");
97 Throw<std::runtime_error>(
98 "issueFromJson currency must be a valid currency");
105 Throw<std::runtime_error>(
"Issue, XRP should not have issuer");
112 Throw<std::runtime_error>(
113 "issueFromJson issuer must be a string Json value");
115 auto const issuer = parseBase58<AccountID>(issStr.
asString());
119 Throw<std::runtime_error>(
120 "issueFromJson issuer must be a valid account");
123 return Issue{currency, *issuer};
Currency const & badCurrency()
We deliberately disallow the currency that looks like "XRP" because too many people were using it ins...
bool to_currency(Currency ¤cy, std::string const &code)
Tries to convert a string to a Currency, returns true on success.
A currency issued by an account.
Currency const & noCurrency()
A placeholder for empty currencies.
bool isConsistent(Book const &book)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
bool isNull() const
isNull() tests to see if this field is null.
std::ostream & operator<<(std::ostream &os, TOffer< TIn, TOut > const &offer)
std::string getText() const
bool isXRP(AccountID const &c)
Issue issueFromJson(Json::Value const &v)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Json::Value to_json(Issue const &is)
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
AccountID const & noAccount()
A placeholder for empty accounts.
std::string asString() const
Returns the unquoted string value.