Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2edfe0f
xelis boiler plate early setup
Tritonn204 Jan 28, 2025
2061eba
xelis CryptoCurrency definition added, bridged wallet wrapper started
Tritonn204 Jan 29, 2025
34cee82
added xelis enum variants
Tritonn204 Jan 29, 2025
5f9466c
build script + dep updates, xelis library integration progress
Tritonn204 Feb 6, 2025
96478de
gitignore
Tritonn204 Feb 6, 2025
24a2023
Xelis base integration
Tritonn204 Feb 12, 2025
7a3558e
Slight polish for Xelis integration
Tritonn204 Feb 12, 2025
c6bff81
Android works
Tritonn204 Feb 14, 2025
e1964ea
adjusted for xelis flutter refactor
Tritonn204 Feb 14, 2025
1463ea7
Xelis price service added, wallet storage bugs fixed, updated to appl…
Tritonn204 Feb 15, 2025
e04efc7
Apple/iOS builds working (with PRs from plugins)
Tritonn204 Feb 16, 2025
2f02d4d
removed Xelis lib from build scripts
Tritonn204 Feb 16, 2025
0dad4ad
updated linux devops for new Xelis flutter setup, fixed Xelis fee est…
Tritonn204 Feb 17, 2025
102fab5
updated price_test, corrected outgoing tx db entries for xelis
Tritonn204 Feb 17, 2025
8b41d0b
xelis_flutter branch switch adopted
Tritonn204 Feb 20, 2025
a06945b
xelis_flutter correction
Tritonn204 Feb 20, 2025
2879e5b
updated fee estimation params in xelis_flutter
Tritonn204 Feb 20, 2025
8c6f660
libepiccash build script corrections, pubspec template adjusted for s…
Tritonn204 Feb 26, 2025
f56519e
svg change reversal
Tritonn204 Feb 27, 2025
0ed0ef3
removed frostdart from windows build scripts
Tritonn204 Feb 27, 2025
448fd0c
keep version update without frostdart in windows build scripts
Tritonn204 Feb 27, 2025
c1cd986
removed xelis submodule in favor of git tag dependency
Tritonn204 Mar 11, 2025
4e26e4c
updated dep template
Tritonn204 Mar 11, 2025
f7b7362
added port information to xelis connection invocations
Tritonn204 Mar 12, 2025
dd67d2f
reversions and deletions as per request
Tritonn204 Mar 13, 2025
0d20cb6
remove logging package from test_node_connection
Tritonn204 Mar 13, 2025
0f7e44f
rebase cleanup + xelis bug fixes
Tritonn204 Mar 14, 2025
4feb14c
updated rust logging method, added mnemonic word validation for Xelis
Tritonn204 Mar 15, 2025
6e725a5
removed comment
Tritonn204 Mar 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ secp256k1.dll
/lib/app_config.g.dart
/android/app/src/main/app_icon-playstore.png

# Dart generated files (Freezed, Riverpod, GoRouter etc..)
lib/**/*.g.dart
lib/**/*.freezed.dart

## other generated project files

pubspec.yaml
Expand Down Expand Up @@ -106,3 +110,4 @@ scripts/linux/build/libsecret/subprojects/gi-docgen/.meson-subproject-wrap-hash.

