Skip to main content

abstractCloud

Hierarchy

Index

Constructors

constructor

  • new Cloud(params: { args?: string; cache: string; chain: blockchain; developer: string; id: string; isLocalCloud?: boolean; jobId: string; metadata?: string; repo: string; stepId: string; task?: string; taskId: string; userId?: string }): Cloud
  • Constructor for the Cloud class


    Parameters

    • params: { args?: string; cache: string; chain: blockchain; developer: string; id: string; isLocalCloud?: boolean; jobId: string; metadata?: string; repo: string; stepId: string; task?: string; taskId: string; userId?: string }

      the parameters for the Cloud class

    Returns Cloud

Properties

optionalreadonlyargs

args?: string

readonlycache

cache: string

readonlychain

chain: blockchain

readonlydeveloper

developer: string

readonlyid

id: string

readonlyisLocalCloud

isLocalCloud: boolean

readonlyjobId

jobId: string

optionalreadonlymetadata

metadata?: string

readonlyrepo

repo: string

readonlystepId

stepId: string

optionalreadonlytask

task?: string

readonlytaskId

taskId: string

optionalreadonlyuserId

userId?: string

Methods

abstractaddTask

  • addTask(data: { args?: string; maxAttempts?: number; metadata?: string; startTime?: number; task: string; userId?: string }): Promise<string>
  • Abstract method to add the task Used to add the task


    Parameters

    • data: { args?: string; maxAttempts?: number; metadata?: string; startTime?: number; task: string; userId?: string }

      the data

    Returns Promise<string>

    the task id

abstractdecrypt

  • decrypt(params: { context: string; data: string; keyId?: string }): Promise<undefined | string>
  • Abstract method to decrypt the data


    Parameters

    • params: { context: string; data: string; keyId?: string }

    Returns Promise<undefined | string>

abstractdeleteTask

  • deleteTask(taskId: string): Promise<void>
  • Abstract method to delete the task Used to delete the task


    Parameters

    • taskId: string

      the task id

    Returns Promise<void>

abstractdeleteTransaction

  • deleteTransaction(txId: string): Promise<void>
  • Abstract method to delete the transaction Used to delete the transaction


    Parameters

    • txId: string

      the transaction id

    Returns Promise<void>

abstractencrypt

  • encrypt(params: { context: string; data: string; keyId?: string }): Promise<undefined | string>
  • Abstract method to encrypt the data


    Parameters

    • params: { context: string; data: string; keyId?: string }

    Returns Promise<undefined | string>

abstractexecute

  • execute(data: { args?: string; metadata?: string; task: string; transactions: string[]; userId?: string }): Promise<string>
  • Abstract method to execute the transactions Used to execute the transactions


    Parameters

    • data: { args?: string; metadata?: string; task: string; transactions: string[]; userId?: string }

      the data

    Returns Promise<string>

    the result

abstractforceWorkerRestart

  • forceWorkerRestart(): Promise<void>

abstractgetDataByKey

  • getDataByKey(key: string): Promise<undefined | string>
  • Abstract method to get the data by key Used to get the data by key from the cloud storage


    Parameters

    • key: string

      the key

    Returns Promise<undefined | string>

    the value of the key

abstractgetDeployer

  • Abstract method to get the deployer key pair Used to get the public and private keys of the deployer for test networks only Devnet and Zeko are supported


    Returns Promise<undefined | DeployerKeyPair>

    the deployer key pair

abstractgetTransactions

  • Abstract method to get the transactions Used to get the transactions


    Returns Promise<CloudTransaction[]>

    the transactions

abstractjobResult

  • jobResult(jobId: string): Promise<undefined | JobData>
  • Abstract method to get the job result Used to get the job result


    Parameters

    • jobId: string

      the job id

    Returns Promise<undefined | JobData>

    the job result

abstractloadFile

  • loadFile(filename: string): Promise<undefined | Buffer>
  • Abstract method to load the file Used to load the file from the cloud storage


    Parameters

    • filename: string

      the filename

    Returns Promise<undefined | Buffer>

    the value of the file

abstractprocessTasks

  • processTasks(): Promise<void>
  • Abstract method to process the tasks


    Returns Promise<void>

abstractpublishTransactionMetadata

  • publishTransactionMetadata(params: { metadata: TransactionMetadata; txId: string }): Promise<void>
  • Publish the transaction metadata in human-readable format


    Parameters

    Returns Promise<void>

abstractrecursiveProof

  • recursiveProof(data: { args?: string; metadata?: string; task?: string; transactions: string[]; userId?: string }): Promise<string>
  • Abstract method to calculate the recursive proof Used to calculate the recursive proof


    Parameters

    • data: { args?: string; metadata?: string; task?: string; transactions: string[]; userId?: string }

      the data

    Returns Promise<string>

    the proof

abstractreleaseDeployer

  • releaseDeployer(params: { publicKey: string; txsHashes: string[] }): Promise<void>
  • Abstract method to release the deployer


    Parameters

    • params: { publicKey: string; txsHashes: string[] }

      the public key of the deployer and the transactions hashes Used to release the deployer after the transactions are sent to the blockchain

    Returns Promise<void>

abstractsaveDataByKey

  • saveDataByKey(key: string, value: undefined | string): Promise<void>
  • Abstract method to save the data by key Used to save the data by key to the cloud storage


    Parameters

    • key: string

      the key

    • value: undefined | string

      the value

    Returns Promise<void>

abstractsaveFile

  • saveFile(filename: string, value: Buffer): Promise<void>
  • Abstract method to save the file Used to save the file to the cloud storage


    Parameters

    • filename: string

      the filename

    • value: Buffer

      the value

    Returns Promise<void>

abstractsendTransactions