DatumHash class final

Class representing a datum hash in Cardano. A DatumHash is a type of Datum that contains a cryptographic hash, which refers to data stored off-chain.

This is useful when you need to reference data without including the actual data in the transaction output.

Inheritance

Constructors

DatumHash(Uint8List hash)
Constructor for the DatumHash class, which requires a hash.
const
DatumHash.fromCbor(CborValue value)
Factory constructor to create a DatumHash from a CBOR-encoded value. The CBOR value is expected to be a byte string.
factory

Properties

hash Uint8List
Byte array representing the cryptographic hash.
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCbor() → CborValue
Converts the DatumHash to a CBOR-encoded value. The CBOR value is a byte string representing the hash.
override
toString() String
A string representation of this object.
inherited

Operators

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