Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
1d9b7d9698 | |||
82c05588bc | |||
1cddd05bc0 | |||
8ad0d1c461 | |||
a22a75913c | |||
e797da0ed8 | |||
6936c14ed2 | |||
c626ed5a48 | |||
d79d05ef5a |
8 changed files with 607 additions and 618 deletions
1161
Cargo.lock
generated
1161
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
23
Cargo.toml
23
Cargo.toml
|
@ -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
|
||||||
|
|
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 |
|
@ -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
|
||||||
|
|
|
@ -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