Credential class that implements ICredential interface.

Implements

Hierarchy

  • Credential

Implements

Constructors

Properties

auth: Auth

The authentication object used for credential creation.

Methods

  • Processes a credential request.

    Parameters

    • walletDID: string

      The wallet DID.

    • signedChallenge: string

      The signed challenge.

    • vcId: string

      The VC ID.

    • vcProvider: any

      The VC provider.

    Returns Promise<any>

    • A promise that resolves with the result of the credential request.
  • Processes a status check request.

    Parameters

    • did: string

      The DID.

    • vcId: string

      The VC ID.

    • vcProvider: any

      The VC provider.

    Returns Promise<string>

    • A promise that resolves with the result of the status check request.
  • Processes an update credential request.

    Parameters

    • walletDID: string

      The wallet DID.

    • signedRequest: string

      The signed request.

    • vcId: string

      The VC ID.

    • vcProvider: any

      The VC provider.

    Returns Promise<any>

    • A promise that resolves with the result of the update credential request.
  • Signs a verifiable credential using the provided issuance details, message, and signature.

    Parameters

    • issuanceDetails: IssuanceDetails

      The details of the credential issuance, including issuer, metadata, and credential subject.

    • message: string

      The message to authenticate.

    • signature: string

      The signature to use for authentication.

    Returns Promise<any>

    A signed verifiable credential.

    Throws

    An error if the signature is invalid.

  • Builds a context object from a credential subject.

    Parameters

    • creadentialSubject: object

    Returns {}

    The context object.

    • Removes any characters that are not alphanumeric or a space from the given string.

      Parameters

      • str: string

        The string to sanitize.

      Returns string

      The sanitized string.

    • Verifies the given credential object.

      Parameters

      • credential: any

        The credential object to be verified.

      Returns Promise<any>

      A parsed verification object.

      Throws

      An error if the proof, proof purpose, or verification method is missing.

    Generated using TypeDoc