sindri
Version:
The Sindri Labs JavaScript SDK and CLI tool.
1 lines • 126 kB
Source Map (JSON)
{"version":3,"sources":["../../../src/lib/client.ts","../../../src/lib/api/core/BaseHttpRequest.ts","../../../src/lib/api/core/request.ts","../../../src/lib/isomorphic.ts","../../../src/lib/api/core/ApiError.ts","../../../src/lib/api/core/CancelablePromise.ts","../../../src/lib/api/core/AxiosHttpRequest.ts","../../../src/lib/api/services/AuthorizationService.ts","../../../src/lib/api/services/CircuitsService.ts","../../../src/lib/api/services/InternalService.ts","../../../src/lib/api/services/ProofsService.ts","../../../src/lib/api/services/TokenService.ts","../../../src/lib/api/ApiClient.ts","../../../src/lib/config.ts","../../../src/lib/logging.ts","../../../src/lib/utils.ts","../../../src/lib/index.ts"],"names":["readFile","stat","path","gzip","walk","tar","Tar","BaseHttpRequest","config","axios","AxiosError","pRetry","File","FormData","ApiError","request","response","message","CancelError","CancelablePromise","#isResolved","#isRejected","#isCancelled","#cancelHandlers","#promise","#resolve","#reject","executor","resolve","reject","onResolve","value","onReject","reason","onCancel","cancelHandler","onFulfilled","onRejected","onFinally","error","isDefined","isString","isStringWithValue","isBlob","isFormData","isSuccess","status","base64","str","getQueryString","params","qs","append","key","process","v","k","getUrl","options","encoder","substring","group","url","getFormData","formData","_","resolver","getHeaders","token","username","password","additionalHeaders","formHeaders","headers","credentials","getRequestBody","shouldRetry","sendRequest","body","axiosClient","source","requestConfig","axiosError","getResponseHeader","responseHeader","content","getResponseBody","catchErrorCodes","result","errorStatus","errorStatusText","errorBody","startTime","getElapsedTime","ellapsedMilliseconds","ellapsedSeconds","ellapsedMinutes","logPrefix","responseBody","responseMessage","errorMessage","AxiosHttpRequest","AuthorizationService","httpRequest","requestBody","sindriTeamId","name","apikeyId","CircuitsService","circuitId","includeVerificationKey","InternalService","limit","offset","projectId","projectName","proofId","teamSlug","ProofsService","includeProof","includePublic","includeSmartContractCalldata","TokenService","ApiClient","HttpRequest","envPaths","z","ConfigSchema","defaultConfig","pino","createLogger","level","logger","cachedDefaultMeta","getDefaultMeta","cache","raiseExceptions","SINDRI_META","validationFilter","validateMetaAndMergeWithDefaults","meta","defaultMeta","validationError","validateMetaEntry","keyRegex","SindriClient","_SindriClient","authOptions","retryOptions","versionTag","project","tags","tag","projectStats","tarballFilename","tarballContent","sindriJsonPath","sindriJsonContent","sindriJson","circuitName","files","file","sindriJsonFilename","a","b","tarStream","code","sindriJsonFile","tarball","gzippedTarball","tarFile","proofInput","verify","lib_default"],"mappings":"AAAA,OAAS,YAAAA,EAAU,QAAAC,OAAY,cAC/B,OAAOC,MAAU,OAGjB,OAAOC,OAAU,UACjB,OAAOC,OAAU,cAEjB,OAAOC,OAAS,MAChB,OAAOC,OAAS,SCAT,IAAeC,EAAf,KAA+B,CACpC,YAA4BC,EAAuB,CAAvB,YAAAA,CAAwB,CAGtD,ECFA,OAAOC,MAAW,QAElB,OAAS,cAAAC,MAAkB,QAC3B,OAAOC,MAAY,oBCXnB,MAAyC,gBAalC,IAAMC,EAAmC,OAAO,KAC1CC,EACT,OAAO,SCVJ,IAAMC,EAAN,cAAuB,KAAM,CAClB,IACA,OACA,WACA,KACA,QAEhB,YACEC,EACAC,EACAC,EACA,CACA,MAAMA,CAAO,EAEb,KAAK,KAAO,WACZ,KAAK,IAAMD,EAAS,IACpB,KAAK,OAASA,EAAS,OACvB,KAAK,WAAaA,EAAS,WAC3B,KAAK,KAAOA,EAAS,KACrB,KAAK,QAAUD,CACjB,CACF,ECxBO,IAAMG,EAAN,cAA0B,KAAM,CACrC,YAAYD,EAAiB,CAC3B,MAAMA,CAAO,EACb,KAAK,KAAO,aACd,CAEA,IAAW,aAAuB,CAChC,MAAO,EACT,CACF,EAUaE,EAAN,KAAiD,CACtDC,GACAC,GACAC,GACSC,GACAC,GACTC,GACAC,GAEA,YACEC,EAKA,CACA,KAAKP,GAAc,GACnB,KAAKC,GAAc,GACnB,KAAKC,GAAe,GACpB,KAAKC,GAAkB,CAAC,EACxB,KAAKC,GAAW,IAAI,QAAW,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,CACtD,CA+BA,MAAM,aACJP,EACA8D,EACAC,EAAkB,GAClBnD,EAAwC,GACxCmB,EAAa,CAAC,EACc,CAM5B,IAAMxB,GALiB,MAAM,KAAK,QAAQ,SAAS,YAAYP,EAAW,CACxE,KAAM8B,EAAiCC,CAAI,EAC3C,eAAgBgC,EAChB,YAAaD,CACf,CAAC,GACsC,SACvC,OAAa,CACX,IAAM3J,EACJ,MAAM,KAAK,QAAQ,SAAS,YAAYoG,CAAO,EACjD,GAAIpG,EAAS,SAAW,SAAWA,EAAS,SAAW,SACrD,MAGF,MAAM,IAAI,QAASY,GAAY,WAAWA,EAAS,KAAK,eAAe,CAAC,CAC1E,CACA,OAAO,KAAK,QAAQ,OAAO,YACzBwF,EACA,GACA,GACAK,EACA,EACF,CACF,CACF,EgBxsBA,IAAOoD,GAAQ,IAAI5B","sourcesContent":["import { readFile, stat } from \"fs/promises\";\nimport path from \"path\";\nimport type { Readable } from \"stream\";\n\nimport gzip from \"gzip-js\";\nimport walk from \"ignore-walk\";\nimport type { WrapOptions as RetryOptions } from \"retry\";\nimport tar from \"tar\";\nimport Tar from \"tar-js\";\n\nimport { ApiClient, CircuitType, JobStatus, OpenAPIConfig } from \"lib/api\";\nimport type {\n BoojumCircuitInfoResponse,\n CircomCircuitInfoResponse,\n CircuitStatusResponse,\n GnarkCircuitInfoResponse,\n HermezCircuitInfoResponse,\n Halo2CircuitInfoResponse,\n JoltCircuitInfoResponse,\n NoirCircuitInfoResponse,\n OpenvmCircuitInfoResponse,\n Plonky2CircuitInfoResponse,\n ProofInfoResponse,\n ProofStatusResponse,\n SnarkvmCircuitInfoResponse,\n Sp1CircuitInfoResponse,\n} from \"lib/api\";\nimport { Config } from \"lib/config\";\nimport { createLogger, type Logger, type LogLevel } from \"lib/logging\";\nimport { File, FormData } from \"lib/isomorphic\";\nimport type {\n BrowserFile,\n BrowserFormData,\n NodeFile,\n NodeFormData,\n} from \"lib/isomorphic\";\nimport { type Meta, validateMetaAndMergeWithDefaults } from \"lib/utils\";\n\n// Re-export types from the API.\nexport type {\n BoojumCircuitInfoResponse,\n CircomCircuitInfoResponse,\n CircuitType,\n GnarkCircuitInfoResponse,\n Halo2CircuitInfoResponse,\n HermezCircuitInfoResponse,\n JoltCircuitInfoResponse,\n JobStatus,\n NoirCircuitInfoResponse,\n OpenvmCircuitInfoResponse,\n Plonky2CircuitInfoResponse,\n ProofInfoResponse,\n SnarkvmCircuitInfoResponse,\n Sp1CircuitInfoResponse,\n};\nexport type CircuitInfoResponse =\n | BoojumCircuitInfoResponse\n | CircomCircuitInfoResponse\n | Halo2CircuitInfoResponse\n | HermezCircuitInfoResponse\n | JoltCircuitInfoResponse\n | GnarkCircuitInfoResponse\n | NoirCircuitInfoResponse\n | OpenvmCircuitInfoResponse\n | Plonky2CircuitInfoResponse\n | SnarkvmCircuitInfoResponse\n | Sp1CircuitInfoResponse;\n\n// Re-export other internal types.\nexport type { Logger, LogLevel, Meta, RetryOptions };\n\n/**\n * The options for authenticating with the API.\n */\nexport interface AuthOptions {\n /**\n * The API key to use for authentication.\n */\n apiKey?: string;\n /**\n * The base URL for the API.\n */\n baseUrl?: string;\n}\n\n/**\n * Represents the primary client for interacting with the Sindri ZKP service API. This class serves\n * as the central entry point for the SDK, facilitating various operations such as compiling ZKP\n * circuits and generating proofs.\n *\n * The {@link SindriClient} class encapsulates all the necessary methods and properties required to\n * communicate effectively with the Sindri ZKP service, handling tasks like authentication, request\n * management, and response processing.\n *\n * Usage of this class typically involves instantiating it with appropriate authentication options\n * and then utilizing its methods to interact with the service.\n *\n * @example\n * // Create an instance of the `SindriClient` class.\n * const client = new SindriClient({ apiKey: 'your-api-key' });\n *\n * // Use the client to interact with the Sindri ZKP service...\n */\nexport class SindriClient {\n /** @hidden */\n readonly _client: ApiClient;\n /** @hidden */\n readonly _clientConfig: OpenAPIConfig;\n /** @hidden */\n readonly _config: Config | undefined;\n\n readonly logger: Logger;\n\n /**\n * Represents the polling interval in milliseconds used for querying the status of an endpoint.\n * This value determines the frequency at which the SDK polls an endpoint to check for any changes\n * in status.\n *\n * The choice of polling interval is critical for balancing responsiveness against resource\n * consumption. A shorter interval leads to more frequent updates, beneficial for\n * rapidly-changing statuses, but at the expense of higher network and computational load. In\n * contrast, a longer interval reduces resource usage but may delay the detection of status\n * changes.\n *\n * For more complex ZKP circuits, which may take longer to compile, considering a larger polling\n * interval could be advantageous. This approach minimizes unnecessary network traffic and\n * computational effort while awaiting the completion of these time-intensive operations.\n *\n * The default value is set to 1000 milliseconds (1 second), offering a general balance. However,\n * it can and should be adjusted based on the expected complexity and compilation time of the\n * circuits being processed.\n */\n public pollingInterval: number = 1000;\n\n /**\n * Represents the options for retrying requests to the Sindri ZKP service.\n *\n * See the [`retry` package](https://www.npmjs.com/package/retry#retrytimeoutsoptions)\n * documentation for more information on the available options. The values here are the defaults,\n * but they can be replaced with custom values in the constructor.\n */\n public retryOptions: RetryOptions = {\n minTimeout: 1000,\n retries: 6,\n };\n\n /**\n * Constructs a new instance of the {@link SindriClient} class for interacting with the Sindri ZKP\n * service. This constructor initializes the client with the necessary authentication options.\n *\n * The provided `authOptions` parameter allows for specifying authentication credentials and\n * configurations required for the client to communicate securely with the service. See\n * {@link SindriClient.authorize} for more details about how authentication credentials are sourced.\n *\n * @param authOptions - The authentication options for the client, including\n * credentials like API keys or tokens. Defaults to an empty object if not provided.\n *\n * @example\n * // Instantiating the SindriClient with authentication options\n * const client = new SindriClient({ apiKey: 'sindri-...-fskd' });\n *\n * @see {@link SindriClient.authorize} for information on retrieving this value.\n */\n constructor(\n authOptions: AuthOptions = {},\n { retryOptions }: { retryOptions?: RetryOptions } = {},\n ) {\n // Initialize the client and store a reference to its config.\n this._client = new ApiClient();\n this._clientConfig = this._client.request.config;\n\n // Set the `Sindri-Client` header.\n const versionTag = process.env.VERSION\n ? `v${process.env.VERSION}`\n : \"unknown\";\n this._clientConfig.HEADERS = {\n ...this._clientConfig.HEADERS,\n \"Sindri-Client\": `sindri-js-sdk/${versionTag}`,\n };\n\n // Create a local logger instance.\n this.logger = createLogger();\n if (!process.env.BROWSER_BUILD) {\n this._config = new Config(this.logger);\n }\n this._clientConfig.sindri = this;\n\n // Authorize the client.\n this.authorize(authOptions);\n\n // Store the retry options.\n if (retryOptions) {\n this.retryOptions = structuredClone(retryOptions);\n }\n }\n\n /**\n * Retrieves the current value of the client's API key used for authenticating with the Sindri ZKP\n * service. This property is crucial for ensuring secure communication with the API and is\n * typically set during client initialization.\n *\n * If the API key is not set or is in an invalid format (not a string), this getter returns\n * `null`. Proper management of the API key is essential for the security and proper functioning\n * of the SDK.\n *\n * @returns The current API key if set and valid, otherwise `null`.\n *\n * @example\n * const currentApiKey = client.apiKey;\n * if (currentApiKey) {\n * console.log('API Key is set.');\n * } else {\n * console.log('API Key is not set or is invalid.');\n * }\n */\n get apiKey(): string | null {\n if (\n this._clientConfig.TOKEN &&\n typeof this._clientConfig.TOKEN !== \"string\"\n ) {\n return null;\n }\n return this._clientConfig.TOKEN || null;\n }\n\n /**\n * Retrieves the current base URL of the Sindri ZKP service that the client is configured to\n * interact with. This URL forms the foundation of all API requests made by the client and is\n * typically set during client initialization. Anyone other than employees at Sindri can typically\n * ignore this and use the default value of `https://sindri.app`.\n *\n * @returns The current base URL of the Sindri ZKP service.\n *\n * @example\n * console.log(`Current base URL: ${client.baseUrl}`);\n */\n get baseUrl(): string {\n return this._clientConfig.BASE;\n }\n\n /** Retrieves the current log level of the client. The log level determines the verbosity of logs\n * produced by the client which can be crucial for debugging and monitoring the client's\n * interactions with the Sindri ZKP service.\n *\n * @returns The current log level of the client.\n *\n * @example\n * console.log(`Current log level: ${client.logLevel}`);\n */\n get logLevel(): LogLevel {\n // We don't specify any custom log levels, so we can narrow the type to exclude strings.\n return this.logger.level as LogLevel;\n }\n\n /**\n * Sets the client's log level. This level determines the verbosity of logs produced by the\n * client, allowing for flexible control over the amount of information logged during operation.\n *\n * @param level - The new log level to set for the client.\n *\n * @example\n * // Set log level to debug.\n * client.logLevel = \"debug\";\n */\n set logLevel(level: LogLevel) {\n this.logger.level = level;\n this.logger.debug(`Set log level to \"${this.logger.level}\".`);\n }\n\n /**\n * Authorizes the client with the Sindri ZKP service using the provided authentication options.\n * This method is called automatically after initializing a client, but you may call it again if\n * you would like to change the credentials. The logic around how credentials is as follows:\n *\n * 1. Any explicitly specified options in `authOptions` are always used if provided.\n * 2. The `SINDRI_API_KEY` and `SINDRI_BASE_URL` environment variables are checked next.\n * 3. The settings in `sindri.conf.json` (produced by running `sindri login` on the command-line) will be checked after that.\n * 4. Finally, the default value of `https://sindri.app` will be used for the base URL (this is\n * typically what you want unless you're an employee at Sindri). The API key will remain unset and\n * you will only be able to make requests that allow anonymous access.\n *\n *\n * @param authOptions - The authentication details required to authorize the client.\n * @returns True if authorization is successful, false otherwise.\n *\n * @example\n * const authOptions = { apiKey: 'sindri-...-jskd' };\n * const isAuthorized = client.authorize(authOptions);\n * if (isAuthorized) {\n * console.log('Client is fully authorized.');\n * } else {\n * console.log('Client is not authorized.');\n * }\n */\n authorize(authOptions: AuthOptions): boolean {\n if (process.env.BROWSER_BUILD) {\n this._clientConfig.BASE = authOptions.baseUrl || \"https://sindri.app\";\n this._clientConfig.TOKEN = authOptions.apiKey;\n } else {\n this._config!.reload();\n this._clientConfig.BASE =\n authOptions.baseUrl ||\n process.env.SINDRI_BASE_URL ||\n this._config!.auth?.baseUrl ||\n this._clientConfig.BASE ||\n \"https://sindri.app\";\n this._clientConfig.TOKEN =\n authOptions.apiKey ||\n process.env.SINDRI_API_KEY ||\n this._config!.auth?.apiKey;\n }\n return !!(this._clientConfig.BASE && this._clientConfig.TOKEN);\n }\n\n /**\n * Creates a new {@link SindriClient} client instance. The class itself is not exported, so use\n * this method on the exported (or any other) client instance to create a new instance. The new\n * instance can be configured and used completely independently from any other instances. For\n * example it can use different credentials or a different log level.\n *\n * @param authOptions - The authentication options for the client, including\n * credentials like API keys or tokens. Defaults to an empty object if not provided.\n * @param options - Additional options for configuring the client.\n * @param options.retryOptions - The options related to retrying a request.\n *\n * @example\n * import sindri from 'sindri';\n *\n * // Equivalent to: const myClient = new SindriClient({ ... });\n * const myClient = sindri.create({ apiKey: 'sindri-mykey-1234'});\n *\n * @returns The new client instance.\n */\n create(\n authOptions: AuthOptions | undefined,\n options:\n | {\n retryOptions?: RetryOptions;\n }\n | undefined,\n ): SindriClient {\n return new SindriClient(authOptions, options);\n }\n\n /**\n * Asynchronously creates and deploys a new circuit, initiating its compilation process. This\n * method is essential for submitting new versions of circuits to the Sindri ZKP service for\n * compilation. Upon deployment, it continuously polls the service to track the compilation status\n * until the process either completes successfully or fails.\n *\n * The method accepts two parameters: `project` and `tags`. The `project` parameter can be either\n * a string representing the path to the project or an array of files (browser or Node.js file\n * objects) constituting the circuit. The `tags` parameter is used to assign tags to the deployed\n * circuit, facilitating versioning and identification. By default, the circuit is tagged as\n * \"latest\".\n *\n * After successful deployment and compilation, the method returns a `CircuitInfoResponse` object,\n * which includes details about the compiled circuit, such as its identifier and status.\n *\n * @param project - In Node.js, this can either be a path to the root\n * directory of a Sindri project, the path to a gzipped tarball containing the project, or an\n * array of `buffer.File` objects. In a web browser, it can only be an array of `File` objects.\n * @param tags - The list of tags, or singular tag if a string is passed, that\n * should be associated with the deployed circuit. Defaults to `[\"latest\"]`. Specify an empty\n * array to indicate that you don't care about the compilation outputs and just want to see if it\n * the circuit will compile.\n * @param meta - An object containing metadata to associate with the circuit build. This will be\n * merged into any metadata specified in the `SINDRI_META` environment variable. This variable can\n * be a JSON object (*e.g.* `{\"key\": \"value\"}`) or a colon-delimited set of assignments (*e.g.*\n * `key1=value1:key2=value2`).\n * @returns A promise which resolves to the details of the deployed circuit.\n *\n * @example\n * // Deploy a circuit with a project identifier and default `latest` tag.\n * const circuit = await client.createCircuit(\"/path/to/circuit-directory/\");\n * console.log(\"Did circuit compilation succeed?\", circuit.status);\n *\n * @example\n * // Deploy a circuit with files and custom tags.\n * await client.createCircuit([file1, file2], ['v1.0', 'experimental']);\n */\n async createCircuit(\n project: string | Array<BrowserFile | NodeFile>,\n tags: string | string[] | null = [\"latest\"],\n meta: Meta = {},\n ): Promise<CircuitInfoResponse> {\n const formData = new FormData();\n\n // First, validate the tags and them to the form data.\n tags = typeof tags === \"string\" ? [tags] : tags ?? [];\n for (const tag of tags) {\n if (!/^[-a-zA-Z0-9_.]+$/.test(tag)) {\n throw new Error(\n `\"${tag}\" is not a valid tag. Tags may only contain alphanumeric characters, ` +\n \"underscores, hyphens, and periods.\",\n );\n }\n formData.append(\"tags\", tag);\n }\n if (tags.length === 0) {\n formData.append(\"tags\", \"\");\n }\n\n // Validate and add the metadata.\n formData.append(\n \"meta\",\n JSON.stringify(validateMetaAndMergeWithDefaults(meta)),\n );\n\n // Handle `project` being a file or directory path.\n if (typeof project === \"string\") {\n if (process.env.BROWSER_BUILD) {\n throw new Error(\n \"Specifying `project` as a path is not allowed in the browser build.\",\n );\n }\n\n let projectStats;\n try {\n projectStats = await stat(project);\n } catch {\n throw new Error(\n `The \"${project}\" path does not exist or you do not have permission to access it.`,\n );\n }\n\n // If `project` is a path, then it's a prepackaged tarball.\n if (projectStats.isFile()) {\n if (!/\\.(zip|tar|tar\\.gz|tgz)$/i.test(project)) {\n throw new Error(\"Only gzipped tarballs or zip files are supported.\");\n }\n const tarballFilename = path.basename(project);\n const tarballContent = await readFile(project);\n (formData as NodeFormData).append(\n \"files\",\n new File([tarballContent], tarballFilename),\n );\n\n // If `project` is a directory, then we need to bundle it.\n } else if (projectStats.isDirectory()) {\n const sindriJsonPath = path.join(project, \"sindri.json\");\n let sindriJsonContent;\n try {\n sindriJsonContent = await readFile(sindriJsonPath, {\n encoding: \"utf-8\",\n });\n } catch {\n throw new Error(\n `Expected Sindri manifest file at \"${sindriJsonPath}\" does not exist.`,\n );\n }\n let sindriJson;\n try {\n sindriJson = JSON.parse(sindriJsonContent) as { name: string };\n } catch {\n throw new Error(\n `Could not parse \"${sindriJsonPath}\", is it valid JSON?`,\n );\n }\n const circuitName = sindriJson?.name;\n if (!circuitName) {\n throw new Error(\n `No circuit \"name\" field was found in \"${sindriJsonPath}\", the manifest is invalid.`,\n );\n }\n\n // Create a tarball with all the files that should be included from the project.\n const files = walk\n .sync({\n follow: true,\n ignoreFiles: [\".sindriignore\"],\n path: project,\n })\n .filter(\n (file) =>\n // Always exclude `.git` subdirectories.\n !/(^|\\/)\\.git(\\/|$)/.test(file),\n );\n // Always include the `sindri.json` file.\n const sindriJsonFilename = path.basename(sindriJsonPath);\n if (!files.includes(sindriJsonFilename)) {\n files.push(sindriJsonFilename);\n }\n const tarballFilename = `${circuitName}.tar.gz`;\n files.sort((a, b) => a.localeCompare(b)); // Deterministic for tests.\n const tarStream = tar.c(\n {\n cwd: project,\n gzip: true,\n onwarn: (code: string, message: string) => {\n this.logger.warn(`While creating tarball: ${code} - ${message}`);\n },\n prefix: `${circuitName}/`,\n sync: true,\n },\n files,\n // This works around a bug in the typing of `tar` when using `sync`.\n ) as unknown as Readable;\n\n // Add the tarball to the form data.\n (formData as NodeFormData).append(\n \"files\",\n new File([tarStream.read()], tarballFilename),\n );\n } else {\n throw new Error(`The \"${project}\" path is not a file or directory.`);\n }\n\n // Handle an array of files.\n } else if (Array.isArray(project)) {\n // Validate the file array.\n if (!project.every((file) => file instanceof File)) {\n throw new Error(\"All entries in `project` must be `File` instances.\");\n }\n const sindriJsonFile = project.find(\n (file) => file.name === \"sindri.json\",\n );\n if (!sindriJsonFile) {\n throw new Error(\n \"The `project` array must include a `sindri.json` file.\",\n );\n }\n let sindriJson;\n try {\n sindriJson = JSON.parse(await sindriJsonFile.text()) as {\n name: string;\n };\n } catch {\n throw new Error(`Could not parse \"sindri.json\", is it valid JSON?`);\n }\n const circuitName = sindriJson?.name;\n if (!circuitName) {\n throw new Error(\n `No circuit \"name\" field was found in \"sindri.json\", the manifest is invalid.`,\n );\n }\n\n // Create the gzipped tarball.\n const tarball = new Tar();\n project.sort((a, b) => a.name.localeCompare(b.name)); // Deterministic for tests.\n for (const file of project) {\n const content = new Uint8Array(await file.arrayBuffer());\n await new Promise((resolve) =>\n tarball.append(`${circuitName}/${file.name}`, content, resolve),\n );\n }\n const gzippedTarball = new Uint8Array(gzip.zip(tarball.out));\n const tarFile = new File([gzippedTarball], `${circuitName}.tar.gz`);\n\n // Append the tarball to the form data.\n // These lines are functionally identical, but we want to typecheck node and browser.\n if (process.env.BROWSER_BUILD) {\n (formData as BrowserFormData).append(\"files\", tarFile as BrowserFile);\n } else {\n (formData as NodeFormData).append(\"files\", tarFile as NodeFile);\n }\n }\n\n const createResponse = await this._client.circuits.circuitCreate(\n formData as NodeFormData,\n );\n const circuitId = createResponse.circuit_id;\n\n while (true) {\n const response: CircuitStatusResponse =\n await this._client.internal.circuitStatus(circuitId);\n if (response.status === \"Ready\" || response.status === \"Failed\") {\n break;\n }\n\n await new Promise((resolve) => setTimeout(resolve, this.pollingInterval));\n }\n return this._client.circuits.circuitDetail(circuitId, false);\n }\n\n /**\n * Retrieves all proofs associated with a specified circuit. This method is essential for\n * obtaining a comprehensive list of proofs generated for a given circuit, identified by its\n * unique circuit ID. It returns an array of `ProofInfoResponse` objects, each representing a\n * proof associated with the circuit.\n *\n * The method is particularly useful in scenarios where tracking or auditing all proofs of a\n * circuit is necessary. This could include verifying the integrity of proofs, understanding their\n * usage, or simply enumerating them for record-keeping.\n *\n * The `circuitId` parameter is a string that uniquely identifies the circuit in question. It's\n * crucial to provide the correct circuit ID to retrieve the corresponding proofs accurately.\n *\n * @param circuitId - The unique identifier of the circuit for which proofs are to be retrieved.\n * @returns A promise that resolves to an array of details for each associated proof.\n *\n * @example\n * const proofs = await client.getAllCircuitProofs(circuitId);\n * console.log(\"Proofs:', proofs);\n */\n async getAllCircuitProofs(circuitId: string): Promise<ProofInfoResponse[]> {\n return await this._client.circuits.circuitProofs(circuitId);\n }\n\n /**\n * Retrieves all circuits associated with the team. This method fetches a list of all circuits\n * that have been created or accessed by the currently authenticated team. It's a key method for\n * managing and monitoring circuit usage within a team, offering insights into the variety and\n * scope of circuits in use.\n *\n * @returns A promise that resolves to an array of circuit information responses.\n *\n * @example\n * const circuits = await = client.getAllCircuits();\n * console.log(\"Circuits:\", circuits);\n */\n async getAllCircuits(): Promise<CircuitInfoResponse[]> {\n return await this._client.circuits.circuitList();\n }\n\n /**\n * Retrieves a specific circuit using its unique circuit ID. This method is crucial for obtaining\n * detailed information about a particular circuit, identified by the provided `circuitId`. It's\n * especially useful when detailed insights or operations on a single circuit are required, rather\n * than handling multiple circuits.\n *\n * *Note:* In case the provided `circuitId` is invalid or does not correspond to an existing circuit,\n * the promise may reject, indicating an error. Proper error handling is therefore essential when using this method.\n *\n * @param circuitId - The unique identifier of the circuit to retrieve.\n * @returns A promise that resolves to the information about the specified circuit.\n *\n * @example\n * const circuit = await client.getCircuit(circuitId);\n * console.log('Circuit details:', circuit);\n */\n async getCircuit(circuitId: string): Promise<CircuitInfoResponse> {\n return await this._client.circuits.circuitDetail(circuitId);\n }\n\n /**\n * Retrieves detailed information about a specific proof, identified by its unique proof ID. This\n * method is vital for obtaining individual proof details, facilitating in-depth analysis or\n * verification of a particular proof within the system.\n *\n * The `proofId` parameter is the key identifier for the proof, and it should be provided to fe