getPrivateKeyForCredentialDid method
Returns the private key as hex-String associated with did
.
Implementation
Future<String?> getPrivateKeyForCredentialDid(
String did,
) async {
if (did.startsWith('did:ethr')) {
return _getPrivateKeyForCredentialDidEthr(did);
} else if (did.startsWith('did:key:z6Mk')) {
return _getPrivateKeyForCredentialDidEd(did);
} else {
throw Exception('Unknown KeyType');
}
}