• Creates a Verifiable Presentation from one or more credentials and adds a proof for the purpose of holder authentication. To that end, the presentation can be scoped to a specific transaction, timeframe, purpose, or verifier, by means of multiple mechanisms.

    Parameters

    • params: {
          credentials: VerifiableCredential[];
          holder: HolderOptions;
          now?: Date;
          presentationOptions?: {
              validFrom?: Date;
              validUntil?: Date;
              verifier?: Did;
          };
          proofOptions?: {
              challenge?: string;
              domain?: string;
              proofPurpose?: string;
              proofType?: string;
          };
      }

      Holds all named parameters.

      • credentials: VerifiableCredential[]

        Array of one or more Verifiable Credentials to be included in the presentation.

      • holder: HolderOptions

        Interfaces for interacting with the holder identity for the purpose of generating a presentation proof.

      • Optional now?: Date

        Allows manipulating the current date and time for the purpose of presentation & proof generation. Defaults to the current date and time.

      • Optional presentationOptions?: {
            validFrom?: Date;
            validUntil?: Date;
            verifier?: Did;
        }

        Object holding optional arguments for scoping the presentation.

        • Optional validFrom?: Date
        • Optional validUntil?: Date
        • Optional verifier?: Did
      • Optional proofOptions?: {
            challenge?: string;
            domain?: string;
            proofPurpose?: string;
            proofType?: string;
        }

        Object holding optional arguments for creating and scoping the presentation proof.

        • Optional challenge?: string
        • Optional domain?: string
        • Optional proofPurpose?: string
        • Optional proofType?: string

    Returns Promise<VerifiablePresentation>

    A holder-signed presentation.