whoIs method Null safety
- String did
Get a User's WhoIs
This method queries the blockchain for a user's WhoIs data. This contains the user's DIDDocument and Alias data.
Parameters
did
- The user's DID to query for
Implementation
Future<WhoIs?> whoIs(String did) async {
try {
final response = await httpClient.get<QueryWhoIsResponse>('/registry/who_is/$did', contentType: "application/json");
if (!response.isOk || response.body == null) {
return null;
}
return response.body?.whoIs;
} catch (e) {
Log.warn("Failed to call query using REST API on $baseUrl/$query");
}
return null;
}