importAccount method

Future<Map?> importAccount({
  1. required EVMKeyType keyType,
  2. required String key,
  3. required String name,
  4. required String password,
})

Implementation

Future<Map?> importAccount({
  required EVMKeyType keyType,
  required String key,
  required String name,
  required String password,
}) async {
  final acc = await service.importAccount(
      keyType: keyType, key: key, password: password, name: name);

  if (acc['error'] != null) {
    throw Exception(acc['error']);
  }

  return acc;
}