Folding API
The Folding API provides a HTTP interface for external clients to interact with Mainframe (Subnet 25). It enables programmatic submission of protein folding jobs, querying job status, and retrieving results from the network of validators and miners that perform protein folding simulations. It is implemented using FastAPI and integrates with several core components of the subnet system.
Core components
Validator Registry
Maintains a registry of available validators on the network, tracks their status, and provides methods to select validators based on availability and stake.
Subtensor Service
Interfaces with the Bittensor blockchain to synchronize the metagraph and retrieve validator information.
Authentication System
Uses API keys for authentication and rate limiting of requests.
Request Flow
When a client submits a folding job request, the following sequence occurs:

Data Models
The API uses several core data models defined using Pydantic: https://github.com/macrocosm-os/mainframe/blob/61136333/folding_api/schemas.py#L12-L259
Last updated