blockchain/docker/demos/helpers/wallet-balance.sh
Claude 96e79beef4
Some checks are pending
Build & Release / Linux x86_64 (push) Waiting to run
Build & Release / macOS ARM64 (push) Waiting to run
Build & Release / Create Release (push) Blocked by required conditions
feat(demos): add ecosystem startup, wallet ops, LNS, and helper scripts
6 VHS terminal demos with reusable helper scripts:
- ecosystem-startup: full stack coming online
- wallet-basics: address, balance, chain info, aliases
- lns-dns: HTTP API and DNS resolution
- exit-node: VPN exit setup
- node-quickstart: 3-step home node
- health-check: all services green

Co-Authored-By: Charon <charon@lethean.io>
2026-04-03 12:34:00 +01:00

9 lines
320 B
Bash
Executable file

#!/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')
"