#!/bin/bash
curl -s localhost:46944/json_rpc \
  -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' \
  -H 'Content-Type: application/json' | python3 -c "
import sys,json
d=json.load(sys.stdin)['result']
print(f'Balance:  {d[\"balance\"]/1e12:.4f} LTHN')
print(f'Unlocked: {d[\"unlocked_balance\"]/1e12:.4f} LTHN')
"
