39 lines
1006 B
Dart
39 lines
1006 B
Dart
part of '../wallet.dart';
|
|
|
|
abstract class IWalletRepository {
|
|
Future<Either<WalletFailure, WalletSummary>> getWallet();
|
|
|
|
Future<Either<WalletFailure, WalletTransactionPage>> getTransactions({
|
|
required int page,
|
|
int limit = 20,
|
|
WalletCurrency? currency,
|
|
List<WalletTransactionType> types = const [],
|
|
DateTime? from,
|
|
DateTime? to,
|
|
});
|
|
|
|
Future<Either<WalletFailure, WalletExpiring>> getExpiring();
|
|
|
|
Future<Either<WalletFailure, ExchangePreview>> previewExchange({
|
|
required int coins,
|
|
});
|
|
|
|
Future<Either<WalletFailure, ExchangeResult>> exchange({
|
|
required int coins,
|
|
required String pin,
|
|
required String idempotencyKey,
|
|
});
|
|
|
|
Future<Either<WalletFailure, TransferRecipient>> checkRecipient({
|
|
required String phone,
|
|
});
|
|
|
|
Future<Either<WalletFailure, TransferResult>> transfer({
|
|
required WalletCurrency currency,
|
|
required int amount,
|
|
required String recipientPhone,
|
|
required String pin,
|
|
required String idempotencyKey,
|
|
});
|
|
}
|