mirror of
https://github.com/codex-storage/codex-testnet-starter.git
synced 2025-02-23 23:58:15 +00:00
Update USINGCODEX.md
Remove curly braces around variables as zsh seems to automatically protect them when copying and pasting
This commit is contained in:
parent
7e5455dc12
commit
15c3af1322
@ -46,7 +46,7 @@ export CID="..." # paste your CID from the previous step here between the quotes
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl --request GET \
|
curl --request GET \
|
||||||
--url http://localhost:8080/api/codex/v1/data/${CID}/network
|
--url http://localhost:8080/api/codex/v1/data/$CID/network
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that Codex does not store content-type or extension information.
|
Note that Codex does not store content-type or extension information.
|
||||||
@ -84,20 +84,20 @@ First create two variables for the request:
|
|||||||
```shell
|
```shell
|
||||||
export CID="..." # paste your CID from the previous step here between the quotes
|
export CID="..." # paste your CID from the previous step here between the quotes
|
||||||
export EXPIRY_TIME=$((1000 + $(date +%s))) # current time + 1000 seconds
|
export EXPIRY_TIME=$((1000 + $(date +%s))) # current time + 1000 seconds
|
||||||
echo CID: ${CID}
|
echo CID: $CID
|
||||||
echo EXPIRY_TIME: ${EXPIRY_TIME}
|
echo EXPIRY_TIME: $EXPIRY_TIME
|
||||||
```
|
```
|
||||||
|
|
||||||
Next you can run:
|
Next you can run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl "http://localhost:8080/api/codex/v1/storage/request/${CID}" \
|
curl "http://localhost:8080/api/codex/v1/storage/request/$CID" \
|
||||||
--header 'Content-Type: application/json' \
|
--header 'Content-Type: application/json' \
|
||||||
--data "{
|
--data "{
|
||||||
\"duration\": \"3600\",
|
\"duration\": \"3600\",
|
||||||
\"reward\": \"1\",
|
\"reward\": \"1\",
|
||||||
\"proofProbability\": \"3\",
|
\"proofProbability\": \"3\",
|
||||||
\"expiry\": \"${EXPIRY_TIME}\",
|
\"expiry\": \"$EXPIRY_TIME\",
|
||||||
\"nodes\": 2,
|
\"nodes\": 2,
|
||||||
\"tolerance\": 1,
|
\"tolerance\": 1,
|
||||||
\"collateral\": \"1\"
|
\"collateral\": \"1\"
|
||||||
@ -115,8 +115,15 @@ On successful, this request will return a Purchase-ID.
|
|||||||
|
|
||||||
## View purchase status
|
## View purchase status
|
||||||
Using a Purchase-ID, you can check the status of your request-for-storage contract:
|
Using a Purchase-ID, you can check the status of your request-for-storage contract:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl --request GET \
|
export PURCHASE_ID="..."
|
||||||
--url http://localhost:8080/api/codex/v1/storage/purchases/{PURCHASE_ID_HERE}
|
```
|
||||||
|
|
||||||
|
Then:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl --request GET \
|
||||||
|
--url http://localhost:8080/api/codex/v1/storage/purchases/$PURCHASE_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user