diff --git a/docs/cli/Guides/quick-guide.md b/docs/cli/Guides/quick-guide.md new file mode 100644 index 00000000..b10548e1 --- /dev/null +++ b/docs/cli/Guides/quick-guide.md @@ -0,0 +1,159 @@ +--- +id: "quick-guide" +title: "Quick Deployment Guide" +slug: "/guides/quick-guide" +sidebar_position: 1 +--- + +This quick guide provides instructions on deploying a solution and data on Super Protocol. Its purpose is to introduce you to the logic and sequence of the CLI commands. + +## Prerequisites + +- Docker +- [SPCTL](/cli) + +## 1. Prepare the solution + +### 1.1. Create a Dockerfile + +When writing a Dockerfile and other scripts, keep in mind the special file structure inside the TEE: + +| **Location** | **Purpose** | **Access** | +| :- | :- | :- | +| `/sp/inputs/input-0001`
`/sp/inputs/input-0002`
etc. | Possible data locations | Read-only | +| `/sp/output` | Output directory for results | Write; read own files | +| `/sp/certs` | Contains the order certificate | Read-only | + +So, your solution must find the data in `/sp/inputs` and write the results to `/sp/output`. + +:::important + +Always use absolute paths, such as `/sp/...`. + +::: + +You can find several Dockerfile examples in the [Super-Protocol/solutions](https://github.com/Super-Protocol/solutions) GitHub repository. + +### 1.2. Build a Docker image + +```shell +docker build -t . +``` + +For example: + +```shell +docker build -t my-solution . +``` + +### 1.3. Save and archive the image + +```shell +docker save :latest | gzip > .tar.gz +``` + +For example: + +```shell +docker save my-solution:latest | gzip > my-solution.tar.gz +``` + +### 1.4. Upload the archive + +From your SPCTL directory, [upload](/cli/commands/files/upload) the archive with your solution: + +```shell +./spctl files upload \ +--filename .tar.gz \ +--output .resource.json +``` + +For example: + +```shell +./spctl files upload ./my-solution.tar.gz \ +--filename my-solution.tar.gz \ +--output my-solution.resource.json +``` + +## 2. Prepare data + +If your application requires additional input data, prepare and upload it as well. + +### 2.1. Archive the data + +Archive the data: + +```shell +tar -czvf .tar.gz -C . +``` + +For example: + +```shell +tar -czvf my_data.tar.gz -C ./data . +``` + +### 2.2. Upload the archive + +From your SPCTL directory, [upload](/cli/commands/files/upload) the archive with your data, just like you did with the solution: + +```shell +./spctl files upload \ +--filename .tar.gz \ +--output .resource.json +``` + +For example: + +```shell +./spctl files upload ./my-data.tar.gz \ +--filename my-data.tar.gz \ +--output my-data.resource.json +``` + +## 3. Deploy + +Place an order using the [`workflows create`](/cli/commands/workflows/create) command. For example: + +```shell +./spctl workflows create \ +--tee 7 \ +--solution ./my-solution.resource.json \ +--data ./my-data.resource.json \ +--data ./more-data.resource.json +``` + +:::note + +When you provide multiple data inputs, they are placed in separate directories inside the CVM: the first in `/sp/inputs/input-0001`, the second in `/sp/inputs/input-0002`, and so on. + +::: + +Find the order ID in the output. + +## 4. Download the result + +Wait a few minutes and [check the order status](/cli/commands/orders/get): + +```shell +./spctl orders get +``` + +For example: + +```shell +./spctl orders get 256587 +``` + +If the status is `Done`, the order is ready, and you can [download the order result](/cli/commands/orders/download-result): + +```shell +./spctl orders download-result +``` + +For example: + +```shell +./spctl orders download-result 256587 +``` \ No newline at end of file diff --git a/docs/cli/Guides/smpc.md b/docs/cli/Guides/smpc.md new file mode 100644 index 00000000..df4f1059 --- /dev/null +++ b/docs/cli/Guides/smpc.md @@ -0,0 +1,7 @@ +--- +id: "smpc" +title: "Secure Multiparty Computation" +slug: "/guides/smpc" +sidebar_position: 2 +--- + diff --git a/docs/cli/commands/files/calculate-hash.md b/docs/cli/commands/files/calculate-hash.md new file mode 100644 index 00000000..e6fb2478 --- /dev/null +++ b/docs/cli/commands/files/calculate-hash.md @@ -0,0 +1,36 @@ +--- +id: "cli-files-calculate-hash" +title: "files calculate-hash" +slug: "/commands/files/calculate-hash" +sidebar_label: "calculate-hash" +sidebar_position: 2 +--- + +Calculates the hash of a file or directory taking into account the file names. + +## Syntax + +```shell +./spctl files calculate-hash + [--config ] + [--help | -h] +``` + +## Arguments + +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Path to a file or directory. | + +## Options + +|
**Name**
|
**Description**
| +| :- | :- | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | + +## Example + +```shell +./spctl files calculate-hash ./content/ +``` \ No newline at end of file diff --git a/docs/cli/commands/files/delete.md b/docs/cli/commands/files/delete.md index 6755e31d..25fb55d9 100644 --- a/docs/cli/commands/files/delete.md +++ b/docs/cli/commands/files/delete.md @@ -3,35 +3,36 @@ id: "cli-files-delete" title: "files delete" slug: "/commands/files/delete" sidebar_label: "delete" +sidebar_position: 4 --- -Deletes a file in remote storage using the information in a resource JSON file. - -The resource JSON file is created as a result of the [`files upload`](/cli/commands/files/upload) command. +Deletes files in remote storage using the information in a resource JSON file. ## Syntax -``` -./spctl files delete - [--config ] +```shell +./spctl files delete + [--use-addon] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Path to the resource JSON file. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Path to a resource JSON file. This file is created as a result of the
[`files upload`](/cli/commands/files/upload) command. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--use-addon` | Option required to delete files that were [uploaded](/cli/commands/files/upload) with this option. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl files delete ./resource-old-data.json ``` \ No newline at end of file diff --git a/docs/cli/commands/files/download.md b/docs/cli/commands/files/download.md index cc331e9b..15fbc24f 100644 --- a/docs/cli/commands/files/download.md +++ b/docs/cli/commands/files/download.md @@ -3,36 +3,36 @@ id: "cli-files-download" title: "files download" slug: "/commands/files/download" sidebar_label: "download" +sidebar_position: 3 --- -Downloads a file from remote storage and decrypts it using the information in a resource JSON file. - -The resource JSON file is created as a result of the [`files upload`](/cli/commands/files/upload) command. +Downloads files from remote storage and decrypts it using the information in a resource JSON file. ## Syntax -``` -./spctl files download - [--config ] +```shell +./spctl files download + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Path to the resource JSON file. | -| `` | Path to save the downloaded file. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Path to a resource JSON file. This file is created as a result of the
[`files upload`](/cli/commands/files/upload) command. | +| `` | Path to save the downloaded files. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--use-addon` | Option required to download files that were [uploaded](/cli/commands/files/upload) with this option. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl files download ./resource-data.json ./ ``` \ No newline at end of file diff --git a/docs/cli/commands/files/index.md b/docs/cli/commands/files/index.md index 60f8a146..1b4485f3 100644 --- a/docs/cli/commands/files/index.md +++ b/docs/cli/commands/files/index.md @@ -2,18 +2,17 @@ id: "cli-files" title: "files" slug: "/commands/files" -sidebar_position: 3 +sidebar_position: 2 --- This group contains commands to manage files in third-party storage such as Storj. -Most of these commands require a Storj account and SPCTL configured to use it. Refer to the [Set up Storj](/cli/#set-up-storj-access-optional) section to create a bucket and access grants and set up SPCTL. - ## Commands -| **Command** | **Description** | -| :- | :- | -| [files delete](/cli/commands/files/delete) | Deletes a file in remote storage. | -| [files download](/cli/commands/files/download) | Downloads and decrypt a file from remote storage. | -| [files upload](/cli/commands/files/upload) | Uploads a file to remote storage. | \ No newline at end of file +|
**Command**
|
**Description**
| +| :- | :- | +| [files upload](/cli/commands/files/upload) | Encrypts and uploads a file to remote storage. | +| [files calculate-hash](/cli/commands/files/calculate-hash) | Calculates the hash of a file or directory. | +| [files download](/cli/commands/files/download) | Downloads and decrypts a file from remote storage. | +| [files delete](/cli/commands/files/delete) | Deletes a file in remote storage. | \ No newline at end of file diff --git a/docs/cli/commands/files/upload.md b/docs/cli/commands/files/upload.md index 51a37435..e79f0154 100644 --- a/docs/cli/commands/files/upload.md +++ b/docs/cli/commands/files/upload.md @@ -3,89 +3,65 @@ id: "cli-files-upload" title: "files upload" slug: "/commands/files/upload" sidebar_label: "upload" +sidebar_position: 1 --- -Uploads a file to remote storage such as Storj. +Uploads files to remote storage such as Storj. -The primary purpose of this command is to make the uploading files available for download and execution. This is necessary in two cases: +The primary purpose of this command is to make uploaded files available for download and execution inside a CVM. The uploaded data is automatically encrypted and placed in the [storage configured](/cli#set-up-storj-access-optional) in the SPCTL's `config.json` file. If no storage was preconfigured, a free space of up to 20 GB will be automatically created using the Super Protocol's Storj account. -- With the [`workflows create`](/cli/commands/workflows/create) command, **users** can add the uploaded solution or data to an order instead of an offer. In this case, a short-term storage period is enough. -- Solution and data **providers** can store the contents of their offers to make them available for customers' orders. This requires a long-term storage period. +The input of the command can be a TAR.GZ file or a directory (with the `--use-addon` flag). -Depending on the options, the command provides two ways to upload and store the files. Choose one that suits you better: - -- **Uploads to storage directly.** This requires a Storj account and SPCTL [configured](/cli/#set-up-storj-access-optional) to use it. The command will upload the file to the root directory of the bucket specified in the SPCTL configuration file. -- **Creates a storage order using a Marketplace storage offer.** This does not require a Storj account but requires paying SPPI tokens for the order according to the offer pricing and selected lease duration. - -The input of the command is a TAR.GZ archive file. For solutions, this file is created by the [`solutions prepare`](/cli/commands/solutions/prepare) command. For data, it is an archive containing the dataset files. - -The output of the command is a resource JSON file with the information for a compute provider on how to access the uploaded file. +The output of the command is a resource JSON file with the information for the CVM on how to access and decrypt the uploaded file. ## Syntax -``` -./spctl files upload - [--filename ] - [--output ] +```shell +./spctl files upload + [--filename ] + [--output ] [--skip-encryption] - [--metadata ] - [--max-concurrent ] - [--storage ] - [--min-rent-minutes ] - [--config ] + [--metadata ] + [--max-concurrent ] + [--use-addon] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Path to the uploading TAR.GZ archive file. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Path to the file or directory you want to upload. | ## Options -|
**Name**
| **Description** | -| :- | :- | -| `--filename ` | Desired name of the resulting file in storage. The default is a random string. | -| `--output ` | Path to save the output resource JSON file. The default is `./resource.json`. | -| `--skip-encryption` | Flag to skip file encryption before uploading. The default is `false`. | -| `--metadata ` | Path to a metadata file for adding fields to the resource JSON file. This file is generated by the [`solutions prepare`](/cli/commands/solutions/prepare) command. | -| `--max-concurrent ` | Maximum concurrent pieces to upload at once per transfer to limit the number of threads. Use only when dealing with a memory-constrained environment. | -| `--storage ` | Option to use a storage offer. State the IDs of the offer and the requirement slot, separated by a comma. | -| `--min-rent-minutes ` | Storage lease period in minutes. Use this option together with `--storage`. The default is `60`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--filename ` | Desired name of the resulting file or directory in the storage.
Default: a random string (with no file extension). | +| `--output ` | Path to save the output resource JSON file.
Default: `./resource.json`. | +| `--skip-encryption` | Flag for skipping file encryption before uploading.
Default: `false`. | +| `--metadata ` | Path to a metadata JSON file for adding fields to the resource JSON file. | +| `--max-concurrent ` | Maximum concurrent pieces to upload at once per transfer to limit the number of threads. Use only when dealing with a memory-constrained environment. | +| `--use-addon` | Flag for uploading a directory instead of a single TAR.GZ archive.
To manage the data uploaded this way, use this option with the [`files delete`](/cli/commands/files/delete) and [`files download`](/cli/commands/files/download) commands. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Examples -### Example 1. Upload to storage directly +### Upload a TAR.GZ archive +```shell +./spctl files upload ./data.tar.gz \ + --filename data_2026.tar.gz ``` -./spctl files upload content.tar.gz -``` - -To execute this command successfully, you need a Storj account and SPCTL configured to use it. Refer to the [Set up Storj](/cli#set-up-storj-access-optional) section to create a bucket and access grants and set up SPCTL. -### Example 2. Upload and create a storage order +### Upload a directory -``` -./spctl files upload content.tar.gz --storage 47,49 --min-rent-minutes 120 +```shell +./spctl files upload ./dataset/ \ + --output ./dataset.resource.json \ + --use-addon ``` -Where: - -- `--storage 47,49`: Create a storage order using the [Storj DCS Offer](https://marketplace.superprotocol.com/storage?offer=offerId%3D47&tab=pricing) (offer ID: 47) and the requirement slot with ID 49. -- `--min-rent-minutes 120`: Set the lease period for 120 minutes. - -Since the `--storage` option is set, the command does not require a Storj account. However, when the lease period is over, the content will become unavailable unless you [replenish the order deposit](/cli/commands/orders/replenish-deposit). - -### Example 3. Upload using additional options - -``` -./spctl files upload ./data/content.tar.gz \ - --filename data.tar.gz \ - --output ./data-resource.json \ - --metadata ./meta.json \ - --storage 25,33 \ - --min-rent-minutes 120 -``` +Because the `--filename` option is not used, the uploaded directory will have a random name in the storage, for example, `5a3cfa5be14256fc`. \ No newline at end of file diff --git a/docs/cli/commands/index.md b/docs/cli/commands/index.md index 003b92a2..3f3152a2 100644 --- a/docs/cli/commands/index.md +++ b/docs/cli/commands/index.md @@ -2,20 +2,18 @@ id: "cli-commands" title: "CLI Commands" slug: "/commands" -sidebar_position: 2 +sidebar_position: 99 --- This section contains Super Protocol CLI commands. [Install and configure SPCTL](/cli) to access the CLI. ## Command groups -| **Group** | **Description** | -| :- | :- | -| [tokens](/cli/commands/tokens) | Receive SPPI and BNB test tokens; **testnet only**. | -| [solutions](/cli/commands/solutions) | Prepare a solution for deployment. | -| [files](/cli/commands/files) | Manage files in decentralized storage. | -| [workflows](/cli/commands/workflows) | Create a new order. | -| [orders](/cli/commands/orders) | Manage your orders. | -| [offers](/cli/commands/offers) | View and manage Marketplace offers. | -| [providers](/cli/commands/providers) | View and manage providers. | -| [quotes](/cli/commands/quotes) | Verify the authenticity and integrity of a Trusted Execution Environment. | \ No newline at end of file +|
**Group**
|
**Description**
| +| :- | :- | +| [tokens](/cli/commands/tokens) | Receive SPPI and BNB test tokens; **testnet only**. | +| [files](/cli/commands/files) | Manage files in decentralized storage. | +| [workflows](/cli/commands/workflows) | Create a new order. | +| [orders](/cli/commands/orders) | Manage your orders. | +| [providers](/cli/commands/providers) | View and manage providers. | +| [offers](/cli/commands/offers) | View and manage Marketplace offers. | \ No newline at end of file diff --git a/docs/cli/commands/offers/add-slot.md b/docs/cli/commands/offers/add-slot.md index ec955107..c00ce34b 100644 --- a/docs/cli/commands/offers/add-slot.md +++ b/docs/cli/commands/offers/add-slot.md @@ -3,37 +3,37 @@ id: "cli-offers-add-slot" title: "offers add-slot" slug: "/commands/offers/add-slot" sidebar_label: "add-slot" -sidebar_position: 8 +sidebar_position: 9 --- Adds a slot to an offer. -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). ## Syntax -``` -./spctl offers add-slot - --offer - [--path ] - [--config ] +```shell +./spctl offers add-slot + --offer + [--path ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--offer ` | Offer ID. | -| `--path ` | Path to a slot-info JSON file. The default is `./slotInfo.json`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--offer ` | Offer ID. | +| `--path ` | Path to a slot-info JSON file.
Default: `./slotInfo.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Slot info @@ -82,6 +82,8 @@ A template with example values: ## Example -``` -./spctl offers add-slot value --offer 39 --path ./new-slot.json +```shell +./spctl offers add-slot value \ + --offer 39 \ + --path ./new-slot.json ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/delete-slot.md b/docs/cli/commands/offers/delete-slot.md index a35bc860..63e30dda 100644 --- a/docs/cli/commands/offers/delete-slot.md +++ b/docs/cli/commands/offers/delete-slot.md @@ -3,42 +3,44 @@ id: "cli-offers-delete-slot" title: "offers delete-slot" slug: "/commands/offers/delete-slot" sidebar_label: "delete-slot" -sidebar_position: 10 +sidebar_position: 11 --- Deletes a slot in an offer. -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all slots in an offer. Use the [`offers get-slot`](/cli/commands/offers/get-slot) command to get additional information on a slot. ## Syntax -``` -./spctl offers delete-slot - --offer - --slot - [--config ] +```shell +./spctl offers delete-slot + --offer + --slot + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | ## Option -| **Name** | **Description** | -| :- | :- | -| `--offer ` | Offer ID. | -| `--slot ` | Slot ID. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--offer ` | Offer ID. | +| `--slot ` | Slot ID. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl offers delete-slot value --offer 39 --slot 47 +```shell +./spctl offers delete-slot value \ + --offer 39 \ + --slot 47 ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/disable.md b/docs/cli/commands/offers/disable.md index b8e46329..055cb1be 100644 --- a/docs/cli/commands/offers/disable.md +++ b/docs/cli/commands/offers/disable.md @@ -8,31 +8,31 @@ sidebar_position: 6 Disables an existing enabled offer. -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). ## Syntax -``` -./spctl offers disable - [--config ] +```shell +./spctl offers disable + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Offer ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Offer ID. | ## Option -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl offers disable 39 ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/download-content.md b/docs/cli/commands/offers/download-content.md index 9dcf5a10..a34fac1f 100644 --- a/docs/cli/commands/offers/download-content.md +++ b/docs/cli/commands/offers/download-content.md @@ -12,29 +12,29 @@ The command only works with offers that allow this operation. ## Syntax -``` -./spctl offers download-content - [--save-to ] - [--config ] +```shell +./spctl offers download-content + [--save-to ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Offer ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Offer ID. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--save-to ` | Path to save the content. The default is the original filename. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--save-to ` | Path to save the content.
Default: the original filename. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl offers download-content 12 ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/enable.md b/docs/cli/commands/offers/enable.md index 37510cea..c8d8edb0 100644 --- a/docs/cli/commands/offers/enable.md +++ b/docs/cli/commands/offers/enable.md @@ -8,31 +8,31 @@ sidebar_position: 7 Enables an existing disabled offer. -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). ## Syntax -``` -./spctl offers enable - [--config ] +```shell +./spctl offers enable + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Offer ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Offer ID. | ## Options -| **Name** |**Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl offers enable 39 ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/get-info.md b/docs/cli/commands/offers/get-info.md index aa847180..caeb9fca 100644 --- a/docs/cli/commands/offers/get-info.md +++ b/docs/cli/commands/offers/get-info.md @@ -10,30 +10,30 @@ Displays the information on an ## Syntax -``` -./spctl offers get-info - [--save-to ] - [--config ] +```shell +./spctl offers get-info + [--save-to ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | -| `` | Offer ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +| `` | Offer ID. | ## Option -| **Name** | **Description** -| :- | :- | -| `--save-to ` | Path to save the output to a file. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--save-to ` | Path to save the output to a file. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl offers get-info value 30 --save-to ./offer-30.json ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/get-option.md b/docs/cli/commands/offers/get-option.md index 2097992b..8818c41d 100644 --- a/docs/cli/commands/offers/get-option.md +++ b/docs/cli/commands/offers/get-option.md @@ -10,25 +10,27 @@ Displays the information on a [configuration option](/fundamentals/slots) of a < ## Syntax -``` +```shell ./spctl offers get-option - --offer - --option - [--config ] + --offer + --option
slot in an offer. @@ -12,33 +12,35 @@ Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all t ## Syntax -``` -./spctl offers get-slot - --offer - --slot - [--save-to ] - [--config ] +```shell +./spctl offers get-slot + --offer + --slot + [--save-to ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | ## Option -| **Name** | **Description** | -| :- | :-| -| `--offer ` | Offer ID. | -| `--slot ` | Slot ID. | -| `--save-to ` | Path to save the result file. The default is the SPCTL root directory. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--offer ` | Offer ID. | +| `--slot ` | Slot ID. | +| `--save-to ` | Path to save the result file.
Default: the SPCTL root directory. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl offers get-slot value --offer 39 --slot 38 +```shell +./spctl offers get-slot value \ + --offer 39 \ + --slot 38 ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/get.md b/docs/cli/commands/offers/get.md index de3d6239..221bdd7a 100644 --- a/docs/cli/commands/offers/get.md +++ b/docs/cli/commands/offers/get.md @@ -10,30 +10,30 @@ Displays information on an offe ## Syntax -``` -./spctl offers get - [--save-to ] - [--config ] +```shell +./spctl offers get + [--save-to ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | -| `` | Offer ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +| `` | Offer ID. | ## Option -| **Name** | **Description** | -| :- | :- | -| `--save-to ` | Path to save the output to a file. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--save-to ` | Path to save the output to a file. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl offers get value 30 --save-to ./offer-30.json ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/index.md b/docs/cli/commands/offers/index.md index 97a626b0..1c9ec70e 100644 --- a/docs/cli/commands/offers/index.md +++ b/docs/cli/commands/offers/index.md @@ -10,29 +10,29 @@ This group contains commands to view and manage
of ## Syntax -``` -./spctl offers list - [--fields ,[,...]] - [--ids [ ...]] - [--limit ] - [--cursor ] - [--config ] +```shell +./spctl offers list + [--fields [,,...]] + [--ids [ ...]] + [--limit ] + [--cursor ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | ## Options For the `tee` offer type: -|
**Name**
| **Description** | -| :- | :- | -| `--fields ,[,...]` | Columns in the output table, separated by commas. Default fields: `id`, `name`, `orders_in_queue`. Additional fields: `description`, `provider_address`, `provider_name`, `total_cores`, `free_cores`, `cancelable`, `modified_date`. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--fields [,,...]` | Columns in the output table, separated by commas. Default fields: `id`, `name`, `orders_in_queue`. Additional fields: `description`, `provider_address`, `provider_name`, `total_cores`, `free_cores`, `cancelable`, `modified_date`. | For the `value` offer type: -|
**Name**
| **Description** | -| :- | :- | -| `--fields ,[,...]` | Columns in the output table, separated by commas. Default fields: `id`, `name`, `type`. Additional fields: `description`, `provider_address`, `provider_name`, `cancelable`, `modified_date`. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--fields [,,...]` | Columns in the output table, separated by commas. Default fields: `id`, `name`, `type`. Additional fields: `description`, `provider_address`, `provider_name`, `cancelable`, `modified_date`. | For both offer types: -|
**Name**
| **Description** | -| :- | :- | -| `--ids [ ...]` | Filter by offer IDs. This option accepts multiple values separated by spaces. | -| `--limit ` | Number of rows to display. The default is `10`. | -| `--cursor ` | Cursor for pagination. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--ids [ ...]` | Filter by offer IDs, separated by spaces. | +| `--limit ` | Number of rows to display.
Default: `10`. | +| `--cursor ` | Cursor for pagination. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Examples ### Example 1 -``` +```shell ./spctl offers list value --limit 30 ``` ### Example 2 -``` -./spctl offers list value --ids 30 31 32 33 --fields id,name,description +```shell +./spctl offers list value \ + --ids 25 26 27 28 \ + --fields id,name,modified_date ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/update-slot.md b/docs/cli/commands/offers/update-slot.md index ccfe0643..1ddf8482 100644 --- a/docs/cli/commands/offers/update-slot.md +++ b/docs/cli/commands/offers/update-slot.md @@ -3,12 +3,12 @@ id: "cli-offers-update-slot" title: "offers update-slot" slug: "/commands/offers/update-slot" sidebar_label: "update-slot" -sidebar_position: 9 +sidebar_position: 10 --- Updates a
slot in an offer. -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all slots in an offer. Use the [`offers get-slot`](/cli/commands/offers/get-slot) command to get additional information on a slot. @@ -16,33 +16,36 @@ Refer to the description of the [`offers add-slot`](/cli/commands/offers/add-slo ## Syntax -``` -./spctl offers update-slot - --offer - --slot - [--path ] - [--config ] +```shell +./spctl offers update-slot + --offer + --slot + [--path ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | ## Options -| **Name** |**Description** | -| :- | :- | -| `--offer ` | Offer ID. | -| `--slot ` | Slot ID. | -| `--path ` | Path to the slotInfo JSON file. The default is `./slotInfo.json`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--offer ` | Offer ID. | +| `--slot ` | Slot ID. | +| `--path ` | Path to the slotInfo JSON file.
Default: `./slotInfo.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl offers update-slot value --offer 46 --slot 45 --path ./new-slot.json +```shell +./spctl offers update-slot value \ + --offer 46 \ + --slot 45 \ + --path ./slot-info.json ``` \ No newline at end of file diff --git a/docs/cli/commands/offers/update.md b/docs/cli/commands/offers/update.md index 13fb2bb4..11a20313 100644 --- a/docs/cli/commands/offers/update.md +++ b/docs/cli/commands/offers/update.md @@ -8,92 +8,55 @@ sidebar_position: 5 Updates information about an offer. -Refer to the [Providers and Offers] guide to create the initial offer description. - -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). ## Syntax -``` -./spctl offers update - [--path ] - [--config ] +```shell +./spctl offers update + [--path ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | -| `` | Offer ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Type of the offer: `tee` for a compute offer or `value` for a solution, data, or storage offer. | +| `` | Offer ID. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--path ` | Path to the offerInfo JSON file. The default is `./offerInfo.json`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | - -## Offer description file - -The offerInfo JSON file may contain the following objects, arrays, and strings: - -| **String, array,
or object** | **Description** | **Comments** | -| :- |:- |:- | -| `name` | Offer name | | -| `group` | Offer group type | `0` for data and solution offers.
`2` for storage offers (not implemented yet). | -| `offerType` | Offer type | `1` for storage offers (not implemented yet).
`2` for solution offers.
`3` for data offers. | -| `cancelable` | Flag indicating if the offer is cancelable. | `true` or `false` | -| `description` | Offer description | | -| `restrictions` | Object that specifies the offers that should be executed together with the current one|This object contains the `offers` and `types` arrays | -| `offers` | Array of IDs of required offers, including their dependencies | Put each ID in quotation marks and separate them with a comma | -| `types` | Array of types of the required offers, the same codes as in `offerType` | State the type for each offer in `offers`. Put each type in quotation marks and separate them with a comma | -| `metadata` | Any additional information | May be empty or contain information about whether the current offer is a grouping one. For example, `"{\"groupingOffers\":true}"`. | -| `input` | Metadata about permitted inputs (not implemented yet) | Leave empty. | -| `output` | Metadata about permitted outputs (not implemented yet) | Leave empty. | -| `allowedArgs` | Deprecated | Leave empty. | -| `allowedAccounts` | List of accounts allowed to use the current offer | Leave empty to allow all accounts. | -| `argsPublicKey` | Encryption information in a string format:
`algo`: algorithm for encrypting arguments
`encoding`: encoding scheme
`key`: public key | Example:
`"argsPublicKey":`
`"{\"algo\":\"ECIES\",`
`\"encoding\":\"base64\",`
`\"key\":\"\"}"` | -| `resultResource` | Unencrypted content available for downloading, in a string format:
`type`, `storageType`, `credentials` to access content, including `token`, `storageId`, and `filepath` |Currently, only Storj is supported. Use `STORAGE_PROVIDER` for `type` and `STORJ` for `storageType`. `token` should be a Storj access grant with **Read** permission, `storageId` is the bucket name, and `filepath` is the path to the content file in the bucket.

It is mainly used for base image solutions:
`"resultResource":`
`"{\"type\":\"STORAGE_PROVIDER\",`
`\"storageType\":\"STORJ\",`
`\"credentials\":`
`{\"token\":\"\",`
`\"storageId\":\"\"},`
`\"filepath\":\"\"}"` | -| `linkage` | Verification of the solutions linked to the current offer (not implemented yet) | Leave empty. | -| `hash` | Verification of the solutions linked to the current offer (not implemented yet) | Leave empty. | - -An `offerInfo.json` file template with example values for a solution identical to [Image Classification Dataset #1](https://marketplace.superprotocol.com/marketplace?offer=offerId%3D30): +|
**Name**
|
**Description**
| +| :- | :- | +| `--path ` | Path to an offer-info JSON file.
Default: `./offerInfo.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | -```json title="offerInfo.json" -{ - "name":"Image Classification Dataset #1", - "group":"0", - "offerType":"3", - "cancelable":false, - "description":"Dataset with images of various breeds of dogs

This demo dataset is compatible with the Image Classification solution. Refer to the documentation for detailed instructions.", - "restrictions":{ - "offers":[ - "8", - "5" - ], - "types":[ - "2", - "2" - ] - }, - "metadata":"", - "input":"", - "output":"", - "allowedArgs":"", - "allowedAccounts":[], - "argsPublicKey":"", - "resultResource":"", - "linkage":"", - "hash":"" -} -``` +## Offer info file -The file may contain only the fields that need to be updated. For example, to only update the `name` and `description` fields, the file must look like this: +The offer-info JSON file may contain the following objects, arrays, and strings, among others: -```json +| **String, array,
or object** | **Description** | **Comments** | +| :- |:- |:- | +| `name` | Offer name. | | +| `group` | Offer group type. | `0` for data and solution offers.
`2` for storage offers (not implemented yet). | +| `offerType` | Offer type . | `1` for storage offers (not implemented yet).
`2` for solution offers.
`3` for data offers. | +| `cancelable` | Flag indicating if the offer is cancelable. | `true` or `false` | +| `description` | Offer description. | | +| `restrictions` | Object that specifies the offers that should be executed together with the current one. | This object contains the `offers` and `types` arrays | +| `offers` | Array of IDs of required offers, including their dependencies. | Put each ID in quotation marks and separate them with a comma | +| `types` | Array of types of the required offers, the same codes as in `offerType`. | State the type for each offer in `offers`. Put each type in quotation marks and separate them with a comma | +| `allowedAccounts` | List of accounts allowed to use the current offer. | Leave empty to allow all accounts. | +| `argsPublicKey` | Encryption information in a string format:
`algo`: algorithm for encrypting arguments
`encoding`: encoding scheme
`key`: public key. | Template:
`"argsPublicKey":`
`"{\"algo\":\"ECIES\",`
`\"encoding\":\"base64\",`
`\"key\":\"\"}"`

Replace `` with a public key. | +| `resultResource` | Unencrypted content available for downloading, in a string format:
`type`, `storageType`, `credentials` to access content, including `token`, `storageId`, and `filepath`.

It is mainly used for base image solutions.| Template:
`"resultResource":`
`"{\"type\":\"STORAGE_PROVIDER\",`
`\"storageType\":\"STORJ\",`
`\"credentials\":`
`{\"token\":\"\",`
`\"storageId\":\"\"},`
`\"filepath\":\"\"}"`

Use `STORAGE_PROVIDER` for `type` and `STORJ` for `storageType` (currently, only Storj is supported). Replace: `` with a Storj access grant with **Read** permission, `` with the bucket name, and `` with the path to the file in the bucket. | + +Use the [`offers get-info`](/cli/commands/offers/get-info) command to get the offer-info of an existing offer to use as an example. + +The file you prepare should contain only the fields that need to be updated. For example, to only update the `name` and `description` fields, the file should look like this: + +```json title="offerInfo.json" { "name":"New Image Classification", "description":"New improved Image Classification solution" @@ -102,6 +65,6 @@ The file may contain only the fields that need to be updated. For example, to on ## Example -``` -./spctl offers update value 46 --path ./updated-offer-46.json +```shell +./spctl offers update value 346 --path ./updated-offerInfo-346.json ``` \ No newline at end of file diff --git a/docs/cli/commands/orders/cancel.md b/docs/cli/commands/orders/cancel.md index 2ff5296e..29455e98 100644 --- a/docs/cli/commands/orders/cancel.md +++ b/docs/cli/commands/orders/cancel.md @@ -3,33 +3,34 @@ id: "cli-orders-cancel" title: "orders cancel" slug: "/commands/orders/cancel" sidebar_label: "cancel" +sidebar_position: 4 --- Cancels an order. ## Syntax -``` -./spctl orders cancel - [--config ] +```shell +./spctl orders cancel ... + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Order ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Order ID. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl orders cancel 1312 ``` \ No newline at end of file diff --git a/docs/cli/commands/orders/complete.md b/docs/cli/commands/orders/complete.md new file mode 100644 index 00000000..05dcefe1 --- /dev/null +++ b/docs/cli/commands/orders/complete.md @@ -0,0 +1,45 @@ +--- +id: "cli-orders-complete" +title: "orders complete" +slug: "/commands/orders/complete" +sidebar_label: "complete" +sidebar_position: 6 +--- + +Completes an order. + +## Syntax + +```shell +./spctl orders complete ... + --status + [--result ] + [--solution-hash ] + [--config ] + [--help | -h] +``` + +## Arguments + +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Order ID. | + +## Options + +|
**Name**
|
**Description**
| +| :- | :- | +| `--status ` | Order status to set. Available statuses: `done`, `error`, `canceled`. | +| `--result ` | Path to the resource JSON file that should be the suborder's result (for suborders that receive the `done` status). | +| `--solution-hash ` | Prevents the completion of a data suborder if the hash of the order's solution doesn't match. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | + +## Example + +```shell +./spctl orders complete 1312 \ + --status done \ + --result ./resource.json \ + --solution-hash 1e6724cd8622e286fed0740223400571488359c7608055df9f83cbdc18067a0e +``` \ No newline at end of file diff --git a/docs/cli/commands/orders/download-result.md b/docs/cli/commands/orders/download-result.md index a7f07528..9fa5880d 100644 --- a/docs/cli/commands/orders/download-result.md +++ b/docs/cli/commands/orders/download-result.md @@ -3,6 +3,7 @@ id: "cli-orders-download-result" title: "orders download-result" slug: "/commands/orders/download-result" sidebar_label: "download-result" +sidebar_position: 5 --- Downloads the order result—a TAR.GZ archive file containing: @@ -14,29 +15,29 @@ If the order status is `Error`, the result archive will contain a text file with ## Syntax -``` -./spctl orders download-result - [--save-to ] - [--config ] +```shell +./spctl orders download-result + [--save-to ] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Order ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Order ID. | ## Options -| **Name** | **Description** | -| :- | :- | -| `--save-to ` | Path to save the result file. The default is the SPCTL root directory. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--save-to ` | Path to save the result file.
Default: the SPCTL root directory. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl orders download-result 1312 --save-to ./results/1312.tar.gz ``` \ No newline at end of file diff --git a/docs/cli/commands/orders/get-report.md b/docs/cli/commands/orders/get-report.md new file mode 100644 index 00000000..d9d4af39 --- /dev/null +++ b/docs/cli/commands/orders/get-report.md @@ -0,0 +1,38 @@ +--- +id: "cli-orders-get-report" +title: "orders get-report" +slug: "/commands/orders/get-report" +sidebar_label: "get-report" +sidebar_position: 7 +--- + +Downloads the order report. + +## Syntax + +```shell +./spctl orders get-report + [--save-to ] + [--config ] + [--help | -h] +``` + +## Arguments + +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Order ID. | + +## Options + +|
**Name**
|
**Description**
| +| :- | :- | +| `--save-to ` | Path to save the output to a file. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | + +## Example + +```shell +./spctl orders get-report 1312 --save-to report_1312.json +``` \ No newline at end of file diff --git a/docs/cli/commands/orders/get.md b/docs/cli/commands/orders/get.md index 4c20ea14..bb997769 100644 --- a/docs/cli/commands/orders/get.md +++ b/docs/cli/commands/orders/get.md @@ -3,43 +3,44 @@ id: "cli-orders-get" title: "orders get" slug: "/commands/orders/get" sidebar_label: "get" +sidebar_position: 2 --- Displays the information on an order. -This command allows you to check any order, not only yours. The information on all orders is openly available on the blockchain. +You can check any order, not only yours. The information on all orders is openly available on the blockchain. ## Syntax -``` -./spctl orders get - [--fields ,[,...]] +```shell +./spctl orders get + [--fields [,,...]] [--suborders] - [--suborders_fields ,[,...]] - [--config ] + [--suborders_fields [,,...]] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Order ID. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Order ID. | ## Options -|
**Name**
| **Description** | -| :- | :- | -| `--fields ,[,...]` | Fields in the output, separated by commas. Default fields: `offer_name`, `offer_description`, `type`, `status`, `total_deposit`, `total_unspent_deposit`, `modified_date`. Additional fields: `id`, `offer_id`, `consumer_address`, `parent_order_id`, `deposit`, `unspent_deposit`, `cancelable`. | -| `--suborders` | Flag for showing suborders. The default is `false`. | -| `--suborders_fields ,[,...]` | Columns in the output table, separated by commas. Default fields: `id`, `offer_name`, `offer_description`, `type`, `status`, `modified_date`. Additional fields: `cancelable`, `actual_cost`. Use together with `--suborders true`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--fields [,,...]` | Fields in the output, separated by commas. Default fields: `offer_name`, `offer_description`, `type`, `status`, `total_deposit`, `total_unspent_deposit`, `modified_date`. Additional fields: `id`, `offer_id`, `consumer_address`, `parent_order_id`, `deposit`, `unspent_deposit`, `cancelable`. | +| `--suborders` | Flag for showing suborders.
Default: `false`. | +| `--suborders_fields [,,...]` | Columns in the output table, separated by commas. Default fields: `id`, `offer_name`, `offer_description`, `type`, `status`, `modified_date`. Additional fields: `cancelable`, `actual_cost`. Use together with `--suborders true`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl orders get 3770 \ +```shell +./spctl orders get 1312 \ --suborders true \ --suborders_fields id,offer_name ``` \ No newline at end of file diff --git a/docs/cli/commands/orders/index.md b/docs/cli/commands/orders/index.md index 5935bd68..2201d9ab 100644 --- a/docs/cli/commands/orders/index.md +++ b/docs/cli/commands/orders/index.md @@ -2,18 +2,20 @@ id: "cli-orders" title: "orders" slug: "/commands/orders" -sidebar_position: 5 +sidebar_position: 4 --- -This group contains commands to track and manage orders. Note that [Marketplace web app](https://marketplace.superprotocol.com/marketplace) can be more convenient to use than most of the commands in this group. +This group contains commands to track and manage orders. Note that [Marketplace web app](https://marketplace.superprotocol.com/marketplace) may be more convenient to use than most of the commands in this group. ## Commands -| **Command** | **Description** | -| :- | :- | -| [orders cancel](/cli/commands/orders/cancel) | Cancels an order. | -| [orders download-result](/cli/commands/orders/download-result) | Downloads the order result. | -| [orders get](/cli/commands/orders/get) | Displays information on an order. | -| [orders list](/cli/commands/orders/list) | Lists orders. | -| [orders replenish-deposit](/cli/commands/orders/replenish-deposit) | Replenishes the order deposit. | \ No newline at end of file +|
**Command**
|
**Description**
| +| :- | :- | +| [orders list](/cli/commands/orders/list) | Lists orders. | +| [orders get](/cli/commands/orders/get) | Displays information on an order. | +| [orders replenish-deposit](/cli/commands/orders/replenish-deposit) | Replenishes the order deposit. | +| [orders cancel](/cli/commands/orders/cancel) | Cancels an order. | +| [orders download-result](/cli/commands/orders/download-result) | Downloads the order result. | +| [orders complete](/cli/commands/orders/complete) | Completes an order. | +| [orders get-report](/cli/commands/orders/get-report) | Downloads the order report. | \ No newline at end of file diff --git a/docs/cli/commands/orders/list.md b/docs/cli/commands/orders/list.md index edc0e4b3..681f2ab8 100644 --- a/docs/cli/commands/orders/list.md +++ b/docs/cli/commands/orders/list.md @@ -3,41 +3,48 @@ id: "cli-orders-list" title: "orders list" slug: "/commands/orders/list" sidebar_label: "list" +sidebar_position: 1 --- Lists orders stored on the blockchain. -This command displays a list of all orders and suborders, unless the `--my-account true` option is specified. +This command displays a list of all orders and suborders, unless the `--my-account` flag is set. ## Syntax -``` +```shell ./spctl orders list - [--fields ,[,...]] + [--fields [,,...]] [--my-account] [--type {tee | storage | solution | data}] - [--save-to ] - [--limit ] - [--cursor ] - [--config ] + [--status ] + [--save-to ] + [--limit ] + [--cursor ] + [--config ] [--help | -h] ``` ## Options -|
**Name**
| **Description** | -| :- | :- | -| `--fields ,[,...]` | Columns in the output table, separated by commas. Default fields: `id`, `offer_name`, `status`. Additional fields: `offer_description`, `type`, `offer_id`, `consumer_address`, `parent_order_id`, `total_deposit`, `total_unspent_deposit`, `deposit`, `unspent_deposit`, `cancelable`, `sub_orders_count`, `modified_date`. | -| `--my-account` | Flag for showing the orders created by the account specified in the config file. The default is `false`. | -| `--type {tee │ storage │ solution │ data}` | Filter to only show orders of the specified type. | -| `--save-to ` | Path to save the output to the file. | -| `--limit ` | Number of records to display. The default is `10`. | -| `--cursor ` | Cursor for pagination. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--fields [,,...]` | Columns in the output table, separated by commas. Default fields: `id`, `offer_name`, `status`. Additional fields: `offer_description`, `type`, `offer_id`, `consumer_address`, `parent_order_id`, `total_deposit`, `total_unspent_deposit`, `deposit`, `unspent_deposit`, `cancelable`, `sub_orders_count`, `modified_date`. | +| `--my-account` | Flag for showing the orders created by the account specified in the config file.
Default: `false`. | +| `--type {tee \| storage \| solution \| data}` | Filter to only show orders of the specified type. | +| `--status ` | Filter to only show orders with the specified statuses, separated by comma. Available statuses: `new`, `processing`, `canceling`, `canceled`, `done`, `error`, `blocked`, `suspended`. | +| `--save-to ` | Path to save the output to the file. | +| `--limit ` | Number of records to display.
Default: `10`. | +| `--cursor ` | Cursor for pagination. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl orders list --fields id,offer_name,offer_description --my-account true --type tee +```shell +./spctl orders list \ + --fields id,offer_name,status \ + --my-account \ + --type tee \ + --status new,blocked,processing ``` \ No newline at end of file diff --git a/docs/cli/commands/orders/replenish-deposit.md b/docs/cli/commands/orders/replenish-deposit.md index 5276a445..8343badb 100644 --- a/docs/cli/commands/orders/replenish-deposit.md +++ b/docs/cli/commands/orders/replenish-deposit.md @@ -3,6 +3,7 @@ id: "cli-orders-replenish-deposit" title: "orders replenish-deposit" slug: "/commands/orders/replenish-deposit" sidebar_label: "replenish-deposit" +sidebar_position: 3 --- Replenishes the order deposit. @@ -11,28 +12,28 @@ Certain orders requi ## Syntax -``` -./spctl orders replenish-deposit - [--config ] +```shell +./spctl orders replenish-deposit + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Order ID. | -| `` | Amount of SPPI tokens to deposit. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Order ID. | +| `` | Amount of SPPI tokens to deposit. | ## Option -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl orders replenish-deposit 1312 3 ``` \ No newline at end of file diff --git a/docs/cli/commands/providers/get.md b/docs/cli/commands/providers/get.md index b77611ca..17cb89f6 100644 --- a/docs/cli/commands/providers/get.md +++ b/docs/cli/commands/providers/get.md @@ -3,35 +3,37 @@ id: "cli-providers-get" title: "providers get" slug: "/commands/providers/get" sidebar_label: "get" +sidebar_position: 1 --- Displays the information on a provider using its authority account address. ## Syntax -``` -./spctl providers get - [--fields ,[,...]] - [--config ] +```shell +./spctl providers get + [--fields [,,...]] + [--config ] [--help | -h] ``` ## Arguments -| **Name** | **Description** | -| :- | :- | -| `` | Provider's authority account address. | +|
**Name**
|
**Description**
| +| :- | :- | +| `` | Provider's authority account address. | ## Options -|
**Name**
| **Description** | -| :- | :- | -| `--fields ,[,...]` | Fields in the output, separated by commas. Default fields: `name`, `description`, `authority_account`, `action_account`, `token_receiver`, `metadata`. Additional fields: `address`, `modified_date`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--fields [,,...]` | Fields in the output, separated by commas. Default fields: `name`, `description`, `authority_account`, `action_account`, `token_receiver`, `metadata`. Additional fields: `address`, `modified_date`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl providers get 0xB9f0b77BDC567E453fbAe9fBe3E60Bd503605BAa --fields name,address,description +```shell +./spctl providers get 0xB9f0b77BDC567E453fbAe9fBe3E60Bd503605BAa \ + --fields name,address,description ``` \ No newline at end of file diff --git a/docs/cli/commands/providers/index.md b/docs/cli/commands/providers/index.md index 28080280..d5dc18bf 100644 --- a/docs/cli/commands/providers/index.md +++ b/docs/cli/commands/providers/index.md @@ -2,7 +2,7 @@ id: "cli-providers" title: "providers" slug: "/commands/providers" -sidebar_position: 7 +sidebar_position: 5 --- @@ -10,8 +10,8 @@ This group contains commands to view and update [providers](/fundamentals/offers ## Commands -| **Command** | **Description** | -| :- | :- | -| [providers get](/cli/commands/providers/get) | Displays information on a provider using its authority account address. | -| [providers update](/cli/commands/providers/update) | Updates the current provider information. | -| [providers list](/cli/commands/providers/list) | Lists all providers. | \ No newline at end of file +|
**Command**
|
**Description**
| +| :- | :- | +| [providers get](/cli/commands/providers/get) | Displays information on a provider using its authority account address. | +| [providers update](/cli/commands/providers/update) | Updates the current provider information. | +| [providers list](/cli/commands/providers/list) | Lists all providers. | \ No newline at end of file diff --git a/docs/cli/commands/providers/list.md b/docs/cli/commands/providers/list.md index 5a9320da..7899af4f 100644 --- a/docs/cli/commands/providers/list.md +++ b/docs/cli/commands/providers/list.md @@ -3,31 +3,35 @@ id: "cli-providers-list" title: "providers list" slug: "/commands/providers/list" sidebar_label: "list" +sidebar_position: 2 --- Lists all registered providers. ## Syntax -``` +```shell ./spctl providers list - [--fields ,[,...]] - [--config ] + [--fields [,,...]] + [--limit ] + [--cursor ] + [--config ] [--help | -h] ``` ## Options -|
**Name**
| **Description** | -| :- | :- | -| `--fields ,[,...]`| Columns in the output table, separated by commas. Default fields: `address`, `name`. Additional fields: `description`, `authority_account`, `action_account`, `token_receiver`, `modified_date`, `metadata`. | -| `--limit ` | Number of records to display. The default is `10`. | -| `--cursor ` | Cursor for pagination. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--fields [,,...]` | Columns in the output table, separated by commas. Default fields: `address`, `name`. Additional fields: `description`, `authority_account`, `action_account`, `token_receiver`, `modified_date`, `metadata`. | +| `--limit ` | Number of records to display.
Default: `10`. | +| `--cursor ` | Cursor for pagination. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` -./spctl providers list --fields name,description,authority_account,action_account +```shell +./spctl providers list \ + --fields name,description,authority_account,action_account ``` \ No newline at end of file diff --git a/docs/cli/commands/providers/update.md b/docs/cli/commands/providers/update.md index 5bfd6d50..bc5d3f92 100644 --- a/docs/cli/commands/providers/update.md +++ b/docs/cli/commands/providers/update.md @@ -3,49 +3,48 @@ id: "cli-providers-update" title: "providers update" slug: "/commands/providers/update" sidebar_label: "update" +sidebar_position: 3 --- Updates information about a provider. -**Important:** This command requires SPCTL with a [provider configuration file](/cli/#configure-spctl-for-providers). +**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers). ## Syntax -``` +```shell ./spctl providers update - [--path ] - [--config ] + [--path ] + [--config ] [--help | -h] ``` ## Options -| **Name** | **Description** | -| :- | :- | -| `--path ` | Path to the provider info JSON file. The default is `./provider.json`. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--path ` | Path to the provider info JSON file.
Default: `./provider.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Provider info file The provider info JSON file must contain the following keys: -| **Key** | **Description** | -| :- | :- | -| `name` | Provider name. | -| `description` | Description of services provided by the provider. | -| `tokenReceiver` | Token receiver account address. | -| `actionAccount` | Action account address. | -| `metadata` | Additional information about the provider. | - -The `description` and `metadata` may be empty. All other strings require values. +|
**Key**
|
**Description**
| +| :- | :- | +| `name` | Provider name. | +| `description` | (optional) Description of services provided by the provider. | +| `tokenReceiver` | Token receiver account address. | +| `actionAccount` | Action account address. | +| `metadata` | (optional) Additional information about the provider. | Template with example values: -```json title="providerInfo.json" +```json title="provider.json" { - "name": "Data Provider", - "description": "Various data for modeling", + "name": "AI Model Provider", + "description": "Various AI models", "tokenReceiver": "0xB9f0bB77DbeA9fBeC563E60Bd7E453f503605BAa", "actionAccount": "0xfe9CB4557639a3aB7892ab7F0A994Eed89477120", "metadata": "" @@ -54,6 +53,6 @@ Template with example values: ## Example -``` -./spctl providers update --path ./updated-provider.json +```shell +./spctl providers update --path ./provider.json ``` \ No newline at end of file diff --git a/docs/cli/commands/quotes/index.md b/docs/cli/commands/quotes/index.md deleted file mode 100644 index c34e22e7..00000000 --- a/docs/cli/commands/quotes/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -id: "cli-quotes" -title: "quotes" -slug: "/commands/quotes" -sidebar_position: 9 - ---- - -This group contains a single command to verify the authenticity and integrity of a Trusted Execution Environment by examining its quote. - -## Command - -| **Command** | **Description** | -| :- | :- | -| [quotes validate](/cli/commands/quotes/validate) | Checks the confidentiality of a domain. | \ No newline at end of file diff --git a/docs/cli/commands/quotes/validate.md b/docs/cli/commands/quotes/validate.md deleted file mode 100644 index ac1e0f77..00000000 --- a/docs/cli/commands/quotes/validate.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: "cli-quotes-validate" -title: "quotes validate" -slug: "/commands/quotes/validate" -sidebar_label: "validate" ---- - -Checks if the domain content runs in a Trusted Execution Environment. The command also displays if the domain content is an offer. - -## Syntax - -``` -./spctl quotes validate - [--config ] - [--help | -h] -``` - -## Arguments - -| **Name** | **Description** | -| :- | :- | -| `` | URL of the domain to check. | - -## Options - -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | - -## Example - -``` -./spctl quotes validate https://bbs-tdr-bren.superprotocol.io -``` \ No newline at end of file diff --git a/docs/cli/commands/solutions/generate-key.md b/docs/cli/commands/solutions/generate-key.md deleted file mode 100644 index 9213e53b..00000000 --- a/docs/cli/commands/solutions/generate-key.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: "cli-solutions-generate-key" -title: "solutions generate-key" -slug: "/commands/solutions/generate-key" -sidebar_label: "generate-key" ---- - -Generates a signing key necessary to prepare a solution. - -Docker needs this key to [pack a solution](/cli/commands/solutions/prepare) into a container. - -## Syntax - -``` -./spctl solutions generate-key - [--config ] - [--help | -h] -``` - -## Arguments - -| **Name** | **Description** | -| :- | :- | -| `` | Path to save the generated key file. | - -## Option - -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | - -## Example - -``` -./spctl solutions generate-key ./new-key -``` \ No newline at end of file diff --git a/docs/cli/commands/solutions/index.md b/docs/cli/commands/solutions/index.md deleted file mode 100644 index 5ab743d6..00000000 --- a/docs/cli/commands/solutions/index.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: "cli-solutions" -title: "solutions" -slug: "/commands/solutions" -sidebar_position: 2 - ---- - -This group contains commands to prepare a solution for deployment on Super Protocol and generate a key for signing a Docker container with a solution. - -## Commands - -| **Command** | **Description** | -| :- | :- | -| [solutions generate-key](/cli/commands/solutions/generate-key) | Generates a solution signing key. | -| [solutions prepare](/cli/commands/solutions/prepare) | Prepares a solution for deployment. | \ No newline at end of file diff --git a/docs/cli/commands/solutions/prepare.md b/docs/cli/commands/solutions/prepare.md deleted file mode 100644 index aea8efb3..00000000 --- a/docs/cli/commands/solutions/prepare.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -id: "cli-solutions-prepare" -title: "solutions prepare" -slug: "/commands/solutions/prepare" -sidebar_label: "prepare" ---- - -Packs and signs a solution with [Gramine](https://gramineproject.io/) and writes a [manifest](https://gramine.readthedocs.io/en/stable/manifest-syntax.html). - -This allows the execution of the "graminized" solution code inside a Trusted Execution Environment. When the solution is prepared and packed, you can [upload](/cli/commands/files/upload) the resulting archive to a distributed storage to use the solution in orders. - -The input of the command is the following: - -- Directory with the solution and all its dependencies -- Signing key file generated by the [solutions generate-key](/cli/commands/solutions/generate-key) command -- Node.js or Python base image downloaded from their respective offers using the [`offers download-content`](/cli/commands/offers/download-content) command: - - Python Base Image: `./spctl offers download-content 12` - - Node.js Base Image: `./spctl offers download-content 13` - -The output of the command: - -- TAR.GZ archive file with graminized solution and dependencies. -- JSON file with essential metadata. - -Note that the base image is graminized but not included in the output archive file and must be added to the order separately. - -## Syntax - -``` -./spctl solutions prepare - [--base-image-path ] - [--metadata ] - [--pack-solution ] - [--write-default-manifest] - [--env [--env ...]] - [--hash-algo ] - [--sgx-max-threads ] - [--sgx-enclave-size ] - [--sgx-loader-internal-size ] - [--sgx-stack-size ] - [--config ] - [--help | -h] -``` - -## Arguments - -| **Name** | **Description** | -| :- | :- | -| `` | Path to the solution directory. | -| `` | Path to the signing key file. | - -## Options - -|
**Name**
| **Description** | -| :- | :- | -| `--base-image-path ` | Path to the base image file. | -| `--metadata ` | Path to save the resulting metadata file (hash and MrEnclave). The default is `./metadata.json`. | -| `--pack-solution ` | Path to save the resulting TAR.GZ archive file. | -| `--write-default-manifest` | Write a default manifest for solutions with empty MrEnclave. The default is `false`. | -| `--env ` | Environment variable to set into solution manifest. You can use this option multiple times. | -| `--hash-algo ` | Hash calculation algorithm for the solution. The default is `sha256`. | -| `--sgx-max-threads ` | Number of maximum threads, a Gramine 1.4 option. | -| `--sgx-enclave-size ` | Entire enclave size, must be a power of 2. Append the unit M (MiB) or G (GiB) to the value. For example, `16G` means 16 GiB.| -| `--sgx-stack-size ` | Size of the enclave thread stack. Append the unit K (KiB), M (MiB), or G (GiB) to the value. For example, `1M` means 1 MiB.| -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | - -## Example - -``` -./spctl solutions prepare ./my-solution/run ./my-solution/signing-key \ - --base-image-path ./base-solution-image.tar.gz -``` \ No newline at end of file diff --git a/docs/cli/commands/syntax.md b/docs/cli/commands/syntax.md index f81e14cb..6d71110d 100644 --- a/docs/cli/commands/syntax.md +++ b/docs/cli/commands/syntax.md @@ -8,25 +8,27 @@ sidebar_position: 1 Command format: ``` -./spctl +./spctl ``` _Command groups_ contain functionally related commands. See the [full list of command groups](/cli/commands). _Commands_ perform a specific function, like placing an order or showing the list of providers. -For example, the [`tokens`](/cli/commands/tokens) command group includes the following commands: +For example, the [`files`](/cli/commands/files) command group includes the following commands: -- [`balance`](/cli/commands/tokens/balance): Checks the balance. -- [`request`](/cli/commands/tokens/request): Requests testnet tokens. +- [`upload`](/cli/commands/files/upload) +- [`calculate-hash`](/cli/commands/files/calculate-hash) +- [`download`](/cli/commands/files/download) +- [`delete`](/cli/commands/files/delete) _Options_ modify the command behavior and are prefixed by double hyphen `--`; for example, `--help`. Options can be mandatory or optional. -_Arguments_ provide values for commands and options. Angle brackets `< >` indicate argument placeholders in the command syntax. When executing a command, replace placeholders, including the brackets, with values. For example, replace `` with `27` for [ComfyUI (GPU)](https://marketplace.superprotocol.com/marketplace?offer=offerId%3D27). +_Arguments_ provide values for commands and options. Angle brackets `< >` and upper case indicate argument placeholders in the command syntax. When executing a command, **replace placeholders, including the brackets**, with values. Command syntax may also contain the following special characters: -- Square brackets `[ ]` indicate optional arguments and options. +- Square brackets `[ ]` indicate an optional argument or option. - Curly brackets `{ }` indicate a required choice between two or more options or arguments. - A vertical bar `|` separates mutually exclusive options or arguments you must choose from. - An ellipsis `...` indicates you may use the preceding option or argument multiple times. @@ -38,18 +40,18 @@ Never include these special characters in the final command. The following is a mandatory option `--solution` of the [`workflows create`](/cli/commands/workflows/create) command: ``` ---solution {,[] | } +--solution {[,] | } ``` -The format `{,[] | }` requires you to choose one of the following: +The format `{[,] | }` requires you to choose one of the following: -- `,[]`: a mandatory argument `` and an optional argument ``, separated by a comma. -- ``: a mandatory argument. +- `[,]`: a mandatory argument `` and an optional argument ``, separated by a comma. +- ``: a mandatory argument. -So, the final format of this option must be one of the following: +So, the final format of this option should be one of the following: -- `--solution `. For example, `--solution 26`. -- `--solution ,`. For example, `--solution 26,25`. -- `--solution `. For example, `--solution ./tgwui-cpu.resource.json`. +- `--solution `. For example, `--solution 26`. +- `--solution ,`. For example, `--solution 26,25`. +- `--solution `. For example, `--solution ./solution.resource.json`. Read the descriptions of arguments and options and refer to the examples for more information. If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new). \ No newline at end of file diff --git a/docs/cli/commands/tokens/balance.md b/docs/cli/commands/tokens/balance.md index 4181a48c..4c7990c0 100644 --- a/docs/cli/commands/tokens/balance.md +++ b/docs/cli/commands/tokens/balance.md @@ -9,21 +9,21 @@ Displays the balance of SPPI and BNB tokens in your wallet. ## Syntax -``` +```shell ./spctl tokens balance - [--config ] + [--config ] [--help | -h] ``` ## Option -| **Name** | **Description** | -| :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | +|
**Name**
|
**Description**
| +| :- | :- | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | +| `--help`, `-h` | Help for the command. | ## Example -``` +```shell ./spctl tokens balance --config ./config-provider.json ``` \ No newline at end of file diff --git a/docs/cli/commands/tokens/index.md b/docs/cli/commands/tokens/index.md index 803ecc4f..2835e1d5 100644 --- a/docs/cli/commands/tokens/index.md +++ b/docs/cli/commands/tokens/index.md @@ -3,7 +3,6 @@ id: "cli-tokens" title: "tokens" slug: "/commands/tokens" sidebar_position: 1 - --- This group contains commands to manage SPPI and BNB tokens. @@ -12,7 +11,6 @@ SPPI tokens are necessary to pay for ] - [--help | -h] -``` - -## Options - -| **Name** | **Description** | -| :- | :- | -| `--tee` | Request for SPPI tokens. | -| `--bnb` | Request for BNB tokens. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | - -## Example - -``` -./spctl tokens request --tee -``` \ No newline at end of file diff --git a/docs/cli/commands/workflows/create.md b/docs/cli/commands/workflows/create.md index e3ccd4d9..50064103 100644 --- a/docs/cli/commands/workflows/create.md +++ b/docs/cli/commands/workflows/create.md @@ -3,56 +3,69 @@ id: "cli-workflows-create" title: "workflows create" slug: "/commands/workflows/create" sidebar_label: "create" +sidebar_position: 1 --- Creates a main compute order and necessary suborders: solution, data, and storage. The output of the command contains the order ID necessary to track and manage the order with the [`orders`](/cli/commands/orders) commands or in the [Marketplace web app](https://marketplace.superprotocol.com/marketplace). -For solutions and data, you can add to an order either a Marketplace offer or [uploaded files](/cli/commands/files/upload). Refer to the [fundamentals](/fundamentals) to understand the logic of the Super Protocol order creation process. +For solutions and data, you can add to an order either a Marketplace offer or [uploaded files](/cli/commands/files/upload). Refer to the [fundamentals](/fundamentals) to understand the logic of the Super Protocol order creation process. ## Syntax -``` +```shell ./spctl workflows create - --solution {,[] | } [--solution ...] - --storage ,[] - [--data {,[] | }] [--data ...] - [--solution-configuration ] - [--tee ,[]] - [--tee-slot-count ] - [--tee-options [ ...]] - [--tee-options-count [ ...]] - [--deposit ] - [--min-rent-minutes ] - [--config ] + --tee [,] + [--tee-slot-count ] + [--tee-options [ ...]] + [--tee-options-count [ ...]] + --solution {[,] | } + [--solution-configuration ] + [--solution-hash ] + [--data {[,] | } [--data ...]] + [--deposit ] + [--min-rent-minutes ] + [--config ] [--help | -h] ``` ## Options -|
**Name**
| **Description** | -| :- | :- | -| `--solution {,[] │ }` | Solution you are adding to the order:

• For a Marketplace offer, state the solution offer ID and the solution requirement slot ID (optional), separated by a comma. If the slot is not specified, it will be selected automatically.
• For an [uploaded](/cli/commands/files/upload) solution, state the path to the solution resource JSON file.

You can use this option multiple times. | -| `--storage ,[]` | Storage offer you are adding to the order. State the storage offer ID and the storage requirement slot ID (optional), separated by a comma. If the requirement slot is not specified, it will be selected automatically. | -| `--data {,[] │ }` | Data you are adding to the order:

• For a Marketplace offer, state the data offer ID and the data requirement slot ID (optional), separated by a comma. If the requirement slot is not specified, it will be selected automatically.
• For [uploaded](/cli/commands/files/upload) data, state the path to the data resource JSON file.

You can use this option multiple times.

Although this option is technically not mandatory, most solutions require data. | -| `--solution-configuration ` | A solution configuration JSON file. | -| `--tee ,[]` | Compute offer you are adding to the order. State the compute offer ID and, optionally, the [configuration slot](/fundamentals/slots#configuration) ID, separated by a comma. If the configuration slot is not specified, it will be selected automatically.

If you do not use this option, the compute offer and its configuration will be selected automatically. | -| `--tee-slot-count ` | Configuration slot increments—how many times the selected slot is applied. Use this option together with `--tee`.

If you do not use this option, the increments will be calculated automatically. | -| `--tee-options [ ...]` | IDs of [configuration options](/fundamentals/slots#configuration) separated by spaces. Use `--tee-options` together with `--tee`.

If you do not use `--tee-options`, configuration options will be selected automatically. | -| `--tee-options-count [ ...]` | Increments for each configuration option separated by spaces. Use `--tee-options-count` together with `--tee` and `--tee-options`.

If you do not use `--tee-options-count`, increments will be calculated automatically. | -| `--deposit ` | [Deposit](/fundamentals/orders#usage-scenarios) in SPPI tokens. The default is the minimum required deposit. | -| `--min-rent-minutes ` | Compute [lease time](/fundamentals/orders#usage-scenarios) in minutes. Using this option will increase the required deposit. The default is the minimum required time. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | -| `--help`, `-h` | Help for the command. | - -## Example +|
**Name**
|
**Description**
| +| :- | :- | +| `--tee [,]` | Compute offer you are adding to the order. State the compute offer ID and, optionally, the [configuration slot](/fundamentals/slots#configuration) ID, separated by a comma. If the configuration slot is not specified, it will be selected automatically.

If you do not use this option, the compute offer and its configuration will be selected automatically. | +| `--tee-slot-count ` | Configuration slot increments—how many times the selected slot is applied. Use this option together with `--tee`.

If you do not use this option, the increments will be calculated automatically. | +| `--tee-options