2023-12-16 08:49:23 +00:00
|
|
|
import 'package:cake_wallet/utils/language_list.dart';
|
2024-03-14 06:28:29 +00:00
|
|
|
import 'package:cw_core/wallet_base.dart';
|
2024-03-19 15:51:08 +00:00
|
|
|
import 'package:cw_zano/model/zano_asset.dart';
|
|
|
|
import 'package:cw_zano/model/zano_transaction_credentials.dart';
|
2024-03-20 11:17:48 +00:00
|
|
|
import 'package:cw_zano/zano_formatter.dart';
|
2023-10-02 14:17:35 +00:00
|
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
import 'package:cw_core/wallet_credentials.dart';
|
|
|
|
import 'package:cw_core/wallet_info.dart';
|
|
|
|
import 'package:cw_core/transaction_priority.dart';
|
|
|
|
import 'package:cw_core/transaction_history.dart';
|
|
|
|
import 'package:cw_core/transaction_info.dart';
|
|
|
|
import 'package:cw_core/balance.dart';
|
|
|
|
import 'package:cw_core/output_info.dart';
|
|
|
|
import 'package:cake_wallet/view_model/send/output.dart';
|
|
|
|
import 'package:cw_core/wallet_service.dart';
|
|
|
|
import 'package:hive/hive.dart';
|
|
|
|
import 'package:cw_core/crypto_currency.dart';
|
|
|
|
import 'package:cw_core/monero_amount_format.dart';
|
|
|
|
import 'package:cw_core/monero_transaction_priority.dart';
|
|
|
|
import 'package:cw_zano/zano_wallet_service.dart';
|
|
|
|
import 'package:cw_zano/zano_wallet.dart';
|
2024-03-19 15:51:08 +00:00
|
|
|
import 'package:cw_zano/model/zano_transaction_info.dart';
|
2023-10-02 14:17:35 +00:00
|
|
|
import 'package:cw_zano/mnemonics/english.dart';
|
|
|
|
|
|
|
|
part 'cw_zano.dart';
|
|
|
|
|
|
|
|
Zano? zano = CWZano();
|
|
|
|
|
|
|
|
abstract class Zano {
|
|
|
|
TransactionHistoryBase getTransactionHistory(Object wallet);
|
|
|
|
TransactionPriority getDefaultTransactionPriority();
|
|
|
|
TransactionPriority deserializeMoneroTransactionPriority({required int raw});
|
|
|
|
List<TransactionPriority> getTransactionPriorities();
|
2023-12-16 08:49:23 +00:00
|
|
|
List<String> getWordList(String language);
|
2023-10-02 14:17:35 +00:00
|
|
|
|
|
|
|
WalletCredentials createZanoRestoreWalletFromKeysCredentials({
|
|
|
|
required String name,
|
|
|
|
required String spendKey,
|
|
|
|
required String viewKey,
|
|
|
|
required String address,
|
|
|
|
required String password,
|
|
|
|
required String language,
|
|
|
|
required int height});
|
|
|
|
WalletCredentials createZanoRestoreWalletFromSeedCredentials({required String name, required String password, required int height, required String mnemonic});
|
2023-11-17 17:40:23 +00:00
|
|
|
WalletCredentials createZanoNewWalletCredentials({required String name, String password});
|
2023-10-02 14:17:35 +00:00
|
|
|
Map<String, String> getKeys(Object wallet);
|
2024-03-16 10:55:03 +00:00
|
|
|
Object createZanoTransactionCredentials({required List<Output> outputs, required TransactionPriority priority, required CryptoCurrency currency});
|
2024-03-20 11:17:48 +00:00
|
|
|
double formatterIntAmountToDouble({required int amount, required CryptoCurrency currency});
|
|
|
|
int formatterParseAmount({required String amount, required CryptoCurrency currency});
|
2023-10-02 14:17:35 +00:00
|
|
|
int getTransactionInfoAccountId(TransactionInfo tx);
|
|
|
|
WalletService createZanoWalletService(Box<WalletInfo> walletInfoSource);
|
2024-03-16 10:55:03 +00:00
|
|
|
CryptoCurrency assetOfTransaction(WalletBase wallet, TransactionInfo tx);
|
2024-03-14 06:28:29 +00:00
|
|
|
List<ZanoAsset> getZanoAssets(WalletBase wallet);
|
|
|
|
String getZanoAssetAddress(CryptoCurrency asset);
|
2024-03-19 15:51:08 +00:00
|
|
|
Future<void> changeZanoAssetAvailability(WalletBase wallet, CryptoCurrency token);
|
2024-03-15 12:42:27 +00:00
|
|
|
Future<CryptoCurrency> addZanoAssetById(WalletBase wallet, String assetId);
|
2024-03-14 06:28:29 +00:00
|
|
|
Future<void> deleteZanoAsset(WalletBase wallet, CryptoCurrency token);
|
|
|
|
Future<CryptoCurrency?> getZanoAsset(WalletBase wallet, String contractAddress);
|
2024-03-20 11:17:48 +00:00
|
|
|
String getAddress(WalletBase wallet);
|
2023-10-02 14:17:35 +00:00
|
|
|
}
|