Socket
Socket
Sign inDemoInstall

@prosopo/cli

Package Overview
Dependencies
16
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @prosopo/cli

CLI for Prosopo Provider


Version published
Weekly downloads
233
increased by54.3%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

Prosopo Provider Command Line Interface

The Provier CLI allows you to set up a Provider instance and begin to serve CAPTCHA challenges to the Prosopo Network. This will allow you to obtain valuable human-labelled image data. As we are currently in beta testing, the CLI is only useable for development purposes.

The Provider CLI is intended to be used from within the Prosopo Provider Container Image. It is not intended to be used directly from the host machine. A bundled version of the CLI is available in the Provider Container Image.

Container Image

Get the Container ID

To execute commands against the running Provider, you must first get the Container ID of the running Provider Container.

```bash
$ PROVIDER_CONTAINER = docker ps -q -f name=docker-provider
```

Execute a command inside the provider container

You can then execute the commands as follows:

```bash
$ docker exec -it $PROVIDER_CONTAINER bash -c "npx provider <command>"
```

Executing Commands in the Container

Register your Provider

You must first register your Provider in the network contract in order to be selected as a CAPTCHA Provider.

$ npx provider provider_register --url https://YOUR_URL --fee 0 --payee Dapp

Fund your Provider

It is necessary to fund your Provider with at least the minimum fee amount in order to serve CAPTCHA challenges. The funds are used to incentivise good behaviour by Providers.

$ npx provider provider_update --value 1000 --address YOUR_ADDRESS

Set a new Dataset

You must load a dataset in to your database in order to provider CAPTCHA challenges. The dataset contains the CAPTCHA challenges that will be served to users. The format for the dataset is defined here and an example dataset can be seen here.

$ npx provider provider_set_data_set --file /path/to/dataset.json

Start the API

Start the API and a begin to serve CAPTCHA challenges.

$ npx provider start

Deregister your Provider

When you no longer wish to be part of the Prosopo Network, you can stop serving CAPTCHA challenges by deregistering.

$ npx provider provider_deregister

List details of a single Provider

$ npx provider provider_details --address PROVIDER_ADDRESS

Get a list of provider accounts from the contract

$ npx provider provider_accounts

View the Provider Version

$ npx provider version

Full CLI Usage

--help output from the CLI.

Usage: cli.js [global options] <command> [options]

Commands:
  cli.js provider_register            Register a Provider
  cli.js provider_update              Update a Provider
  cli.js provider_deregister          Deregister a Provider
  cli.js provider_set_data_set        Add a dataset as a Provider
  cli.js dapp_register                Register a Dapp
  cli.js dapp_update                  Register a Dapp
  cli.js provider_accounts            List all provider accounts
  cli.js dapp_accounts                List all dapp accounts
  cli.js provider_details             List details of a single Provider
  cli.js provider_dataset             Exports a dataset from the provider database
  cli.js dapp_details                 List details of a single Dapp
  cli.js calculate_captcha_solutions  Calculate captcha solutions
  cli.js batch_commit                 Batch commit user solutions to contract
  cli.js version                      Return the version of the software

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --api                                               [boolean] [default: false]

FAQs

Last updated on 24 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc