Class StateProofMessage

Represents the message that the state proofs are attesting to.

Hierarchy

Constructors

  • Creates a new StateProofMessage object.

    Parameters

    • __namedParameters: { blockheaderscommitment: string | Uint8Array; firstattestedround: number | bigint; lastattestedround: number | bigint; lnprovenweight: number | bigint; voterscommitment: string | Uint8Array }
      • blockheaderscommitment: string | Uint8Array
      • firstattestedround: number | bigint
      • lastattestedround: number | bigint
      • lnprovenweight: number | bigint
      • voterscommitment: string | Uint8Array

    Returns StateProofMessage

Properties

attribute_map: Record<string, string>
blockheaderscommitment: Uint8Array

The vector commitment root on all light block headers within a state proof interval.

firstattestedround: number | bigint

The first round the message attests to.

lastattestedround: number | bigint

The last round the message attests to.

lnprovenweight: number | bigint

An integer value representing the natural log of the proven weight with 16 bits of precision. This value would be used to verify the next state proof.

voterscommitment: Uint8Array

The vector commitment root of the top N accounts to sign the next StateProof.

Methods

  • Get an object ready for encoding to either JSON or msgpack.

    Parameters

    • binary: boolean = false

      Use true to indicate that the encoding can handle raw binary objects (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64 strings. True should be used for objects that will be encoded with msgpack, and false should be used for objects that will be encoded with JSON.

    Returns Record<string, any>

Generated using TypeDoc