changeRecoveryIdentifier method

  1. @override
Future<void> changeRecoveryIdentifier(
  1. Uint8List signerPrivateKey,
  2. String newRecoveryIdentifier
)
override

Change recovery identifier

Implementation

@override
Future<void> changeRecoveryIdentifier(Uint8List signerPrivateKey, String newRecoveryIdentifier) async {
  try {
    final params = <String, dynamic>{
      'signerPrivateKey': signerPrivateKey.toList(),
      'newRecoveryIdentifier': newRecoveryIdentifier,
    }.jsify() as JSObject;

    await _promiseToFuture(
      _clientManager.changeRecoveryIdentifier(params),
    );
  } catch (e) {
    throw Exception('Failed to change recovery identifier: $e');
  }
}