update workshop instructions
- simplifiy some commands - make instructions clearer
This commit is contained in:
parent
5ec884e1e5
commit
eef0390302
|
@ -17,8 +17,7 @@ This document will show you several useful API calls.
|
|||
An easy way to check that your node is up and running is:
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
--url http://localhost:8080/api/codex/v1/debug/info
|
||||
curl http://localhost:8080/api/codex/v1/debug/info
|
||||
```
|
||||
|
||||
This will return a JSON structure with plenty of information about your local node. It contains peer information that may be useful when troubleshooting connection issues.
|
||||
|
@ -42,13 +41,14 @@ On successful upload, you'll receive a CID. This can be used to download the fil
|
|||
When you have a CID of data you want to download, you can use the following commands:
|
||||
|
||||
```shell
|
||||
export CID="..." # paste your CID from the previous step here between the quotes
|
||||
CID="..." # paste your CID from the previous step here between the quotes
|
||||
```
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
--url http://localhost:8080/api/codex/v1/data/$CID/network
|
||||
curl -o "${CID}.png" "http://localhost:8080/api/codex/v1/data/${CID}/network"
|
||||
```
|
||||
> #### 📢 **Note**
|
||||
>NOTE: Use the file type of the image uploaded in the previous step
|
||||
|
||||
Note that Codex does not store content-type or extension information. If you get an error, run `echo ${CID}` to verify your CID is set properly.
|
||||
|
||||
|
@ -57,11 +57,9 @@ Note that Codex does not store content-type or extension information. If you get
|
|||
You can view which datasets are currently being stored by your node.
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
--url http://localhost:8080/api/codex/v1/data
|
||||
curl http://localhost:8080/api/codex/v1/data
|
||||
```
|
||||
|
||||
|
||||
## Create storage availability
|
||||
> #### 📢 **Warning**
|
||||
>Are you currently in a Codex workshop?! Yes: Please skip this step.
|
||||
|
@ -90,7 +88,7 @@ To purchase storag space from the network, first you must upload your data. Once
|
|||
Set your CID:
|
||||
|
||||
```shell
|
||||
export CID="..." # paste your CID from the previous step here between the quotes
|
||||
CID="..." # paste your CID from the previous step here between the quotes
|
||||
echo CID: $CID
|
||||
```
|
||||
|
||||
|
@ -120,14 +118,13 @@ On successful, this request will return a Purchase-ID.
|
|||
Using a Purchase-ID, you can check the status of your request-for-storage contract:
|
||||
|
||||
```shell
|
||||
export PURCHASE_ID="..."
|
||||
PURCHASE_ID="..."
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
--url http://localhost:8080/api/codex/v1/storage/purchases/$PURCHASE_ID
|
||||
curl "http://localhost:8080/api/codex/v1/storage/purchases/${PURCHASE_ID}"
|
||||
```
|
||||
|
||||
This will display state and error information for your purchase.
|
||||
|
|
|
@ -9,24 +9,19 @@ Switch to the workshop wifi:
|
|||
## 2. Clone this repository
|
||||
```
|
||||
git clone https://github.com/codex-storage/codex-testnet-starter.git
|
||||
```
|
||||
|
||||
## 3. Open a terminal
|
||||
Open a terminal in the `/scripts` folder:
|
||||
```shell
|
||||
cd scripts
|
||||
cd codex-testnet-starter/scripts
|
||||
```
|
||||
> #### 📢 **Windows users**<br>
|
||||
>If you are using a native Windows environment, and not a *nix-like environment
|
||||
>(eg CYGWIN/MINGW/MSYS/MINGW), use the `scripts/windows` directory.
|
||||
|
||||
## 4. Download Codex
|
||||
## 3. Download Codex
|
||||
Run `download` script:
|
||||
```shell
|
||||
./download.sh
|
||||
```
|
||||
|
||||
## 5. Generate an ETH key-pair
|
||||
## 4. Generate an ETH key-pair
|
||||
Run `generate` script:
|
||||
```shell
|
||||
./generate.sh
|
||||
|
@ -37,7 +32,7 @@ Run `generate` script:
|
|||
> #### 📢 **Don't lose your keys**<br>
|
||||
>If you lose your key and address, you can generate new ones. But the faucet and/or discord bot may refuse to give you new tokens for quite a while!
|
||||
|
||||
## 6. Start Codex node
|
||||
## 5. Start Codex node
|
||||
Run the `run_client` script:
|
||||
```shell
|
||||
./run_client.sh
|
||||
|
@ -54,7 +49,7 @@ Check that your `LOCAL IP` in the output is correct, and if not, re-run the scri
|
|||
LOCALIP=192.168.88.46 ./run_client.sh
|
||||
```
|
||||
|
||||
## 7. Acquire tokens
|
||||
## 6. Acquire tokens
|
||||
You can acquire tokens in one of two ways: the testnet faucets or the Discord bot.
|
||||
|
||||
### Faucets
|
||||
|
@ -68,6 +63,6 @@ You will need both ETH and TST to use Codex:
|
|||
- Use `/set` command to enter your generated address.
|
||||
- Use `/mint` command to receive some tokens.
|
||||
|
||||
## 8. Use Codex
|
||||
## 7. Use Codex
|
||||
Setup complete! 🥳 You can now proceed to use your Codex node. Follow the
|
||||
[instructions](./USINGCODEX.md) 🐇
|
||||
|
|
Loading…
Reference in New Issue