Skip to content
Open

Xelis #2328

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7783646
added xelis deps
Tritonn204 Mar 31, 2025
fba275a
added devops config handling for Xelis
Tritonn204 Apr 2, 2025
fe39deb
added mnemonic language util methods
Tritonn204 Apr 2, 2025
93f5b11
implemented getXelisWordList
Tritonn204 Apr 2, 2025
3ff84e3
Merge branch 'xelis' of https://github.com/Tritonn204/cake_wallet int…
Tritonn204 Apr 2, 2025
7a2a48b
added cw_xelis wrapper plugin, begun xelis wallet service implementation
Tritonn204 Apr 2, 2025
e641547
cw_xelis boilerplate updates
Tritonn204 Apr 2, 2025
021e47b
corrected wallet path handling for xelis
Tritonn204 Apr 2, 2025
55f480e
cw_xelis cleanup with dart analyzer, further integration progess
Tritonn204 Apr 4, 2025
0c669a3
verious architectural milestones for Xelis integration
Tritonn204 Apr 5, 2025
f705063
xelis bug fixes
Tritonn204 Apr 6, 2025
46c0ea9
support sending/receiving xelis
Tritonn204 Apr 6, 2025
14c6159
tightened send/receiving xelis
Tritonn204 Apr 6, 2025
6618c64
devops changes for xelis
Tritonn204 Apr 6, 2025
5666a7a
undid github runner experiment
Tritonn204 Apr 6, 2025
8fedc03
Merge branch 'cake-tech:main' into xelis
Tritonn204 Apr 6, 2025
c2c7520
initial boilerplate for Xelis asset support
Tritonn204 Apr 7, 2025
fd4c2e2
Xelis integration in working state
Tritonn204 Apr 9, 2025
56bd5ac
xelis tx display and rescan improvements
Tritonn204 Apr 11, 2025
4b9497f
removed build file
Tritonn204 Apr 11, 2025
82b25f0
xelis bug fixes, amount info displayed in multi-send records
Tritonn204 Apr 11, 2025
37584f9
xelis bug fixes
Tritonn204 Apr 12, 2025
075e3e1
updated xelis_flutter lib, improves xelis token/asset support
Tritonn204 Apr 16, 2025
4a528e2
various fixes and improvements for Xelis native assets + stability
Tritonn204 May 29, 2025
d477892
update xelis ffi dep
Tritonn204 May 29, 2025
9fcb367
dep + json safety updates for Xelis
Tritonn204 Jun 6, 2025
4ccb7a3
update README
Tritonn204 Jun 6, 2025
03665e3
Display amounts per recipient for Xelis multi-TX, reconnect on Xelis …
Tritonn204 Jun 7, 2025
194245b
cleaned up handling of xelis tx details and history syncing
Tritonn204 Jun 18, 2025
d22e635
corrected analysis_options
Tritonn204 Jun 18, 2025
9c67920
Merge branch 'main' into xelis
Tritonn204 Jun 18, 2025
18d94a0
Xelis wallet service rework, Xelis TX view formatting adjustments, Xe…
Tritonn204 Jun 19, 2025
75ffbe2
Corrected testnet TX fee ticker for Xelis
Tritonn204 Jun 20, 2025
75e2c67
Merge branch 'main' into xelis
Tritonn204 Jun 20, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.log
*.pyc
*.swp
*.zip
.DS_Store
.atom/
.buildlog/
Expand Down Expand Up @@ -140,6 +141,7 @@ lib/tron/tron.dart
lib/wownero/wownero.dart
lib/zano/zano.dart
lib/decred/decred.dart
lib/xelis/xelis.dart

ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon@2x~ipad.png
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ Cake Wallet includes support for several cryptocurrencies, including:
* Automatically generate new addresses
* Specify multiple recipients for batch sending

### Xelis Specific Features

* Store XEL and all native assets/tokens
* Add custom tokens by asset ID
* Specify multiple recipients for batch sending

# Monero.com by Cake Wallet for Android and iOS

