@@ -26,17 +26,17 @@ interface IRegistry {
26
26
* @param addr The address the DSNP Id is pointing at
27
27
* @param handle The actual UTF-8 string used for the handle
28
28
*/
29
- event DSNPRegistryUpdate (uint64 indexed id , address indexed addr , string indexed handle );
29
+ event DSNPRegistryUpdate (uint64 indexed id , address indexed addr , string handle );
30
30
31
31
/**
32
32
* @dev Register a new DSNP Id
33
33
* @param addr Address for the new DSNP Id to point at
34
34
* @param handle The handle for discovery
35
- * @return id for new registration
36
35
*
37
36
* MUST reject if the handle is already in use
38
37
* MUST emit DSNPRegistryUpdate
39
38
* MUST check that addr implements IDelegation interface
39
+ * @return id for new registration
40
40
*/
41
41
function register (address addr , string calldata handle ) external returns (uint64 );
42
42
@@ -48,7 +48,7 @@ interface IRegistry {
48
48
* MUST be called by someone who is authorized on the contract
49
49
* via `IDelegation(oldAddr).isAuthorizedTo(oldAddr, Permission.OWNERSHIP_TRANSFER, block.number)`
50
50
* MUST emit DSNPRegistryUpdate
51
- * MUST check that addr implements IDelegation interface
51
+ * MUST check that newAddr implements IDelegation interface
52
52
*/
53
53
function changeAddress (address newAddr , string calldata handle ) external ;
54
54
@@ -103,26 +103,20 @@ interface IRegistry {
103
103
) external ;
104
104
105
105
/**
106
- * @dev Resolve a handle to a contract address
107
- * @param handle The handle to resolve
108
- *
109
- * @return Address of the contract
110
- */
111
- function resolveHandleToAddress (string calldata handle ) external view returns (address );
112
-
113
- /**
114
- * @dev Resolve a handle to a DSNP Id
106
+ * @dev Resolve a handle to a DSNP Id and contract address
115
107
* @param handle The handle to resolve
116
108
*
117
- * @return DSNP Id
109
+ * rejects if not found
110
+ * @return A tuple of the DSNP Id and the Address of the contract
118
111
*/
119
- function resolveHandleToId (string calldata handle ) external view returns (uint64 );
112
+ function resolveRegistration (string calldata handle ) external view returns (uint64 , address );
120
113
121
114
/**
122
- * @dev Resolve a handle to nonce
115
+ * @dev Resolve a handle to a EIP 712 nonce
123
116
* @param handle The handle to resolve
124
117
*
125
- * @return nonce value for handle
118
+ * rejects if not found
119
+ * @return expected nonce for next EIP 712 update
126
120
*/
127
121
function resolveHandleToNonce (string calldata handle ) external view returns (uint32 );
128
122
}
0 commit comments