FulfillmentPreimageSha256 class

Represents a fulfillment with SHA-256 preimage in Dart. Crypto-Conditions Fulfillment

This class encapsulates the data related to a fulfillment with a SHA-256 preimage, including the fulfillment byte array and the corresponding condition byte array.

It provides a factory method, generate, to create an instance of FulfillmentPreimageSha256 based on a given preimage. The generation process involves creating ASN.1-encoded options for fingerprint, constant, and condition, which are then used to construct the encoded fulfillment and condition byte arrays. Usage example:

// Creating a FulfillmentPreimageSha256 instance with a preimage
List<int> preImage = [...];
FulfillmentPreimageSha256 fulfillment = FulfillmentPreimageSha256.generate(preImage);

// Accessing the hexadecimal string representations of fulfillment and condition
print(fulfillment.fulfillment);
print(fulfillment.condition);

Constructors

FulfillmentPreimageSha256.generate(List<int> preImage)
Factory method to generate a FulfillmentPreimageSha256 instance based on a preimage.
factory

Properties

condition String
Gets the hexadecimal string representation of the condition byte array.
no setter
fulfillment String
Gets the hexadecimal string representation of the fulfillment byte array.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited