Vana SDK - v4.1.0
    Preparing search index...

    Interface JobsClient

    Builder operations exposed by createJobsClient.

    interface JobsClient {
        submitRawRead(params: SubmitRawReadParams): Promise<SubmitRawReadResult>;
        quoteJob(): Promise<JobQuote>;
        getJob(jobId: string): Promise<JobStatus>;
        waitForJob(jobId: string, options?: WaitForJobOptions): Promise<JobStatus>;
        openResult(
            handle: ResultHandle,
            options: OpenJobResultOptions,
        ): Promise<JobResult>;
        readRaw(params: ReadRawParams): Promise<JobResult>;
    }
    Index

    Methods

    • Ask what one read costs on this chain before committing to it.

      Returns Promise<JobQuote>

      The chain's data_access fee, its asset, and whether the Gateway enforces it today.

      When the Gateway or transport rejects the call.

      Optional: JobsClient.submitRawRead signs the quote the Gateway returns with its 402, so a builder that does not care about the price ahead of time never needs this call.

    • Read one builder-visible job status.

      Parameters

      • jobId: string

        Client-generated job UUID.

      Returns Promise<JobStatus>

      The current job status.

      When the job is absent or belongs to another builder.

      For other Gateway or transport failures.

    • Fetch, decrypt, and validate a job result from object storage.

      Parameters

      Returns Promise<JobResult>

      The validated plaintext job result.

      Decryption requires builderPrivateKey; builderAccount alone only supports submission, status reads, and waiting.

      When a raw private key is unavailable.

      When fetching the result object fails.

      When the fetched bytes mismatch the handle.

      When decrypted protocol fields or bindings differ.

    • Submit, wait for, and decrypt one raw read.

      Parameters

      Returns Promise<JobResult>

      The decrypted, binding-checked job result.

      This convenience flow decrypts the result and therefore requires builderPrivateKey; a client configured only with builderAccount cannot call readRaw.

      When submission, polling, or decryption setup fails.

      When decrypted result bindings differ.

      const result = await client.readRaw({
      owner,
      grantId,
      scope: "profile.email",
      wait: 25,
      });