getLastConnectionIndex method

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

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

Implementation

int? getLastConnectionIndex([KeyType keyType = KeyType.secp256k1]) {
  if (keyType == KeyType.secp256k1) {
    return _keyBox!.get('lastConnectionIndex');
  } else if (keyType == KeyType.ed25519) {
    return _keyBox!.get('lastConnectionIndexEd');
  } else if (keyType == KeyType.x25519) {
    return _keyBox!.get('lastConnectionIndexX');
  } else {
    throw Exception('Unknown KeyType');
  }
}