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>
This commit is contained in:
parent
eebfb3f1f1
commit
96e79beef4
10 changed files with 201 additions and 0 deletions
BIN
docker/demos/ecosystem-startup.gif
Normal file
BIN
docker/demos/ecosystem-startup.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
54
docker/demos/ecosystem-startup.tape
Normal file
54
docker/demos/ecosystem-startup.tape
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Lethean Ecosystem — Full Stack Startup
|
||||
|
||||
Output demos/ecosystem-startup.gif
|
||||
|
||||
Set FontSize 13
|
||||
Set Width 1000
|
||||
Set Height 650
|
||||
Set Theme "Dracula"
|
||||
Set TypingSpeed 30ms
|
||||
Set Padding 12
|
||||
|
||||
Type "# Lethean Testnet Ecosystem"
|
||||
Enter
|
||||
Sleep 500ms
|
||||
|
||||
Type "docker compose -f docker-compose.pull.yml up -d"
|
||||
Enter
|
||||
Sleep 3s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Waiting for chain daemon to sync..."
|
||||
Enter
|
||||
Sleep 1s
|
||||
|
||||
Type "docker compose -f docker-compose.pull.yml ps | grep lthn | sort"
|
||||
Enter
|
||||
Sleep 3s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# All services online — running health check"
|
||||
Enter
|
||||
Type "bash health.sh"
|
||||
Enter
|
||||
Sleep 4s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Browse the explorer at http://localhost:3335"
|
||||
Enter
|
||||
Type "# Trade DEX at http://localhost:3338"
|
||||
Enter
|
||||
Type "# Mine at stratum+tcp://localhost:5555"
|
||||
Enter
|
||||
Type "# Resolve .lthn names via DNS at localhost:5354"
|
||||
Enter
|
||||
Sleep 1s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Lethean — privacy by default, earn by participating"
|
||||
Enter
|
||||
Sleep 3s
|
||||
13
docker/demos/helpers/chain-aliases.sh
Executable file
13
docker/demos/helpers/chain-aliases.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
curl -s localhost:46941/json_rpc \
|
||||
-d '{"jsonrpc":"2.0","id":"0","method":"get_all_alias_details"}' \
|
||||
-H 'Content-Type: application/json' | python3 -c "
|
||||
import sys,json
|
||||
aliases=json.load(sys.stdin)['result']['aliases']
|
||||
print(f'{len(aliases)} aliases registered on-chain:')
|
||||
print()
|
||||
for a in aliases:
|
||||
name = a['alias']
|
||||
comment = a.get('comment','')
|
||||
print(f' @{name:12s} {comment[:50]}')
|
||||
"
|
||||
17
docker/demos/helpers/chain-info.sh
Executable file
17
docker/demos/helpers/chain-info.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
curl -s localhost:46941/json_rpc \
|
||||
-d '{"jsonrpc":"2.0","id":"0","method":"getinfo"}' \
|
||||
-H 'Content-Type: application/json' | python3 -c "
|
||||
import sys,json
|
||||
d=json.load(sys.stdin)['result']
|
||||
hf = d.get('is_hardfok_active',[])
|
||||
active = sum(1 for h in hf if h)
|
||||
print(f'Height: {d[\"height\"]:,}')
|
||||
print(f'Hardforks: HF0-{active-1} active')
|
||||
print(f'PoW diff: {d.get(\"pow_difficulty\",0):,}')
|
||||
print(f'Aliases: {d.get(\"alias_count\",0)}')
|
||||
print(f'TX count: {d.get(\"tx_count\",0):,}')
|
||||
print(f'Peers in: {d.get(\"incoming_connections_count\",0)}')
|
||||
print(f'Peers out: {d.get(\"outgoing_connections_count\",0)}')
|
||||
print(f'Status: {d[\"status\"]}')
|
||||
"
|
||||
8
docker/demos/helpers/wallet-address.sh
Executable file
8
docker/demos/helpers/wallet-address.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
curl -s localhost:46944/json_rpc \
|
||||
-d '{"jsonrpc":"2.0","id":"0","method":"getaddress"}' \
|
||||
-H 'Content-Type: application/json' | python3 -c "
|
||||
import sys,json
|
||||
d=json.load(sys.stdin)['result']
|
||||
print('Address:', d['address'])
|
||||
"
|
||||
9
docker/demos/helpers/wallet-balance.sh
Executable file
9
docker/demos/helpers/wallet-balance.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/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')
|
||||
"
|
||||
BIN
docker/demos/lns-dns.gif
Normal file
BIN
docker/demos/lns-dns.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 404 KiB |
50
docker/demos/lns-dns.tape
Normal file
50
docker/demos/lns-dns.tape
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Lethean Name Service — DNS Resolution
|
||||
|
||||
Output demos/lns-dns.gif
|
||||
|
||||
Set FontSize 14
|
||||
Set Width 900
|
||||
Set Height 500
|
||||
Set Theme "Dracula"
|
||||
Set TypingSpeed 40ms
|
||||
Set Padding 15
|
||||
|
||||
Type "# Lethean Name Service — .lthn Domain Resolution"
|
||||
Enter
|
||||
Sleep 500ms
|
||||
|
||||
Type "# Query the LNS HTTP API"
|
||||
Enter
|
||||
Type "curl -s http://localhost:5553/health | python3 -m json.tool"
|
||||
Enter
|
||||
Sleep 2s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Resolve a .lthn name"
|
||||
Enter
|
||||
Type "curl -s http://localhost:5553/resolve?name=charon.lthn | python3 -m json.tool"
|
||||
Enter
|
||||
Sleep 2s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# DNS query — works with standard dig"
|
||||
Enter
|
||||
Type "dig @127.0.0.1 -p 5354 gateway.lthn A +short"
|
||||
Enter
|
||||
Sleep 2s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# List all known names"
|
||||
Enter
|
||||
Type "curl -s http://localhost:5553/names | python3 -m json.tool | head -20"
|
||||
Enter
|
||||
Sleep 3s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Names are discovered from blockchain aliases automatically"
|
||||
Enter
|
||||
Sleep 2s
|
||||
BIN
docker/demos/wallet-basics.gif
Normal file
BIN
docker/demos/wallet-basics.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
50
docker/demos/wallet-basics.tape
Normal file
50
docker/demos/wallet-basics.tape
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Lethean Wallet — Basic Operations
|
||||
|
||||
Output demos/wallet-basics.gif
|
||||
|
||||
Set FontSize 14
|
||||
Set Width 900
|
||||
Set Height 500
|
||||
Set Theme "Dracula"
|
||||
Set TypingSpeed 40ms
|
||||
Set Padding 15
|
||||
|
||||
Type "# Lethean Wallet — Basic Operations"
|
||||
Enter
|
||||
Sleep 500ms
|
||||
|
||||
Type "# Get your wallet address"
|
||||
Enter
|
||||
Type "bash demos/helpers/wallet-address.sh"
|
||||
Enter
|
||||
Sleep 2s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Check balance (staking rewards accumulate here)"
|
||||
Enter
|
||||
Type "bash demos/helpers/wallet-balance.sh"
|
||||
Enter
|
||||
Sleep 2s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# View chain info"
|
||||
Enter
|
||||
Type "bash demos/helpers/chain-info.sh"
|
||||
Enter
|
||||
Sleep 2s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Browse on-chain aliases"
|
||||
Enter
|
||||
Type "bash demos/helpers/chain-aliases.sh"
|
||||
Enter
|
||||
Sleep 3s
|
||||
|
||||
Type ""
|
||||
Enter
|
||||
Type "# Wallet stakes automatically — PoS rewards arrive as you sleep"
|
||||
Enter
|
||||
Sleep 2s
|
||||
Loading…
Add table
Reference in a new issue