From 0372ec26ddb035f0626e94245c0944b2ac692a43 Mon Sep 17 00:00:00 2001 From: k3dz0r Date: Wed, 15 Oct 2025 17:54:43 -0300 Subject: [PATCH 1/9] Document structure Marketplace guides moved to Marketplace. Added quick deployment guide. Reviewed all CLI commands except offers, improved table layout. --- docs/cli/commands/files/calculate-hash.md | 36 +++++ docs/cli/commands/files/delete.md | 29 ++-- docs/cli/commands/files/download.md | 30 ++-- docs/cli/commands/files/index.md | 15 +- docs/cli/commands/files/upload.md | 93 ++++------- docs/cli/commands/index.md | 6 +- docs/cli/commands/offers/add-slot.md | 30 ++-- docs/cli/commands/offers/delete-slot.md | 4 +- docs/cli/commands/offers/disable.md | 4 +- docs/cli/commands/offers/download-content.md | 6 +- docs/cli/commands/offers/enable.md | 4 +- docs/cli/commands/offers/get-info.md | 4 +- docs/cli/commands/offers/get-option.md | 4 +- docs/cli/commands/offers/get-slot.md | 6 +- docs/cli/commands/offers/get.md | 4 +- docs/cli/commands/offers/list.md | 16 +- docs/cli/commands/offers/update-slot.md | 6 +- docs/cli/commands/offers/update.md | 12 +- docs/cli/commands/orders/cancel.md | 23 +-- docs/cli/commands/orders/complete.md | 45 ++++++ docs/cli/commands/orders/download-result.md | 27 ++-- docs/cli/commands/orders/get-report.md | 38 +++++ docs/cli/commands/orders/get.md | 37 ++--- docs/cli/commands/orders/index.md | 20 +-- docs/cli/commands/orders/list.md | 41 ++--- docs/cli/commands/orders/replenish-deposit.md | 25 +-- docs/cli/commands/providers/get.md | 27 ++-- docs/cli/commands/providers/index.md | 12 +- docs/cli/commands/providers/list.md | 21 +-- docs/cli/commands/providers/update.md | 41 +++-- docs/cli/commands/quotes/index.md | 15 -- docs/cli/commands/quotes/validate.md | 35 ---- docs/cli/commands/solutions/generate-key.md | 37 ----- docs/cli/commands/solutions/index.md | 16 -- docs/cli/commands/solutions/prepare.md | 73 --------- docs/cli/commands/syntax.md | 16 +- docs/cli/commands/tokens/balance.md | 14 +- docs/cli/commands/tokens/index.md | 8 +- docs/cli/commands/tokens/request.md | 35 ---- docs/cli/commands/workflows/create.md | 78 +++++---- docs/cli/commands/workflows/generate-key.md | 17 +- docs/cli/commands/workflows/index.md | 12 +- docs/cli/quick-guide.md | 151 ++++++++++++++++++ docs/colab/cli.md | 2 +- docs/colab/jupyter.md | 2 +- .../developers/cli_guides/providers_offers.md | 2 +- docs/developers/cli_guides/quick_guide.md | 2 +- .../deployment_guides/blockchain/oracles.md | 2 +- .../deployment_guides/python/solution.md | 4 +- .../deployment_guides/tunnels/manual_run.md | 2 +- docs/developers/index.md | 2 +- .../marketplace_gui/confidentiality.md | 2 +- docs/developers/marketplace_gui/index.md | 3 - .../Guides}/deploy-model.md | 24 +-- .../Guides}/log-in-trustwallet.md | 32 ++-- docs/{guides => marketplace/Guides}/log-in.md | 28 ++-- .../Guides}/prepare-comfyui.md | 6 +- .../Guides}/publish-offer.md | 12 +- .../{guides => marketplace/Guides}/storage.md | 10 +- .../Guides}/troubleshooting.md | 10 +- docs/marketplace/account/index.md | 2 +- docs/marketplace/account/web2.md | 2 +- docs/marketplace/account/web3.md | 2 +- docs/marketplace/all-orders/order.md | 2 +- docs/marketplace/my-offers/index.md | 2 +- docs/marketplace/my-offers/offer-builder.md | 4 +- docusaurus.config.js | 78 ++++----- src/theme/Layout/index.js | 8 +- 68 files changed, 727 insertions(+), 691 deletions(-) create mode 100644 docs/cli/commands/files/calculate-hash.md create mode 100644 docs/cli/commands/orders/complete.md create mode 100644 docs/cli/commands/orders/get-report.md delete mode 100644 docs/cli/commands/quotes/index.md delete mode 100644 docs/cli/commands/quotes/validate.md delete mode 100644 docs/cli/commands/solutions/generate-key.md delete mode 100644 docs/cli/commands/solutions/index.md delete mode 100644 docs/cli/commands/solutions/prepare.md delete mode 100644 docs/cli/commands/tokens/request.md create mode 100644 docs/cli/quick-guide.md rename docs/{guides => marketplace/Guides}/deploy-model.md (71%) rename docs/{guides => marketplace/Guides}/log-in-trustwallet.md (63%) rename docs/{guides => marketplace/Guides}/log-in.md (66%) rename docs/{guides => marketplace/Guides}/prepare-comfyui.md (95%) rename docs/{guides => marketplace/Guides}/publish-offer.md (88%) rename docs/{guides => marketplace/Guides}/storage.md (83%) rename docs/{guides => marketplace/Guides}/troubleshooting.md (88%) 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..1ea1cb79 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..0d97776f 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..06f0f66a 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/upload) | 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..c24125a0 100644 --- a/docs/cli/commands/files/upload.md +++ b/docs/cli/commands/files/upload.md @@ -3,89 +3,62 @@ 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 storage space of up to 20 GB will be 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 file or a directory (with the `--use-addon` option). -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 in storage.
Default: a random string (with no file extension). | +| `--output ` | Path to save the output resource JSON file.
Default: `./resource.json`. | +| `--skip-encryption` | Flag to skip 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` | An option that allows uploading multiple files and directories. It is not recommended yet to use this option when uploading a single TAR.GZ archive.
Use this option with the [`files delete`](/cli/commands/files/delete) and [`files download`](/cli/commands/files/download) commands to manage the data uploaded this way. | +| `--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_2025.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 ./content/ --use-addon --output ./resource-data.json ``` -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..1eadd656 100644 --- a/docs/cli/commands/index.md +++ b/docs/cli/commands/index.md @@ -2,7 +2,7 @@ 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. @@ -12,10 +12,8 @@ This section contains Super Protocol CLI commands. [Install and configure SPCTL] | **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 +| [providers](/cli/commands/providers) | View and manage providers. | \ 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..94a3b48e 100644 --- a/docs/cli/commands/offers/add-slot.md +++ b/docs/cli/commands/offers/add-slot.md @@ -12,28 +12,28 @@ Adds a slot to an - --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,6 @@ A template with example values: ## Example -``` +```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..66cc7eed 100644 --- a/docs/cli/commands/offers/delete-slot.md +++ b/docs/cli/commands/offers/delete-slot.md @@ -18,7 +18,7 @@ Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all s ./spctl offers delete-slot --offer --slot - [--config ] + [--config ] [--help | -h] ``` @@ -34,7 +34,7 @@ Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all s | :- | :- | | `--offer ` | Offer ID. | | `--slot ` | Slot ID. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Example diff --git a/docs/cli/commands/offers/disable.md b/docs/cli/commands/offers/disable.md index b8e46329..9aea38bd 100644 --- a/docs/cli/commands/offers/disable.md +++ b/docs/cli/commands/offers/disable.md @@ -14,7 +14,7 @@ Disables an existing enabled
of ``` ./spctl offers disable - [--config ] + [--config ] [--help | -h] ``` @@ -28,7 +28,7 @@ Disables an existing enabled of | **Name** | **Description** | | :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Example diff --git a/docs/cli/commands/offers/download-content.md b/docs/cli/commands/offers/download-content.md index 9dcf5a10..ebe94f3d 100644 --- a/docs/cli/commands/offers/download-content.md +++ b/docs/cli/commands/offers/download-content.md @@ -15,7 +15,7 @@ The command only works with offers that allow this operation. ``` ./spctl offers download-content [--save-to ] - [--config ] + [--config ] [--help | -h] ``` @@ -29,8 +29,8 @@ The command only works with offers that allow this operation. | **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`. | +| `--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 diff --git a/docs/cli/commands/offers/enable.md b/docs/cli/commands/offers/enable.md index 37510cea..bc0ad036 100644 --- a/docs/cli/commands/offers/enable.md +++ b/docs/cli/commands/offers/enable.md @@ -14,7 +14,7 @@ Enables an existing disabled
of ``` ./spctl offers enable - [--config ] + [--config ] [--help | -h] ``` @@ -28,7 +28,7 @@ Enables an existing disabled of | **Name** |**Description** | | :- | :- | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Example diff --git a/docs/cli/commands/offers/get-info.md b/docs/cli/commands/offers/get-info.md index aa847180..81a3cf8f 100644 --- a/docs/cli/commands/offers/get-info.md +++ b/docs/cli/commands/offers/get-info.md @@ -13,7 +13,7 @@ Displays the information on an
``` ./spctl offers get-info [--save-to ] - [--config ] + [--config ] [--help | -h] ``` @@ -29,7 +29,7 @@ Displays the information on an | **Name** | **Description** | :- | :- | | `--save-to ` | Path to save the output to a file. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Example diff --git a/docs/cli/commands/offers/get-option.md b/docs/cli/commands/offers/get-option.md index 2097992b..2613687e 100644 --- a/docs/cli/commands/offers/get-option.md +++ b/docs/cli/commands/offers/get-option.md @@ -14,7 +14,7 @@ Displays the information on a [configuration option](/fundamentals/slots) of a < ./spctl offers get-option --offer --option - [--config ] + [--config ] [--help | -h] ``` @@ -24,7 +24,7 @@ Displays the information on a [configuration option](/fundamentals/slots) of a < | :- | :- | | `--offer ` | Offer ID. | | `--option ` | Configuration option ID. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Example diff --git a/docs/cli/commands/offers/get-slot.md b/docs/cli/commands/offers/get-slot.md index dd9f6b84..edc07e6a 100644 --- a/docs/cli/commands/offers/get-slot.md +++ b/docs/cli/commands/offers/get-slot.md @@ -17,7 +17,7 @@ Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all t --offer --slot [--save-to ] - [--config ] + [--config ] [--help | -h] ``` @@ -33,8 +33,8 @@ Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all t | :- | :-| | `--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`. | +| `--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 diff --git a/docs/cli/commands/offers/get.md b/docs/cli/commands/offers/get.md index de3d6239..d1c5cb56 100644 --- a/docs/cli/commands/offers/get.md +++ b/docs/cli/commands/offers/get.md @@ -13,7 +13,7 @@ Displays information on an
offe ``` ./spctl offers get [--save-to ] - [--config ] + [--config ] [--help | -h] ``` @@ -29,7 +29,7 @@ Displays information on an offe | **Name** | **Description** | | :- | :- | | `--save-to ` | Path to save the output to a file. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Example diff --git a/docs/cli/commands/offers/list.md b/docs/cli/commands/offers/list.md index 95664b41..745bea52 100644 --- a/docs/cli/commands/offers/list.md +++ b/docs/cli/commands/offers/list.md @@ -12,11 +12,11 @@ Displays a list of available
of ``` ./spctl offers list - [--fields ,[,...]] + [--fields [,,...]] [--ids [ ...]] [--limit ] [--cursor ] - [--config ] + [--config ] [--help | -h] ``` @@ -30,24 +30,24 @@ Displays a list of available of For the `tee` offer type: -|
**Name**
| **Description** | +|
**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`. | +| `--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** | +|
**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`. | +| `--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`. | +| `--limit ` | Number of rows to display.
Default: `10`. | | `--cursor ` | Cursor for pagination. | -| `--config ` | Path to the SPCTL configuration file. The default is `./config.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Examples diff --git a/docs/cli/commands/offers/update-slot.md b/docs/cli/commands/offers/update-slot.md index ccfe0643..4e44eed4 100644 --- a/docs/cli/commands/offers/update-slot.md +++ b/docs/cli/commands/offers/update-slot.md @@ -21,7 +21,7 @@ Refer to the description of the [`offers add-slot`](/cli/commands/offers/add-slo --offer --slot [--path ] - [--config ] + [--config ] [--help | -h] ``` @@ -37,8 +37,8 @@ Refer to the description of the [`offers add-slot`](/cli/commands/offers/add-slo | :- | :- | | `--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`. | +| `--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 diff --git a/docs/cli/commands/offers/update.md b/docs/cli/commands/offers/update.md index 13fb2bb4..6fdb4e06 100644 --- a/docs/cli/commands/offers/update.md +++ b/docs/cli/commands/offers/update.md @@ -17,7 +17,7 @@ Refer to the [Providers and Offers] guide to create the initial offer descriptio ``` ./spctl offers update [--path ] - [--config ] + [--config ] [--help | -h] ``` @@ -32,8 +32,8 @@ Refer to the [Providers and Offers] guide to create the initial offer descriptio | **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`. | +| `--path ` | Path to the offerInfo JSON file.
Default: `./offerInfo.json`. | +| `--config ` | Path to the SPCTL configuration file.
Default: `./config.json`. | | `--help`, `-h` | Help for the command. | ## Offer description file @@ -43,8 +43,8 @@ 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. | +| `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 | @@ -56,7 +56,7 @@ The offerInfo JSON file may contain the following objects, arrays, and strings: | `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\":\"\"}"` | +| `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. | 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..46da6346 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..6b620dd8 100644 --- a/docs/cli/commands/orders/list.md +++ b/docs/cli/commands/orders/list.md @@ -3,41 +3,44 @@ 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 true` flag is specified. ## 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..6d3c6b45 100644 --- a/docs/cli/commands/providers/get.md +++ b/docs/cli/commands/providers/get.md @@ -3,35 +3,36 @@ 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 -``` +```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..a7179c71 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..a2e81c06 100644 --- a/docs/cli/commands/providers/list.md +++ b/docs/cli/commands/providers/list.md @@ -3,6 +3,7 @@ id: "cli-providers-list" title: "providers list" slug: "/commands/providers/list" sidebar_label: "list" +sidebar_position: 2 --- Lists all registered providers. @@ -11,20 +12,22 @@ Lists all registered providers. ``` ./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 diff --git a/docs/cli/commands/providers/update.md b/docs/cli/commands/providers/update.md index 5bfd6d50..462ac3cb 100644 --- a/docs/cli/commands/providers/update.md +++ b/docs/cli/commands/providers/update.md @@ -3,6 +3,7 @@ id: "cli-providers-update" title: "providers update" slug: "/commands/providers/update" sidebar_label: "update" +sidebar_position: 3 --- Updates information about a provider. @@ -11,41 +12,39 @@ Updates information about a provider. ## 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" { - "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-info.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..14b74a67 100644 --- a/docs/cli/commands/syntax.md +++ b/docs/cli/commands/syntax.md @@ -15,10 +15,12 @@ _Command groups_ contain functionally related commands. See the [full list of co _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. @@ -38,15 +40,15 @@ 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 `` 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`. 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..5de5cda7 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..d6e67893 100644 --- a/docs/cli/commands/workflows/create.md +++ b/docs/cli/commands/workflows/create.md @@ -3,56 +3,68 @@ 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