@@ -1,4 +1,4 @@
|
|||||||
silentdragon-lite is z-Addr first, Sapling compatible wallet lightwallet for hush
|
SilenDragonLite is z-Addr first, Sapling compatible wallet lightwallet for hush still in very experimental status! Use it on your own Risk!
|
||||||
|
|
||||||
## Compiling from source
|
## Compiling from source
|
||||||
* silentdragon is written in C++ 14, and can be compiled with g++/clang++/visual c++.
|
* silentdragon is written in C++ 14, and can be compiled with g++/clang++/visual c++.
|
||||||
@@ -8,7 +8,7 @@ silentdragon-lite is z-Addr first, Sapling compatible wallet lightwallet for hus
|
|||||||
### Building on Linux
|
### Building on Linux
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/adityapk/silentdragon-lite.git
|
git clone https://github.com/DenioD/SilenDragonLite.git
|
||||||
cd silentdragon
|
cd silentdragon
|
||||||
/path/to/qt5/bin/qmake silentdragon-lite.pro CONFIG+=debug
|
/path/to/qt5/bin/qmake silentdragon-lite.pro CONFIG+=debug
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
24
lib/Cargo.lock
generated
24
lib/Cargo.lock
generated
@@ -1051,7 +1051,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=1011ff7c7c6d5fe7de078194538ae5a2a0e5e461)",
|
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=99507a8fc6c874e027b0f002320c7b232f459761)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1467,7 +1467,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "silentdragonlitelib"
|
name = "silentdragonlitelib"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=1011ff7c7c6d5fe7de078194538ae5a2a0e5e461#1011ff7c7c6d5fe7de078194538ae5a2a0e5e461"
|
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=99507a8fc6c874e027b0f002320c7b232f459761#99507a8fc6c874e027b0f002320c7b232f459761"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=44a1c3981df37b73d87f0e625ca3557d8534e6f3)",
|
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=44a1c3981df37b73d87f0e625ca3557d8534e6f3)",
|
||||||
@@ -1496,10 +1496,10 @@ dependencies = [
|
|||||||
"tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-rustls 0.10.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-rustls 0.10.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tower-grpc 0.1.1 (git+https://github.com/tower-rs/tower-grpc)",
|
"tower-grpc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tower-grpc-build 0.1.0 (git+https://github.com/tower-rs/tower-grpc)",
|
"tower-grpc-build 0.1.0 (git+https://github.com/tower-rs/tower-grpc)",
|
||||||
"tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2)",
|
"tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2?rev=0865040d699697bbaf1c3b77b3f256b72f98cdf4)",
|
||||||
"tower-request-modifier 0.1.0 (git+https://github.com/tower-rs/tower-http)",
|
"tower-request-modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tower-util 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tower-util 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webpki 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"webpki 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1917,7 +1917,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-grpc"
|
name = "tower-grpc"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://github.com/tower-rs/tower-grpc#5308ec0d3433dd8c22cafd0ca37456824dff827e"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1945,7 +1945,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-h2"
|
name = "tower-h2"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/tower-rs/tower-h2#0865040d699697bbaf1c3b77b3f256b72f98cdf4"
|
source = "git+https://github.com/tower-rs/tower-h2?rev=0865040d699697bbaf1c3b77b3f256b72f98cdf4#0865040d699697bbaf1c3b77b3f256b72f98cdf4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2017,7 +2017,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-request-modifier"
|
name = "tower-request-modifier"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/tower-rs/tower-http#cb393c933f5167f934abde9d4f902e44d9ea2d50"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
"http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2481,7 +2481,7 @@ dependencies = [
|
|||||||
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
|
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
|
||||||
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
||||||
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
||||||
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=1011ff7c7c6d5fe7de078194538ae5a2a0e5e461)" = "<none>"
|
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=99507a8fc6c874e027b0f002320c7b232f459761)" = "<none>"
|
||||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||||
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
||||||
"checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"
|
"checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"
|
||||||
@@ -2520,15 +2520,15 @@ dependencies = [
|
|||||||
"checksum tower 0.1.1 (git+https://github.com/tower-rs/tower)" = "<none>"
|
"checksum tower 0.1.1 (git+https://github.com/tower-rs/tower)" = "<none>"
|
||||||
"checksum tower-buffer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7b83e1ccf5b23dd109dd6ae2c07b8e2beec7a51a21f29da2dba576317370e0"
|
"checksum tower-buffer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7b83e1ccf5b23dd109dd6ae2c07b8e2beec7a51a21f29da2dba576317370e0"
|
||||||
"checksum tower-discover 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73a7632286f78164d65d18fd0e570307acde9362489aa5c8c53e6315cc2bde47"
|
"checksum tower-discover 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73a7632286f78164d65d18fd0e570307acde9362489aa5c8c53e6315cc2bde47"
|
||||||
"checksum tower-grpc 0.1.1 (git+https://github.com/tower-rs/tower-grpc)" = "<none>"
|
"checksum tower-grpc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddd833a116f724984a09ff25c27ea5d0b9a65d301f48048e366f8f3c6081c2cb"
|
||||||
"checksum tower-grpc-build 0.1.0 (git+https://github.com/tower-rs/tower-grpc)" = "<none>"
|
"checksum tower-grpc-build 0.1.0 (git+https://github.com/tower-rs/tower-grpc)" = "<none>"
|
||||||
"checksum tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2)" = "<none>"
|
"checksum tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2?rev=0865040d699697bbaf1c3b77b3f256b72f98cdf4)" = "<none>"
|
||||||
"checksum tower-http 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
|
"checksum tower-http 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
|
||||||
"checksum tower-http-util 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
|
"checksum tower-http-util 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
|
||||||
"checksum tower-layer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ddf07e10c07dcc8f41da6de036dc66def1a85b70eb8a385159e3908bb258328"
|
"checksum tower-layer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ddf07e10c07dcc8f41da6de036dc66def1a85b70eb8a385159e3908bb258328"
|
||||||
"checksum tower-limit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d990c5b6c0e4e192db8cf3dacaafefe1278962d0ec45dc84421175db32d33f0"
|
"checksum tower-limit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d990c5b6c0e4e192db8cf3dacaafefe1278962d0ec45dc84421175db32d33f0"
|
||||||
"checksum tower-load-shed 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04fbaf5bfb63d84204db87b9b2aeec61549613f2bbb8706dcc36f5f3ea8cd769"
|
"checksum tower-load-shed 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04fbaf5bfb63d84204db87b9b2aeec61549613f2bbb8706dcc36f5f3ea8cd769"
|
||||||
"checksum tower-request-modifier 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
|
"checksum tower-request-modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6af257a01ba5f7a5c6190a70220cceebe832fa836e689cb8f73cb0e53112af5"
|
||||||
"checksum tower-retry 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09e80588125061f276ed2a7b0939988b411e570a2dbb2965b1382ef4f71036f7"
|
"checksum tower-retry 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09e80588125061f276ed2a7b0939988b411e570a2dbb2965b1382ef4f71036f7"
|
||||||
"checksum tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc0c98637d23732f8de6dfd16494c9f1559c3b9e20b4a46462c8f9b9e827bfa"
|
"checksum tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc0c98637d23732f8de6dfd16494c9f1559c3b9e20b4a46462c8f9b9e827bfa"
|
||||||
"checksum tower-timeout 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c06bbc2fbd056f810940a8c6f0cc194557d36da3c22999a755a7a6612447da9"
|
"checksum tower-timeout 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c06bbc2fbd056f810940a8c6f0cc194557d36da3c22999a755a7a6612447da9"
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ crate-type = ["staticlib"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.58"
|
libc = "0.2.58"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "1011ff7c7c6d5fe7de078194538ae5a2a0e5e461" }
|
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "99507a8fc6c874e027b0f002320c7b232f459761" }
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern bool litelib_wallet_exists (const char* chain_name);
|
extern bool litelib_wallet_exists (const char* chain_name, const char* dir);
|
||||||
extern char * litelib_initialze_existing (bool dangerous, const char* server);
|
extern char * litelib_initialze_existing (bool dangerous, const char* server);
|
||||||
extern char * litelib_execute (const char* s, const char* args);
|
extern char * litelib_execute (const char* s, const char* args);
|
||||||
extern void litelib_rust_free_string (char* s);
|
extern void litelib_rust_free_string (char* s);
|
||||||
@@ -14,4 +14,4 @@ extern void litelib_rust_free_string (char* s);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -17,18 +17,7 @@ lazy_static! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is an existing wallet
|
// Check if there is an existing wallet
|
||||||
#[no_mangle]
|
|
||||||
pub extern fn litelib_wallet_exists(chain_name: *const c_char) -> bool {
|
|
||||||
let chain_name_str = unsafe {
|
|
||||||
assert!(!chain_name.is_null());
|
|
||||||
|
|
||||||
CStr::from_ptr(chain_name).to_string_lossy().into_owned()
|
|
||||||
};
|
|
||||||
|
|
||||||
let config = LightClientConfig::create_unconnected(chain_name_str);
|
|
||||||
|
|
||||||
config.wallet_exists()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize a new lightclient and store its value
|
// Initialize a new lightclient and store its value
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ void LiteInterface::createNewZaddr(bool, const std::function<void(json)>& cb) {
|
|||||||
if (conn == nullptr)
|
if (conn == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
conn->doRPCWithDefaultErrorHandling("new", "z", cb);
|
conn->doRPCWithDefaultErrorHandling("new", "zs", cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
|
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
|
||||||
if (conn == nullptr)
|
if (conn == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
conn->doRPCWithDefaultErrorHandling("new", "t", cb);
|
conn->doRPCWithDefaultErrorHandling("new", "R", cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiteInterface::fetchPrivKey(QString addr, const std::function<void(json)>& cb) {
|
void LiteInterface::fetchPrivKey(QString addr, const std::function<void(json)>& cb) {
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ public:
|
|||||||
parser.addOption(confOption);
|
parser.addOption(confOption);
|
||||||
|
|
||||||
// Positional argument will specify a hush payment URI
|
// Positional argument will specify a hush payment URI
|
||||||
parser.addPositionalArgument("hushURI", "An optional hush URI to pay");
|
parser.addPositionalArgument("HUSHURI", "An optional hush URI to pay");
|
||||||
|
|
||||||
parser.process(a);
|
parser.process(a);
|
||||||
|
|
||||||
@@ -169,8 +169,8 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QCoreApplication::setOrganizationName("silentdragon-org");
|
QCoreApplication::setOrganizationName("myhush.org");
|
||||||
QCoreApplication::setApplicationName("silentdragon");
|
QCoreApplication::setApplicationName("SilentDragonLite");
|
||||||
|
|
||||||
QString locale = QLocale::system().name();
|
QString locale = QLocale::system().name();
|
||||||
locale.truncate(locale.lastIndexOf('_')); // Get the language code
|
locale.truncate(locale.lastIndexOf('_')); // Get the language code
|
||||||
@@ -214,7 +214,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
w = new MainWindow();
|
w = new MainWindow();
|
||||||
w->setWindowTitle("silentdragon v" + QString(APP_VERSION));
|
w->setWindowTitle("SilentDragonLite v" + QString(APP_VERSION));
|
||||||
|
|
||||||
// If there was a payment URI on the command line, pay it
|
// If there was a payment URI on the command line, pay it
|
||||||
if (parser.positionalArguments().length() > 0) {
|
if (parser.positionalArguments().length() > 0) {
|
||||||
|
|||||||
@@ -50,12 +50,16 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
// Set up exit action
|
// Set up exit action
|
||||||
QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close);
|
QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close);
|
||||||
|
|
||||||
// Set up donate action
|
// Set up Feedback action
|
||||||
QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate);
|
QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate);
|
||||||
|
|
||||||
|
QObject::connect(ui->actionDiscord, &QAction::triggered, this, &MainWindow::discord);
|
||||||
|
|
||||||
|
QObject::connect(ui->actionWebsite, &QAction::triggered, this, &MainWindow::website);
|
||||||
|
|
||||||
// File a bug
|
// File a bug
|
||||||
QObject::connect(ui->actionFile_a_bug, &QAction::triggered, [=]() {
|
QObject::connect(ui->actionFile_a_bug, &QAction::triggered, [=]() {
|
||||||
QDesktopServices::openUrl(QUrl("https://github.com/hushfoundation/silentdragon/issues/new"));
|
QDesktopServices::openUrl(QUrl("https://github.com/MyHush/silentdragonlite/issues/new"));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set up check for updates action
|
// Set up check for updates action
|
||||||
@@ -142,9 +146,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::createWebsocket(QString wormholecode) {
|
void MainWindow::createWebsocket(QString wormholecode) {
|
||||||
qDebug() << "Listening for app connections on port 8237";
|
qDebug() << "Listening for app connections on port 8777";
|
||||||
// Create the websocket server, for listening to direct connections
|
// Create the websocket server, for listening to direct connections
|
||||||
wsserver = new WSServer(8237, false, this);
|
wsserver = new WSServer(8777, false, this);
|
||||||
|
|
||||||
if (!wormholecode.isEmpty()) {
|
if (!wormholecode.isEmpty()) {
|
||||||
// Connect to the wormhole service
|
// Connect to the wormhole service
|
||||||
@@ -267,7 +271,7 @@ void MainWindow::setupSettingsModal() {
|
|||||||
QObject::connect(settings.comboBoxTheme, &QComboBox::currentTextChanged, [=] (QString theme_name) {
|
QObject::connect(settings.comboBoxTheme, &QComboBox::currentTextChanged, [=] (QString theme_name) {
|
||||||
this->slot_change_theme(theme_name);
|
this->slot_change_theme(theme_name);
|
||||||
// Tell the user to restart
|
// Tell the user to restart
|
||||||
QMessageBox::information(this, tr("Restart"), tr("Please restart silentdragon to have the theme apply"), QMessageBox::Ok);
|
QMessageBox::information(this, tr("Restart"), tr("Please restart Silentdragonlite to have the theme apply"), QMessageBox::Ok);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Save sent transactions
|
// Save sent transactions
|
||||||
@@ -306,7 +310,7 @@ void MainWindow::setupSettingsModal() {
|
|||||||
settings.rpcpassword->setEnabled(false);
|
settings.rpcpassword->setEnabled(false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
settings.confMsg->setText("No local hush.conf found. Please configure connection manually.");
|
settings.confMsg->setText("No local HUSH3.conf found. Please configure connection manually.");
|
||||||
settings.hostname->setEnabled(true);
|
settings.hostname->setEnabled(true);
|
||||||
settings.port->setEnabled(true);
|
settings.port->setEnabled(true);
|
||||||
settings.rpcuser->setEnabled(true);
|
settings.rpcuser->setEnabled(true);
|
||||||
@@ -355,7 +359,7 @@ void MainWindow::setupSettingsModal() {
|
|||||||
rpc->getConnection()->config->proxy = "proxy=127.0.0.1:9050";
|
rpc->getConnection()->config->proxy = "proxy=127.0.0.1:9050";
|
||||||
|
|
||||||
QMessageBox::information(this, tr("Enable Tor"),
|
QMessageBox::information(this, tr("Enable Tor"),
|
||||||
tr("Connection over Tor has been enabled. To use this feature, you need to restart silentdragon."),
|
tr("Connection over Tor has been enabled. To use this feature, you need to restart Silentdragonlite."),
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,17 +421,26 @@ void MainWindow::addressBook() {
|
|||||||
AddressBook::open(this);
|
AddressBook::open(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::discord() {
|
||||||
|
QString url = "https://myhush.org/discord/";
|
||||||
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::website() {
|
||||||
|
QString url = "https://myhush.org";
|
||||||
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::donate() {
|
void MainWindow::donate() {
|
||||||
// Set up a donation to me :)
|
// Set up a donation to me :)
|
||||||
clearSendForm();
|
|
||||||
|
|
||||||
ui->Address1->setText(Settings::getDonationAddr());
|
ui->Address1->setText(Settings::getDonationAddr());
|
||||||
ui->Address1->setCursorPosition(0);
|
ui->Address1->setCursorPosition(0);
|
||||||
ui->Amount1->setText("0.01");
|
ui->Amount1->setText("0.00");
|
||||||
ui->MemoTxt1->setText(tr("Thanks for supporting silentdragon!"));
|
ui->MemoTxt1->setText(tr("Some feedback about SilentDragonlite or Hush..."));
|
||||||
|
|
||||||
ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support silentdragon"));
|
ui->statusBar->showMessage(tr("Send Duke some private and shielded feedback about") % Settings::getTokenName() % tr(" or SilentDragonLite"));
|
||||||
|
|
||||||
// And switch to the send tab.
|
// And switch to the send tab.
|
||||||
ui->tabWidget->setCurrentIndex(1);
|
ui->tabWidget->setCurrentIndex(1);
|
||||||
@@ -508,8 +521,8 @@ void MainWindow::payhushURI(QString uri, QString myAddr) {
|
|||||||
|
|
||||||
// If there was no URI passed, ask the user for one.
|
// If there was no URI passed, ask the user for one.
|
||||||
if (uri.isEmpty()) {
|
if (uri.isEmpty()) {
|
||||||
uri = QInputDialog::getText(this, tr("Paste hush URI"),
|
uri = QInputDialog::getText(this, tr("Paste HUSH URI"),
|
||||||
"hush URI" + QString(" ").repeated(180));
|
"HUSH URI" + QString(" ").repeated(180));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's no URI, just exit
|
// If there's no URI, just exit
|
||||||
@@ -520,7 +533,7 @@ void MainWindow::payhushURI(QString uri, QString myAddr) {
|
|||||||
qDebug() << "Received URI " << uri;
|
qDebug() << "Received URI " << uri;
|
||||||
PaymentURI paymentInfo = Settings::parseURI(uri);
|
PaymentURI paymentInfo = Settings::parseURI(uri);
|
||||||
if (!paymentInfo.error.isEmpty()) {
|
if (!paymentInfo.error.isEmpty()) {
|
||||||
QMessageBox::critical(this, tr("Error paying hush URI"),
|
QMessageBox::critical(this, tr("Error paying HUSH URI"),
|
||||||
tr("URI should be of the form 'hush:<addr>?amt=x&memo=y") + "\n" + paymentInfo.error);
|
tr("URI should be of the form 'hush:<addr>?amt=x&memo=y") + "\n" + paymentInfo.error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -620,6 +633,7 @@ void MainWindow::exportTransactions() {
|
|||||||
void MainWindow::backupWalletDat() {
|
void MainWindow::backupWalletDat() {
|
||||||
if (!rpc->getConnection())
|
if (!rpc->getConnection())
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// QDir hushdir(rpc->getConnection()->config->hushDir);
|
// QDir hushdir(rpc->getConnection()->config->hushDir);
|
||||||
// QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat";
|
// QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat";
|
||||||
@@ -644,7 +658,7 @@ void MainWindow::backupWalletDat() {
|
|||||||
// QMessageBox::critical(this, tr("Couldn't backup"), tr("Couldn't backup the wallet.dat file.") +
|
// QMessageBox::critical(this, tr("Couldn't backup"), tr("Couldn't backup the wallet.dat file.") +
|
||||||
// tr("You need to back it up manually."), QMessageBox::Ok);
|
// tr("You need to back it up manually."), QMessageBox::Ok);
|
||||||
// }
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::exportAllKeys() {
|
void MainWindow::exportAllKeys() {
|
||||||
exportKeys("");
|
exportKeys("");
|
||||||
@@ -664,7 +678,7 @@ void MainWindow::exportKeys(QString addr) {
|
|||||||
|
|
||||||
Settings::saveRestore(&d);
|
Settings::saveRestore(&d);
|
||||||
|
|
||||||
pui.privKeyTxt->setPlainText(tr("This might take several minutes. Loading..."));
|
pui.privKeyTxt->setPlainText(tr("Loading..."));
|
||||||
pui.privKeyTxt->setReadOnly(true);
|
pui.privKeyTxt->setReadOnly(true);
|
||||||
pui.privKeyTxt->setLineWrapMode(QPlainTextEdit::LineWrapMode::NoWrap);
|
pui.privKeyTxt->setLineWrapMode(QPlainTextEdit::LineWrapMode::NoWrap);
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,8 @@ private:
|
|||||||
void setMemoEnabled(int number, bool enabled);
|
void setMemoEnabled(int number, bool enabled);
|
||||||
|
|
||||||
void donate();
|
void donate();
|
||||||
|
void discord();
|
||||||
|
void website();
|
||||||
void addressBook();
|
void addressBook();
|
||||||
void importPrivKey();
|
void importPrivKey();
|
||||||
void exportAllKeys();
|
void exportAllKeys();
|
||||||
|
|||||||
@@ -1074,6 +1074,8 @@
|
|||||||
<string>&Help</string>
|
<string>&Help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionDonate"/>
|
<addaction name="actionDonate"/>
|
||||||
|
<addaction name="actionDiscord"/>
|
||||||
|
<addaction name="actionWebsite"/>
|
||||||
<addaction name="actionCheck_for_Updates"/>
|
<addaction name="actionCheck_for_Updates"/>
|
||||||
<addaction name="actionFile_a_bug"/>
|
<addaction name="actionFile_a_bug"/>
|
||||||
<addaction name="actionAbout"/>
|
<addaction name="actionAbout"/>
|
||||||
@@ -1118,9 +1120,19 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionDonate">
|
<action name="actionDonate">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Donate</string>
|
<string>&Send Duke Feedback</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDiscord">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Hush Discord</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionWebsite">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Hush Website</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionCheck_for_Updates">
|
<action name="actionCheck_for_Updates">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Check github.com for &updates</string>
|
<string>Check github.com for &updates</string>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
Package: hush-qt-wallet
|
Package: silentdragonlite
|
||||||
Version: RELEASE_VERSION
|
Version: RELEASE_VERSION
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Maintainer: Aditya Kulkarni <hush@adityapk.com>
|
Maintainer: DenioD <admin@hush-lightwallet.de>
|
||||||
Description: silentdragon is a full node and UI wallet for hush.
|
Description: Silentdragonlite is a Lightwallet for hush. It comes with
|
||||||
silentdragon is a full node and UI wallet for hush. It comes with
|
full support for transparent and shielded addresses.
|
||||||
full support for shielded addresses and many apps for hush.
|
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ void MainWindow::setDefaultPayFrom() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// By default, select the z-address with the most balance from the inputs combo
|
// By default, select the z-address with the most balance from the inputs combo
|
||||||
auto maxZ = findMax("z");
|
auto maxZ = findMax("zs1");
|
||||||
if (maxZ >= 0) {
|
if (maxZ >= 0) {
|
||||||
ui->inputsCombo->setCurrentIndex(maxZ);
|
ui->inputsCombo->setCurrentIndex(maxZ);
|
||||||
} else {
|
} else {
|
||||||
auto maxT = findMax("t");
|
auto maxT = findMax("R");
|
||||||
maxT = maxT >= 0 ? maxT : 0;
|
maxT = maxT >= 0 ? maxT : 0;
|
||||||
ui->inputsCombo->setCurrentIndex(maxT);
|
ui->inputsCombo->setCurrentIndex(maxT);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ bool Settings::isSaplingAddress(QString addr) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
return ( isTestnet() && addr.startsWith("ztestsapling")) ||
|
return ( isTestnet() && addr.startsWith("ztestsapling")) ||
|
||||||
(!isTestnet() && addr.startsWith("zs"));
|
(!isTestnet() && addr.startsWith("zs1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::isSproutAddress(QString addr) {
|
bool Settings::isSproutAddress(QString addr) {
|
||||||
@@ -79,7 +79,7 @@ bool Settings::isTAddress(QString addr) {
|
|||||||
if (!isValidAddress(addr))
|
if (!isValidAddress(addr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return addr.startsWith("t");
|
return addr.startsWith("R");
|
||||||
}
|
}
|
||||||
|
|
||||||
int Settings::gethushdVersion() {
|
int Settings::gethushdVersion() {
|
||||||
@@ -107,8 +107,8 @@ void Settings::setBlockNumber(int number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::isSaplingActive() {
|
bool Settings::isSaplingActive() {
|
||||||
return (isTestnet() && getBlockNumber() > 280000) ||
|
return (isTestnet() && getBlockNumber() > 1) ||
|
||||||
(!isTestnet() && getBlockNumber() > 419200);
|
(!isTestnet() && getBlockNumber() > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
double Settings::gethushPrice() {
|
double Settings::gethushPrice() {
|
||||||
@@ -199,7 +199,7 @@ void Settings::openAddressInExplorer(QString address) {
|
|||||||
if (Settings::getInstance()->isTestnet()) {
|
if (Settings::getInstance()->isTestnet()) {
|
||||||
url = "https://chain.so/address/hushTEST/" + address;
|
url = "https://chain.so/address/hushTEST/" + address;
|
||||||
} else {
|
} else {
|
||||||
url = "https://chain.so/address/hush/" + address;
|
url = "https://explorer.myhush.org/address/" + address;
|
||||||
}
|
}
|
||||||
QDesktopServices::openUrl(QUrl(url));
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ void Settings::openTxInExplorer(QString txid) {
|
|||||||
url = "https://chain.so/tx/hushTEST/" + txid;
|
url = "https://chain.so/tx/hushTEST/" + txid;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
url = "https://chain.so/tx/hush/" + txid;
|
url = "https://explorer.myhush.org/tx/" + txid;
|
||||||
}
|
}
|
||||||
QDesktopServices::openUrl(QUrl(url));
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ const QString Settings::txidStatusMessage = QString(QObject::tr("Tx submitted (r
|
|||||||
|
|
||||||
QString Settings::getTokenName() {
|
QString Settings::getTokenName() {
|
||||||
if (Settings::getInstance()->isTestnet()) {
|
if (Settings::getInstance()->isTestnet()) {
|
||||||
return "TAZ";
|
return "HUSHT";
|
||||||
} else {
|
} else {
|
||||||
return "HUSH";
|
return "HUSH";
|
||||||
}
|
}
|
||||||
@@ -262,9 +262,9 @@ QString Settings::getTokenName() {
|
|||||||
|
|
||||||
QString Settings::getDonationAddr() {
|
QString Settings::getDonationAddr() {
|
||||||
if (Settings::getInstance()->isTestnet())
|
if (Settings::getInstance()->isTestnet())
|
||||||
return "ztestsapling1wn6889vznyu42wzmkakl2effhllhpe4azhu696edg2x6me4kfsnmqwpglaxzs7tmqsq7kudemp5";
|
return "ztestsaplingXXX";
|
||||||
else
|
else
|
||||||
return "zs1gv64eu0v2wx7raxqxlmj354y9ycznwaau9kduljzczxztvs4qcl00kn2sjxtejvrxnkucw5xx9u";
|
return "zs1aq4xnrkjlnxx0zesqye7jz3dfrf3rjh7q5z6u8l6mwyqqaam3gx3j2fkqakp33v93yavq46j83q";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,13 +343,11 @@ bool Settings::isValidSaplingPrivateKey(QString pk) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::isValidAddress(QString addr) {
|
bool Settings::isValidAddress(QString addr) {
|
||||||
QRegExp zcexp("^z[a-z0-9]{94}$", Qt::CaseInsensitive);
|
QRegExp zsexp("^zs1[a-z0-9]{75}$", Qt::CaseInsensitive);
|
||||||
QRegExp zsexp("^z[a-z0-9]{77}$", Qt::CaseInsensitive);
|
|
||||||
QRegExp ztsexp("^ztestsapling[a-z0-9]{76}", Qt::CaseInsensitive);
|
QRegExp ztsexp("^ztestsapling[a-z0-9]{76}", Qt::CaseInsensitive);
|
||||||
QRegExp texp("^t[a-z0-9]{34}$", Qt::CaseInsensitive);
|
QRegExp texp("^R[a-z0-9]{33}$", Qt::CaseInsensitive);
|
||||||
|
|
||||||
return zcexp.exactMatch(addr) || texp.exactMatch(addr) ||
|
return texp.exactMatch(addr) || ztsexp.exactMatch(addr) || zsexp.exactMatch(addr);
|
||||||
ztsexp.exactMatch(addr) || zsexp.exactMatch(addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a pretty string representation of this Payment URI
|
// Get a pretty string representation of this Payment URI
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ public:
|
|||||||
|
|
||||||
static const QString labelRegExp;
|
static const QString labelRegExp;
|
||||||
|
|
||||||
static const int updateSpeed = 20 * 1000; // 20 sec
|
static const int updateSpeed = 10 * 1000; // 10 sec
|
||||||
static const int quickUpdateSpeed = 5 * 1000; // 5 sec
|
static const int quickUpdateSpeed = 3 * 1000; // 3 sec
|
||||||
static const int priceRefreshSpeed = 60 * 60 * 1000; // 1 hr
|
static const int priceRefreshSpeed = 15 * 60 * 1000; // 15 mins
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This class can only be accessed through Settings::getInstance()
|
// This class can only be accessed through Settings::getInstance()
|
||||||
|
|||||||
Reference in New Issue
Block a user