getDidDocument static method
Returns the Did Document associated with the given did
,
or null
if no Did Document was found.
Implementation
static Future<DidDocument?> getDidDocument(
String did,
Wallet wallet, {
http.Client? client,
}) async {
final url = Uri.parse('${wallet.networkInfo.lcdUrl}/identities/$did');
final response = await Network.queryChain(url, client: client);
if (response == null) {
return null;
}
return DidDocument.fromJson(response['did_document']);
}