client.sh raw
1 #!/bin/sh
2 # One client: given a relay address and nothing else, discover the back ends and sync every chain.
3 #
4 # usage: client.sh <relay-url>
5 set -eu
6
7 relay=$1
8 echo "== client via $relay"
9
10 echo "-- discovery (btc)"
11 nostrino-discover -relay "$relay" -chain btc
12
13 echo "-- discovery (blake)"
14 nostrino-discover -relay "$relay" -chain blake
15
16 echo "-- discovery (alt)"
17 nostrino-discover -relay "$relay" -chain alt
18
19 for chain in btc blake alt; do
20 echo "-- sync $chain through the tunnel"
21 nostrino-neutrino -relay "$relay" -profile "/profiles/$chain.json" \
22 -headers-only -memory -json | grep -E '"peer_tip"|"elapsed_millis"'
23 done
24