Browse Source

Rebrand

duke
gilardh 4 years ago
parent
commit
d3111b4ade
  1. 11
      cli/Cargo.toml
  2. 58
      cli/mkrelease.sh
  3. 12
      cli/src/main.rs
  4. 9
      lib/Cargo.toml
  5. 6
      lib/src/pdf.rs
  6. 8
      ui/.gitignore
  7. 6
      ui/hushpaperwalletui_resource.rc
  8. 18
      ui/mkdockerwinlinux.sh
  9. 76
      ui/mkrelease.sh
  10. 20
      ui/papersapling.pro
  11. 4
      ui/qtlib/Cargo.toml
  12. 4
      ui/qtlib/src/hushpaperrust.h
  13. 2
      ui/qtlib/src/lib.rs
  14. 4
      ui/res/Info.plist
  15. 6
      ui/src/about.ui
  16. 6
      ui/src/main.cpp
  17. 6
      ui/src/mainwindow.cpp
  18. 2
      ui/src/mainwindow.ui
  19. 4
      web/Cargo.toml
  20. 8
      web/README.md
  21. 2
      web/src/lib.rs
  22. 10
      web/www/index.html
  23. 2
      web/www/index.js
  24. 2
      web/www/package.json

11
cli/Cargo.toml

@ -1,11 +1,14 @@
[package] [package]
name = "zecpaperwallet" name = "hushpaperwallet"
version = "0.1.0" version = "0.1.0"
authors = ["ZecWallet"] authors = [
"ZecWallet",
"The Hush developers"
]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
clap = "2.33.0" clap = "2.33.0"
zecpaperlib = { path = "../lib" } hushpaperlib = { path = "../lib" }
json = "0.11.14" json = "0.11.14"
printpdf = "0.2.8" printpdf = "0.3.2"

58
cli/mkrelease.sh

@ -32,58 +32,58 @@ cargo clean
cargo build --release cargo build --release
# macOS # macOS
rm -rf target/macOS-zecpaperwallet-v$APP_VERSION rm -rf target/macOS-hushpaperwallet-v$APP_VERSION
mkdir -p target/macOS-zecpaperwallet-v$APP_VERSION mkdir -p target/macOS-hushpaperwallet-v$APP_VERSION
cp target/release/zecpaperwallet target/macOS-zecpaperwallet-v$APP_VERSION/ cp target/release/hushpaperwallet target/macOS-hushpaperwallet-v$APP_VERSION/
# For Windows and Linux, build via docker # 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 # 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 target
cd macOS-zecpaperwallet-v$APP_VERSION cd macOS-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet > sha256sum.txt gsha256sum hushpaperwallet > sha256sum.txt
cd .. 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 .. cd ..
#Linux #Linux
rm -rf target/linux-zecpaperwallet-v$APP_VERSION rm -rf target/linux-hushpaperwallet-v$APP_VERSION
mkdir -p target/linux-zecpaperwallet-v$APP_VERSION mkdir -p target/linux-hushpaperwallet-v$APP_VERSION
cp target/release/zecpaperwallet target/linux-zecpaperwallet-v$APP_VERSION/ cp target/release/hushpaperwallet target/linux-hushpaperwallet-v$APP_VERSION/
gpg --batch --output target/linux-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/linux-zecpaperwallet-v$APP_VERSION/zecpaperwallet gpg --batch --output target/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet
cd target cd target
cd linux-zecpaperwallet-v$APP_VERSION cd linux-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet > sha256sum.txt gsha256sum hushpaperwallet > sha256sum.txt
cd .. 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 .. cd ..
#Windows #Windows
rm -rf target/Windows-zecpaperwallet-v$APP_VERSION rm -rf target/Windows-hushpaperwallet-v$APP_VERSION
mkdir -p target/Windows-zecpaperwallet-v$APP_VERSION mkdir -p target/Windows-hushpaperwallet-v$APP_VERSION
cp target/x86_64-pc-windows-gnu/release/zecpaperwallet.exe target/Windows-zecpaperwallet-v$APP_VERSION/ cp target/x86_64-pc-windows-gnu/release/hushpaperwallet.exe target/Windows-hushpaperwallet-v$APP_VERSION/
gpg --batch --output target/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwallet.exe gpg --batch --output target/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.exe
cd target cd target
cd Windows-zecpaperwallet-v$APP_VERSION cd Windows-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet.exe > sha256sum.txt gsha256sum hushpaperwallet.exe > sha256sum.txt
cd .. 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 .. cd ..
# aarch64 (armv8) # aarch64 (armv8)
rm -rf target/aarch64-zecpaperwallet-v$APP_VERSION rm -rf target/aarch64-hushpaperwallet-v$APP_VERSION
mkdir -p target/aarch64-zecpaperwallet-v$APP_VERSION mkdir -p target/aarch64-hushpaperwallet-v$APP_VERSION
cp target/aarch64-unknown-linux-gnu/release/zecpaperwallet target/aarch64-zecpaperwallet-v$APP_VERSION/ cp target/aarch64-unknown-linux-gnu/release/hushpaperwallet target/aarch64-hushpaperwallet-v$APP_VERSION/
gpg --batch --output target/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig target/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet gpg --batch --output target/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig target/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet
cd target cd target
cd aarch64-zecpaperwallet-v$APP_VERSION cd aarch64-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet > sha256sum.txt gsha256sum hushpaperwallet > sha256sum.txt
cd .. 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 .. cd ..

