diff options
Diffstat (limited to 'tester.sh')
| -rwxr-xr-x | tester.sh | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -26,6 +26,7 @@ curl --request POST \ | |||
| 26 | curl --request POST \ | 26 | curl --request POST \ |
| 27 | --header 'Content-Type: application/json' \ | 27 | --header 'Content-Type: application/json' \ |
| 28 | --data '{ | 28 | --data '{ |
| 29 | "by": "old_transaction_hash_1", | ||
| 29 | "source": "old_transaction_hash_1", | 30 | "source": "old_transaction_hash_1", |
| 30 | "target": "target_account", | 31 | "target": "target_account", |
| 31 | "amount": 20, | 32 | "amount": 20, |
| @@ -35,7 +36,7 @@ curl --request POST \ | |||
| 35 | 36 | ||
| 36 | ## new transaction | 37 | ## new transaction |
| 37 | curl --request POST \ | 38 | curl --request POST \ |
| 38 | --header 'Content-Type: application/json' \ | 39 | --header 'Content-Length: 36864' \ |
| 39 | --data '{ | 40 | --data '{ |
| 40 | "source": "old_transaction_hash_2", | 41 | "source": "old_transaction_hash_2", |
| 41 | "target": "target_account", | 42 | "target": "target_account", |
| @@ -47,7 +48,9 @@ curl --request POST \ | |||
| 47 | ## new transaction | 48 | ## new transaction |
| 48 | curl --request POST \ | 49 | curl --request POST \ |
| 49 | --header 'Content-Type: application/json' \ | 50 | --header 'Content-Type: application/json' \ |
| 51 | --header 'Authorization: Bearer arstarst.arstarst.arstarst' \ | ||
| 50 | --data '{ | 52 | --data '{ |
| 53 | "by": "e254275", | ||
| 51 | "source": "old_transaction_hash_3", | 54 | "source": "old_transaction_hash_3", |
| 52 | "target": "target_account", | 55 | "target": "target_account", |
| 53 | "amount": 20, | 56 | "amount": 20, |
| @@ -60,6 +63,7 @@ printf "\n\nList of current transactions\n\n" | |||
| 60 | curl localhost:8080/transaction | 63 | curl localhost:8080/transaction |
| 61 | 64 | ||
| 62 | curl --header "Content-Type: application/json" \ | 65 | curl --header "Content-Type: application/json" \ |
| 66 | --header "Authorization: aaa.bbb.ccc" \ | ||
| 63 | --request POST \ | 67 | --request POST \ |
| 64 | --data '{ | 68 | --data '{ |
| 65 | "transaction_list": [ | 69 | "transaction_list": [ |
| @@ -67,7 +71,7 @@ curl --header "Content-Type: application/json" \ | |||
| 67 | "old_transaction_hash_2", | 71 | "old_transaction_hash_2", |
| 68 | "old_transaction_hash_3" | 72 | "old_transaction_hash_3" |
| 69 | ], | 73 | ], |
| 70 | "nonce": "not_a_thing_yet", | 74 | "nonce": 0, |
| 71 | "timestamp": "2021-04-08T12:30:30", | 75 | "timestamp": "2021-04-08T12:30:30", |
| 72 | "hash": "not_a_thing_yet" | 76 | "hash": "not_a_thing_yet" |
| 73 | }' \ | 77 | }' \ |