## Open Source Monero-Only Wallet
Expand Down
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ analyzer:
lib/tron/cw_tron.dart,
lib/wownero/cw_wownero.dart,
lib/zano/cw_zano.dart,
lib/xelis/cw_xelis.dart,
]
language:
strict-casts: true
Expand Down
11 changes: 11 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1744859372158</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
13 changes: 12 additions & 1 deletion android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
eclipse.preferences.version=1
gradle.user.home=
java.home=
jvm.arguments=
offline.mode=false
override.workspace.settings=false
show.console.view=false
show.executions.view=false
Binary file added assets/images/xelis_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/xelis_testnet_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions assets/xelis_node_list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-
uri: us-node.xelis.io
useSSL: true
is_default: true
-
uri: pl-node.xelis.io
useSSL: true
-
uri: de-node.xelis.io
useSSL: true
-
uri: fr-node.xelis.io
useSSL: true
-
uri: sg-node.xelis.io
useSSL: true
-
uri: uk-node.xelis.io
useSSL: true
-
uri: ca-node.xelis.io
useSSL: true
-
uri: testnet-node.xelis.io
useSSL: true
4 changes: 2 additions & 2 deletions cakewallet.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set cw_win_app_config=--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron
set cw_win_app_config=--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron --xelis
set cw_root=%cd%
set cw_archive_name=Cake Wallet.zip
set cw_archive_path=%cw_root%\%cw_archive_name%
Expand All @@ -24,7 +24,7 @@ IF NOT EXIST "%secrets_file_path%" (
) ELSE (echo === Using previously/already generated secrets file: %secrets_file_path% ===)