12
cli/src/main.rs

@ -1,18 +1,18 @@
extern crate clap; extern crate clap;
extern crate zecpaperlib; extern crate hushpaperlib;
mod version; mod version;
use clap::{Arg, App}; use clap::{Arg, App};
use zecpaperlib::paper::*; use hushpaperlib::paper::*;
use zecpaperlib::pdf; use hushpaperlib::pdf;
use std::io; use std::io;
use std::io::prelude::*; use std::io::prelude::*;
fn main() { fn main() {
let matches = App::new("zecpaperwaller") let matches = App::new("hushpaperwaller")
.version(version::version()) .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") .arg(Arg::with_name("testnet")
.long("testnet") .long("testnet")
.help("Generate Testnet addresses")) .help("Generate Testnet addresses"))
@ -27,7 +27,7 @@ fn main() {
.arg(Arg::with_name("nohd") .arg(Arg::with_name("nohd")
.short("n") .short("n")
.long("nohd") .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") .arg(Arg::with_name("output")
.short("o") .short("o")
.long("output") .long("output")

9
lib/Cargo.toml

@ -1,7 +1,10 @@
[package] [package]
name = "zecpaperlib" name = "hushpaperlib"
version = "0.1.0" version = "0.1.0"
authors = ["ZecWallet"] authors = [
"ZecWallet",
"The Hush developers"
]
edition = "2018" edition = "2018"
[features] [features]
@ -14,7 +17,7 @@ bech32 = "0.6"
zcash_primitives = { git = "https://github.com/zcash/librustzcash", rev = "5a48d179b8434a0318e7e19dda506e245a904092" } zcash_primitives = { git = "https://github.com/zcash/librustzcash", rev = "5a48d179b8434a0318e7e19dda506e245a904092" }
json = "0.11.14" json = "0.11.14"
qrcode = { version = "0.8", default-features = false } 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" libsecp256k1 = "0.2.2"
ripemd160 = "0.8.0" ripemd160 = "0.8.0"
sha2 = "0.8.0" sha2 = "0.8.0"

6
lib/src/pdf.rs

@ -16,7 +16,7 @@ use printpdf::*;
* Save the list of wallets (address + private keys) to the given PDF file name. * 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> { 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 = doc.add_builtin_font(BuiltinFont::Courier).unwrap();
let font_bold = doc.add_builtin_font(BuiltinFont::CourierBold).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 // page_height top_margin vertical_padding position
let ypos = 297.0 - 5.0 - 35.0 - (140.0 * pos as f64); 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); 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 // 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); 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 let strs = split_to_max(&address, 39, 39); // No spaces, so user can copy the address
for i in 0..strs.len() { for i in 0..strs.len() {

8
ui/.gitignore

@ -5,10 +5,10 @@ Makefile
Makefile.Debug Makefile.Debug
Makefile.Release Makefile.Release
.qmake.stash .qmake.stash
zecpaperwalletui hushpaperwalletui
zecpaperwalletui.app/ hushpaperwalletui.app/
zecpaperwalletui_plugin_import.cpp hushpaperwalletui_plugin_import.cpp
zecpaperwalletui.pro.user hushpaperwalletui.pro.user
.vscode/ .vscode/
ui*.h ui*.h
*.swp *.swp

6
ui/zecpaperwalletui_resource.rc → ui/hushpaperwalletui_resource.rc

@ -1,6 +1,6 @@
#include <windows.h> #include <windows.h>
IDI_ICON1 ICON DISCARDABLE "/opt/zecpaperwallet/ui/res/icon.ico" IDI_ICON1 ICON DISCARDABLE "/opt/hushpaperwallet/ui/res/icon.ico"
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0 FILEVERSION 0,0,0,0
@ -23,8 +23,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", "\0" VALUE "FileDescription", "\0"
VALUE "FileVersion", "0.0.0.0\0" VALUE "FileVersion", "0.0.0.0\0"
VALUE "LegalCopyright", "\0" VALUE "LegalCopyright", "\0"
VALUE "OriginalFilename", "zecpaperwalletui.exe\0" VALUE "OriginalFilename", "hushpaperwalletui.exe\0"
VALUE "ProductName", "zecpaperwalletui\0" VALUE "ProductName", "hushpaperwalletui\0"
VALUE "ProductVersion", "0.0.0.0\0" VALUE "ProductVersion", "0.0.0.0\0"
END END
END END

18
ui/mkdockerwinlinux.sh

@ -29,30 +29,30 @@ if [ -z $APP_VERSION ]; then
exit 1; exit 1;
fi fi
cd /opt/zecpaperwallet/ui cd /opt/hushpaperwallet/ui
source ~/.cargo/env source ~/.cargo/env
# We need to run qmake before we run disclean # We need to run qmake before we run disclean
/opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release /opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release
make distclean make distclean
rm -rf artifacts/linux-zecpaperwallet-v$APP_VERSION rm -rf artifacts/linux-hushpaperwallet-v$APP_VERSION
mkdir -p artifacts/linux-zecpaperwallet-v$APP_VERSION mkdir -p artifacts/linux-hushpaperwallet-v$APP_VERSION
/opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release /opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release
make -j4 make -j4
strip zecpaperwalletui strip hushpaperwalletui
cp zecpaperwalletui artifacts/linux-zecpaperwallet-v$APP_VERSION cp hushpaperwalletui artifacts/linux-hushpaperwallet-v$APP_VERSION
# Run qmake before distclean # Run qmake before distclean
/opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release /opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release
make distclean make distclean
rm -rf artifacts/Windows-zecpaperwallet-v$APP_VERSION rm -rf artifacts/Windows-hushpaperwallet-v$APP_VERSION
mkdir -p artifacts/Windows-zecpaperwallet-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 /opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release
make -j4 make -j4
strip release/zecpaperwalletui.exe strip release/hushpaperwalletui.exe
cp release/zecpaperwalletui.exe artifacts/Windows-zecpaperwallet-v$APP_VERSION cp release/hushpaperwalletui.exe artifacts/Windows-hushpaperwallet-v$APP_VERSION
# Cleanup before exiting # Cleanup before exiting
make distclean make distclean

76
ui/mkrelease.sh

@ -39,8 +39,8 @@ QT_STATIC=$QT_PATH/clang_64/bin
echo -n "Cleaning..............." echo -n "Cleaning..............."
$QT_STATIC/qmake papersapling.pro CONFIG+=release >/dev/null $QT_STATIC/qmake papersapling.pro CONFIG+=release >/dev/null
make distclean >/dev/null 2>&1 make distclean >/dev/null 2>&1
rm -rf artifacts/macOS-zecpaperwallet-v$APP_VERSION rm -rf artifacts/macOS-hushpaperwallet-v$APP_VERSION
mkdir -p artifacts/macOS-zecpaperwallet-v$APP_VERSION mkdir -p artifacts/macOS-hushpaperwallet-v$APP_VERSION
echo "[OK]" echo "[OK]"
echo -n "Testing................" echo -n "Testing................"
@ -67,12 +67,12 @@ echo "[OK]"
#Qt deploy #Qt deploy
echo -n "Deploying.............." echo -n "Deploying.............."
$QT_STATIC/macdeployqt zecpaperwalletui.app $QT_STATIC/macdeployqt hushpaperwalletui.app
cp -r zecpaperwalletui.app artifacts/macOS-zecpaperwallet-v$APP_VERSION/ cp -r hushpaperwalletui.app artifacts/macOS-hushpaperwallet-v$APP_VERSION/
echo "[OK]" echo "[OK]"
# Run inside docker container # 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 # Move to build the cli
cd ../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 # Compile for mac directly and copy it over
cargo build --release 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 # 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 # Come back and package everything
cd ../ui cd ../ui
@ -94,62 +94,62 @@ cd ../ui
# Now sign and zip the binaries # Now sign and zip the binaries
#macOS #macOS
# binary is already copied above # 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-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet
#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.app.sig --detach-sig artifacts/macOS-hushpaperwallet-v$APP_VERSION/hushpaperwallet.app
cd artifacts cd artifacts
cd macOS-zecpaperwallet-v$APP_VERSION cd macOS-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet > sha256sum.txt gsha256sum hushpaperwallet > sha256sum.txt
cd .. 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 .. cd ..
#Linux #Linux
cp ../cli/target/release/zecpaperwallet artifacts/linux-zecpaperwallet-v$APP_VERSION/ cp ../cli/target/release/hushpaperwallet artifacts/linux-hushpaperwallet-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-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwallet
gpg --batch --output artifacts/linux-zecpaperwallet-v$APP_VERSION/zecpaperwalletui.sig --detach-sig artifacts/linux-zecpaperwallet-v$APP_VERSION/zecpaperwalletui gpg --batch --output artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwalletui.sig --detach-sig artifacts/linux-hushpaperwallet-v$APP_VERSION/hushpaperwalletui
cd artifacts cd artifacts
cd linux-zecpaperwallet-v$APP_VERSION cd linux-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet zecpaperwalletui > sha256sum.txt gsha256sum hushpaperwallet hushpaperwalletui > sha256sum.txt
cd .. 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 .. cd ..
#Windows #Windows
cp ../cli/target/x86_64-pc-windows-gnu/release/zecpaperwallet.exe artifacts/Windows-zecpaperwallet-v$APP_VERSION/ cp ../cli/target/x86_64-pc-windows-gnu/release/hushpaperwallet.exe artifacts/Windows-hushpaperwallet-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-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/Windows-hushpaperwallet-v$APP_VERSION/hushpaperwallet.exe
gpg --batch --output artifacts/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwalletui.sig --detach-sig artifacts/Windows-zecpaperwallet-v$APP_VERSION/zecpaperwalletui.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 artifacts
cd Windows-zecpaperwallet-v$APP_VERSION cd Windows-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet.exe zecpaperwalletui.exe > sha256sum.txt gsha256sum hushpaperwallet.exe hushpaperwalletui.exe > sha256sum.txt
cd .. 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 .. cd ..
# aarch64 (armv8) # aarch64 (armv8)
rm -rf artifacts/aarch64-zecpaperwallet-v$APP_VERSION rm -rf artifacts/aarch64-hushpaperwallet-v$APP_VERSION
mkdir -p artifacts/aarch64-zecpaperwallet-v$APP_VERSION mkdir -p artifacts/aarch64-hushpaperwallet-v$APP_VERSION
cp ../cli/target/aarch64-unknown-linux-gnu/release/zecpaperwallet artifacts/aarch64-zecpaperwallet-v$APP_VERSION/ cp ../cli/target/aarch64-unknown-linux-gnu/release/hushpaperwallet artifacts/aarch64-hushpaperwallet-v$APP_VERSION/
gpg --batch --output artifacts/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/aarch64-zecpaperwallet-v$APP_VERSION/zecpaperwallet gpg --batch --output artifacts/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/aarch64-hushpaperwallet-v$APP_VERSION/hushpaperwallet
cd artifacts cd artifacts
cd aarch64-zecpaperwallet-v$APP_VERSION cd aarch64-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet > sha256sum.txt gsha256sum hushpaperwallet > sha256sum.txt
cd .. 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 .. cd ..
# ARMv7 # ARMv7
rm -rf artifacts/armv7-zecpaperwallet-v$APP_VERSION rm -rf artifacts/armv7-hushpaperwallet-v$APP_VERSION
mkdir -p artifacts/armv7-zecpaperwallet-v$APP_VERSION mkdir -p artifacts/armv7-hushpaperwallet-v$APP_VERSION
cp ../cli/target/armv7-unknown-linux-gnueabihf/release/zecpaperwallet artifacts/armv7-zecpaperwallet-v$APP_VERSION/ cp ../cli/target/armv7-unknown-linux-gnueabihf/release/hushpaperwallet artifacts/armv7-hushpaperwallet-v$APP_VERSION/
gpg --batch --output artifacts/armv7-zecpaperwallet-v$APP_VERSION/zecpaperwallet.sig --detach-sig artifacts/armv7-zecpaperwallet-v$APP_VERSION/zecpaperwallet gpg --batch --output artifacts/armv7-hushpaperwallet-v$APP_VERSION/hushpaperwallet.sig --detach-sig artifacts/armv7-hushpaperwallet-v$APP_VERSION/hushpaperwallet
cd artifacts cd artifacts
cd armv7-zecpaperwallet-v$APP_VERSION cd armv7-hushpaperwallet-v$APP_VERSION
gsha256sum zecpaperwallet > sha256sum.txt gsha256sum hushpaperwallet > sha256sum.txt
cd .. 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 .. cd ..

20
ui/papersapling.pro

@ -8,7 +8,7 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = zecpaperwalletui TARGET = hushpaperwalletui
TEMPLATE = app TEMPLATE = app
MOC_DIR = bin MOC_DIR = bin
@ -50,7 +50,7 @@ HEADERS += \
src/qrcode/QrCode.hpp \ src/qrcode/QrCode.hpp \
src/qrcode/QrSegment.hpp \ src/qrcode/QrSegment.hpp \
src/version.h \ src/version.h \
qtlib/src/zecpaperrust.h qtlib/src/hushpaperrust.h
FORMS += \ FORMS += \
@ -69,8 +69,8 @@ mac: LIBS+= -Wl,-bind_at_load
win32: RC_ICONS = res/icon.ico win32: RC_ICONS = res/icon.ico
ICON = res/logo.icns ICON = res/logo.icns
unix: librust.target = $$PWD/qtlib/target/release/libzecpaperrust.a unix: librust.target = $$PWD/qtlib/target/release/libhushpaperrust.a
else:win32: librust.target = $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/zecpaperrust.lib else:win32: librust.target = $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/hushpaperrust.lib
unix: librust.commands = $(MAKE) -C $$PWD/qtlib unix: librust.commands = $(MAKE) -C $$PWD/qtlib
else:win32: librust.commands = $(MAKE) -C $$PWD/qtlib winrelease else:win32: librust.commands = $(MAKE) -C $$PWD/qtlib winrelease
@ -81,7 +81,7 @@ distclean.depends += librustclean
QMAKE_INFO_PLIST = res/Info.plist QMAKE_INFO_PLIST = res/Info.plist
QMAKE_EXTRA_TARGETS += librust librustclean distclean 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. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin
@ -89,9 +89,9 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target !isEmpty(target.path): INSTALLS += target
win32: LIBS += -L$$PWD/qtlib/target/x86_64-pc-windows-gnu/release -lzecpaperrust win32: LIBS += -L$$PWD/qtlib/target/x86_64-pc-windows-gnu/release -lhushpaperrust
else:macx: LIBS += -L$$PWD/qtlib/target/release -lzecpaperrust -framework Security -framework Foundation else:macx: LIBS += -L$$PWD/qtlib/target/release -lhushpaperrust -framework Security -framework Foundation
else:unix: LIBS += -L$$PWD/qtlib/target/release -lzecpaperrust -ldl else:unix: LIBS += -L$$PWD/qtlib/target/release -lhushpaperrust -ldl
win32: PRE_TARGETDEPS += $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/zecpaperrust.lib win32: PRE_TARGETDEPS += $$PWD/qtlib/target/x86_64-pc-windows-gnu/release/hushpaperrust.lib
else:unix::PRE_TARGETDEPS += $$PWD/qtlib/target/release/libzecpaperrust.a else:unix::PRE_TARGETDEPS += $$PWD/qtlib/target/release/libhushpaperrust.a

4
ui/qtlib/Cargo.toml

@ -5,9 +5,9 @@ authors = ["ZecWallet"]
edition = "2018" edition = "2018"
[lib] [lib]
name = "zecpaperrust" name = "hushpaperrust"
crate-type = ["staticlib"] crate-type = ["staticlib"]
[dependencies] [dependencies]
libc = "0.2.58" libc = "0.2.58"
zecpaperlib = { path = "../../lib" } hushpaperlib = { path = "../../lib" }

4
ui/qtlib/src/zecpaperrust.h → ui/qtlib/src/hushpaperrust.h

@ -1,5 +1,5 @@
#ifndef _ZEC_PAPER_RUST_H #ifndef _HUSH_PAPER_RUST_H
#define _ZEC_PAPER_RUST_H #define _HUSH_PAPER_RUST_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C"{ extern "C"{

2
ui/qtlib/src/lib.rs

@ -1,6 +1,6 @@
use libc::{c_char}; use libc::{c_char};
use std::ffi::{CStr, CString}; 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. * Call into rust to generate a paper wallet. Returns the paper wallet in JSON form.

4
ui/res/Info.plist

@ -3,13 +3,13 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>zecpaperwalletui</string> <string>hushpaperwalletui</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string> <string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>logo.icns</string> <string>logo.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>co.zecwallet.paper</string> <string>co.hushwallet.paper</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>

6
ui/src/about.ui

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>About zecpaperwallet</string> <string>About hushpaperwallet</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="2" column="0"> <item row="2" column="0">
@ -59,13 +59,13 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>zecpaperwallet</string> <string>hushpaperwallet</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="lblVersion"> <widget class="QLabel" name="lblVersion">
<property name="text"> <property name="text">
<string>zecpaperwallet version 1.0(6 May 2009)</string> <string>hushpaperwallet version 1.0(6 May 2009)</string>
</property> </property>
</widget> </widget>
</item> </item>

6
ui/src/main.cpp

@ -7,8 +7,8 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setOrganizationDomain("zecwallet.co"); QCoreApplication::setOrganizationDomain("hushwallet.co");
QCoreApplication::setOrganizationName("zecpaperwallet"); QCoreApplication::setOrganizationName("hushpaperwallet");
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
QFontDatabase::addApplicationFont(":/fonts/res/Ubuntu-R.ttf"); QFontDatabase::addApplicationFont(":/fonts/res/Ubuntu-R.ttf");
@ -18,7 +18,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv); QApplication a(argc, argv);
MainWindow w; MainWindow w;
w.setWindowTitle(QString("zecpaperwallet ") + APP_VERSION); w.setWindowTitle(QString("hushpaperwallet ") + APP_VERSION);
w.show(); w.show();

6
ui/src/mainwindow.cpp

@ -8,7 +8,7 @@
#include "ui_wallet.h" #include "ui_wallet.h"
#include "ui_about.h" #include "ui_about.h"
#include "zecpaperrust.h" #include "hushpaperrust.h"
void SaveRestore(QDialog* d) { void SaveRestore(QDialog* d) {
d->restoreGeometry(QSettings().value(d->objectName() % "geometry").toByteArray()); d->restoreGeometry(QSettings().value(d->objectName() % "geometry").toByteArray());
@ -172,7 +172,7 @@ MainWindow::MainWindow(QWidget *parent) :
// Help site // Help site
QObject::connect(ui->actionHelp_site, &QAction::triggered, [=]() { 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 // About button
@ -180,7 +180,7 @@ MainWindow::MainWindow(QWidget *parent) :
QDialog ad(this); QDialog ad(this);
Ui_AboutDialog d; Ui_AboutDialog d;
d.setupUi(&ad); 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); SaveRestore(&ad);
ad.exec(); ad.exec();

2
ui/src/mainwindow.ui

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Zec Sapling Paper Wallet</string> <string>Hush Paper Wallet</string>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">

4
web/Cargo.toml

@ -1,5 +1,5 @@
[package] [package]
name = "zecpaperwallet" name = "hushpaperwallet"
version = "0.1.0" version = "0.1.0"
authors = ["Aditya Kulkarni <adityapk@gmail.com>"] authors = ["Aditya Kulkarni <adityapk@gmail.com>"]
edition = "2018" edition = "2018"
@ -13,7 +13,7 @@ default = ["console_error_panic_hook"]
[dependencies] [dependencies]
sha2 = "0.8.0" sha2 = "0.8.0"
wasm-bindgen = "0.2" 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 # The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires # logging them with `console.error`. This is great for development, but requires

8
web/README.md

@ -1,7 +1,7 @@
## ZecPaperWallet Web ## hushPaperWallet Web
The paper wallet generator [is hosted at paper.zecwallet.co](https://paper.zecwallet.co). 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 ## Installing wasm-pack
You can run the web wallet locally. You need to install the following first: 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. You can run the web wallet locally.
``` ```
cd zecpaperwallet/web cd hushpaperwallet/web
wasm-pack build wasm-pack build
cd www cd www
npm install npm install

2
web/src/lib.rs

@ -1,6 +1,6 @@
mod utils; mod utils;
use zecpaperlib::paper::{generate_wallet, double_sha256}; use hushpaperlib::paper::{generate_wallet, double_sha256};
use wasm_bindgen::prelude::*; use wasm_bindgen::prelude::*;
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global

10
web/www/index.html

@ -58,7 +58,7 @@
} }
</style> </style>
<title>zecpaperwallet Web!</title> <title>hushpaperwallet Web!</title>
</head> </head>
<body> <body>
<script src="./bootstrap.js"></script> <script src="./bootstrap.js"></script>
@ -66,7 +66,7 @@
<nav class="navbar navbar-default"> <nav class="navbar navbar-default">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<h1>ZecPaperWallet - Zcash Sapling Paper Wallet Generator</h1> <h1>hushPaperWallet - Zcash Sapling Paper Wallet Generator</h1>
</div> </div>
</div> </div>
</nav> </nav>
@ -76,7 +76,7 @@
<div class="alert alert-warning" role="alert"> <div class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span> <span class="sr-only">Error:</span>
For informational purposes only. For serious wallets, please run <a target="_blank" href="https://github.com/adityapk00/zecpaperwallet"><code>zecpaperwallet</code></a> offline on an air-gapped computer. For informational purposes only. For serious wallets, please run <a target="_blank" href="https://github.com/MyHush/hushpaperwallet"><code>hushpaperwallet</code></a> offline on an air-gapped computer.
</div> </div>
</div> </div>
@ -102,7 +102,7 @@
<div class="row" style="padding-top: 10px;"> <div class="row" style="padding-top: 10px;">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="well"> <div class="well">
Copyright &copy; 2019, ZecWallet. Copyright &copy; 2020, ZecWallet, The Hush developers.
</div> </div>
</div> </div>
</div> </div>
@ -113,7 +113,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">ZecPaperWallet - Configure Entropy</h4> <h4 class="modal-title">hushPaperWallet - Configure Entropy</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-group"> <div class="form-group">

2
web/www/index.js

@ -2,7 +2,7 @@ global.jQuery = require('jquery');
require('bootstrap'); require('bootstrap');
var QRCode = require('qrcode') var QRCode = require('qrcode')
import * as wasm from "zecpaperwallet"; import * as wasm from "hushpaperwallet";
var address_number = 0; var address_number = 0;
function add_section(wallet_item) { function add_section(wallet_item) {

2
web/www/package.json

@ -30,7 +30,7 @@
"bootstrap": "^3.4.1", "bootstrap": "^3.4.1",
"jquery": "^3.4.1", "jquery": "^3.4.1",
"qrcode": "^1.3.4", "qrcode": "^1.3.4",
"zecpaperwallet": "file:../pkg" "hushpaperwallet": "file:../pkg"
}, },
"devDependencies": { "devDependencies": {
"copy-webpack-plugin": "^5.0.0", "copy-webpack-plugin": "^5.0.0",

Loading…
Cancel
Save