citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 0ce354bca4097072216fc2fb40ae5499f7479d13
parent 95f3536bd3551b9a33281bd45468cb3d6522d585
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 17 Jul 2023 18:05:48 -0700

update balance script

Diffstat:
Mbin/btc-balance | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/btc-balance b/bin/btc-balance @@ -1,8 +1,14 @@ #!/usr/bin/env bash #btc coins | awk '{print $3}' | xargs printf '%.8f * 100000000\n' | bc -l | xargs printf '%.0f\n' | paste -sd+ | bc -l | xargs printf '%s sats to btc\n' | bcalc -n -bcli -rpcwallet=personal getbalance -bcli -rpcwallet=vanessa getbalance +for wallet in personal vanessa multisig bare clightning +do + echo -n "$wallet " + bcli -rpcwallet="$wallet" getbalance +done + +echo -n "cln-availout " +lcli summary | grep avail_out | cut -d= -f2 | cut -d" " -f1 | xargs printf '%s to btc\n' | bcalc -n #if [ -n "$1" ]; then # FIAT=$(printf '%s sats to fiat\n' "$SATS" | bcalc --price "$1")