1#include <xrpl/protocol/STIssue.h>
3#include <xrpl/basics/contract.h>
4#include <xrpl/json/json_value.h>
5#include <xrpl/protocol/AccountID.h>
6#include <xrpl/protocol/Asset.h>
7#include <xrpl/protocol/Issue.h>
8#include <xrpl/protocol/MPTIssue.h>
9#include <xrpl/protocol/SField.h>
10#include <xrpl/protocol/STBase.h>
11#include <xrpl/protocol/Serializer.h>
12#include <xrpl/protocol/UintTypes.h>
29 auto const currencyOrAccount = sit.
get160();
48 static_assert(
MPTID::size() ==
sizeof(sequence) +
sizeof(currencyOrAccount));
49 memcpy(mptID.
data(), &sequence,
sizeof(sequence));
51 mptID.
data() +
sizeof(sequence),
52 currencyOrAccount.data(),
53 sizeof(currencyOrAccount));
93 [&](
Issue const& issue) {
102 memcpy(&sequence, issue.getMptID().data(),
sizeof(sequence));
111 return (v !=
nullptr) && (*v == *
this);
119 [](
MPTIssue const&) {
return false; });
131 return emplace(n, buf, std::move(*
this));
static BaseUInt fromRaw(Container const &c)
static constexpr std::size_t size()
A currency issued by an account.
AccountID const & getIssuer() const
A type which can be exported to a well known binary format.
static STBase * emplace(std::size_t n, void *buf, T &&val)
void add(Serializer &s) const override
bool isDefault() const override
SerializedTypeID getSType() const override
STBase * copy(std::size_t n, void *buf) const override
json::Value getJson(JsonOptions) const override
std::string getText() const override
STBase * move(std::size_t n, void *buf) override
bool isEquivalent(STBase const &t) const override
int addBitString(BaseUInt< Bits, Tag > const &v)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
Issue issueFromJson(json::Value const &v)
bool isXRP(AccountID const &c)
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
AccountID const & noAccount()
A placeholder for empty accounts.
bool isConsistent(Asset const &asset)
Asset assetFromJson(json::Value const &jv)
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)
Note, should be treated as flags that can be | and &.