getLastConnectionDid method

String? getLastConnectionDid([
  1. KeyType keyType = KeyType.secp256k1
])

Implementation

String? getLastConnectionDid([KeyType keyType = KeyType.secp256k1]) {
  if (keyType == KeyType.secp256k1) {
    return _configBox!.get('lastConnectionDid');
  } else if (keyType == KeyType.ed25519) {
    return _configBox!.get('lastConnectionDidEd');
  } else if (keyType == KeyType.x25519) {
    return _configBox!.get('lastConnectionDidX');
  } else if (keyType == KeyType.p384 ||
      keyType == KeyType.p256 ||
      keyType == KeyType.p521) {
    return _configBox!.get('lastConnectionDidP');
  } else {
    throw Exception('Unknown KeyType');
  }
}