Skip to main content

abstractzkCloudWorker

Abstract class for the zkCloudWorker Used to define the zkCloudWorker methods and properties Should be implemented for by the developer for the zkCloudWorker in the cloud

Index

Constructors

constructor

  • Constructor for the zkCloudWorker class


    Parameters

    • cloud: Cloud

      the cloud instance provided by the zkCloudWorker in the local environment or in the cloud

    Returns zkCloudWorker

Properties

readonlycloud

cloud: Cloud

cloud: the cloud instance

Methods

create

  • create(transaction: string): Promise<undefined | string>
  • Creates a new proof from a transaction


    Parameters

    • transaction: string

      the transaction

    Returns Promise<undefined | string>

    the serialized proof

execute

  • execute(transactions: string[]): Promise<undefined | string>
  • Executes the transactions


    Parameters

    • transactions: string[]

      the transactions, can be empty list

    Returns Promise<undefined | string>

    the result

merge

  • merge(proof1: string, proof2: string): Promise<undefined | string>
  • Merges two proofs


    Parameters

    • proof1: string

      the first proof

    • proof2: string

      the second proof

    Returns Promise<undefined | string>

    the merged proof

processTransactions

task

  • task(): Promise<undefined | string>
  • process the task defined by the developer


    Returns Promise<undefined | string>

    the result