Created
December 10, 2017 22:07
-
-
Save nealfennimore/3317eda5bce6a2ce3cef7d67b4aa2313 to your computer and use it in GitHub Desktop.
IOTA Full Node scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addNeighbor() { | |
payload=$(jq -n --arg uris "$1" '{"command":"addNeighbors", "uris":[ $uris ]}') | |
curl http://localhost:14265 -H "X-IOTA-API-VERSION: 1.4" -d "$payload" | jq | |
} | |
function removeNeighbor() { | |
payload=$(jq -n --arg uris "$1" '{"command":"removeNeighbors", "uris":[ $uris ]}') | |
curl http://localhost:14265 -H "X-IOTA-API-VERSION: 1.4" -d "$payload" | jq | |
} | |
function getNodeInfo(){ | |
curl http://localhost:14265 -X POST -H 'X-IOTA-API-Version: 1.4' -d '{"command": "getNodeInfo"}' | jq | |
} | |
function getNeighbors(){ | |
curl http://localhost:14265 -X POST -H 'X-IOTA-API-Version: 1.4' -d '{"command": "getNeighbors"}' | jq | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment