Workstep Instances

Overview

A WorkstepInstance is a a real-time execution of a deployed Workstep. All workstep instances included in a WorkflowInstance are instantiated upon the creation of the WorkflowInstance at the time of prime Workstep triggering. A WorkstepInstance is executed when a triggering event, as defined in the parent Workstep, occurs.

Application

A WorkstepInstance execution is the process that outputs the zero-knowledge proof that is at the heart of all baseline processes. Workstep instances are automatically spawned upon WorkflowInstance generation, as dictated by the parameters defined in the prime-workstep trigger.

A Workstep prototype can spawn n number of WorkstepInstance executions.

Using Workstep Instances

Prerequisites

The Workstep API is intended to function within the context of an Organization acting as a Participant in a Workgroup.

Within this context, it is assumed that:

  • an Organization scoped JWT is available for use

  • Organization is a participant in a Workgroup

  • a Workflow containing at least 1 Workstep has been created and successfully deployed

WorkstepInstance Schema

FieldTypeDescription

cardinality

int

position within sequence of worksteps in parent workflow

created_at

date/time

timestamp of Workstep creation

deployed_at

date/time

timestamp of Workstep deployment

description

string

brief descriptor of Workstep

id

uuid

id of Workstep

metadata

object

arbitrary data pertaining to Workstep; contains prover object

prover_id

uuid

id of prover generated for use in WorkstepInstance execution. When value is non-null, indicates record is WorkstepInstance

require_finality

boolean

when true, resulting proof will be published to a specified network

shield

string

address of target shield contract

status

string

current workstep status

workflow_id

uuid

id of parent Workflow

workstep_id

uuid

id of Workstep used as prototype to spawn WorkstepInstance; non-null value indicates record is WorkstepInstance

API Requests

List Workflow Workstep Instances

Returns a list of WorkstepInstance objects for a specified Workflow

List Workflow Workstep Instances

GET https://baseline.provide.services/api/v1/workflow/:id/worksteps

Returns a list of all WorkstepInstance objects for a specified Workflow in the authorized scope

Path Parameters

NameTypeDescription

id*

uuid

id of targetWorkflow

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped for an Organization

