···9494 return cowHash;
9595 }
96969797- /// @notice Resolve a did:cow identifier to its current controller and wrapped DID.
9797+ /// @notice Resolve a did:cow identifier to its current wrapped DID and controller.
9898 /// @dev Returns the initial values if the cow has never been registered on-chain.
9999- /// Prepend "did:" to the returned wrappedDID to form the full wrapped DID string.
10099 /// @param _controller The initial controller address from the did:cow identifier.
101100 /// @param _wrappedDID The initial wrapped DID from the did:cow identifier, without "did:".
101101+ /// @return wrappedDID The current full wrapped DID (with "did:" prepended), or "did::" if deactivated.
102102 /// @return controller The current controller address.
103103- /// @return wrappedDID The current wrapped DID (without "did:"), or ":" if deactivated.
104104- function resolveCow(address _controller, string memory _wrappedDID) external view returns (address controller, string memory wrappedDID) {
103103+ function resolveCow(address _controller, string memory _wrappedDID) external view returns (string memory wrappedDID, address controller) {
105104 bytes32 cowHash = calculateCowHash(_controller, _wrappedDID);
106105 Cow storage cow = cows[cowHash];
107106 if (bytes(cow.wrappedDID).length == 0) {
108108- return (_controller, _wrappedDID);
107107+ return (string.concat("did:", _wrappedDID), _controller);
109108 }
110110- return (cow.controller, cow.wrappedDID);
109109+ return (string.concat("did:", cow.wrappedDID), cow.controller);
111110 }
112111113112 /// @notice Optionally pre-register a cow on-chain before its first update.