Developers building PolySwarm participants (Microengines, Ambassadors & Arbiters) need to be familiar with two projects:
polyswarm-client: the PolySwarm "client library" that provides the abstract classes and methods upon which you will build your participant.
polyswarm-clientwill be automatically configured for your participant via
participant-template: template scaffolding around
polyswarm-clientthat we will customize for your participant.
Together, these projects provide you with the tools necessary to stay up to date with the latest PolySwarm features, while offering virtually unlimited flexibility in terms of dictating your participant's behavior.
PolySwarm participants built outside of the
polyswarm-clientecosystem are UNSUPPORTED.
Building an Arbiter is not yet supported by
participant-template is a
cookiecutter project. We'll need to install
cookiecutter in our PolySwarm virtualenv:
pip install cookiecutter
cookiecutter installed, point
cookiecutter to PolySwarm's
cookiecutter will present you with a series of prompts that allow you to customize the template to your participant.
participant-template will present a series of prompts:
participant_type: The type of participant you're building.
platform: The platform on which your participant will operate.
participant_name: Your participant's name.
participant_name_slug: Accepting the default is recommended. A "sluggified" version of your participant's name.
project_slug: Accepting the default is recommended. A "sluggified" version of your participants type + name.
author_org: The name of your organization.
author_org_slug: Accepting the default is recommended. A "sluggified" version or your organization's name.
package_slug: Accepting the default is recommended. A "sluggified" version of your organization's name + your participant's name.
author_name: Your name.
author_email: Your e-mail address.
Once complete, you should have a new directory, named what was set as your
participant-template のみをカスタマイズしています。自分で作成する必要がある項目が少しあります。 Search for
CUSTOMIZE_HERE in your participant's directory to quickly identify all the components that require customization.
participant-template's prompts complete, you're ready to move on to implementing your participant. Use the navigation menu to the left to continue to development instructions for your participant type.