forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Non-interactive import via ./ethd keys import
- Loading branch information
1 parent
9c0c91a
commit 3cf23d3
Showing
12 changed files
with
84 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
|
||
while true; do | ||
prompt="Please choose a wallet password: " | ||
read -srp "${prompt}" password1 | ||
echo | ||
read -srp "Please re-enter the wallet password: " password2 | ||
if [ "$password1" == "$password2" ]; then | ||
break | ||
else | ||
echo "The two entered passwords do not match, please try again." | ||
echo | ||
fi | ||
done | ||
__password=$(echo $RANDOM | md5sum | head -c 32) | ||
|
||
echo | ||
echo "$password1" >/var/lib/prysm/password.txt | ||
echo "$__password" >/tmp/password.txt | ||
echo "Wallet password created" | ||
set +e | ||
__result=$(validator --datadir=/var/lib/prysm wallet create --${NETWORK} --wallet-dir=/var/lib/prysm --keymanager-kind=imported --accept-terms-of-use --wallet-password-file=/tmp/password.txt 2>&1) | ||
if echo $__result | grep -qi error; then | ||
echo "An error occured while attempting to create a Prysm wallet" | ||
echo $__result | ||
exit 1 | ||
else | ||
echo $__result | ||
fi | ||
set -e | ||
echo "Wallet has been created" | ||
echo "$__password" >/var/lib/prysm/password.txt | ||
chmod 600 /var/lib/prysm/password.txt | ||
echo "Wallet password has been stored." | ||
validator --datadir /var/lib/prysm wallet create --${NETWORK} --wallet-dir /var/lib/prysm --keymanager-kind direct --accept-terms-of-use --wallet-password-file /var/lib/prysm/password.txt | ||
echo "Wallet has been created." | ||
echo "Wallet password stored" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters