2023-07-24 18:09:28 +00:00
|
|
|
part of 'nano.dart';
|
|
|
|
|
2023-07-24 20:23:09 +00:00
|
|
|
class CWNano extends Nano {
|
|
|
|
// @override
|
2023-07-24 21:01:07 +00:00
|
|
|
// NanoAccountList getAccountList(Object wallet) {
|
|
|
|
// return CWNanoAccountList(wallet);
|
|
|
|
// }
|
2023-07-24 18:09:28 +00:00
|
|
|
|
|
|
|
@override
|
2023-07-24 20:23:09 +00:00
|
|
|
List<String> getNanoWordList(String language) {
|
2023-07-25 20:31:52 +00:00
|
|
|
// throw UnimplementedError();
|
|
|
|
return NanoMnemomics.WORDLIST;
|
2023-07-24 20:23:09 +00:00
|
|
|
}
|
2023-07-24 18:09:28 +00:00
|
|
|
|
|
|
|
@override
|
2023-07-24 20:23:09 +00:00
|
|
|
WalletService createNanoWalletService(Box<WalletInfo> walletInfoSource) {
|
2023-07-25 17:36:24 +00:00
|
|
|
print("creating NanoWalletService");
|
2023-07-25 15:21:49 +00:00
|
|
|
return NanoWalletService(walletInfoSource);
|
2023-07-24 21:01:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NanoWalletDetails getNanoWalletDetails(Object wallet) {
|
|
|
|
throw UnimplementedError();
|
|
|
|
}
|
|
|
|
|
|
|
|
String getTransactionAddress(Object wallet, int accountIndex, int addressIndex) {
|
|
|
|
throw UnimplementedError();
|
2023-07-24 18:09:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
2023-07-24 20:23:09 +00:00
|
|
|
WalletCredentials createNanoNewWalletCredentials({
|
|
|
|
required String name,
|
|
|
|
String? password,
|
2023-07-25 20:31:52 +00:00
|
|
|
}) =>
|
|
|
|
NanoNewWalletCredentials(
|
|
|
|
name: name,
|
|
|
|
password: password,
|
|
|
|
);
|
|
|
|
|
|
|
|
@override
|
|
|
|
WalletCredentials createNanoRestoreWalletFromSeedCredentials({
|
|
|
|
required String name,
|
|
|
|
required String password,
|
2023-07-31 13:10:33 +00:00
|
|
|
required String mnemonic,
|
|
|
|
DerivationType? derivationType,
|
2023-07-25 20:31:52 +00:00
|
|
|
}) =>
|
|
|
|
NanoRestoreWalletFromSeedCredentials(
|
|
|
|
name: name,
|
|
|
|
password: password,
|
|
|
|
mnemonic: mnemonic,
|
2023-07-26 17:15:22 +00:00
|
|
|
derivationType: derivationType,
|
2023-07-25 20:31:52 +00:00
|
|
|
);
|
2023-07-24 18:09:28 +00:00
|
|
|
|
|
|
|
@override
|
2023-07-24 20:23:09 +00:00
|
|
|
TransactionHistoryBase getTransactionHistory(Object wallet) {
|
|
|
|
// final moneroWallet = wallet as MoneroWallet;
|
|
|
|
// return moneroWallet.transactionHistory;
|
|
|
|
throw UnimplementedError();
|
2023-07-24 18:09:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
2023-07-24 20:23:09 +00:00
|
|
|
void onStartup() {
|
|
|
|
// monero_wallet_api.onStartup();
|
2023-07-24 18:09:28 +00:00
|
|
|
}
|
2023-07-31 13:10:33 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Object createNanoTransactionCredentials(List<Output> outputs) {
|
|
|
|
return NanoTransactionCredentials(
|
|
|
|
outputs
|
|
|
|
.map((out) => OutputInfo(
|
|
|
|
fiatAmount: out.fiatAmount,
|
|
|
|
cryptoAmount: out.cryptoAmount,
|
|
|
|
address: out.address,
|
|
|
|
note: out.note,
|
|
|
|
sendAll: out.sendAll,
|
|
|
|
extractedAddress: out.extractedAddress,
|
|
|
|
isParsedAddress: out.isParsedAddress,
|
|
|
|
formattedCryptoAmount: out.formattedCryptoAmount,
|
|
|
|
))
|
|
|
|
.toList(),
|
|
|
|
);
|
|
|
|
}
|
2023-07-24 18:09:28 +00:00
|
|
|
}
|