Initializes a new AddressableEntityHash instance.
The byte array representing the hash value.
Optional. The prefix of the original hash string. Defaults to addressable-entity-
.
Stores the prefix of the original hash string if it had one.
Defaults to addressable-entity-
if not provided.
Static
ByteThe fixed length of the hash in bytes.
Static
StringThe fixed length of the hash string representation in hexadecimal characters.
Static
createCreates an array of Hash instances from a byte array.
An array of Hash instances created from the byte array.
Error if the byte array length is not a multiple of the hash length.
The byte array containing multiple hash values.
Static
fromStatic
fromCreates a Hash instance from a byte array.
A result object containing the new Hash instance and the remaining bytes.
Error if the byte array length does not match the expected hash length.
The byte array representing the hash.
Static
fromParses a hexadecimal string to create an AddressableEntityHash instance.
Checks if the input string starts with the addressable-entity-
prefix, removing it if present.
A new AddressableEntityHash instance.
The hexadecimal string representation of the hash, with or without the prefix.
Static
fromJSONDeserializes an AddressableEntityHash instance from a JSON string representation.
A new AddressableEntityHash instance created from the JSON string.
The JSON string representation of the AddressableEntityHash, with or without the prefix.
Generated using TypeDoc
Represents an addressable entity hash in the Casper network. This class extends the
Hash
class to include a prefix indicating it is an addressable entity, adding specific methods and properties for managing such hashes.