Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
1d9b7d9698 | |||
82c05588bc | |||
1cddd05bc0 | |||
8ad0d1c461 | |||
a22a75913c | |||
e797da0ed8 | |||
6936c14ed2 | |||
c626ed5a48 | |||
d79d05ef5a | |||
|
094a5b8969 | ||
|
12a75f8370 | ||
|
1c14b9aa93 | ||
|
8ea388554a |
13 changed files with 652 additions and 641 deletions
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
@ -109,11 +109,11 @@ jobs:
|
||||||
- name: Install cargo-zigbuild
|
- name: Install cargo-zigbuild
|
||||||
run: cargo install cargo-zigbuild
|
run: cargo install cargo-zigbuild
|
||||||
- name: Download SDK
|
- name: Download SDK
|
||||||
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.15.sdk.tar.xz
|
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
|
||||||
- name: Setup SDK env
|
- name: Setup SDK env
|
||||||
run: tar xf ${{ github.workspace }}/MacOSX10.15.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX10.15.sdk" >> $GITHUB_ENV
|
run: tar xf ${{ github.workspace }}/MacOSX11.0.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX11.0.sdk" >> $GITHUB_ENV
|
||||||
- name: Setup platform env
|
- name: Setup platform env
|
||||||
run: echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
|
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
|
||||||
- name: Release x86
|
- name: Release x86
|
||||||
run: |
|
run: |
|
||||||
rustup target add x86_64-apple-darwin
|
rustup target add x86_64-apple-darwin
|
||||||
|
@ -129,12 +129,6 @@ jobs:
|
||||||
working-directory: target/x86_64-apple-darwin/release
|
working-directory: target/x86_64-apple-darwin/release
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sha256sum grim-${{ github.ref_name }}-macos-x86_64.zip > grim-${{ github.ref_name }}-macos-x86_64-sha256sum.txt
|
run: sha256sum grim-${{ github.ref_name }}-macos-x86_64.zip > grim-${{ github.ref_name }}-macos-x86_64-sha256sum.txt
|
||||||
- name: Download SDK
|
|
||||||
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
|
|
||||||
- name: Setup SDK env
|
|
||||||
run: tar xf ${{ github.workspace }}/MacOSX11.0.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX11.0.sdk" >> $GITHUB_ENV
|
|
||||||
- name: Setup platform env
|
|
||||||
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
|
|
||||||
- name: Release ARM
|
- name: Release ARM
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-apple-darwin
|
rustup target add aarch64-apple-darwin
|
||||||
|
|
1163
Cargo.lock
generated
1163
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
25
Cargo.toml
25
Cargo.toml
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "grim"
|
name = "grim"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
authors = ["Ardocrat <ardocrat@proton.me>"]
|
authors = ["Ardocrat <ardocrat@proton.me>"]
|
||||||
description = "Cross-platform GUI for Grin with focus on usability and availability to be used by anyone, anywhere."
|
description = "Cross-platform GUI for Grin with focus on usability and availability to be used by anyone, anywhere."
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
@ -78,23 +78,23 @@ gif = "0.13.1"
|
||||||
rkv = { version = "0.19.0", features = ["lmdb"] }
|
rkv = { version = "0.19.0", features = ["lmdb"] }
|
||||||
|
|
||||||
## tor
|
## tor
|
||||||
arti-client = { version = "0.23.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] }
|
arti-client = { version = "0.26.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] }
|
||||||
tor-rtcompat = { version = "0.23.0", features = ["static"] }
|
tor-rtcompat = { version = "0.26.0", features = ["static"] }
|
||||||
tor-config = "0.23.0"
|
tor-config = "0.26.0"
|
||||||
fs-mistrust = "0.8.0"
|
fs-mistrust = "0.8.0"
|
||||||
tor-hsservice = "0.23.0"
|
tor-hsservice = "0.26.0"
|
||||||
tor-hsrproxy = "0.23.0"
|
tor-hsrproxy = "0.26.0"
|
||||||
tor-keymgr = "0.23.0"
|
tor-keymgr = "0.26.0"
|
||||||
tor-llcrypto = "0.23.0"
|
tor-llcrypto = "0.26.0"
|
||||||
tor-hscrypto = "0.23.0"
|
tor-hscrypto = "0.26.0"
|
||||||
tor-error = "0.23.0"
|
tor-error = "0.26.0"
|
||||||
sha2 = "0.10.8"
|
sha2 = "0.10.8"
|
||||||
ed25519-dalek = "2.1.1"
|
ed25519-dalek = "2.1.1"
|
||||||
curve25519-dalek = "4.1.3"
|
curve25519-dalek = "4.1.3"
|
||||||
hyper = { version = "0.14.30", features = ["full"] }
|
hyper = { version = "0.14.30", features = ["full"] }
|
||||||
hyper-tls = "0.5.0"
|
hyper-tls = "0.5.0"
|
||||||
tls-api = "0.9.0"
|
tls-api = "0.12.0"
|
||||||
tls-api-native-tls = "0.9.0"
|
tls-api-native-tls = "0.12.1"
|
||||||
|
|
||||||
## stratum server
|
## stratum server
|
||||||
tokio-old = {version = "0.2", features = ["full"], package = "tokio" }
|
tokio-old = {version = "0.2", features = ["full"], package = "tokio" }
|
||||||
|
@ -108,7 +108,6 @@ nokhwa = { version = "0.10.5", default-features = false, features = ["input-msmf
|
||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
eye = { git = "https://github.com/raymanfx/eye-rs", rev = "5b7e3f7a1e79966091692896c568aab042e449ef", default-features = false }
|
eye = { git = "https://github.com/raymanfx/eye-rs", rev = "5b7e3f7a1e79966091692896c568aab042e449ef", default-features = false }
|
||||||
tls-api-openssl = "0.9.0"
|
|
||||||
|
|
||||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||||
env_logger = "0.11.3"
|
env_logger = "0.11.3"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# <img height="22" src="https://github.com/ardocrat/grim/blob/master/android/app/src/main/ic_launcher-playstore.png?raw=true"> Grim <img height="20" src="https://github.com/mimblewimble/site/blob/master/assets/images/grin-logo.png?raw=true"> <img height="20" src="https://github.com/ardocrat/grim/blob/master/img/logo.png?raw=true">
|
# Grim <img height="20" src="https://gri.mw/code/GUI/grim/raw/branch/master/img/grin-logo.png"/> <img height="20" src="https://gri.mw/code/GUI/grim/raw/branch/master/img/logo.png"/>
|
||||||
Cross-platform GUI for [GRiN ツ](https://grin.mw) in [Rust](https://www.rust-lang.org/)
|
Cross-platform GUI for [GRiN ツ](https://grin.mw) in [Rust](https://www.rust-lang.org/)
|
||||||
for maximum compatibility with original [Mimblewimble](https://github.com/mimblewimble/grin) implementation.
|
for maximum compatibility with original [Mimblewimble](https://github.com/mimblewimble/grin) implementation.
|
||||||
Initially supported platforms are Linux, Mac, Windows, limited Android and possible web support with help of [egui](https://github.com/emilk/egui) - immediate mode GUI library in pure Rust.
|
Initially supported platforms are Linux, Mac, Windows, limited Android and possible web support with help of [egui](https://github.com/emilk/egui) - immediate mode GUI library in pure Rust.
|
||||||
|
|
||||||
Named by the character [Grim](http://harrypotter.wikia.com/wiki/Grim) - the shape of a large, black, menacing, spectral giant dog.
|
Named by the character [Grim](http://harrypotter.wikia.com/wiki/Grim) - the shape of a large, black, menacing, spectral giant dog.
|
||||||
|
|
||||||
![image](https://github.com/user-attachments/assets/a925b1c8-02c9-4b08-b888-0315d11138b6)
|
![image](https://gri.mw/code/GUI/grim/raw/branch/master/img/cover.png)
|
||||||
|
|
||||||
|
|
||||||
## Build instructions
|
## Build instructions
|
||||||
|
|
|
@ -11,7 +11,7 @@ android {
|
||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 3
|
versionCode 3
|
||||||
versionName "0.2.2"
|
versionName "0.2.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
|
|
BIN
img/cover.png
Normal file
BIN
img/cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 KiB |
BIN
img/grin-logo.png
Normal file
BIN
img/grin-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
|
@ -21,7 +21,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.2.2</string>
|
<string>0.2.3</string>
|
||||||
<key>CFBundleSupportedPlatforms</key>
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
<array>
|
<array>
|
||||||
<string>MacOSX</string>
|
<string>MacOSX</string>
|
||||||
|
|
|
@ -63,8 +63,8 @@ function build_apk() {
|
||||||
./gradlew clean
|
./gradlew clean
|
||||||
# Build signed apk if keystore exists
|
# Build signed apk if keystore exists
|
||||||
if [ ! -f keystore.properties ]; then
|
if [ ! -f keystore.properties ]; then
|
||||||
./gradlew assembleRelease
|
./gradlew assembleDebug
|
||||||
apk_path=app/build/outputs/apk/release/app-release.apk
|
apk_path=app/build/outputs/apk/debug/app-debug.apk
|
||||||
else
|
else
|
||||||
./gradlew assembleSignedRelease
|
./gradlew assembleSignedRelease
|
||||||
apk_path=app/build/outputs/apk/signedRelease/app-signedRelease.apk
|
apk_path=app/build/outputs/apk/signedRelease/app-signedRelease.apk
|
||||||
|
|
|
@ -339,6 +339,30 @@ impl WalletTransactions {
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
t!("wallets.tx_sending"))
|
t!("wallets.tx_sending"))
|
||||||
},
|
},
|
||||||
|
TxLogEntryType::ConfirmedCoinbase => {
|
||||||
|
let tx_h = tx.height.unwrap_or(1) - 1;
|
||||||
|
if tx_h != 0 {
|
||||||
|
let left_conf = height - tx_h;
|
||||||
|
if height >= tx_h && left_conf < COINBASE_MATURITY {
|
||||||
|
let conf_info = format!("{}/{}",
|
||||||
|
left_conf,
|
||||||
|
COINBASE_MATURITY);
|
||||||
|
format!("{} {} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"),
|
||||||
|
conf_info
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
format!("{} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
format!("{} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"))
|
||||||
|
}
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
format!("{} {}",
|
format!("{} {}",
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
|
@ -353,17 +377,20 @@ impl WalletTransactions {
|
||||||
let tx_h = tx.height.unwrap_or(1) - 1;
|
let tx_h = tx.height.unwrap_or(1) - 1;
|
||||||
if tx_h != 0 {
|
if tx_h != 0 {
|
||||||
let left_conf = height - tx_h;
|
let left_conf = height - tx_h;
|
||||||
let conf_info = if tx_h != 0 && height >= tx_h &&
|
if height >= tx_h && left_conf < COINBASE_MATURITY {
|
||||||
left_conf < COINBASE_MATURITY {
|
let conf_info = format!("{}/{}",
|
||||||
format!("{}/{}", left_conf, COINBASE_MATURITY)
|
left_conf,
|
||||||
|
COINBASE_MATURITY);
|
||||||
|
format!("{} {} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"),
|
||||||
|
conf_info
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
"".to_string()
|
format!("{} {}",
|
||||||
};
|
DOTS_THREE_CIRCLE,
|
||||||
format!("{} {} {}",
|
t!("wallets.tx_confirmed"))
|
||||||
DOTS_THREE_CIRCLE,
|
}
|
||||||
t!("wallets.tx_confirming"),
|
|
||||||
conf_info
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
format!("{} {}",
|
format!("{} {}",
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
|
|
|
@ -203,6 +203,7 @@ impl WalletTransactionModal {
|
||||||
if let Ok(_) = res {
|
if let Ok(_) = res {
|
||||||
self.show_finalization = false;
|
self.show_finalization = false;
|
||||||
self.finalize_edit = "".to_string();
|
self.finalize_edit = "".to_string();
|
||||||
|
self.response_edit = "".to_string();
|
||||||
} else {
|
} else {
|
||||||
self.finalize_error = true;
|
self.finalize_error = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ use grin_util::secp::SecretKey;
|
||||||
use hyper::{Body, Uri};
|
use hyper::{Body, Uri};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use sha2::Sha512;
|
use sha2::Sha512;
|
||||||
|
use tls_api_native_tls::TlsConnector;
|
||||||
use tls_api::{TlsConnector as TlsConnectorTrait, TlsConnectorBuilder};
|
use tls_api::{TlsConnector as TlsConnectorTrait, TlsConnectorBuilder};
|
||||||
use tokio::time::sleep;
|
use tokio::time::sleep;
|
||||||
use tor_hscrypto::pk::{HsIdKey, HsIdKeypair};
|
use tor_hscrypto::pk::{HsIdKey, HsIdKeypair};
|
||||||
|
@ -47,14 +48,6 @@ use tor_llcrypto::pk::ed25519::ExpandedKeypair;
|
||||||
use tor_rtcompat::tokio::TokioNativeTlsRuntime;
|
use tor_rtcompat::tokio::TokioNativeTlsRuntime;
|
||||||
use tor_rtcompat::Runtime;
|
use tor_rtcompat::Runtime;
|
||||||
|
|
||||||
// On aarch64-apple-darwin targets there is an issue with the native and rustls
|
|
||||||
// tls implementation so this makes it fall back to the openssl variant.
|
|
||||||
//
|
|
||||||
// https://gitlab.torproject.org/tpo/core/arti/-/issues/715
|
|
||||||
#[cfg(not(all(target_vendor = "apple", target_arch = "aarch64")))]
|
|
||||||
use tls_api_native_tls::TlsConnector;
|
|
||||||
#[cfg(all(target_vendor = "apple", target_arch = "aarch64"))]
|
|
||||||
use tls_api_openssl::TlsConnector;
|
|
||||||
use crate::tor::http::ArtiHttpConnector;
|
use crate::tor::http::ArtiHttpConnector;
|
||||||
use crate::tor::TorConfig;
|
use crate::tor::TorConfig;
|
||||||
|
|
||||||
|
@ -80,20 +73,16 @@ pub struct Tor {
|
||||||
|
|
||||||
impl Default for Tor {
|
impl Default for Tor {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
|
// Cleanup keys, state and cache on start.
|
||||||
|
fs::remove_dir_all(TorConfig::keystore_path()).unwrap_or_default();
|
||||||
|
fs::remove_dir_all(TorConfig::state_path()).unwrap_or_default();
|
||||||
|
fs::remove_dir_all(TorConfig::cache_path()).unwrap_or_default();
|
||||||
|
// Create Tor client.
|
||||||
let runtime = TokioNativeTlsRuntime::create().unwrap();
|
let runtime = TokioNativeTlsRuntime::create().unwrap();
|
||||||
let config = Self::build_config();
|
let config = Self::build_config();
|
||||||
let client = if let Ok(c) = TorClient::with_runtime(runtime)
|
let client = TorClient::with_runtime(runtime)
|
||||||
.config(config.clone())
|
.config(config.clone())
|
||||||
.create_unbootstrapped() {
|
.create_unbootstrapped().unwrap();
|
||||||
c
|
|
||||||
} else {
|
|
||||||
fs::remove_dir_all(TorConfig::state_path()).unwrap();
|
|
||||||
fs::remove_dir_all(TorConfig::cache_path()).unwrap();
|
|
||||||
let runtime = TokioNativeTlsRuntime::create().unwrap();
|
|
||||||
TorClient::with_runtime(runtime)
|
|
||||||
.config(config.clone())
|
|
||||||
.create_unbootstrapped().unwrap()
|
|
||||||
};
|
|
||||||
Self {
|
Self {
|
||||||
running_services: Arc::new(RwLock::new(BTreeMap::new())),
|
running_services: Arc::new(RwLock::new(BTreeMap::new())),
|
||||||
starting_services: Arc::new(RwLock::new(BTreeSet::new())),
|
starting_services: Arc::new(RwLock::new(BTreeSet::new())),
|
||||||
|
|
|
@ -617,7 +617,7 @@ impl Wallet {
|
||||||
let r_inst = self.instance.as_ref().read();
|
let r_inst = self.instance.as_ref().read();
|
||||||
let instance = r_inst.clone().unwrap();
|
let instance = r_inst.clone().unwrap();
|
||||||
let mut api = Owner::new(instance, None);
|
let mut api = Owner::new(instance, None);
|
||||||
return match parse_slatepack(&mut api, None, None, Some(text.clone())) {
|
match parse_slatepack(&mut api, None, None, Some(text.clone())) {
|
||||||
Ok(s) => Ok(s.0),
|
Ok(s) => Ok(s.0),
|
||||||
Err(e) => Err(e)
|
Err(e) => Err(e)
|
||||||
}
|
}
|
||||||
|
@ -714,7 +714,7 @@ impl Wallet {
|
||||||
amount,
|
amount,
|
||||||
minimum_confirmations: config.min_confirmations,
|
minimum_confirmations: config.min_confirmations,
|
||||||
num_change_outputs: 1,
|
num_change_outputs: 1,
|
||||||
selection_strategy_is_use_all: true,
|
selection_strategy_is_use_all: false,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let r_inst = self.instance.as_ref().read();
|
let r_inst = self.instance.as_ref().read();
|
||||||
|
@ -857,7 +857,7 @@ impl Wallet {
|
||||||
src_acct_name: None,
|
src_acct_name: None,
|
||||||
amount: slate.amount,
|
amount: slate.amount,
|
||||||
minimum_confirmations: config.min_confirmations,
|
minimum_confirmations: config.min_confirmations,
|
||||||
selection_strategy_is_use_all: true,
|
selection_strategy_is_use_all: false,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let r_inst = self.instance.as_ref().read();
|
let r_inst = self.instance.as_ref().read();
|
||||||
|
|
Loading…
Reference in a new issue