aboutsummaryrefslogtreecommitdiffstats
path: root/tester.sh
blob: a0396d68ae4ed82fc6eac5a0b2b5ceb524639131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash

## When in doubt just write a shell script

curl --request POST \
    --header 'Content-Type: application/json' \
    --data '{
    "source": "foo",
    "target": "bar",
    "amount": 5,
    "timestamp": "2021-04-07T00:17:00"
}' \
    http://localhost:8080/transaction

curl --request POST \
    --header 'Content-Type: application/json' \
    --data '{
    "source": "saz",
    "target": "quux",
    "amount": 12,
    "timestamp": "2021-04-07T00:17:00"
}' \
    http://localhost:8080/transaction

curl localhost:8080/transaction

curl --header "Content-Type: application/json" \
    --request POST \
    --data '{
    "transaction_list": [
    "foo",
    "saz"
    ],
    "nonce": 4,
    "timestamp": "2021-04-07T04:17:00",
    "hash": "aaaaaa"
}' \
    http://localhost:8080/block