Skip to content

Instantly share code, notes, and snippets.

@st3b1t
Created February 23, 2024 21:27
Show Gist options
  • Save st3b1t/21ac27f1332a4eeaf2d97d06f87ac8a1 to your computer and use it in GitHub Desktop.
Save st3b1t/21ac27f1332a4eeaf2d97d06f87ac8a1 to your computer and use it in GitHub Desktop.
testing rpc methods of your rpc Bitcoin full node
#!/bin/sh
#
# included in: https://github.com/st3b1t/SatoshiLog
#
# usage: echo server.banner | satlog-rpc 127.0.0.1 50001
#
read METHOD
HOST=$1
PORT=$2
URL="http://${HOST}:${PORT}/"
JSON="{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"${METHOD}\",\"params\":[\"satlog-rpc-method\",\"1.4\"]}"
DATA=`echo -e "${JSON}\n"`
echo $DATA | netcat $HOST $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment