sindri
Version:
The Sindri Labs JavaScript SDK and CLI tool.
1,751 lines (1,727 loc) • 104 kB
TypeScript
import { WrapOptions } from 'retry';
export { WrapOptions as RetryOptions } from 'retry';
import { z } from 'zod';
import { BaseLogger } from 'pino';
export { BaseLogger as Logger } from 'pino';
import { File as File$1 } from 'buffer';
type ApiRequestOptions = {
readonly method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH";
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
readonly responseType?: // DO NOT REMOVE
"arraybuffer" | "blob" | "document" | "json" | "text" | "stream";
};
interface OnCancel {
readonly isResolved: boolean;
readonly isRejected: boolean;
readonly isCancelled: boolean;
(cancelHandler: () => void): void;
}
declare class CancelablePromise<T> implements Promise<T> {
#private;
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
get [Symbol.toStringTag](): string;
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
finally(onFinally?: (() => void) | null): Promise<T>;
cancel(): void;
get isCancelled(): boolean;
}
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;
type OpenAPIConfig = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: "include" | "omit" | "same-origin";
TOKEN?: string | Resolver<string> | undefined;
USERNAME?: string | Resolver<string> | undefined;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
sindri?: SindriClient;
};
declare abstract class BaseHttpRequest {
readonly config: OpenAPIConfig;
constructor(config: OpenAPIConfig);
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
}
/**
* Generic response for any client action.
* E.g. job submission, patch, delete
*/
type ActionResponse = {
success?: boolean;
};
/**
* Response containing an API key.
*
* This key is used in conjunction with the APIKey model
* to authenticate users in the API.
*/
type APIKeyResponse = {
/**
* The API key. Will be `null` unless the key was created during the request. Keys are not stored in plaintext and can not be recovered after creation time.
*/
api_key: string | null;
/**
* The date that the API key was created.
*/
date_created: string;
/**
* The date that the API key will automatically expire.
*/
date_expires: string | null;
/**
* The last time that the API key was used to authenticate with the API.
*/
date_last_used: string | null;
/**
* The database ID for the API key. Used when deleting keys.
*/
id: string;
/**
* The human-readable name for the API key used for managing keys.
*/
name: string;
/**
* The non-secret key prefix.
*/
prefix: string;
/**
* The non-secret key suffix. Helpful for identifying keys if a name wasn't specified at creation time.
*/
suffix: string;
};
/**
* Client input to obtain an API key.
*/
type ObtainApikeyInput = {
/**
* Your account username.
*/
username: string;
/**
* Your account password.
*/
password: string;
/**
* A human readable name for your API key used to identify it when managing keys.
*/
name?: string;
};
declare class AuthorizationService {
readonly httpRequest: BaseHttpRequest;
constructor(httpRequest: BaseHttpRequest);
/**
* Generate API Key
* Generates a long-term API Key from your account's username and password.
* @param requestBody
* @param sindriTeamId Optional. Team ID for the API key.
* @returns APIKeyResponse OK
* @throws ApiError
*/
apikeyGenerate(requestBody: ObtainApikeyInput, sindriTeamId?: string | null): CancelablePromise<APIKeyResponse>;
/**
* API Key Generate
* Generate an API key for the requesting team.
* @param name An optional name or tag to assign to the generated API Key.
* @returns APIKeyResponse Created
* @throws ApiError
*/
apikeyGenerateWithAuth(name?: string): CancelablePromise<APIKeyResponse>;
/**
* API Key List
* List API keys for the requesting team.
* @returns APIKeyResponse OK
* @throws ApiError
*/
apikeyList(): CancelablePromise<Array<APIKeyResponse>>;
/**
* API Key Delete
* Delete a specific API key.
* @param apikeyId The UUID4 identifier associated with this API Key.
* @returns ActionResponse OK
* @throws ApiError
*/
apikeyDelete(apikeyId: string): CancelablePromise<ActionResponse>;
}
/**
* JobStatus choices
*/
type JobStatus = "Queued" | "In Progress" | "Ready" | "Failed";
/**
* Response for getting Boojum circuit info.
*/
type BoojumCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "boojum";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The field over which proofs take place.
*/
field: string | null;
/**
* The zkSync Era zkEVM version tag.
*/
zkevm_version: string | null;
};
/**
* Response for getting Circom circuit info.
*/
type CircomCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "circom";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The elliptic curve over which the proving protocol takes place.
*/
curve: string;
/**
* The number of constraints in the Rank-1 Constraint System (R1CS) of the circuit.
*/
num_constraints: number | null;
/**
* The number of public outputs from the circuit.
*/
num_outputs: number | null;
/**
* The number of private inputs for the circuit.
*/
num_private_inputs: number | null;
/**
* The number of public inputs for the circuit.
*/
num_public_inputs: number | null;
};
/**
* Response for getting Gnark circuit info.
*/
type GnarkCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "gnark";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The elliptic curve over which the proving protocol takes place.
*/
curve: string;
/**
* The Gnark frontend version tag.
*/
gnark_version: string;
};
/**
* Response for getting Halo2 circuit info.
*/
type Halo2CircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "halo2";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The path to the circuit struct definition. This is specified during creation in the included sindri.json file.
*/
class_name: string;
/**
* The elliptic curve over which the proving protocol takes place.
*/
curve: string;
/**
* The log_2 of the number of rows in the circuit, expressed as a matrix.
*/
degree: number;
/**
* The Halo2 frontend version tag.
*/
halo2_version: string;
};
/**
* Response for getting Polygon Hermez circuit info.
*/
type HermezCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "hermez";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The Polygon Hermez zkEVM version tag.
*/
zkevm_version: string | null;
};
/**
* Response for getting Jolt circuit info.
*/
type JoltCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "jolt";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The commitment scheme used in the Jolt zkVM prover.
*/
commitment_scheme: string;
/**
* Whether the Rust standard library is enabled for the guest code.
*/
std_enabled: boolean;
/**
* The Jolt frontend version tag.
*/
jolt_version: string;
/**
* The name of the circuit project specified in the included Cargo.toml file.
*/
package_name: string;
/**
* The name of the guest function in the user's uploaded guest code.
*/
guest_function: string;
};
/**
* Response for getting Noir circuit info.
*/
type NoirCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "noir";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The number of opcodes in the intermediate representation.
*/
acir_opcodes: number | null;
/**
* The number of constraints with an instantiated proving backend in the circuit.
*/
circuit_size: number | null;
/**
* The elliptic curve over which the proving protocol takes place.
*/
curve: string;
/**
* The name of the circuit project specified in the included Nargo.toml file.
*/
nargo_package_name: string;
/**
* The Noir frontend version tag.
*/
noir_version: string;
};
/**
* Response for getting OpenVM circuit info.
*/
type OpenvmCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "openvm";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The OpenVM frontend version tag.
*/
openvm_version: string;
};
/**
* Response for getting Plonky2 circuit info.
*/
type Plonky2CircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "plonky2";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The path to the circuit struct definition. This is specified during creation in the included sindri.json file.
*/
struct_name: string;
/**
* The Plonky2 frontend version tag.
*/
plonky2_version: string;
};
/**
* Response for getting SnarkVM circuit info.
*/
type SnarkvmCircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "snarkvm";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The main.aleo function name.
*/
function_name: string;
/**
* The network.
*/
network: string;
};
/**
* Response for getting SP1 circuit info.
*/
type Sp1CircuitInfoResponse = {
/**
* A unique identifier generated for the circuit. UUID4 format.
*/
circuit_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project. This can be used in place of circuit_id for proving. This is specified during creation in the included sindri.json file. If the project is renamed, this will be the new name of the project, not the original name that was included in the sindri.json file.
*/
project_name: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: "sp1";
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* The URL of the homepage for the team or project.
*/
homepage: string | null;
/**
* Metadata keys and values for the circuit that were specified at creation time.
*/
meta: Record<string, string>;
/**
* The number of proofs submitted for this circuit.
*/
num_proofs: number | null;
/**
* The proving scheme for this circuit. This is specified during creation in the included sindri.json file.
*/
proving_scheme: string;
/**
* Whether the circuit is public. Public circuits can be used by any user.
*/
public: boolean;
/**
* The URL of a code repository for the circuit.
*/
repository: string | null;
/**
* The status of the circuit job.
*/
status: JobStatus;
/**
* The job is finished processing and waiting/polling can be terminated.
*/
finished_processing: boolean;
/**
* Tags for the circuit.
*/
tags: Array<string>;
/**
* The name of the team that owns this circuit.
* @deprecated
*/
team: string;
/**
* URL for the avatar image of the team that owns this circuit.
*/
team_avatar_url: string;
/**
* The name of the team that owns this circuit.
*/
team_name: string;
/**
* The slug of the team that owns this circuit.
*/
team_slug: string;
/**
* Total compute time in ISO8601 format.
*/
compute_time: string | null;
/**
* Total compute time in seconds.
*/
compute_time_sec: number | null;
/**
* Detailed compute times for the circuit compilation.
*/
compute_times: null;
/**
* Total size of stored file(s) in bytes.
*/
file_size: number | null;
/**
* Queue time in ISO8601 format.
*/
queue_time: string | null;
/**
* Queue time in seconds.
*/
queue_time_sec: number | null;
/**
* The name of the uploaded circuit file. Note: the CLI and SDKs create a generic name when a directory is specified for upload.
*/
uploaded_file_name: string;
/**
* Boolean indicating whether this circuit has a smart contract verifier available.
*/
has_smart_contract_verifier: boolean;
/**
* Boolean indicating whether this circuit has a verification key available.
*/
has_verification_key: boolean;
/**
* The verification key of this circuit.
*/
verification_key: Record<string, any> | null;
/**
* A list of runtime warnings with UTC timestamps.
*/
warnings: Array<string> | null;
/**
* The error message for a failed circuit upload.
*/
error: string | null;
/**
* The SP1 frontend version tag.
*/
sp1_version: string;
};
/**
* Response for getting circuit info.
*/
type CircuitInfoResponse$1 = BoojumCircuitInfoResponse | CircomCircuitInfoResponse | Halo2CircuitInfoResponse | HermezCircuitInfoResponse | GnarkCircuitInfoResponse | JoltCircuitInfoResponse | NoirCircuitInfoResponse | OpenvmCircuitInfoResponse | Plonky2CircuitInfoResponse | SnarkvmCircuitInfoResponse | Sp1CircuitInfoResponse;
/**
* Client input to prove a circuit.
*/
type CircuitProveInput = {
/**
* An arbitrary mapping of metadata keys to string values. This can be used to track additional information about the proof such as an ID from an external system.
*/
meta?: Record<string, string>;
/**
* An object mapping proof input variable names to their values. Can be a raw JSON object or a string serialized as JSON or TOML.
*/
proof_input: Record<string, any> | string;
/**
* A boolean indicating whether to perform an internal verification check during the proof creation.
*/
perform_verify?: boolean;
/**
* Internal prover implementation setting.
*/
prover_implementation?: string;
};
/**
* CircuitType choices
*/
type CircuitType = "boojum" | "circom" | "gnark" | "halo2" | "hermez" | "jolt" | "noir" | "openvm" | "plonky2" | "snarkvm" | "sp1";
/**
* Response for getting proof info.
*/
type ProofInfoResponse = {
/**
* A unique identifier generated for the proof. UUID4 format.
*/
proof_id: string;
/**
* @deprecated
*/
circuit_name: string;
/**
* The name of the project associated with this proof.
*/
project_name: string;
/**
* The circuit_id of the circuit associated with this proof. UUID4 format.
*/
circuit_id: string;
/**
* The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
*/
circuit_type: CircuitType;
/**
* The UTC datetime the circuit was uploaded in ISO8601 format.
*/
date_created: string;
/**
* Metadata keys and values for the proof that were specified at creation time.
*/
meta: