1#ifndef XRPL_CONDITIONS_FULFILLMENT_H
2#define XRPL_CONDITIONS_FULFILLMENT_H
4#include <xrpld/conditions/Condition.h>
6#include <xrpl/basics/Buffer.h>
7#include <xrpl/basics/Slice.h>
10namespace cryptoconditions {
93match(Fulfillment
const& f, Condition
const& c);
122validate(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 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.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static std::unique_ptr< Fulfillment > deserialize(Slice s, std::error_code &ec)
Load a fulfillment from its binary form.
virtual ~Fulfillment()=default
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.
static constexpr std::size_t maxSerializedFulfillment
The largest binary fulfillment we support.
virtual Condition condition() const =0
Returns the condition associated with the given fulfillment.
virtual Buffer fingerprint() const =0
Returns the fulfillment's fingerprint: