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]
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"
printpdf = "0.3.2"

58
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 ..

12
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")

9
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"

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.
*/
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() {

8
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

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

@ -1,6 +1,6 @@
#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
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

18
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

76
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 ..

20
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

4
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" }
hushpaperlib = { path = "../../lib" }

4
ui/qtlib/src/zecpaperrust.h → 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"{

2
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.

4
ui/res/Info.plist

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

6
ui/src/about.ui

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

6
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();

2
ui/src/mainwindow.ui

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

4
web/Cargo.toml

@ -1,5 +1,5 @@
[package]
name = "zecpaperwallet"
name = "hushpaperwallet"
version = "0.1.0"
authors = ["Aditya Kulkarni <adityapk@gmail.com>"]
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

8
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

2
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

10
web/www/index.html

@ -58,7 +58,7 @@
}
</style>
<title>zecpaperwallet Web!</title>
<title>hushpaperwallet Web!</title>
</head>
<body>
<script src="./bootstrap.js"></script>
@ -66,7 +66,7 @@
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<h1>ZecPaperWallet - Zcash Sapling Paper Wallet Generator</h1>
<h1>hushPaperWallet - Zcash Sapling Paper Wallet Generator</h1>
</div>
</div>
</nav>
@ -76,7 +76,7 @@
<div class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></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>
@ -102,7 +102,7 @@
<div class="row" style="padding-top: 10px;">
<div class="col-sm-12">
<div class="well">
Copyright &copy; 2019, ZecWallet.
Copyright &copy; 2020, ZecWallet, The Hush developers.
</div>
</div>
</div>
@ -113,7 +113,7 @@
<div class="modal-content">
<div class="modal-header">
<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 class="modal-body">
<div class="form-group">

2
web/www/index.js

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

2
web/www/package.json

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

Loading…
Cancel
Save