Class CLValueString

Represents a string value in the Casper type system.

Hierarchy

  • CLValueString

Constructors

Properties

Methods

Constructors

Properties

value: string

Methods

  • Converts the string value to its byte representation. The result is a Uint8Array containing the length of the string (as a 4-byte prefix) followed by the string's bytes.

    Returns

    A Uint8Array representing the bytes of the string.

    Returns Uint8Array

  • Converts a size number to its 4-byte Uint8Array representation in little-endian format.

    Returns

    A Uint8Array representing the size.

    Parameters

    • size: number

      The size to convert.

    Returns Uint8Array

  • Converts the instance to a JSON-compatible string.

    Returns

    The string representation of the instance.

    Returns string

  • Creates a CLValueString instance from a Uint8Array. Parses the byte array to retrieve the string value, interpreting the first 4 bytes as the string length.

    Returns

    An object containing the new CLValueString instance and any remaining bytes.

    Parameters

    • source: Uint8Array

      The Uint8Array containing the byte representation of the string value.

    Returns IResultWithBytes<CLValueString>

Generated using TypeDoc