menu-boltzmann.sh
1 #!/bin/bash 2 3 # shellcheck source=./Scripts/defaults.sh 4 . "$HOME"/RoninDojo/Scripts/defaults.sh 5 # shellcheck source=./Scripts/dojo-defaults.sh 6 . "$HOME"/RoninDojo/Scripts/dojo-defaults.sh 7 # shellcheck source=./Scripts/functions.sh 8 . "$HOME"/RoninDojo/Scripts/functions.sh 9 10 if [ ! -d "${boltzmann_path}" ]; then 11 _print_message "Installing Boltzmann..." 12 13 _sleep 14 15 _install_boltzmann 16 fi 17 18 cat << 'EOF' 19 __ ____ 20 / /_ ____ / / /_____ ____ ___ ____ _____ ____ 21 / __ \/ __ \/ / __/_ / / __ `__ \/ __ `/ __ \/ __ \ 22 / /_/ / /_/ / / /_ / /_/ / / / / / /_/ / / / / / / / 23 /_.___/\____/_/\__/ /___/_/ /_/ /_/\__,_/_/ /_/_/ /_/ 24 A python script computing the entropy of Bitcoin transactions 25 and the linkability of their inputs and outputs. 26 27 EOF 28 29 cat <<EOF 30 Example Usage: 31 32 ${red} 33 Single txid 34 ${nc} 35 8e56317360a548e8ef28ec475878ef70d1371bee3526c017ac22ad61ae5740b8 36 37 ${red} 38 Multiple txids 39 ${nc} 40 8e56317360a548e8ef28ec475878ef70d1371bee3526c017ac22ad61ae5740b8,812bee538bd24d03af7876a77c989b2c236c063a5803c720769fc55222d36b47,... 41 EOF 42 43 cd "${boltzmann_path}"/boltzmann || exit 44 45 # Export required environment variables 46 export BOLTZMANN_RPC_USERNAME=${BITCOIND_RPC_USER} 47 export BOLTZMANN_RPC_PASSWORD=${BITCOIND_RPC_PASSWORD} 48 49 # shellcheck disable=SC2154 50 export BOLTZMANN_RPC_HOST=${BITCOIND_IP} 51 # shellcheck disable=SC2154 52 export BOLTZMANN_RPC_PORT=${BITCOIND_RPC_PORT} 53 54 # Loop command until user quits 55 while true 56 do 57 printf "\nEnter a txid or multiple txids separated by commas. Type [Q|Quit] to exit boltzmann\n" 58 read -r txids 59 60 if [[ "$txids" =~ (Q|q|Quit|quit) ]]; then 61 break 62 fi 63 64 if ! pipenv run python ludwig.py --rpc --txids="${txids}"; then 65 echo "Could not get tx information" 66 fi 67 done 68 69 bash -c "${ronin_samourai_toolkit_menu}" 70 exit