cmd/wallet-js-sdk/src/credential/credential-manager.js
/**
   * Resolves credential by credential manifest, descriptor or fulfillment.
   *
   * Given credential can be resolved by raw credential, ID of the credential saved in wallet, credential fulfillment,
   * ID of the manifest saved in wallet, raw credential manifest, output descriptor of the manifest etc
   *
   *  @param {String} auth - authorization token for wallet operations.
   *  @param {Object} options - options to resolve credential from wallet.
   *  @param {String} options.credentialID - (optional) ID of the credential to be resolved from wallet content store.
   *  @param {String} options.credential - (optional) raw credential data model to be resolved.
   *  @param {String} options.fulfillment - (optional) credential fulfillment using which given raw credential or credential ID to be resolved.
   *  @param {String} options.manifestID - (optional) ID of the manifest from wallet content store.
   *  @param {String} options.manifest - (optional) raw manifest to be used for resolving credential.
   *  @param {String} options.descriptorID - (optional) if fulfillment not provided then this descriptor ID can be used to resolve credential.
   *
   * Refer @see {@link https://identity.foundation/credential-manifest/|Credential Manifest Specifications} for more details.
   *
   *  @returns {Promise<Object>} - promise containing resolved results or error if operation fails.
   */
Resolves credential by credential manifest, descriptor or fulfillment.
Given credential can be resolved by raw credential, ID of the credential saved in wallet, credential fulfillment,
ID of the manifest saved in wallet, raw credential manifest, output descriptor of the manifest etc

@param {String} auth - authorization token for wallet operations.
@param {Object} options - options to resolve credential from wallet.
@param {String} options.credentialID - (optional) ID of the credential to be resolved from wallet content store.
@param {String} options.credential - (optional) raw credential data model to be resolved.
@param {String} options.fulfillment - (optional) credential fulfillment using which given raw credential or credential ID to be resolved.
@param {String} options.manifestID - (optional) ID of the manifest from wallet content store.
@param {String} options.manifest - (optional) raw manifest to be used for resolving credential.
@param {String} options.descriptorID - (optional) if fulfillment not provided then this descriptor ID can be used to resolve credential.



@returns {Promise} - promise containing resolved results or error if operation fails.
Resolves credential by credential manifest descriptor or fulfillment . Given credential can be resolved by raw credential ID of the credential saved in wallet credential fulfillment ID of the manifest saved in wallet raw credential manifest output descriptor of the manifest etc @param { String } auth - authorization token for wallet operations . @param { Object } options - options to resolve credential from wallet . @param { String } options . credentialID - ( optional ) ID of the credential to be resolved from wallet content store . @param { String } options . credential - ( optional ) raw credential data model to be resolved . @param { String } options . fulfillment - ( optional ) credential fulfillment using which given raw credential or credential ID to be resolved . @param { String } options . manifestID - ( optional ) ID of the manifest from wallet content store . @param { String } options . manifest - ( optional ) raw manifest to be used for resolving credential . @param { String } options . descriptorID - ( optional ) if fulfillment not provided then this descriptor ID can be used to resolve credential . @returns { Promise } - promise containing resolved results or error if operation fails .
async resolveManifest(
    auth,
    {
      credentialID,
      credential,
      fulfillment,
      manifestID,
      manifest,
      descriptorID,
    }
  ) {
    if (!manifest) {
      const { content } = await this.wallet.get({
        auth,
        contentType: contentTypes.METADATA,
        contentID: manifestID,
      });
      manifest = content;
    }
    let result = await this.wallet.resolveCredential(auth, manifest, {
      credentialID,
      descriptorID,
      fulfillment,
      credential,
    });
    return result.resolved;
  }
async resolveManifest ( auth , { credentialID , credential , fulfillment , manifestID , manifest , descriptorID , } ) { if ( ! manifest ) { const { content } = await this . wallet . get ( { auth , contentType : contentTypes . METADATA , contentID : manifestID , } ) ; manifest = content ; } let result = await this . wallet . resolveCredential ( auth , manifest , { credentialID , descriptorID , fulfillment , credential , } ) ; return result . resolved ; }
Resolves credential by credential manifest, descriptor or fulfillment.
Resolves credential by credential manifest descriptor or fulfillment .