getNextCredentialDID method

Future<String> getNextCredentialDID([
  1. KeyType keyType = KeyType.secp256k1
])

Returns a new DID a credential could be issued for.

Implementation

Future<String> getNextCredentialDID(
    [KeyType keyType = KeyType.secp256k1]) async {
  if (keyType == KeyType.secp256k1) {
    return _getNextCredentialDidEthr();
  } else if (keyType == KeyType.ed25519) {
    return _getNextCredentialDIDWithEdKey();
  } else {
    throw Exception('Unsupported Credential KeyType `$keyType`');
  }
}