Worksteps

Overview

A workstep is a prototype of one stepwise state transition contained in a Workflow. A Workstep contains a Prover that ingests data passed to the Workstep and outputs a zero-knowledge proof that can be used to verify synchronization of data amongst Workgroup participants.

Application

Worksteps are useful for defining the real-world activities or operations to be used as synchronization check-points in a Workflow. They provide context for the data required to instantiate, populate and execute a zero-knowledge Prover as it relates to a corresponding business process.

When used in series, a verified claim from a previously derived proof can be used as input for a subsequent Workstep to ensure that a Workflow cannot be completed if all participants are not in sync. As additional worksteps are completed and a Workflow is completed, the proof derived from the exit-workstep provides verifiable proof of synchronization amongst all participants.

Fundamentals

Prover

A Prover is a zero knowledge circuit that generates a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true while the prover avoids conveying any additional information apart from the fact that the statement is indeed true. To learn more about provers, see Provide Privacy.

Prime Workstep

The prime-workstep is the leading workstep in a workflow. The trigger defined in the prime Workstep instantiates a WorkflowInstance and all subsequent WorkstepInstance objects.

Exit Workstep

The exit-workstep is the final Workstep included in a Workflow. Once executed as a WorkstepInstance, it outputs a recursive proof encompassing all previous WorkstepInstanc proofs. The proof resulting from the execution exit-workstep must always be published to a network.

A WorkstepInstance is a run-time execution of a deployed Workstep. All WorkstepInstance executions included in a WorkflowInstance are spawned when the conditions specified in the prime-workstep are met. A WorkstepInstance shares the same schema as a Workstep and is distinguishable by the presence of a value in the workstep_id field.

Workstep Lifecycle

Status

Definition

draft

undeployed Workstep

pending_deployment

Workstep is currently being provisioned

deployed

Workstep has been provisioned and is available for spawning of WorkstepInstance

deprecated

Workstep has been removed from deployment and can no longer spawn WorkstepInstance executions

Using Worksteps

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

  • destination system of record data structure is known

  • originating system of record data structure is known

  • a Workflow has been created

Workstep 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

participants

array

list of Participant objects; indicates participants to take part in Workstep

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; null value indicates record is Workstep

API Requests

List Worksteps

Returns a list of all Workstep objects in the authorized scope

List Worksteps

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

Returns a list of all Workstep objects in the authorized scope

Query Parameters

NameTypeDescription

filter_prototypes

boolean

when true, prototypes (worksteps) are removed from the response

filter_instances

boolean

when true, instances (workstep instances) are removed from the response

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
    }
]

Create Workstep

Creates a Workstep. The cardinality of a Workstep is calculated by the service, as determined by the order of creation.

Create a Workstep

POST https://baseline.provide.services/api/v1/workflow/:id/

Creates a Workstep within a specified Workflow. Workflow must be in draft status in order to accept new worksteps

Path Parameters

NameTypeDescription

id*

uuid

id of parent Workflow

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped for Organization

Request Body

NameTypeDescription

name*

string

name of Workstep

desciption

string

description of Workstep

status

string

current status of Workstep. Should be draft upon creation

require_finality

boolean

when true, workstep will generate tokenized output to be written to a Network specified in a Workgroup.

The terminal Workstep in a Workflow must be set to true

metadata*

object

arbitrary data containing a Prover object

{
    "name": "{{$randomWord}}",
    "status": "draft",
    "require_finality": true,
    "metadata": {
        "prover": {
            "identifier": "cubic",
            "name": "{{$randomWord}}",
            "provider": "gnark",
            "proving_scheme": "groth16",
            "curve": "BN254"
        },
    "description": "{{$randomWords}}"
    }
}

Get Workstep Details

Retrieves detailed information for a specified Workstep

Get Workstep Details

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

Retrieves details for a specified Workstep

Path Parameters

NameTypeDescription

id*

string

id of Workflow containing the desired Workstep

workstep_id*

string

id of target Workstep

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped for an Organization

{
    "id": "935f700d-d286-446c-9f34-759e8185c0a5",
    "created_at": "2021-11-27T05:57:32.521359958Z",
    "name": "test111",
    "prover_id": "7884fc67-25fc-462c-8d63-b0950efc5067",
    "require_finality": true,
    "status": "draft",
    "workflow_id": "6e77ddf0-c5a6-4d22-90b8-9626a2b807f9",
    "WorkstepID": null
}

Update Workstep

Updates a specified Workstep

Update a Workstep

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

Creates a Workstep within a specified Workflow. Workflow must be in draft status in order to update included worksteps=

Path Parameters

NameTypeDescription

id*

uuid

id of parent Workflow

workstep_id*

uuid

id of target Workstep

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped for Organization

Request Body

NameTypeDescription

name*

string

name of Workstep

desciption

string

brief description of Workstep

status

string

current status of Workstep. Should be draft upon creation

require_finality

boolean

when true, workstep will generate tokenized output to be written to a Network specified in a Workgroup.

All exit-steps in a Workflow must be set to true

metadata[]*

object

arbitrary data containing a Prover object

{
    "name": "{{$randomWord}}",
    "status": "draft",
    "require_finality": true,
    "metadata": {
        "prover": {
            "identifier": "cubic",
            "name": "{{$randomWord}}",
            "provider": "gnark",
            "proving_scheme": "groth16",
            "curve": "BN254"
        },
    "description": "{{$randomWords}}"
    }
}

Delete Workstep

Deletes a specified Workstep

Delete a Workstep

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

Deletes a Workstep within a specified Workflow. Workflow must be in draft status in order to delete included Workstep

Path Parameters

NameTypeDescription

id*

uuid

id of parent Workflow

workstep_id*

uuid

id of target Workstep

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped for Organization

{
    // Response
}

Last updated