diff --git a/README.md b/README.md index 74a81f7..36a699a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # hsc-cli -Reference simple CLI wallet for Hush Smart Chains \ No newline at end of file +Reference simple CLI wallet for Hush Smart Chains + +## Syntax + +| Command | What it does | +|--------------------------|-------------------------| +|`./hsc-cli YOUR-HSC_NAME` | Starts hsc-cli for the specified HSC | +|`./hsc-cli -h` | Displays help | + +### Still To-Do +* Rewrite this in something other than shell, lol + +## License +GPLv3 diff --git a/hsc-cli b/hsc-cli new file mode 100755 index 0000000..6f5599a --- /dev/null +++ b/hsc-cli @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Copyright (c) 2022 Jahway603 & The Hush developers +# +# This is a Hush Smart Chain (HSC) CLI basic wallet for testing new HSC + +### Config section - change if needed +hush_cli_location="./src/hush-cli" +### + +if [[ $# -eq 0 ]] ; then + echo "WARNING: You didn't specify the name of your Hush Smart Chain (HSC)!" + echo "Please try ./hsc-cli -h to see the proper commands." + exit 1 +fi + +Help() +{ + echo "This is a series of test scripts to interact with your new Hush Smart Chain (HSC)." + echo + echo "Syntax: ./hsc-cli Name-of-HSC" + echo "Start the hsc-cli for your specified HSC" +} + +# Get the help options +while getopts ":h" option; do + case $option in + h) # display Help + Help + exit;; + esac +done + +# Main +cat the_ascii_art +echo "Welcome to this Hush Smart Chain CLI experience for $1" +echo +echo "Please select from the following options for your testing:" + +select option in getinfo getwalletinfo listunspent z_getbalances +do +case $option in + "getinfo") + $hush_cli_location -ac_name=$1 getinfo + ;; + "getwalletinfo") + $hush_cli_location -ac_name=$1 getwalletinfo + ;; + "listunspent") + $hush_cli_location -ac_name=$1 listunspent + ;; + "z_getbalances") + $hush_cli_location -ac_name=$1 z_getbalances + ;; +*) +echo "Invalid entry." +break +;; +esac +done diff --git a/the_ascii_art b/the_ascii_art new file mode 100644 index 0000000..6892669 --- /dev/null +++ b/the_ascii_art @@ -0,0 +1,10 @@ + +ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo +dP dP .d88888b a88888b. a88888b. dP dP +88 88 88. "' d8' `88 d8' `88 88 88 +88aaaaa88a `Y88888b. 88 88 88 88 +88 88 `8b 88 88888888 88 88 88 +88 88 d8' .8P Y8. .88 Y8. .88 88 88 +dP dP Y88888P Y88888P' Y88888P' 88888888P dP +ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo +