-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathbip85_locator.dart
More file actions
62 lines (57 loc) · 2.56 KB
/
Copy pathbip85_locator.dart
File metadata and controls
62 lines (57 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import 'package:bb_mobile/core/bip85/data/bip85_datasource.dart';
import 'package:bb_mobile/core/bip85/data/bip85_repository.dart';
import 'package:bb_mobile/core/bip85/domain/activate_bip85_derivation_usecase.dart';
import 'package:bb_mobile/core/bip85/domain/alias_bip85_derivation_usecase.dart';
import 'package:bb_mobile/core/bip85/domain/derive_next_bip85_hex_from_default_wallet_usecase.dart';
import 'package:bb_mobile/core/bip85/domain/derive_next_bip85_mnemonic_from_default_wallet_usecase.dart';
import 'package:bb_mobile/core/bip85/domain/revoke_bip85_derivation_usecase.dart';
import 'package:bb_mobile/core/seed/data/repository/seed_repository.dart';
import 'package:bb_mobile/core/settings/data/settings_repository.dart';
import 'package:bb_mobile/core/storage/sqlite_database.dart';
import 'package:bb_mobile/core/wallet/data/repositories/wallet_repository.dart';
import 'package:get_it/get_it.dart';
class Bip85DerivationsLocator {
static void registerDatasources(GetIt locator) {
locator.registerLazySingleton<Bip85Datasource>(
() => Bip85Datasource(sqlite: locator<SqliteDatabase>()),
);
}
static void registerRepositories(GetIt locator) {
locator.registerLazySingleton<Bip85Repository>(
() => Bip85Repository(datasource: locator<Bip85Datasource>()),
);
}
static void registerUsecases(GetIt locator) {
locator.registerFactory<DeriveNextBip85HexFromDefaultWalletUsecase>(
() => DeriveNextBip85HexFromDefaultWalletUsecase(
bip85Repository: locator<Bip85Repository>(),
walletRepository: locator<WalletRepository>(),
seedRepository: locator<SeedRepository>(),
settingsRepository: locator<SettingsRepository>(),
),
);
locator.registerFactory<DeriveNextBip85MnemonicFromDefaultWalletUsecase>(
() => DeriveNextBip85MnemonicFromDefaultWalletUsecase(
bip85Repository: locator<Bip85Repository>(),
walletRepository: locator<WalletRepository>(),
seedRepository: locator<SeedRepository>(),
settingsRepository: locator<SettingsRepository>(),
),
);
locator.registerFactory<AliasBip85DerivationUsecase>(
() => AliasBip85DerivationUsecase(
bip85Repository: locator<Bip85Repository>(),
),
);
locator.registerFactory<RevokeBip85DerivationUsecase>(
() => RevokeBip85DerivationUsecase(
bip85Repository: locator<Bip85Repository>(),
),
);
locator.registerFactory<ActivateBip85DerivationUsecase>(
() => ActivateBip85DerivationUsecase(
bip85Repository: locator<Bip85Repository>(),
),
);
}
}