Skip to content
This repository was archived by the owner on Jun 13, 2018. It is now read-only.

Add dapp key command to create wallets #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions libexec/dapp/dapp---key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e

OPTS="dapp key [<options>] <args>...
dapp key --help
--
keystore=path save path (default: ~/.ethereum/keystore)
password=file if not given, will prompt for password
"

eval "$(
git rev-parse --parseopt -- "$@" <<<"$OPTS" || echo exit $?
)"

while [[ $1 ]]; do
case $1 in
--) shift; break;;
--keystore) shift; ETH_KEYSTORE=$1;;
--password) shift; ETH_PASSWORD=$1;;
*) printf "${0##*/}: internal error: %q\\n" "$1"; exit 1
esac; shift
done

[[ $ETH_KEYSTORE ]] && args+=(--keystore "$ETH_KEYSTORE")
[[ $ETH_PASSWORD ]] && args+=(--password "$ETH_PASSWORD")

geth account new "${args[@]}"
2 changes: 2 additions & 0 deletions libexec/dapp/dapp-key
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
dapp --nix-run go-ethereum-unlimited dapp --key "$@"