Skip to main content

Configure SPCTL

SPCTL—Super Protocol Control—is a versatile tool to access the Marketplace CLI. With this tool, you can create and manage orders, offers, providers, keys, files, and more.

Download SPCTL

Open a terminal in the directory where you want to place SPCTL for Linux and run the following command:

curl -L https://github.com/Super-Protocol/ctl/releases/latest/download/spctl-linux-x64 -o spctl
chmod +x ./spctl

You can also download and install SPCTL manually from the Super Protocol GitHub repository.

Configure SPCTL for users

You can configure SPCTL using the ./spctl setup command or by manually creating a configuration file.

  1. Execute the ./spctl setup command to initiate the setup dialog.

  2. Enter the following Access Token when prompted:

eyJhbGciOiJFUzI1NiJ9.eyJhZGRyZXNzIjoiMHhBN0E5NjQ4ZGE2QTg5QjBhNzFhNGMwRDQ2Y2FENDAwMDU3ODI3NGEyIiwiaWF0IjoxNjc5OTk4OTQyLCJleHAiOjE3NDMxMTQxNDJ9.x2lx90D733mToYYdOWhh4hhXn3YowFW4JxFjDFtI7helgp2uqekDHFgekT5yjbBWeHTzRap7SHbDC3VvMIDe0g
  1. Enter a private key to your testnet EVM wallet when prompted.

  2. Answer No when promted about a Storj bucket. You can configure Storj and provide this information later or skip this step entirely.

When done, SPCTL creates config.json in the SPCTL root directory. If you need to update your account information, execute ./spctl setup again or modify config.json manually in a text editor.

Configure SPCTL for providers

This section is for offer providers only. Skip it if you are a regular user.

Providers need another copy of SPCTL configured for their accounts to manage offers.

If you registered a provider using Provider Tools, you should have a configuration file created automatically in the Provider Tools directory. Its name looks similar to the following:

spctl-config-0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAb.json

Where 0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAb is your Authority Account wallet address.

Use the --config option with SPCTL commands to manage your provider and orders. For example:

./spctl orders list --my-account --type tee --config spctl-config-0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAa.json

Alternatively, rename this file to config.json so SPCTL can recognize it as its configuration file. Copy or download the SPCTL binary to the Provider Tools directory.

Set up Storj access (optional)

You can use a Marketplace storage offer in the files upload command instead of configuring Storj. However, for additional control, set up and use your storage.

  1. Register a Storj account if you do not have one yet.
note

If you use a free Storj account, your files will become unavailable after the end of the trial period.

  1. Create a bucket for your encrypted solutions and data. Refer to the Storj documentation for guidance.

  2. Create two access grants for this bucket. One should provide Full permission (Read, List, Write, Delete), and the other one Read permission. Refer to the Storj guide to generate access grants.

  3. Open SPCTL's config.json in a text editor and provide values to the following key:

KeyDescription
"bucket"Name of a Storj bucket.
"writeAccessToken"Storj access grant with Full permission (Read, List, Write, Delete) for this bucket.
"readAccessToken"Storj access grant with Read permission for this bucket.

Support

If you have any issues or questions, contact Super Protocol on Discord. The Community Managers will be happy to help you.