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

    Parameters

    • presentationOptions: {
          challenge?: string;
          credential: ICredential;
          didDocument?: DidDocument<DidUrl>;
          selectedAttributes?: readonly string[];
          signers: readonly SignerInterface<string, string>[];
      }

      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 didDocument?: DidDocument<DidUrl>

        The credential owner's DID document; if omitted, it will be resolved from the blockchain.

      • Optional selectedAttributes?: readonly string[]

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

      • signers: readonly SignerInterface<string, string>[]

        An array of signer interfaces, one of which will be selected to sign the presentation.

    Returns Promise<ICredentialPresentation>

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