import 'package:decimal/decimal.dart'; import 'package:stackwallet/models/models.dart'; import 'package:stackwallet/services/tokens/ethereum/ethereum_token.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; import 'package:stackwallet/utilities/prefs.dart'; abstract class TokenServiceAPI { TokenServiceAPI(); factory TokenServiceAPI.from( String contractAddress, String walletId, SecureStorageInterface secureStorageInterface, TransactionNotificationTracker tracker, Prefs prefs, ) { return EthereumToken( contractAddress: contractAddress, walletId: walletId, secureStore: secureStorageInterface, tracker: tracker, ); } Coin get coin; bool get isRefreshing; bool get shouldAutoSync; set shouldAutoSync(bool shouldAutoSync); Future> prepareSend({ required String address, required int satoshiAmount, Map? args, }); Future confirmSend({required Map txData}); Future get fees; Future get maxFee; Future get currentReceivingAddress; // Future get currentLegacyReceivingAddress; Future get availableBalance; Future get pendingBalance; Future get totalBalance; Future get balanceMinusMaxFee; Future> get allOwnAddresses; Future get transactionData; Future refresh(); // String get walletName; // String get walletId; bool validateAddress(String address); Future initializeNew(); Future initializeExisting(); // void Function(bool isActive)? onIsActiveWalletChanged; bool get isConnected; Future estimateFeeFor(int satoshiAmount, int feeRate); // used for electrumx coins Future updateSentCachedTxData(Map txData); }