npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@prosopo/cli

v1.0.2

Published

CLI for Prosopo Provider

Downloads

888

Readme

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]