• Creates a public presentation which can be sent to a verifier. This presentation is signed.

    Returns

    A deep copy of the Credential with all but publicAttributes removed.

    Parameters

    • presentationOptions: {
          challenge?: string;
          credential: ICredential;
          selectedAttributes?: string[];
          signCallback: SignCallback;
      }

      The additional options to use upon presentation generation.

      • Optional challenge?: string

        Challenge which will be part of the presentation signature. If not specified, all attributes are shown. If set to an empty array, we hide all attributes inside the claim for the presentation.

      • credential: ICredential

        The credential to create the presentation for.

      • Optional selectedAttributes?: string[]

        All properties of the claim which have been requested by the verifier and therefore must be publicly presented.

      • signCallback: SignCallback

        The callback to sign the presentation.

    Returns Promise<ICredentialPresentation>