pkg update -y
pkg install -y node npm nano tmux
npm install -g balanceofsatoshis
Export the connection string
/bin/sh
pkg install -y base64
LAN_IP=$(ifconfig | grep broadcast | head -1 | awk '{print $2}')
CERT=$(base64 /var/db/lnd/tls.cert | tr -d '\n')
MACAROON=$(base64 /var/db/lnd/data/chain/bitcoin/mainnet/admin.macaroon | tr -d '\n')
echo "{ \"cert\": \"$CERT\", \"macaroon\": \"$MACAROON\", \"socket\": \"$LAN_IP:10009\"}"
NODE_NAME="something_short"
mkdir -p ~/.bos/$NODE_NAME/
echo "{ \"cert\": \"$CERT\", \"macaroon\": \"$MACAROON\", \"socket\": \"$LAN_IP:10009\"}" | tee -a ~/.bos/$NODE_NAME/credentials.json
bos peers --node $NODE_NAME
npm install -g balanceofsatoshis
cat <<EOF >> /root/bos_tor_proxy.json
{
"host": "127.0.0.1",
"port": 9050
}
EOF
bos telegram --connect <connection code> --use-proxy /root/bos_tor_proxy.json --use-small-units --node $NODE_NAME