z3zB7GMkA9sGzDMm5ghbntnH44zuN/bin/u2.sh
npub1smartg7jdu7q7vew86qjggq90ncwdnue03d7r32gqe4qn335mtlqpqs7zu 01fcbbf3fc
genesis
2024-07-10 22:21:29 +02:00

29 lines
637 B
Bash
Executable File

#!/usr/bin/env bash
PUBKEY=$(cat nostr.json | jq -r .pubkey)
echo "[\"REQ\", \"x\", { \"kinds\" : [611], \"limit\" : 0, \"#p\" : [\"${PUBKEY}\"] }]" | websocat -n --ping-interval 20 wss://npub.info | while read -r line; do
# Process each line received here
echo "Received: $line"
echo "$line" | jq
TYPE=$(echo "$line" | jq -r ".[0]")
echo "type: --${TYPE}--"
if [ "$TYPE" = "EVENT" ]
then
echo event
bash -x bin/validate.sh
time bash -x bin/post.sh
# /home/melvin/go/bin/nak event -c "deployed" --kind 612 --sec $(git config nostr.privkey) wss://npub.info/ &
fi
done