20#include <xrpld/app/misc/CredentialHelpers.h>
21#include <xrpld/app/misc/PermissionedDEXHelpers.h>
24namespace permissioned_dex {
37 if (sleDomain->getAccountID(sfOwner) == account)
40 auto const& credentials = sleDomain->getFieldArray(sfAcceptedCredentials);
43 credentials.begin(), credentials.end(), [&](
auto const&
credential) {
44 auto const sleCred = view.read(keylet::credential(
45 account, credential[sfIssuer], credential[sfCredentialType]));
46 if (!sleCred || !sleCred->isFlag(lsfAccepted))
49 return !credentials::checkExpired(
50 sleCred, view.info().parentCloseTime);
70 if (!sleOffer->isFieldPresent(sfDomainID))
72 if (sleOffer->getFieldH256(sfDomainID) != domainID)
76 !sleOffer->isFieldPresent(sfAdditionalBooks))
78 JLOG(j.
error()) <<
"Hybrid offer " << offerID
79 <<
" missing AdditionalBooks field";
83 return accountInDomain(view, sleOffer->getAccountID(sfAccount), domainID);
A generic endpoint for log messages.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
Keylet permissionedDomain(AccountID const &account, std::uint32_t seq) noexcept
Keylet offer(AccountID const &id, std::uint32_t seq) noexcept
An offer from an account.
bool accountInDomain(ReadView const &view, AccountID const &account, Domain const &domainID)
bool offerInDomain(ReadView const &view, uint256 const &offerID, Domain const &domainID, beast::Journal j)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
@ credential
Credentials signature.