Class PietrzakVDF

Pietrzak VDF implementation

Implements

Constructors

Properties

Methods

Constructors

Properties

intSizeBits: number

Methods

  • Check that the difficulty is valid.

    Parameters

    • difficulty: number

      The number of iterations to validate

    Returns void

    If the difficulty is invalid

  • Solve an instance of this VDF, with challenge challenge and difficulty difficulty.

    Parameters

    • challenge: Uint8Array

      An opaque byte string of arbitrary length

    • difficulty: number

      The number of iterations (difficulty level)

    • Optionaldiscriminant: bigint

    Returns Promise<Uint8Array>

    The proof as a Uint8Array

    If the difficulty is invalid

  • Verifies an alleged solution of this VDF.

    Parameters

    • challenge: Uint8Array

      The challenge used to generate the proof

    • difficulty: number

      The number of iterations used

    • allegedSolution: Uint8Array

      The proof to verify

    • Optionaldiscriminant: bigint

    Returns void

    If the proof is invalid