getLastCredentialIndex method

int? getLastCredentialIndex([
  1. KeyType keyType = KeyType.secp256k1
])

Returns the last value of the next HD-path for the credential keys.

Implementation

int? getLastCredentialIndex([KeyType keyType = KeyType.secp256k1]) {
  if (keyType == KeyType.secp256k1) {
    return _keyBox!.get('lastCredentialIndex');
  } else if (keyType == KeyType.ed25519) {
    return _keyBox!.get('lastCredentialIndexEd');
  } else {
    throw Exception('Unknown KeyType');
  }
}