getNextConnectionDID method
Returns a new connection-DID.
Implementation
Future<String> getNextConnectionDID(
[KeyType keyType = KeyType.secp256k1, bool isDidKey = false]) async {
if (keyType == KeyType.secp256k1) {
return _getNextConnectionDidEthr(isDidKey);
} else if (keyType == KeyType.ed25519) {
return _getNextConnectionDIDWithEdKey();
} else if (keyType == KeyType.x25519) {
return _getNextConnectionDidXKey();
} else if (keyType == KeyType.p384 ||
keyType == KeyType.p256 ||
keyType == KeyType.p521) {
return _generatePdid(keyType, 'lastConnectionDidP');
} else {
throw Exception('Unknown KeyType');
}
}