[
    {
        "id": "9868f1e8-2045-4da3-9ffe-cedbff0a24bf",
        "created_at": "2021-12-01T09:12:15.465476Z",
        "name": "Functionality primary Computer New Web",
        "cardinality": 1,
        "deployed_at": "2021-12-01T09:13:36.984749Z",
        "metadata": {
            "prover": {
                "name": "invoice heuristic Djibouti deliverables Franc",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "94bca26c-8df6-400c-bc3e-f889497f68b4",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "4ce7920b-a7c8-4c9b-9eb5-b68d25962458",
        "created_at": "2021-12-01T09:12:17.420175Z",
        "name": "Cambridgeshire Agent systems",
        "cardinality": 2,
        "deployed_at": "2021-12-01T09:13:37.25624Z",
        "metadata": {
            "prover": {
                "name": "Granite application Fork Metal Pass",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "92d873c3-7954-44c1-9cf8-480c7e697af9",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "385266bc-7901-4170-b1b0-ff8dbf77b0a6",
        "created_at": "2021-12-01T09:12:19.594275Z",
        "name": "Michigan Checking",
        "cardinality": 3,
        "deployed_at": "2021-12-01T09:13:37.515836Z",
        "metadata": {
            "prover": {
                "name": "Sausages HDD",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "4c5a05a4-8e2b-4203-87fa-a8c06eb5c07f",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "0bfe4584-30dd-4c4f-9d74-bdb47a13ea6c",
        "created_at": "2021-12-01T09:12:20.837269Z",
        "name": "Tasty Agent Bedfordshire open-source Crossroad",
        "cardinality": 4,
        "deployed_at": "2021-12-01T09:13:37.79689Z",
        "metadata": {
            "prover": {
                "name": "Steel card",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "272d8ac3-1e4d-45cb-971a-e2bd08c94aa7",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "fecc698e-f8d8-4d43-9e26-af71f787301f",
        "created_at": "2021-12-01T09:12:22.130674Z",
        "name": "object-oriented Senior Bahraini Metal alarm",
        "cardinality": 5,
        "deployed_at": "2021-12-01T09:13:38.067412Z",
        "metadata": {
            "prover": {
                "name": "transmitting bypass Right-sized calculating",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "55bba2b4-f9e3-4d0a-9c2a-3a1a3a8fc7f0",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "3e458fc4-2239-4f8b-91b2-5930435cbb27",
        "created_at": "2021-12-01T09:12:23.117238Z",
        "name": "Assistant Berkshire exploit",
        "cardinality": 6,
        "deployed_at": "2021-12-01T09:13:38.319966Z",
        "metadata": {
            "prover": {
                "name": "Investor bluetooth",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "6882738c-9d9e-4b27-b157-2895d34bb442",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "708508f9-b8f8-42c1-b554-bcc7f92744d1",
        "created_at": "2021-12-01T09:12:24.24345Z",
        "name": "pink leading-edge",
        "cardinality": 7,
        "deployed_at": "2021-12-01T09:13:38.580767Z",
        "metadata": {
            "prover": {
                "name": "array Functionality Nigeria",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "ff3147a9-3c2b-4c27-8572-e4d11fdb1976",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "0ace6484-2cda-47e4-a83e-adc234664453",
        "created_at": "2021-12-01T09:12:25.28587Z",
        "name": "Mouse Account Bike",
        "cardinality": 8,
        "deployed_at": "2021-12-01T09:13:38.83844Z",
        "metadata": {
            "prover": {
                "name": "matrix indigo",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "0d1643c9-b484-4dc6-8fa3-8b73d0fe6ea4",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "62b72d23-cc15-421a-93c4-c0dee83ca554",
        "created_at": "2021-12-01T09:12:26.108616Z",
        "name": "sexy green Cyprus Lead",
        "cardinality": 9,
        "deployed_at": "2021-12-01T09:13:39.104925Z",
        "metadata": {
            "prover": {
                "name": "Ireland Frozen Rubber quantify Markets",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "7cbd3b9b-53f9-41b3-bd22-ee9a7309d57c",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "bed689b0-ff91-4574-952b-1511671f3dd2",
        "created_at": "2021-12-01T09:12:27.180664Z",
        "name": "teal Handcrafted California Account",
        "cardinality": 10,
        "deployed_at": "2021-12-01T09:13:39.366694Z",
        "metadata": {
            "prover": {
                "name": "Dollar Generic Enterprise-wide",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "8c25ab12-5d63-47b6-981d-1cf08296ca96",
        "require_finality": false,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    },
    {
        "id": "f7b0cfcd-7771-4c71-9bdc-5685235a79f0",
        "created_at": "2021-12-01T09:13:29.550556Z",
        "name": "Vision-oriented intranet Lead Florida",
        "cardinality": 11,
        "deployed_at": "2021-12-01T09:13:39.62697Z",
        "metadata": {
            "prover": {
                "name": "intuitive Avon Market pixel",
                "identifier": "cubic",
                "provider": "gnark",
                "proving_scheme": "groth16",
                "curve": "BN254"
            }
        },
        "prover_id": "a439e28d-55a3-4538-9143-97b9a36548ed",
        "require_finality": true,
        "status": "deployed",
        "workflow_id": "78fdadee-61a9-493b-be07-dbd3b5881d45",
        "workstep_id": null
    }
]

Execute Workstep Instance

Execute a Workstep Instance

POST https://baseline.provide.services/api/v1/workflows/:id/worksteps/:workstep_id/execute

Executes a specified WorkstepInstance. The execution of a WorkstepInstance requires a witness object containing public and private inputs as they pertain to the target prover. The derivation of public inputs as they relate to private inputs varies based upon prover type and proving_scheme

Path Parameters

NameTypeDescription

id*

uuid

id of parent WorkflowInstance

workstep_id*

uuid

id of target WorkstepInstance

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped for an Organization

Request Body

NameTypeDescription

witness[]*

object

witness object containing the public and private inputs for the Workstep Circuit

Last updated