aboutsummaryrefslogtreecommitdiffstats
path: root/tester.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tester.sh')
-rw-r--r--tester.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/tester.sh b/tester.sh
new file mode 100644
index 0000000..a0396d6
--- /dev/null
+++ b/tester.sh
@@ -0,0 +1,38 @@
1#!/usr/bin/env bash
2
3## When in doubt just write a shell script
4
5curl --request POST \
6 --header 'Content-Type: application/json' \
7 --data '{
8 "source": "foo",
9 "target": "bar",
10 "amount": 5,
11 "timestamp": "2021-04-07T00:17:00"
12}' \
13 http://localhost:8080/transaction
14
15curl --request POST \
16 --header 'Content-Type: application/json' \
17 --data '{
18 "source": "saz",
19 "target": "quux",
20 "amount": 12,
21 "timestamp": "2021-04-07T00:17:00"
22}' \
23 http://localhost:8080/transaction
24
25curl localhost:8080/transaction
26
27curl --header "Content-Type: application/json" \
28 --request POST \
29 --data '{
30 "transaction_list": [
31 "foo",
32 "saz"
33 ],
34 "nonce": 4,
35 "timestamp": "2021-04-07T04:17:00",
36 "hash": "aaaaaa"
37}' \
38 http://localhost:8080/block