diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
index f29702b8c9..6cdbbf8d59 100644
--- a/android/app/proguard-rules.pro
+++ b/android/app/proguard-rules.pro
@@ -9,6 +9,10 @@
-dontwarn com.google.android.play.core.splitcompat.SplitCompatApplication
-dontwarn com.google.android.gms.common.annotation.NoNullnessRewrite
+## Starknet JNI + rustls-platform-verifier
+-keep, includedescriptorclasses class com.cakewallet.cake_wallet.StarknetRust { *; }
+-keep, includedescriptorclasses class org.rustls.platformverifier.** { *; }
+
# start reown
-dontwarn com.github.luben.zstd.BufferPool
-dontwarn com.github.luben.zstd.ZstdInputStream
diff --git a/android/app/src/main/java/com/cakewallet/cake_wallet/Application.java b/android/app/src/main/java/com/cakewallet/cake_wallet/Application.java
index d3eb70ba6a..6aff98c957 100644
--- a/android/app/src/main/java/com/cakewallet/cake_wallet/Application.java
+++ b/android/app/src/main/java/com/cakewallet/cake_wallet/Application.java
@@ -3,4 +3,9 @@
import io.flutter.app.FlutterApplication;
public class Application extends FlutterApplication {
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ StarknetRust.ensureInitialized(this);
+ }
}
diff --git a/android/app/src/main/java/com/cakewallet/cake_wallet/StarknetRust.java b/android/app/src/main/java/com/cakewallet/cake_wallet/StarknetRust.java
new file mode 100644
index 0000000000..853ae513d0
--- /dev/null
+++ b/android/app/src/main/java/com/cakewallet/cake_wallet/StarknetRust.java
@@ -0,0 +1,21 @@
+package com.cakewallet.cake_wallet;
+
+import android.content.Context;
+
+public final class StarknetRust {
+ private static boolean sInitialized = false;
+
+ static {
+ System.loadLibrary("cw_starknet_rust");
+ }
+
+ private StarknetRust() {}
+
+ public static synchronized void ensureInitialized(Context context) {
+ if (sInitialized) return;
+ nativeInit(context.getApplicationContext());
+ sInitialized = true;
+ }
+
+ private static native void nativeInit(Context context);
+}
diff --git a/assets/images/crypto/starknet.webp b/assets/images/crypto/starknet.webp
new file mode 100644
index 0000000000..3fad6cc632
Binary files /dev/null and b/assets/images/crypto/starknet.webp differ
diff --git a/assets/new-ui/balance_card_icons/starknet.svg b/assets/new-ui/balance_card_icons/starknet.svg
new file mode 100644
index 0000000000..1fa6a3e27d
--- /dev/null
+++ b/assets/new-ui/balance_card_icons/starknet.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/starknet_node_list.yml b/assets/starknet_node_list.yml
new file mode 100644
index 0000000000..3aa8a8dfd0
--- /dev/null
+++ b/assets/starknet_node_list.yml
@@ -0,0 +1,17 @@
+-
+ uri: api.cartridge.gg/x/starknet/mainnet
+ useSSL: true
+ is_default: true
+ isEnabledForAutoSwitching: true
+-
+ uri: rpc.starknet.lava.build
+ useSSL: true
+ isEnabledForAutoSwitching: true
+-
+ uri: starknet-rpc.publicnode.com
+ useSSL: true
+ isEnabledForAutoSwitching: true
+-
+ uri: starknet.drpc.org
+ useSSL: true
+ isEnabledForAutoSwitching: true
diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart
index f69748b4bc..47c3f5c112 100644
--- a/cw_core/lib/crypto_currency.dart
+++ b/cw_core/lib/crypto_currency.dart
@@ -4,7 +4,9 @@ import 'package:collection/collection.dart';
import 'package:cw_core/format_fixed.dart';
import 'package:cw_core/parse_fixed.dart';
-class CryptoCurrency extends EnumerableItem with Serializable implements Currency {
+class CryptoCurrency extends EnumerableItem
+ with Serializable
+ implements Currency {
const CryptoCurrency({
String title = '',
int raw = -1,
@@ -128,6 +130,7 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
CryptoCurrency.arbEth,
CryptoCurrency.usdcArb,
CryptoCurrency.usdtArb,
+ CryptoCurrency.strk,
];
static const havenCurrencies = [
@@ -169,19 +172,32 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
static const xrp = CryptoCurrency(title: 'XRP', fullName: 'Ripple', raw: 15, name: 'xrp', iconPath: 'assets/images/xrp_icon.png', decimals: 6);
static const xhv = CryptoCurrency(title: 'XHV', fullName: 'Haven Protocol', raw: 16, name: 'xhv', iconPath: 'assets/images/xhv_logo.png', decimals: 12);
- static const xag = CryptoCurrency(title: 'XAG', tag: 'XHV', raw: 17, name: 'xag', decimals: 12);
- static const xau = CryptoCurrency(title: 'XAU', tag: 'XHV', raw: 18, name: 'xau', decimals: 12);
- static const xaud = CryptoCurrency(title: 'XAUD', tag: 'XHV', raw: 19, name: 'xaud', decimals: 12);
- static const xbtc = CryptoCurrency(title: 'XBTC', tag: 'XHV', raw: 20, name: 'xbtc', decimals: 12);
- static const xcad = CryptoCurrency(title: 'XCAD', tag: 'XHV', raw: 21, name: 'xcad', decimals: 12);
- static const xchf = CryptoCurrency(title: 'XCHF', tag: 'XHV', raw: 22, name: 'xchf', decimals: 12);
- static const xcny = CryptoCurrency(title: 'XCNY', tag: 'XHV', raw: 23, name: 'xcny', decimals: 12);
- static const xeur = CryptoCurrency(title: 'XEUR', tag: 'XHV', raw: 24, name: 'xeur', decimals: 12);
- static const xgbp = CryptoCurrency(title: 'XGBP', tag: 'XHV', raw: 25, name: 'xgbp', decimals: 12);
- static const xjpy = CryptoCurrency(title: 'XJPY', tag: 'XHV', raw: 26, name: 'xjpy', decimals: 12);
- static const xnok = CryptoCurrency(title: 'XNOK', tag: 'XHV', raw: 27, name: 'xnok', decimals: 12);
- static const xnzd = CryptoCurrency(title: 'XNZD', tag: 'XHV', raw: 28, name: 'xnzd', decimals: 12);
- static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29, name: 'xusd', decimals: 12);
+ static const xag = CryptoCurrency(
+ title: 'XAG', tag: 'XHV', raw: 17, name: 'xag', decimals: 12);
+ static const xau = CryptoCurrency(
+ title: 'XAU', tag: 'XHV', raw: 18, name: 'xau', decimals: 12);
+ static const xaud = CryptoCurrency(
+ title: 'XAUD', tag: 'XHV', raw: 19, name: 'xaud', decimals: 12);
+ static const xbtc = CryptoCurrency(
+ title: 'XBTC', tag: 'XHV', raw: 20, name: 'xbtc', decimals: 12);
+ static const xcad = CryptoCurrency(
+ title: 'XCAD', tag: 'XHV', raw: 21, name: 'xcad', decimals: 12);
+ static const xchf = CryptoCurrency(
+ title: 'XCHF', tag: 'XHV', raw: 22, name: 'xchf', decimals: 12);
+ static const xcny = CryptoCurrency(
+ title: 'XCNY', tag: 'XHV', raw: 23, name: 'xcny', decimals: 12);
+ static const xeur = CryptoCurrency(
+ title: 'XEUR', tag: 'XHV', raw: 24, name: 'xeur', decimals: 12);
+ static const xgbp = CryptoCurrency(
+ title: 'XGBP', tag: 'XHV', raw: 25, name: 'xgbp', decimals: 12);
+ static const xjpy = CryptoCurrency(
+ title: 'XJPY', tag: 'XHV', raw: 26, name: 'xjpy', decimals: 12);
+ static const xnok = CryptoCurrency(
+ title: 'XNOK', tag: 'XHV', raw: 27, name: 'xnok', decimals: 12);
+ static const xnzd = CryptoCurrency(
+ title: 'XNZD', tag: 'XHV', raw: 28, name: 'xnzd', decimals: 12);
+ static const xusd = CryptoCurrency(
+ title: 'XUSD', tag: 'XHV', raw: 29, name: 'xusd', decimals: 12);
static const ape = CryptoCurrency(title: 'APE', tag: 'ETH', fullName: 'ApeCoin', raw: 30, name: 'ape', iconPath: 'assets/images/ape_icon.png', decimals: 18);
static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'AVAXC', fullName: 'Avalanche', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png',iconSvgPath: "assets/new-ui/crypto_full_icons/avax.svg", decimals: 9);
@@ -265,21 +281,31 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
static const usdcArb = CryptoCurrency(title: 'USDC', tag: 'ARB', fullName: 'USDC Coin', raw: 108, name: 'usdcarb', iconPath: 'assets/images/crypto/usdc.webp',iconSvgPath: "assets/new-ui/crypto_full_icons/usdc.svg", decimals: 6);
static const usdtArb = CryptoCurrency(title: 'USDT', tag: 'ARB', fullName: 'USDT Tether', raw: 109, name: 'usdtarb', iconPath: 'assets/images/crypto/tether.webp',iconSvgPath: "assets/new-ui/crypto_full_icons/usdt.svg", decimals: 6);
static const ltcmweb = CryptoCurrency(title: 'LTC', fullName: 'Litecoin MWeb', raw: 110, name: 'ltcmweb', iconPath: 'assets/images/crypto/litecoin.webp',iconSvgPath: "assets/new-ui/crypto_full_icons/litecoin.svg", decimals: 8);
+ static const strk = CryptoCurrency(title: 'STRK', fullName: 'Starknet', raw: 111, name: 'strk', iconPath: 'assets/images/crypto/starknet.webp', decimals: 18, flatIconPath: "assets/new-ui/balance_card_icons/starknet.svg");
- static final Map _rawCurrencyMap =
- [...all, ...havenCurrencies, ...zcashCurrencies].fold