From 69da9ab3e1e5596215cad207735d9bf9c78563c2 Mon Sep 17 00:00:00 2001 From: gilardh Date: Wed, 4 Mar 2020 21:56:36 +0100 Subject: [PATCH 01/13] Rebrand README.md --- README.md | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6be2c5e..631e26d 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,23 @@ -# zecpaperwallet -zecpaperwallet is a Zcash Sapling paper wallet generator that can run completely offline. You can run it on an air-gapped computer to generate your shielded z-addresses, which will allow you to keep your keys completely offline. +# hushpaperwallet +hushpaperwallet is a paper wallet generator that can run completely offline. +You can run it on an air-gapped computer to generate your shielded z-addresses, which will allow you to keep your keys completely offline. *Example:* -![Paper Wallet](docs/paperwallet.png?raw=true) +![screenshot](hushpaperwallet.png?raw=true) # Download -zecpaperwallet is available as pre-built binaries from our [release page](https://github.com/adityapk00/zecpaperwallet/releases). Download the zip file for your platform, extract it and run the `./zecpaperwallet` binary. +hushpaperwallet is available as pre-built binaries from our [release page](https://github.com/MyHush/hushpaperwallet/releases). Download the zip file for your platform, extract it and run the `./hushpaperwallet` binary. # Generating wallets -To generate a Zcash paper wallet, simply run `./zecpaperwallet` +To generate a Hush paper wallet, simply run `./hushpaperwallet` You'll be asked to type some random characters that will add entropy to the random number generator. Run with `--help` to see all options ## Saving as PDFs -To generate a Zcash paper wallet and save it as a PDF, run -`./zecpaperwallet -z 3 --format pdf zecpaper-output.pdf` +To generate a Hush paper wallet and save it as a PDF, run +`./hushpaperwallet -z 3 --format pdf hushpaper-output.pdf` -This will generate 3 shielded z-addresses and their corresponding private keys, and save them in a PDF file called `zecpaper-output.pdf` +This will generate 3 shielded z-addresses and their corresponding private keys, and save them in a PDF file called `hushpaper-output.pdf` ## Vanity Addresses You can generate a "vanity address" (that is, an address starting with a given prefix) by specifying a `--vanity` argument with the prefix you want. @@ -24,14 +25,14 @@ You can generate a "vanity address" (that is, an address starting with a given p Note that generating vanity addresses with a prefix longer than 4-5 characters is computationally expensive. You can run it on multiple CPUs on your computer by specifying the `--threads` option. # Compiling from Source -zecpaperwallet is built with rust. To compile from source, you [install Rust](https://www.rust-lang.org/tools/install). Basically, you need to: +hushpaperwallet is built with rust. To compile from source, you [install Rust](https://www.rust-lang.org/tools/install). Basically, you need to: ``` curl https://sh.rustup.rs -sSf | sh ``` -Checkout the zecpaperwallet repository and build the CLI +Checkout the hushpaperwallet repository and build the CLI ``` -git clone https://github.com/adityapk00/zecpaperwallet.git -cd zecpaperwallet/cli +git clone https://github.com/MyHush/hushpaperwallet.git +cd hushpaperwallet/cli cargo build --release ``` @@ -39,17 +40,17 @@ The binary is available in the `target/release` folder. ## Ensuring Security When generating paper wallets that will store large amounts of crypto, please take special care to ensure the keys are generated and kept completely offline. -1. `zecpaperwallet` supports ARMv8 (Raspberry Pi 3+). You can put one in a Faraday cage along with a printer, and print out the PDFs securely. -2. Please ensure you supply random entropy when you run `zecpaperwallet`. Your entropy is mixed in with system-provided entropy to generate keys +1. `hushpaperwallet` supports ARMv8 (Raspberry Pi 3+). You can put one in a Faraday cage along with a printer, and print out the PDFs securely. +2. Please ensure you supply random entropy when you run `hushpaperwallet`. Your entropy is mixed in with system-provided entropy to generate keys 3. If you can, run with `unshare`, which will disable all network interfaces to a process, providing you with an additional layer of safety. (See next section) 4. After you've generated the keys, you can tear off the Address potion of the wallet and take it to your online computer/phone to send the address funds. Please always keep the private key offline. 5. When you're ready to spend the cold storage keys, import the private key into a full node, then don't re-use the key again. ### Run without network -If you are running a newish version of Linux, you can be doubly sure that the process is not contacting the network by running zecpaperwallet without the network namespace. +If you are running a newish version of Linux, you can be doubly sure that the process is not contacting the network by running hushpaperwallet without the network namespace. ``` -sudo unshare -n ./target/release/zecpaperwallet +sudo unshare -n ./target/release/hushpaperwallet ``` `unshare -n` runs the process without a network interface which means you can be sure that your data is not being sent across the network. @@ -57,11 +58,11 @@ sudo unshare -n ./target/release/zecpaperwallet ## Help options ``` USAGE: - zecpaperwallet [FLAGS] [OPTIONS] [output] + hushpaperwallet [FLAGS] [OPTIONS] [output] FLAGS: -h, --help Prints help information - -n, --nohd Don't reuse HD keys. Normally, zecpaperwallet will use the same HD key to derive multiple + -n, --nohd Don't reuse HD keys. Normally, hushpaperwallet will use the same HD key to derive multiple addresses. This flag will use a new seed for each address --testnet Generate Testnet addresses -V, --version Prints version information From 0b804c0539893eca70d5aa035f7f05088523a9a8 Mon Sep 17 00:00:00 2001 From: gilardh Date: Wed, 4 Mar 2020 22:49:42 +0100 Subject: [PATCH 02/13] Error correction visible during compilation --- lib/src/paper.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/paper.rs b/lib/src/paper.rs index c406258..4005ceb 100644 --- a/lib/src/paper.rs +++ b/lib/src/paper.rs @@ -264,7 +264,7 @@ pub fn generate_vanity_wallet(is_testnet: bool, num_threads: u32, prefix: String let mut processed: u64 = 0; let now = SystemTime::now(); - let mut wallet: String; + let wallet: String; // Calculate the estimated time let expected_combinations = (32 as f64).powf(prefix.len() as f64); @@ -395,8 +395,8 @@ fn gen_addresses_with_seed_as_json(is_testnet: bool, zcount: u32, tcount: u32 /// Generate a t address fn get_taddress(is_testnet: bool, rng: &mut ChaChaRng) -> (String, String) { - use secp256k1; - use ripemd160::{Ripemd160, Digest}; +// use secp256k1; + use ripemd160::{Ripemd160}; let mut sk_bytes: [u8; 32] = [0;32]; From d3111b4adeea89a8de1fc1a956befa61a1e87be3 Mon Sep 17 00:00:00 2001 From: gilardh Date: Wed, 4 Mar 2020 23:25:34 +0100 Subject: [PATCH 03/13] Rebrand --- cli/Cargo.toml | 11 ++- cli/mkrelease.sh | 58 +++++++------- cli/src/main.rs | 12 +-- lib/Cargo.toml | 9 ++- lib/src/pdf.rs | 6 +- ui/.gitignore | 8 +- ...ource.rc => hushpaperwalletui_resource.rc} | 6 +- ui/mkdockerwinlinux.sh | 18 ++--- ui/mkrelease.sh | 76 +++++++++---------- ui/papersapling.pro | 20 ++--- ui/qtlib/Cargo.toml | 4 +- .../src/{zecpaperrust.h => hushpaperrust.h} | 4 +- ui/qtlib/src/lib.rs | 2 +- ui/res/Info.plist | 4 +- ui/src/about.ui | 6 +- ui/src/main.cpp | 6 +- ui/src/mainwindow.cpp | 6 +- ui/src/mainwindow.ui | 2 +- web/Cargo.toml | 4 +- web/README.md | 8 +- web/src/lib.rs | 2 +- web/www/index.html | 10 +-- web/www/index.js | 2 +- web/www/package.json | 2 +- 24 files changed, 146 insertions(+), 140 deletions(-) rename ui/{zecpaperwalletui_resource.rc => hushpaperwalletui_resource.rc} (78%) rename ui/qtlib/src/{zecpaperrust.h => hushpaperrust.h} (84%) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c7d835e..405fd34 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,11 +1,14 @@ [package] -name = "zecpaperwallet" +name = "hushpaperwallet" version = "0.1.0" -authors = ["ZecWallet"] +authors = [ + "ZecWallet", + "The Hush developers" +] edition = "2018" [dependencies] clap = "2.33.0" -zecpaperlib = { path = "../lib" } +hushpaperlib = { path = "../lib" } json = "0.11.14" -printpdf = "0.2.8" \ No newline at end of file +printpdf = "0.3.2" \ No newline at end of file diff --git a/cli/mkrelease.sh b/cli/mkrelease.sh index 29226c5..93c1580 100755 --- a/cli/mkrelease.sh +++ b/cli/mkrelease.sh @@ -32,58 +32,58 @@ cargo clean cargo build --release # macOS -rm -rf target/macOS-zecpaperwallet-v$APP_VERSION -mkdir -p target/macOS-zecpaperwallet-v$APP_VERSION -cp target/release/zecpaperwallet target/macOS-zecpaperwallet-v$APP_VERSION/ +rm -rf target/macOS-hushpaperwallet-v$APP_VERSION +mkdir -p target/macOS-hushpaperwallet-v$APP_VERSION +cp target/release/hushpaperwallet target/macOS-hushpaperwallet-v$APP_VERSION/ # For Windows and Linux, build via docker -docker run --rm -v $(pwd)/..:/opt/zecpaperwallet rustbuild:latest bash -c "cd /opt/zecpaperwallet/cli && cargo build --release && cargo build --release --target x86_64-pc-windows-gnu && cargo build --release --target aarch64-unknown-linux-gnu" +docker run --rm -v $(pwd)/..:/opt/hushpaperwallet rustbuild:latest bash -c "cd /opt/hushpaperwallet/cli && cargo build --release && cargo build --release --target x86_64-pc-windows-gnu && cargo build --release --target aarch64-unknown-linux-gnu" # Now sign and zip the binaries -gpg --batch --output target/macOS-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/macOS-zecpaperwallet-v$APP_VERSION/zecpaperwallet +gpg --batch --output target/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet cd target -cd macOS-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet > sha256sum.txt +cd macOS-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet > sha256sum.txt cd .. -zip -r macOS-zecpaperwallet-v$APP_VERSION.zip macOS-zecpaperwallet-v$APP_VERSION +zip -r macOS-hushpaperwallet-v$APP_VERSION.zip macOS-hushpaperwallet-v$APP_VERSION cd .. #Linux -rm -rf target/linux-zecpaperwallet-v$APP_VERSION -mkdir -p target/linux-zecpaperwallet-v$APP_VERSION -cp target/release/zecpaperwallet target/linux-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output target/linux-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/linux-zecpaperwallet-v$APP_VERSION/zecpaperwallet +rm -rf target/linux-hushpaperwallet-v$APP_VERSION +mkdir -p target/linux-hushpaperwallet-v$APP_VERSION +cp target/release/hushpaperwallet target/linux-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output target/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet cd target -cd linux-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet > sha256sum.txt +cd linux-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet > sha256sum.txt cd .. -zip -r linux-zecpaperwallet-v$APP_VERSION.zip linux-zecpaperwallet-v$APP_VERSION +zip -r linux-hushpaperwallet-v$APP_VERSION.zip linux-hushpaperwallet-v$APP_VERSION cd .. #Windows -rm -rf target/Windows-zecpaperwallet-v$APP_VERSION -mkdir -p target/Windows-zecpaperwallet-v$APP_VERSION -cp target/x86_64-pc-windows-gnu/release/zecpaperwallet.exe target/Windows-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output target/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwallet.exe +rm -rf target/Windows-hushpaperwallet-v$APP_VERSION +mkdir -p target/Windows-hushpaperwallet-v$APP_VERSION +cp target/x86_64-pc-windows-gnu/release/hushpaperwallet.exe target/Windows-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output target/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.exe cd target -cd Windows-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet.exe > sha256sum.txt +cd Windows-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet.exe > sha256sum.txt cd .. -zip -r Windows-zecpaperwallet-v$APP_VERSION.zip Windows-zecpaperwallet-v$APP_VERSION +zip -r Windows-hushpaperwallet-v$APP_VERSION.zip Windows-hushpaperwallet-v$APP_VERSION cd .. # aarch64 (armv8) -rm -rf target/aarch64-zecpaperwallet-v$APP_VERSION -mkdir -p target/aarch64-zecpaperwallet-v$APP_VERSION -cp target/aarch64-unknown-linux-gnu/release/zecpaperwallet target/aarch64-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output target/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet +rm -rf target/aarch64-hushpaperwallet-v$APP_VERSION +mkdir -p target/aarch64-hushpaperwallet-v$APP_VERSION +cp target/aarch64-unknown-linux-gnu/release/hushpaperwallet target/aarch64-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output target/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet cd target -cd aarch64-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet > sha256sum.txt +cd aarch64-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet > sha256sum.txt cd .. -zip -r aarch64-zecpaperwallet-v$APP_VERSION.zip aarch64-zecpaperwallet-v$APP_VERSION +zip -r aarch64-hushpaperwallet-v$APP_VERSION.zip aarch64-hushpaperwallet-v$APP_VERSION cd .. diff --git a/cli/src/main.rs b/cli/src/main.rs index 9f1c80a..702762c 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,18 +1,18 @@ extern crate clap; -extern crate zecpaperlib; +extern crate hushpaperlib; mod version; use clap::{Arg, App}; -use zecpaperlib::paper::*; -use zecpaperlib::pdf; +use hushpaperlib::paper::*; +use hushpaperlib::pdf; use std::io; use std::io::prelude::*; fn main() { - let matches = App::new("zecpaperwaller") + let matches = App::new("hushpaperwaller") .version(version::version()) - .about("A command line Zcash Sapling paper wallet generator") + .about("A command line Hush paper wallet generator") .arg(Arg::with_name("testnet") .long("testnet") .help("Generate Testnet addresses")) @@ -27,7 +27,7 @@ fn main() { .arg(Arg::with_name("nohd") .short("n") .long("nohd") - .help("Don't reuse HD keys. Normally, zecpaperwallet will use the same HD key to derive multiple addresses. This flag will use a new seed for each address")) + .help("Don't reuse HD keys. Normally, hushpaperwallet will use the same HD key to derive multiple addresses. This flag will use a new seed for each address")) .arg(Arg::with_name("output") .short("o") .long("output") diff --git a/lib/Cargo.toml b/lib/Cargo.toml index d6b4f35..708c61d 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -1,7 +1,10 @@ [package] -name = "zecpaperlib" +name = "hushpaperlib" version = "0.1.0" -authors = ["ZecWallet"] +authors = [ + "ZecWallet", + "The Hush developers" +] edition = "2018" [features] @@ -14,7 +17,7 @@ bech32 = "0.6" zcash_primitives = { git = "https://github.com/zcash/librustzcash", rev = "5a48d179b8434a0318e7e19dda506e245a904092" } json = "0.11.14" qrcode = { version = "0.8", default-features = false } -printpdf = { version = "0.2.8", optional = true } +printpdf = { version = "0.3.2", optional = true } libsecp256k1 = "0.2.2" ripemd160 = "0.8.0" sha2 = "0.8.0" diff --git a/lib/src/pdf.rs b/lib/src/pdf.rs index 77aa4fa..b36aa71 100644 --- a/lib/src/pdf.rs +++ b/lib/src/pdf.rs @@ -16,7 +16,7 @@ use printpdf::*; * Save the list of wallets (address + private keys) to the given PDF file name. */ pub fn save_to_pdf(is_testnet: bool, addresses: &str, filename: &str) -> Result<(), String> { - let (doc, page1, layer1) = PdfDocument::new("Zec Sapling Paper Wallet", Mm(210.0), Mm(297.0), "Layer 1"); + let (doc, page1, layer1) = PdfDocument::new("Hush Paper Wallet", Mm(210.0), Mm(297.0), "Layer 1"); let font = doc.add_builtin_font(BuiltinFont::Courier).unwrap(); let font_bold = doc.add_builtin_font(BuiltinFont::CourierBold).unwrap(); @@ -143,7 +143,7 @@ fn add_address_to_page(current_layer: &PdfLayerReference, font: &IndirectFontRef // page_height top_margin vertical_padding position let ypos = 297.0 - 5.0 - 35.0 - (140.0 * pos as f64); - let title = if is_taddr {"T Address"} else {"ZEC Address (Sapling)"}; + let title = if is_taddr {"T Address"} else {"HUSH Address"}; add_address_at(current_layer, font, font_bold, title, address, &scaledimg, finalsize, ypos); } @@ -198,7 +198,7 @@ fn add_pk_to_page(current_layer: &PdfLayerReference, font: &IndirectFontRef, fon } // Add the address a second time below the private key - let title = if is_taddr {"T Address"} else {"ZEC Address (Sapling)"}; + let title = if is_taddr {"T Address"} else {"HUSH Address"}; current_layer.use_text(title, 12, Mm(10.0), Mm(ypos-10.0), &font_bold); let strs = split_to_max(&address, 39, 39); // No spaces, so user can copy the address for i in 0..strs.len() { diff --git a/ui/.gitignore b/ui/.gitignore index ab8e7c7..934444a 100644 --- a/ui/.gitignore +++ b/ui/.gitignore @@ -5,10 +5,10 @@ Makefile Makefile.Debug Makefile.Release .qmake.stash -zecpaperwalletui -zecpaperwalletui.app/ -zecpaperwalletui_plugin_import.cpp -zecpaperwalletui.pro.user +hushpaperwalletui +hushpaperwalletui.app/ +hushpaperwalletui_plugin_import.cpp +hushpaperwalletui.pro.user .vscode/ ui*.h *.swp diff --git a/ui/zecpaperwalletui_resource.rc b/ui/hushpaperwalletui_resource.rc similarity index 78% rename from ui/zecpaperwalletui_resource.rc rename to ui/hushpaperwalletui_resource.rc index 5785ce3..0715845 100644 --- a/ui/zecpaperwalletui_resource.rc +++ b/ui/hushpaperwalletui_resource.rc @@ -1,6 +1,6 @@ #include -IDI_ICON1 ICON DISCARDABLE "/opt/zecpaperwallet/ui/res/icon.ico" +IDI_ICON1 ICON DISCARDABLE "/opt/hushpaperwallet/ui/res/icon.ico" VS_VERSION_INFO VERSIONINFO FILEVERSION 0,0,0,0 @@ -23,8 +23,8 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "\0" VALUE "FileVersion", "0.0.0.0\0" VALUE "LegalCopyright", "\0" - VALUE "OriginalFilename", "zecpaperwalletui.exe\0" - VALUE "ProductName", "zecpaperwalletui\0" + VALUE "OriginalFilename", "hushpaperwalletui.exe\0" + VALUE "ProductName", "hushpaperwalletui\0" VALUE "ProductVersion", "0.0.0.0\0" END END diff --git a/ui/mkdockerwinlinux.sh b/ui/mkdockerwinlinux.sh index 1e0a317..8edad98 100755 --- a/ui/mkdockerwinlinux.sh +++ b/ui/mkdockerwinlinux.sh @@ -29,30 +29,30 @@ if [ -z $APP_VERSION ]; then exit 1; fi -cd /opt/zecpaperwallet/ui +cd /opt/hushpaperwallet/ui source ~/.cargo/env # We need to run qmake before we run disclean /opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release make distclean -rm -rf artifacts/linux-zecpaperwallet-v$APP_VERSION -mkdir -p artifacts/linux-zecpaperwallet-v$APP_VERSION +rm -rf artifacts/linux-hushpaperwallet-v$APP_VERSION +mkdir -p artifacts/linux-hushpaperwallet-v$APP_VERSION /opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release make -j4 -strip zecpaperwalletui -cp zecpaperwalletui artifacts/linux-zecpaperwallet-v$APP_VERSION +strip hushpaperwalletui +cp hushpaperwalletui artifacts/linux-hushpaperwallet-v$APP_VERSION # Run qmake before distclean /opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release make distclean -rm -rf artifacts/Windows-zecpaperwallet-v$APP_VERSION -mkdir -p artifacts/Windows-zecpaperwallet-v$APP_VERSION +rm -rf artifacts/Windows-hushpaperwallet-v$APP_VERSION +mkdir -p artifacts/Windows-hushpaperwallet-v$APP_VERSION /opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release make -j4 -strip release/zecpaperwalletui.exe -cp release/zecpaperwalletui.exe artifacts/Windows-zecpaperwallet-v$APP_VERSION +strip release/hushpaperwalletui.exe +cp release/hushpaperwalletui.exe artifacts/Windows-hushpaperwallet-v$APP_VERSION # Cleanup before exiting make distclean \ No newline at end of file diff --git a/ui/mkrelease.sh b/ui/mkrelease.sh index fd0481c..3fea5a2 100755 --- a/ui/mkrelease.sh +++ b/ui/mkrelease.sh @@ -39,8 +39,8 @@ QT_STATIC=$QT_PATH/clang_64/bin echo -n "Cleaning..............." $QT_STATIC/qmake papersapling.pro CONFIG+=release >/dev/null make distclean >/dev/null 2>&1 -rm -rf artifacts/macOS-zecpaperwallet-v$APP_VERSION -mkdir -p artifacts/macOS-zecpaperwallet-v$APP_VERSION +rm -rf artifacts/macOS-hushpaperwallet-v$APP_VERSION +mkdir -p artifacts/macOS-hushpaperwallet-v$APP_VERSION echo "[OK]" echo -n "Testing................" @@ -67,12 +67,12 @@ echo "[OK]" #Qt deploy echo -n "Deploying.............." -$QT_STATIC/macdeployqt zecpaperwalletui.app -cp -r zecpaperwalletui.app artifacts/macOS-zecpaperwallet-v$APP_VERSION/ +$QT_STATIC/macdeployqt hushpaperwalletui.app +cp -r hushpaperwalletui.app artifacts/macOS-hushpaperwallet-v$APP_VERSION/ echo "[OK]" # Run inside docker container -docker run --rm -v ${PWD}/..:/opt/zecpaperwallet zecwallet/compileenv:v0.8 bash -c "cd /opt/zecpaperwallet/ui && ./mkdockerwinlinux.sh -v $APP_VERSION" +docker run --rm -v ${PWD}/..:/opt/hushpaperwallet hushwallet/compileenv:v0.8 bash -c "cd /opt/hushpaperwallet/ui && ./mkdockerwinlinux.sh -v $APP_VERSION" # Move to build the cli cd ../cli @@ -83,10 +83,10 @@ echo "pub fn version() -> &'static str { &\"$APP_VERSION\" }" > src/version.rs # Compile for mac directly and copy it over cargo build --release -cp target/release/zecpaperwallet ../ui/artifacts/macOS-zecpaperwallet-v$APP_VERSION/ +cp target/release/hushpaperwallet ../ui/artifacts/macOS-hushpaperwallet-v$APP_VERSION/ # For Windows and Linux, build via docker -docker run --rm -v $(pwd)/..:/opt/zecpaperwallet rust/zecpaperwallet:v0.3 bash -c "cd /opt/zecpaperwallet/cli && cargo build --release && cargo build --release --target x86_64-pc-windows-gnu && cargo build --release --target aarch64-unknown-linux-gnu && cargo build --release --target armv7-unknown-linux-gnueabihf" +docker run --rm -v $(pwd)/..:/opt/hushpaperwallet rust/hushpaperwallet:v0.3 bash -c "cd /opt/hushpaperwallet/cli && cargo build --release && cargo build --release --target x86_64-pc-windows-gnu && cargo build --release --target aarch64-unknown-linux-gnu && cargo build --release --target armv7-unknown-linux-gnueabihf" # Come back and package everything cd ../ui @@ -94,62 +94,62 @@ cd ../ui # Now sign and zip the binaries #macOS # binary is already copied above -gpg --batch --output artifacts/macOS-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/macOS-zecpaperwallet-v$APP_VERSION/zecpaperwallet -#gpg --batch --output artifacts/macOS-zecpaperwallet-v$APP_VERSION/zecpaperwallet.app.sig --detach-sig artifacts/macOS-zecpaperwallet-v$APP_VERSION/zecpaperwallet.app +gpg --batch --output artifacts/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet +#gpg --batch --output artifacts/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet.app.sig --detach-sig artifacts/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet.app cd artifacts -cd macOS-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet > sha256sum.txt +cd macOS-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet > sha256sum.txt cd .. -zip -r macOS-zecpaperwallet-v$APP_VERSION.zip macOS-zecpaperwallet-v$APP_VERSION +zip -r macOS-hushpaperwallet-v$APP_VERSION.zip macOS-hushpaperwallet-v$APP_VERSION cd .. #Linux -cp ../cli/target/release/zecpaperwallet artifacts/linux-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output artifacts/linux-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/linux-zecpaperwallet-v$APP_VERSION/zecpaperwallet -gpg --batch --output artifacts/linux-zecpaperwallet-v$APP_VERSION/zecpaperwalletui.sig --detach-sig artifacts/linux-zecpaperwallet-v$APP_VERSION/zecpaperwalletui +cp ../cli/target/release/hushpaperwallet artifacts/linux-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet +gpg --batch --output artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwalletui.sig --detach-sig artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwalletui cd artifacts -cd linux-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet zecpaperwalletui > sha256sum.txt +cd linux-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet hushpaperwalletui > sha256sum.txt cd .. -zip -r linux-zecpaperwallet-v$APP_VERSION.zip linux-zecpaperwallet-v$APP_VERSION +zip -r linux-hushpaperwallet-v$APP_VERSION.zip linux-hushpaperwallet-v$APP_VERSION cd .. #Windows -cp ../cli/target/x86_64-pc-windows-gnu/release/zecpaperwallet.exe artifacts/Windows-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output artifacts/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwallet.exe -gpg --batch --output artifacts/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwalletui.sig --detach-sig artifacts/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwalletui.exe +cp ../cli/target/x86_64-pc-windows-gnu/release/hushpaperwallet.exe artifacts/Windows-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output artifacts/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.exe +gpg --batch --output artifacts/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwalletui.sig --detach-sig artifacts/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwalletui.exe cd artifacts -cd Windows-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet.exe zecpaperwalletui.exe > sha256sum.txt +cd Windows-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet.exe hushpaperwalletui.exe > sha256sum.txt cd .. -zip -r Windows-zecpaperwallet-v$APP_VERSION.zip Windows-zecpaperwallet-v$APP_VERSION +zip -r Windows-hushpaperwallet-v$APP_VERSION.zip Windows-hushpaperwallet-v$APP_VERSION cd .. # aarch64 (armv8) -rm -rf artifacts/aarch64-zecpaperwallet-v$APP_VERSION -mkdir -p artifacts/aarch64-zecpaperwallet-v$APP_VERSION -cp ../cli/target/aarch64-unknown-linux-gnu/release/zecpaperwallet artifacts/aarch64-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output artifacts/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet +rm -rf artifacts/aarch64-hushpaperwallet-v$APP_VERSION +mkdir -p artifacts/aarch64-hushpaperwallet-v$APP_VERSION +cp ../cli/target/aarch64-unknown-linux-gnu/release/hushpaperwallet artifacts/aarch64-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output artifacts/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet cd artifacts -cd aarch64-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet > sha256sum.txt +cd aarch64-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet > sha256sum.txt cd .. -zip -r aarch64-zecpaperwallet-v$APP_VERSION.zip aarch64-zecpaperwallet-v$APP_VERSION +zip -r aarch64-hushpaperwallet-v$APP_VERSION.zip aarch64-hushpaperwallet-v$APP_VERSION cd .. # ARMv7 -rm -rf artifacts/armv7-zecpaperwallet-v$APP_VERSION -mkdir -p artifacts/armv7-zecpaperwallet-v$APP_VERSION -cp ../cli/target/armv7-unknown-linux-gnueabihf/release/zecpaperwallet artifacts/armv7-zecpaperwallet-v$APP_VERSION/ -gpg --batch --output artifacts/armv7-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/armv7-zecpaperwallet-v$APP_VERSION/zecpaperwallet +rm -rf artifacts/armv7-hushpaperwallet-v$APP_VERSION +mkdir -p artifacts/armv7-hushpaperwallet-v$APP_VERSION +cp ../cli/target/armv7-unknown-linux-gnueabihf/release/hushpaperwallet artifacts/armv7-hushpaperwallet-v$APP_VERSION/ +gpg --batch --output artifacts/armv7-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/armv7-hushpaperwallet-v$APP_VERSION/hushpaperwallet cd artifacts -cd armv7-zecpaperwallet-v$APP_VERSION -gsha256sum zecpaperwallet > sha256sum.txt +cd armv7-hushpaperwallet-v$APP_VERSION +gsha256sum hushpaperwallet > sha256sum.txt cd .. -zip -r armv7-zecpaperwallet-v$APP_VERSION.zip armv7-zecpaperwallet-v$APP_VERSION +zip -r armv7-hushpaperwallet-v$APP_VERSION.zip armv7-hushpaperwallet-v$APP_VERSION cd .. diff --git a/ui/papersapling.pro b/ui/papersapling.pro index 166e629..5ebc82a 100644 --- a/ui/papersapling.pro +++ b/ui/papersapling.pro @@ -8,7 +8,7 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = zecpaperwalletui +TARGET = hushpaperwalletui TEMPLATE = app MOC_DIR = bin @@ -50,7 +50,7 @@ HEADERS += \ src/qrcode/QrCode.hpp \ src/qrcode/QrSegment.hpp \ src/version.h \ - qtlib/src/zecpaperrust.h + qtlib/src/hushpaperrust.h FORMS += \ @@ -69,8 +69,8 @@ mac: LIBS+= -Wl,-bind_at_load win32: RC_ICONS = res/icon.ico ICON = res/logo.icns -unix: librust.target = $$PWD/qtlib/target/release/libzecpaperrust.a -else:win32: librust.target = $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/zecpaperrust.lib +unix: librust.target = $$PWD/qtlib/target/release/libhushpaperrust.a +else:win32: librust.target = $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/hushpaperrust.lib unix: librust.commands = $(MAKE) -C $$PWD/qtlib else:win32: librust.commands = $(MAKE) -C $$PWD/qtlib winrelease @@ -81,7 +81,7 @@ distclean.depends += librustclean QMAKE_INFO_PLIST = res/Info.plist QMAKE_EXTRA_TARGETS += librust librustclean distclean -QMAKE_CLEAN += $$PWD/qtlib/target/release/libzecpaperrust.a +QMAKE_CLEAN += $$PWD/qtlib/target/release/libhushpaperrust.a # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin @@ -89,9 +89,9 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target -win32: LIBS += -L$$PWD/qtlib/target/x86_64-pc-windows-gnu/release -lzecpaperrust -else:macx: LIBS += -L$$PWD/qtlib/target/release -lzecpaperrust -framework Security -framework Foundation -else:unix: LIBS += -L$$PWD/qtlib/target/release -lzecpaperrust -ldl +win32: LIBS += -L$$PWD/qtlib/target/x86_64-pc-windows-gnu/release -lhushpaperrust +else:macx: LIBS += -L$$PWD/qtlib/target/release -lhushpaperrust -framework Security -framework Foundation +else:unix: LIBS += -L$$PWD/qtlib/target/release -lhushpaperrust -ldl -win32: PRE_TARGETDEPS += $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/zecpaperrust.lib -else:unix::PRE_TARGETDEPS += $$PWD/qtlib/target/release/libzecpaperrust.a +win32: PRE_TARGETDEPS += $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/hushpaperrust.lib +else:unix::PRE_TARGETDEPS += $$PWD/qtlib/target/release/libhushpaperrust.a diff --git a/ui/qtlib/Cargo.toml b/ui/qtlib/Cargo.toml index 86d4657..31cbe8f 100644 --- a/ui/qtlib/Cargo.toml +++ b/ui/qtlib/Cargo.toml @@ -5,9 +5,9 @@ authors = ["ZecWallet"] edition = "2018" [lib] -name = "zecpaperrust" +name = "hushpaperrust" crate-type = ["staticlib"] [dependencies] libc = "0.2.58" -zecpaperlib = { path = "../../lib" } \ No newline at end of file +hushpaperlib = { path = "../../lib" } \ No newline at end of file diff --git a/ui/qtlib/src/zecpaperrust.h b/ui/qtlib/src/hushpaperrust.h similarity index 84% rename from ui/qtlib/src/zecpaperrust.h rename to ui/qtlib/src/hushpaperrust.h index 1b5a488..ffffbc7 100644 --- a/ui/qtlib/src/zecpaperrust.h +++ b/ui/qtlib/src/hushpaperrust.h @@ -1,5 +1,5 @@ -#ifndef _ZEC_PAPER_RUST_H -#define _ZEC_PAPER_RUST_H +#ifndef _HUSH_PAPER_RUST_H +#define _HUSH_PAPER_RUST_H #ifdef __cplusplus extern "C"{ diff --git a/ui/qtlib/src/lib.rs b/ui/qtlib/src/lib.rs index ccb79f6..b0a9738 100644 --- a/ui/qtlib/src/lib.rs +++ b/ui/qtlib/src/lib.rs @@ -1,6 +1,6 @@ use libc::{c_char}; use std::ffi::{CStr, CString}; -use zecpaperlib::{pdf, paper}; +use hushpaperlib::{pdf, paper}; /** * Call into rust to generate a paper wallet. Returns the paper wallet in JSON form. diff --git a/ui/res/Info.plist b/ui/res/Info.plist index 10db4e9..a5ae76d 100644 --- a/ui/res/Info.plist +++ b/ui/res/Info.plist @@ -3,13 +3,13 @@ CFBundleExecutable - zecpaperwalletui + hushpaperwalletui CFBundleGetInfoString Created by Qt/QMake CFBundleIconFile logo.icns CFBundleIdentifier - co.zecwallet.paper + co.hushwallet.paper CFBundlePackageType APPL CFBundleSignature diff --git a/ui/src/about.ui b/ui/src/about.ui index d16ad6f..cb49598 100644 --- a/ui/src/about.ui +++ b/ui/src/about.ui @@ -11,7 +11,7 @@ - About zecpaperwallet + About hushpaperwallet @@ -59,13 +59,13 @@ - zecpaperwallet + hushpaperwallet - zecpaperwallet version 1.0(6 May 2009) + hushpaperwallet version 1.0(6 May 2009) diff --git a/ui/src/main.cpp b/ui/src/main.cpp index 2497bf8..8c5d264 100644 --- a/ui/src/main.cpp +++ b/ui/src/main.cpp @@ -7,8 +7,8 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QCoreApplication::setOrganizationDomain("zecwallet.co"); - QCoreApplication::setOrganizationName("zecpaperwallet"); + QCoreApplication::setOrganizationDomain("hushwallet.co"); + QCoreApplication::setOrganizationName("hushpaperwallet"); #ifdef Q_OS_LINUX QFontDatabase::addApplicationFont(":/fonts/res/Ubuntu-R.ttf"); @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); MainWindow w; - w.setWindowTitle(QString("zecpaperwallet ") + APP_VERSION); + w.setWindowTitle(QString("hushpaperwallet ") + APP_VERSION); w.show(); diff --git a/ui/src/mainwindow.cpp b/ui/src/mainwindow.cpp index dca3b01..11d9560 100644 --- a/ui/src/mainwindow.cpp +++ b/ui/src/mainwindow.cpp @@ -8,7 +8,7 @@ #include "ui_wallet.h" #include "ui_about.h" -#include "zecpaperrust.h" +#include "hushpaperrust.h" void SaveRestore(QDialog* d) { d->restoreGeometry(QSettings().value(d->objectName() % "geometry").toByteArray()); @@ -172,7 +172,7 @@ MainWindow::MainWindow(QWidget *parent) : // Help site QObject::connect(ui->actionHelp_site, &QAction::triggered, [=]() { - QDesktopServices::openUrl(QUrl("https://docs.zecwallet.co/paper")); + QDesktopServices::openUrl(QUrl("https://docs.hushwallet.co/paper")); }); // About button @@ -180,7 +180,7 @@ MainWindow::MainWindow(QWidget *parent) : QDialog ad(this); Ui_AboutDialog d; d.setupUi(&ad); - d.lblVersion->setText(QString("zecpaperwallet ") + APP_VERSION + "(" + APP_BUILD_DATE + ")"); + d.lblVersion->setText(QString("hushpaperwallet ") + APP_VERSION + "(" + APP_BUILD_DATE + ")"); SaveRestore(&ad); ad.exec(); diff --git a/ui/src/mainwindow.ui b/ui/src/mainwindow.ui index 3bd18de..33aaea1 100644 --- a/ui/src/mainwindow.ui +++ b/ui/src/mainwindow.ui @@ -11,7 +11,7 @@ - Zec Sapling Paper Wallet + Hush Paper Wallet diff --git a/web/Cargo.toml b/web/Cargo.toml index f567113..838e5f7 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "zecpaperwallet" +name = "hushpaperwallet" version = "0.1.0" authors = ["Aditya Kulkarni "] edition = "2018" @@ -13,7 +13,7 @@ default = ["console_error_panic_hook"] [dependencies] sha2 = "0.8.0" wasm-bindgen = "0.2" -zecpaperlib = { path = "../lib", default-features = false } +hushpaperlib = { path = "../lib", default-features = false } # The `console_error_panic_hook` crate provides better debugging of panics by # logging them with `console.error`. This is great for development, but requires diff --git a/web/README.md b/web/README.md index 56287d9..51f1849 100644 --- a/web/README.md +++ b/web/README.md @@ -1,7 +1,7 @@ -## ZecPaperWallet Web -The paper wallet generator [is hosted at paper.zecwallet.co](https://paper.zecwallet.co). +## hushPaperWallet Web +The paper wallet generator [is hosted at paper.hushwallet.co](https://paper.myhush.org). -This is a web version of the Zec Sapling Paper Wallet generator. It's mainly for illustrative purposes. If you want to generate a serious offline paper wallet, you should run [zecpaperwallet](https://github.com/adityapk00/zecpaperwallet) offline. +This is a web version of the Hush Paper Wallet generator. It's mainly for illustrative purposes. If you want to generate a serious offline paper wallet, you should run [hushpaperwallet](https://github.com/MyHush/hushpaperwallet) offline. ## Installing wasm-pack You can run the web wallet locally. You need to install the following first: @@ -16,7 +16,7 @@ cargo install wasm-pack You can run the web wallet locally. ``` -cd zecpaperwallet/web +cd hushpaperwallet/web wasm-pack build cd www npm install diff --git a/web/src/lib.rs b/web/src/lib.rs index c9a412c..616f633 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -1,6 +1,6 @@ mod utils; -use zecpaperlib::paper::{generate_wallet, double_sha256}; +use hushpaperlib::paper::{generate_wallet, double_sha256}; use wasm_bindgen::prelude::*; // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global diff --git a/web/www/index.html b/web/www/index.html index 0673153..e902392 100644 --- a/web/www/index.html +++ b/web/www/index.html @@ -58,7 +58,7 @@ } - zecpaperwallet Web! + hushpaperwallet Web! @@ -66,7 +66,7 @@ @@ -76,7 +76,7 @@ @@ -102,7 +102,7 @@
- Copyright © 2019, ZecWallet. + Copyright © 2020, ZecWallet, The Hush developers.
@@ -113,7 +113,7 @@