Created
May 3, 2021 16:22
-
-
Save Hribek25/4a6f9ac279c3ae0a1f6dad1097d7d114 to your computer and use it in GitHub Desktop.
How to send IOTA non-value message via simple bash
This file contains 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
INDEX_PAYLOAD=$(printf "hello-world-index" | xxd -ps)\ | |
&& DATA_PAYLOAD=$(printf "some data" | xxd -ps)\ | |
&& PAYLOAD=$(echo -e "{\"payload\": {\"type\": 2,\"index\": \"$INDEX_PAYLOAD\", \"data\": \"$DATA_PAYLOAD\"}}")\ | |
&& curl --request POST --header "Content-Type: application/json" --data "$PAYLOAD" --url https://api.lb-0.testnet.chrysalis2.com/api/v1/messages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment