3#include <xrpl/basics/Buffer.h>
4#include <xrpl/basics/Slice.h>
5#include <xrpl/conditions/Condition.h>
8namespace cryptoconditions {
90match(Fulfillment
const& f, Condition
const& c);
119validate(Fulfillment
const& f, Condition
const& c);
Like std::vector<char> but better.
An immutable linear range of bytes.
bool operator!=(Condition const &lhs, Condition const &rhs)
bool validate(Fulfillment const &f, Condition const &c, Slice m)
Verify if the given message satisfies the fulfillment.
bool operator==(Condition const &lhs, Condition const &rhs)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual ~Fulfillment()=default
static constexpr std::size_t maxSerializedFulfillment
The largest binary fulfillment we support.
static std::unique_ptr< Fulfillment > deserialize(Slice s, std::error_code &ec)
Load a fulfillment from its binary form.
virtual Condition condition() const =0
Returns the condition associated with the given fulfillment.
virtual Buffer fingerprint() const =0
Returns the fulfillment's fingerprint:
virtual Type type() const =0
Returns the type of this condition.
virtual bool validate(Slice data) const =0
Validates a fulfillment.
virtual std::uint32_t cost() const =0
Calculates the cost associated with this fulfillment.