core-lightning/daemon/test/scripts/get-new-address.sh
Rusty Russell 4bbb86ae30 daemon: clean up test dirs.
Move final helpers out of test-cli/

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:27:56 +09:30

18 lines
340 B
Bash
Executable File

#! /bin/sh
# Alpha defaults to confidential addresses. We don't handle those (yet?)
# so extract the unconfidential address.
set -e
. `dirname $0`/vars.sh
case $STYLE in
alpha)
A=`$CLI getnewaddress`
$CLI validateaddress $A | sed -n 's/.*"unconfidential" : "\([A-Za-z0-9]*\)".*/\1/p'
;;
bitcoin)
$CLI getnewaddress
;;
esac