cmd/wallet-js-sdk/src/did/didmanager.js
/**
   * refreshes saved orb DID in wallet content store if it is published.
   *
   *  @param {Object} options
   *  @param {string} options.auth - authorization token for wallet operations.
   *  @param {string} options.contentID - DID ID (typically orb https domain ID).
   *
   * @returns {Promise<Object>} - resolved DID ID - Canonical ID of the new published DID or null if not published.
   */
refreshes saved orb DID in wallet content store if it is published.
@param {Object} options
@param {string} options.auth - authorization token for wallet operations.
@param {string} options.contentID - DID ID (typically orb https domain ID).

@returns {Promise} - resolved DID ID - Canonical ID of the new published DID or null if not published.
refreshes saved orb DID in wallet content store if it is published . @param { Object } options @param { string } options . auth - authorization token for wallet operations . @param { string } options . contentID - DID ID ( typically orb https domain ID ) . @returns { Promise } - resolved DID ID - Canonical ID of the new published DID or null if not published .
async refreshOrbDID(auth, contentID) {
    let resolvedDID = await this.resolveOrbDID(auth, contentID);
    if (
      resolvedDID.didDocumentMetadata &&
      resolvedDID.didDocumentMetadata.method &&
      resolvedDID.didDocumentMetadata.method.published
    ) {
      let content = await this.resolveOrbDID(
        auth,
        resolvedDID.didDocumentMetadata.canonicalId
      );
      await Promise.all([
        this.saveDID(auth, { content }),
        this.removeDID(auth, contentID),
      ]);
      return resolvedDID.didDocumentMetadata.canonicalId;
    }
    return null;
  }
async refreshOrbDID ( auth , contentID ) { let resolvedDID = await this . resolveOrbDID ( auth , contentID ) ; if ( resolvedDID . didDocumentMetadata && resolvedDID . didDocumentMetadata . method && resolvedDID . didDocumentMetadata . method . published ) { let content = await this . resolveOrbDID ( auth , resolvedDID . didDocumentMetadata . canonicalId ) ; await Promise . all ( [ this . saveDID ( auth , { content } ) , this . removeDID ( auth , contentID ) , ] ) ; return resolvedDID . didDocumentMetadata . canonicalId ; } return null ; }
refreshes saved orb DID in wallet content store if it is published.
refreshes saved orb DID in wallet content store if it is published .
// resolve canonical DID ID to get fresh DID Document.