Class Era

Represents an Era in the system. An Era is a distinct period in the blockchain, typically used for consensus, validator rotations, and reward distributions.

Hierarchy

  • Era

Constructors

Properties

Methods

Constructors

  • Creates a new Era instance.

    Parameters

    • value: number

      The numeric identifier of the Era.

    Returns Era

Properties

value: number

The numeric identifier of the Era.

Methods

  • Converts the Era instance to a byte array.

    Returns

    A Uint8Array representation of the Era value as a 32-bit unsigned integer.

    Returns Uint8Array

  • Converts the Era instance to its JSON representation.

    Returns

    A string representation of the Era's numeric value.

    Returns string

  • Creates an Era instance from a byte array.

    Returns

    A new Era instance.

    Parameters

    • bytes: Uint8Array

      The byte array representing the Era value as a 32-bit unsigned integer.

    Returns Era

  • Creates an Era instance from its JSON representation.

    Returns

    A new Era instance.

    Throws

    Error if the JSON string cannot be parsed as a valid number.

    Parameters

    • json: string

      The JSON string representation of the Era.

    Returns Era

Generated using TypeDoc