echo === Generating mobx models ===
for /d %%i in (cw_core cw_monero cw_bitcoin cw_ethereum cw_evm cw_polygon cw_nano cw_bitcoin_cash cw_solana cw_tron .) do (
for /d %%i in (cw_core cw_monero cw_bitcoin cw_ethereum cw_evm cw_polygon cw_nano cw_bitcoin_cash cw_solana cw_tron cw_xelis.) do (
cd %%i
call flutter pub get > nul
call dart run build_runner build --delete-conflicting-outputs > nul
Expand Down
7 changes: 6 additions & 1 deletion cw_core/lib/crypto_currency.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
CryptoCurrency.zano,
CryptoCurrency.ton,
CryptoCurrency.flip,
CryptoCurrency.deuro
CryptoCurrency.deuro,
CryptoCurrency.xel,
CryptoCurrency.xet
];

static const havenCurrencies = [
Expand Down Expand Up @@ -234,6 +236,9 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
static const flip = CryptoCurrency(title: 'FLIP', tag: 'ETH', fullName: 'Chainflip', raw: 97, name: 'flip', iconPath: 'assets/images/flip_icon.png', decimals: 18);
static const deuro = CryptoCurrency(title: 'DEURO', tag: 'ETH', fullName: 'Decentralized Euro', raw: 98, name: 'deuro', iconPath: 'assets/images/deuro_icon.png', decimals: 18);

static const xel = CryptoCurrency(title: 'XEL', fullName: 'Xelis', raw: 99, name: 'xel', iconPath: 'assets/images/xelis_icon.png', decimals: 8);
static const xet = CryptoCurrency(title: 'XET', fullName: 'Testnet Xelis', raw: 100, name: 'xet', iconPath: 'assets/images/xelis_testnet_icon.png', decimals: 8);

static final Map<int, CryptoCurrency> _rawCurrencyMap =
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {
acc.addAll({item.raw: item});
Expand Down
7 changes: 7 additions & 0 deletions cw_core/lib/currency_for_wallet_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ CryptoCurrency currencyForWalletType(WalletType type, {bool? isTestnet}) {
return CryptoCurrency.zano;
case WalletType.decred:
return CryptoCurrency.dcr;
case WalletType.xelis:
if (isTestnet == true) {
return CryptoCurrency.xet;
}
return CryptoCurrency.xel;
case WalletType.none:
throw Exception(
'Unexpected wallet type: ${type.toString()} for CryptoCurrency currencyForWalletType');
Expand Down Expand Up @@ -70,6 +75,8 @@ WalletType? walletTypeForCurrency(CryptoCurrency currency) {
return WalletType.zano;
case CryptoCurrency.dcr:
return WalletType.decred;
case CryptoCurrency.xel:
return WalletType.xelis;
default:
return null;
}
Expand Down
1 change: 1 addition & 0 deletions cw_core/lib/hive_type_ids.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ const MWEB_UTXO_TYPE_ID = 20;
const HAVEN_SEED_STORE_TYPE_ID = 21;
const ZANO_ASSET_TYPE_ID = 22;
const PAYJOIN_SESSION_TYPE_ID = 23;
const XELIS_ASSET_TYPE_ID = 24;
16 changes: 9 additions & 7 deletions cw_core/lib/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class Node extends HiveObject with Keyable {
case WalletType.tron:
case WalletType.zano:
case WalletType.decred:
case WalletType.xelis:
return Uri.parse(
"http${isSSL ? "s" : ""}://$uriRaw${path!.startsWith("/") || path!.isEmpty ? path : "/$path"}");
case WalletType.none:
Expand Down Expand Up @@ -165,6 +166,7 @@ class Node extends HiveObject with Keyable {
case WalletType.polygon:
case WalletType.solana:
case WalletType.tron:
case WalletType.xelis:
return requestElectrumServer();
case WalletType.zano:
return requestZanoNode();
Expand Down Expand Up @@ -360,13 +362,13 @@ class Node extends HiveObject with Keyable {
}

Future<bool> requestDecredNode() async {
if (uri.host == "default-spv-nodes") {
// Just show default port as ok. The wallet will connect to a list of known
// nodes automatically.
return true;
}
try {
final socket = await Socket.connect(uri.host, uri.port, timeout: Duration(seconds: 5));
if (uri.host == "default-spv-nodes") {
// Just show default port as ok. The wallet will connect to a list of known
// nodes automatically.
return true;
}
try {
final socket = await Socket.connect(uri.host, uri.port, timeout: Duration(seconds: 5));
socket.destroy();
return true;
} catch (_) {
Expand Down
19 changes: 18 additions & 1 deletion cw_core/lib/wallet_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const walletTypes = [
WalletType.tron,
WalletType.zano,
WalletType.decred,
WalletType.xelis,
];

@HiveType(typeId: WALLET_TYPE_TYPE_ID)
Expand Down Expand Up @@ -65,7 +66,10 @@ enum WalletType {
zano,

@HiveField(14)
decred
decred,

@HiveField(15)
xelis
}

int serializeToInt(WalletType type) {
Expand Down Expand Up @@ -98,6 +102,8 @@ int serializeToInt(WalletType type) {
return 12;
case WalletType.decred:
return 13;
case WalletType.xelis:
return 14;
case WalletType.none:
return -1;
}
Expand Down Expand Up @@ -133,6 +139,8 @@ WalletType deserializeFromInt(int raw) {
return WalletType.zano;
case 13:
return WalletType.decred;
case 14:
return WalletType.xelis;
default:
throw Exception(
'Unexpected token: $raw for WalletType deserializeFromInt');
Expand Down Expand Up @@ -169,6 +177,8 @@ String walletTypeToString(WalletType type) {
return 'Zano';
case WalletType.decred:
return 'Decred';
case WalletType.xelis:
return 'Xelis';
case WalletType.none:
return '';
}
Expand Down Expand Up @@ -204,6 +214,8 @@ String walletTypeToDisplayName(WalletType type) {
return 'Zano (ZANO)';
case WalletType.decred:
return 'Decred (DCR)';
case WalletType.xelis:
return 'Xelis (XEL)';
case WalletType.none:
return '';
}
Expand Down Expand Up @@ -242,6 +254,11 @@ CryptoCurrency walletTypeToCryptoCurrency(WalletType type, {bool isTestnet = fal
return CryptoCurrency.zano;
case WalletType.decred:
return CryptoCurrency.dcr;
case WalletType.xelis:
if (isTestnet) {
return CryptoCurrency.xet;
}
return CryptoCurrency.xel;
case WalletType.none:
throw Exception(
'Unexpected wallet type: ${type.toString()} for CryptoCurrency walletTypeToCryptoCurrency');
Expand Down
38 changes: 38 additions & 0 deletions cw_xelis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
flutter_rust_bridge_local.yaml
build/
rust_temp/
rust_src/
lib/src/**
xelis-flutter-ffi/
27 changes: 27 additions & 0 deletions cw_xelis/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf"
channel: "stable"

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
3 changes: 3 additions & 0 deletions cw_xelis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

* TODO: Describe initial release.
1 change: 1 addition & 0 deletions cw_xelis/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Add your license here.
18 changes: 18 additions & 0 deletions cw_xelis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# cw_xelis

A new Flutter plugin project.

## Getting Started

This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/to/develop-plugins),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

The plugin project was generated without specifying the `--platforms` flag, no platforms are currently supported.
To add platforms, run `flutter create -t plugin --platforms <platforms> .` in this directory.
You can also find a detailed instruction on how to add platforms in the `pubspec.yaml` at https://flutter.dev/to/pubspec-plugin-platforms.
13 changes: 13 additions & 0 deletions cw_xelis/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include: package:flutter_lints/flutter.yaml

analyzer:
exclude:
- "lib/src/api/generated/**"
- "**/*.g.dart"
- "**/*frb_generated*.dart"
errors:
# Ignore specific errors that might come from generated code
invalid_annotation_target: ignore

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Loading