crypto_plugins/cs_monero/built_outputs
crypto_plugins/cs_monero/build
crypto_plugins/*.diff
36 changes: 21 additions & 15 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ PODS:
- Flutter
- wakelock_plus (0.0.1):
- Flutter
- xelis_flutter (0.0.1):
- Flutter

DEPENDENCIES:
- barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`)
Expand Down Expand Up @@ -138,6 +140,7 @@ DEPENDENCIES:
- tor_ffi_plugin (from `.symlinks/plugins/tor_ffi_plugin/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- xelis_flutter (from `.symlinks/plugins/xelis_flutter/ios`)

SPEC REPOS:
trunk:
Expand Down Expand Up @@ -205,6 +208,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
xelis_flutter:
:path: ".symlinks/plugins/xelis_flutter/ios"

SPEC CHECKSUMS:
barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0
Expand All @@ -215,34 +220,35 @@ SPEC CHECKSUMS:
devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_libepiccash: 36241aa7d3126f6521529985ccb3dc5eaf7bb317
flutter_libsparkmobile: 6373955cc3327a926d17059e7405dde2fb12f99f
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_libepiccash: 7d480d11241faea8aefdcb96991319c5e26d4735
flutter_libsparkmobile: e2fcf99dafae4f5d28bf15468bad6d2ba9403c64
flutter_local_notifications: ad39620c743ea4c15127860f4b5641649a988100
flutter_native_splash: 9e672d3818957718ee006a491730c09deeecace9
flutter_secure_storage: 2c2ff13db9e0a5647389bff88b0ecac56e3f3418
frostdart: 4c72b69ccac2f13ede744107db046a125acce597
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
isar_flutter_libs: fdf730ca925d05687f36d7f1d355e482529ed097
lelantus: 417f0221260013dfc052cae9cf4b741b6479edba
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
isar_flutter_libs: bc909e72c3d756c2759f14c8776c13b5b0556e26
lelantus: a5bdee9de3d78dedd1fffda1d92ea3c67106881f
local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
share_plus: de6030e33b4e106470e09322d87cf2a4258d2d1d
sqlite3: 292c3e1bfe89f64e51ea7fc7dab9182a017c8630
sqlite3_flutter_libs: 0d611efdf6d1c9297d5ab03dab21b75aeebdae31
stack_wallet_backup: 5b8563aba5d8ffbf2ce1944331ff7294a0ec7c03
SwiftProtobuf: 6ef3f0e422ef90d6605ca20b21a94f6c1324d6b3
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
tor_ffi_plugin: d80e291b649379c8176e1be739e49be007d4ef93
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
tor_ffi_plugin: 2a4dd758515e5124dce8323f950f6bb135e611b5
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
wakelock_plus: fd58c82b1388f4afe3fe8aa2c856503a262a5b03
xelis_flutter: 63a1007da6fd27faa9f451bb9c2f7aa165c01cbe

PODFILE CHECKSUM: 57c8aed26fba39d3ec9424816221f294a07c58eb

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
16 changes: 16 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,31 @@ import 'wallets/isar/providers/all_wallets_info_provider.dart';
import 'wallets/wallet/wallet_mixin_interfaces/spark_interface.dart';
import 'widgets/crypto_notifications.dart';

import 'package:xelis_flutter/src/frb_generated.dart' as xelis_rust;
import 'package:xelis_flutter/src/api/api.dart' as xelis_api;

final openedFromSWBFileStringStateProvider =
StateProvider<String?>((ref) => null);

void startListeningToRustLogs() {
xelis_api.createLogStream().listen((logEntry) {
Logging.instance.i("[Rust Log] [${logEntry.level}] ${logEntry.tag}: ${logEntry.msg}");
}, onError: (e) {
Logging.instance.e("Error receiving Rust logs: $e");
});
}

// main() is the entry point to the app. It initializes Hive (local database),
// runs the MyApp widget and checks for new users, caching the value in the
// miscellaneous box for later use
void main(List<String> args) async {
// talker.info('initializing Rust lib ...');
await xelis_rust.RustLib.init();
WidgetsFlutterBinding.ensureInitialized();

await xelis_api.setUpRustLogger();
startListeningToRustLogs();

if (Util.isDesktop && args.length == 2 && args.first == "-d") {
StackFileSystem.setDesktopOverrideDir(args.last);
}
Expand Down
5 changes: 4 additions & 1 deletion lib/models/isar/models/blockchain_data/address.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ enum AddressType {
frostMS,
p2tr,
solana,
cardanoShelley;
cardanoShelley,
xelis;

String get readableName {
switch (this) {
Expand Down Expand Up @@ -213,6 +214,8 @@ enum AddressType {
return "P2TR (taproot)";
case AddressType.cardanoShelley:
return "Cardano Shelley";
case AddressType.xelis:
return "Xelis";
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/models/isar/models/blockchain_data/address.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class _NewWalletRecoveryPhraseWarningViewState

// TODO: Refactor these to generate each coin in their respective classes
// This code should not be in a random view page file
if (coin is Monero || coin is Wownero) {
if (coin is Monero || coin is Wownero || coin is Xelis) {
// currently a special case due to the
// xmr/wow libraries handling their
// own mnemonic generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import '../../../wallets/isar/models/wallet_info.dart';
import '../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../wallets/wallet/impl/monero_wallet.dart';
import '../../../wallets/wallet/impl/wownero_wallet.dart';
import '../../../wallets/wallet/impl/xelis_wallet.dart';
import '../../../wallets/wallet/wallet.dart';
import '../../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart';
import '../../../widgets/custom_buttons/app_bar_icon_button.dart';
Expand Down Expand Up @@ -264,6 +265,10 @@ class _RestoreViewOnlyWalletViewState
await (wallet as WowneroWallet).init(isRestore: true);
break;

case const (XelisWallet):
await (wallet as XelisWallet).init(isRestore: true);
break;

default:
await wallet.init();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

import 'package:xelis_flutter/src/api/seed_search_engine.dart' as x_seed;

import '../../../notifications/show_flush_bar.dart';
import '../../../pages_desktop_specific/desktop_home_view.dart';
import '../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
Expand All @@ -49,6 +51,7 @@ import '../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../wallets/wallet/impl/monero_wallet.dart';
import '../../../wallets/wallet/impl/wownero_wallet.dart';
import '../../../wallets/wallet/intermediate/lib_monero_wallet.dart';
import '../../../wallets/wallet/impl/xelis_wallet.dart';
import '../../../wallets/wallet/supporting/epiccash_wallet_info_extension.dart';
import '../../../wallets/wallet/wallet.dart';
import '../../../widgets/custom_buttons/app_bar_icon_button.dart';
Expand Down Expand Up @@ -103,6 +106,7 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
late final int _seedWordCount;
late final bool isDesktop;

x_seed.SearchEngine? _xelisSeedSearch;
final HashSet<String> _wordListHashSet = HashSet.from(bip39wordlist.WORDLIST);
final ScrollController controller = ScrollController();

Expand Down Expand Up @@ -167,6 +171,10 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
// _focusNodes.add(FocusNode());
}

if (widget.coin is Xelis) {
_xelisSeedSearch = x_seed.SearchEngine.init(languageIndex: BigInt.from(0));
}

super.initState();
}

Expand Down Expand Up @@ -199,6 +207,9 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
);
return wowneroWordList.contains(word);
}
if (widget.coin is Xelis) {
return _xelisSeedSearch!.search(query: word).length > 0;
}
return _wordListHashSet.contains(word);
}

Expand Down Expand Up @@ -283,10 +294,9 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
);
}

// TODO: do actual check to make sure it is a valid mnemonic for monero
// TODO: do actual check to make sure it is a valid mnemonic for monero + xelis
if (bip39.validateMnemonic(mnemonic) == false &&
!(widget.coin is Monero || widget.coin is Wownero)) {
if (mounted) setState(() => _hideSeedWords = false);
!(widget.coin is Monero || widget.coin is Wownero || widget.coin is Xelis)) {
unawaited(
showFloatingFlushBar(
type: FlushBarType.warning,
Expand Down Expand Up @@ -371,6 +381,10 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
await (wallet as WowneroWallet).init(isRestore: true);
break;

case const (XelisWallet):
await (wallet as XelisWallet).init(isRestore: true);
break;

default:
await wallet.init();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import '../../../wallets/isar/providers/wallet_info_provider.dart';
import '../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../wallets/wallet/impl/monero_wallet.dart';
import '../../../wallets/wallet/impl/wownero_wallet.dart';
import '../../../wallets/wallet/impl/xelis_wallet.dart';
import '../../../wallets/wallet/intermediate/lib_monero_wallet.dart';
import '../../../wallets/wallet/wallet.dart';
import '../../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart';
Expand Down Expand Up @@ -225,6 +226,10 @@ class _VerifyRecoveryPhraseViewState
await (voWallet as WowneroWallet).init(isRestore: true);
break;

case const (XelisWallet):
await (voWallet as XelisWallet).init(isRestore: true);
break;

default:
await voWallet.init();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import '../../../../../wallets/wallet/impl/bitcoin_frost_wallet.dart';
import '../../../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../../../wallets/wallet/impl/monero_wallet.dart';
import '../../../../../wallets/wallet/impl/wownero_wallet.dart';
import '../../../../../wallets/wallet/impl/xelis_wallet.dart';
import '../../../../../wallets/wallet/intermediate/lib_monero_wallet.dart';
import '../../../../../wallets/wallet/wallet.dart';
import '../../../../../wallets/wallet/wallet_mixin_interfaces/mnemonic_interface.dart';
Expand Down Expand Up @@ -506,6 +507,10 @@ abstract class SWB {
case const (WowneroWallet):
await (wallet as WowneroWallet).init(isRestore: true);
break;

case const (XelisWallet):
await (wallet as XelisWallet).init(isRestore: true);
break;

default:
await wallet.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1366,13 +1366,17 @@ class _TransactionV2DetailsViewState
],
),
),
if (coin is! NanoCurrency)
if (coin is! NanoCurrency &&
!(coin is Xelis && _transaction.type == TransactionType.incoming)
)
isDesktop
? const _Divider()
: const SizedBox(
height: 12,
),
if (coin is! NanoCurrency)
if (coin is! NanoCurrency &&
!(coin is Xelis && _transaction.type == TransactionType.incoming)
)
RoundedWhiteContainer(
padding: isDesktop
? const EdgeInsets.all(16)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import '../../utilities/text_styles.dart';
import '../../utilities/util.dart';
import '../../wallets/crypto_currency/crypto_currency.dart';
import '../../wallets/isar/providers/all_wallets_info_provider.dart';
import '../../wallets/wallet/intermediate/lib_monero_wallet.dart';
import '../../wallets/wallet/intermediate/external_wallet.dart';
import '../../widgets/breathing.dart';
import '../../widgets/conditional_parent.dart';
import '../../widgets/desktop/desktop_dialog.dart';
Expand Down Expand Up @@ -138,7 +138,7 @@ class _DesktopWalletSummaryRowState
}

final Future<void> loadFuture;
if (wallet is LibMoneroWallet) {
if (wallet is ExternalWallet) {
loadFuture =
wallet.init().then((value) async => await (wallet).open());
} else {
Expand Down
Loading