VB accumulator that supports only membership proofs.

Hierarchy (view full)

Constructors

Properties

params: undefined | AccumulatorParams
secretKey: undefined | AccumulatorSecretKey
value: Uint8Array

Accessors

  • get accumulated(): Uint8Array
  • Get the current accumulated value

    Returns Uint8Array

Methods

  • To add arbitrary bytes like byte representation of UUID or some other user id or something else as an accumulator member, encode it first using this. This is an irreversible encoding as a hash function is used to convert a message of arbitrary length to a fixed length encoding.

    Parameters

    • bytes: Uint8Array

    Returns Uint8Array

  • Generate proving key for proving membership in an accumulator in zero knowledge. Proving key is public data that must be known to both the prover and verifier. Any prover and verifier pair can mutually agree on a proving key and the manager does not need to be aware of any proving key.

    Parameters

    • Optionallabel: Uint8Array

      The bytearray that is hashed to deterministically generate the proving key.

    Returns MembershipProvingKey