Class CredentialBuilder<SecretKey, PublicKey, Signature, SignatureParams>Abstract

Create a credential

Type Parameters

  • SecretKey
  • PublicKey
  • Signature
  • SignatureParams

Hierarchy (view full)

Constructors

Properties

_credStatus?: object
_encodedAttributes?: {
    [key: string]: Uint8Array;
}

Each credential references the schema which is included as an attribute

_sig?: Signature
_subject?: object | object[]
_topLevelFields: Map<string, unknown>
_version: string
VERSION: string = '0.7.0'

Follows semver and must be updated accordingly when the logic of this class changes or the underlying crypto changes.

Accessors

Methods

  • Protected

    Update given object with proof metadata

    Parameters

    • s: object

      the object that be updated with the proof metadata

    Returns any

  • Set the credentialStatus property of the credential

    Parameters

    • registryId: string

      This is id of the revocation registry, like the unique id of the accumulator

    • revCheck: string

      whether its a membership or non-membership check. this depends on how revocation is implemented, i.e. if

    • memberValue: unknown

      Value present/absent in the revocation registry (accumulator for now) which corresponds to a credential. This should be unique per credential per registry.

    • OptionalrevType: RevocationStatusProtocol

      revocation protocol being used like if accumulator, which accumulator

    Returns void

  • When schema doesn't match the credential, create a new appropriate schema and update the credential. Returns the serialized credential

    Parameters

    Returns object

  • When schema doesn't match the credential, create a new appropriate schema and update the credential. Returns the serialized credential. Legacy version. Used by SDK for some older credential versions

    Parameters

    Returns object