Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dist/cjs/helper/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ class ZkWasmUtil {
message += params.description_url;
message += params.avator_url;
message += params.circuit_size;
message += params.metadata_keys;
message += params.metadata_vals;
// Additional params afterwards
if (params.initial_context) {
message += params.initial_context_md5;
Expand Down Expand Up @@ -162,6 +164,8 @@ class ZkWasmUtil {
message += params.md5;
message += params.circuit_size;
message += params.user_address;
message += params.metadata_keys;
message += params.metadata_vals;
if (params.reset_context) {
message += params.reset_context_md5;
}
Expand Down
15 changes: 15 additions & 0 deletions dist/cjs/interface/interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export interface VerifierContracts {
circuit_size: number;
}
export type TaskType = "Setup" | "Prove" | "Reset";
/**
* Image status:
* Received: Server received setup task of the image but haven’t been done successfully.
* Initialized: Server received setup task of the image and it is done successfully. No proof task had been done successfully for this image.
* Verified: At least one of the proof task had been done successfully for the image.
**/
export type ImageStatus = "Received" | "Initialized" | "Verified";
export type TaskStatus = "Pending" | "Processing" | "DryRunFailed" | "Done" | "Fail" | "Stale";
export interface PaginationResult<T> {
Expand All @@ -61,6 +67,8 @@ export interface BaseAddImageParams {
description_url: string;
avator_url: string;
circuit_size: number;
metadata_keys: string[];
metadata_vals: string[];
}
export interface WithInitialContext {
initial_context: unknown;
Expand Down Expand Up @@ -102,6 +110,8 @@ export interface BaseResetImageParams {
md5: string;
circuit_size: number;
user_address: string;
metadata_keys: string[];
metadata_vals: string[];
}
export interface WithResetContext {
reset_context: unknown;
Expand Down Expand Up @@ -209,6 +219,11 @@ export interface Image {
initial_context?: Uint8Array;
status: string;
checksum: ImageChecksum | null;
metadata: {
values: {
[key: string]: string;
};
};
}
export interface ImageChecksum {
x: Uint8Array;
Expand Down
4 changes: 4 additions & 0 deletions dist/mjs/helper/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export class ZkWasmUtil {
message += params.description_url;
message += params.avator_url;
message += params.circuit_size;
message += params.metadata_keys;
message += params.metadata_vals;
// Additional params afterwards
if (params.initial_context) {
message += params.initial_context_md5;
Expand Down Expand Up @@ -192,6 +194,8 @@ export class ZkWasmUtil {
message += params.md5;
message += params.circuit_size;
message += params.user_address;
message += params.metadata_keys;
message += params.metadata_vals;
if (params.reset_context) {
message += params.reset_context_md5;
}
Expand Down
15 changes: 15 additions & 0 deletions dist/mjs/interface/interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export interface VerifierContracts {
circuit_size: number;
}
export type TaskType = "Setup" | "Prove" | "Reset";
/**
* Image status:
* Received: Server received setup task of the image but haven’t been done successfully.
* Initialized: Server received setup task of the image and it is done successfully. No proof task had been done successfully for this image.
* Verified: At least one of the proof task had been done successfully for the image.
**/
export type ImageStatus = "Received" | "Initialized" | "Verified";
export type TaskStatus = "Pending" | "Processing" | "DryRunFailed" | "Done" | "Fail" | "Stale";
export interface PaginationResult<T> {
Expand All @@ -61,6 +67,8 @@ export interface BaseAddImageParams {
description_url: string;
avator_url: string;
circuit_size: number;
metadata_keys: string[];
metadata_vals: string[];
}
export interface WithInitialContext {
initial_context: unknown;
Expand Down Expand Up @@ -102,6 +110,8 @@ export interface BaseResetImageParams {
md5: string;
circuit_size: number;
user_address: string;
metadata_keys: string[];
metadata_vals: string[];
}
export interface WithResetContext {
reset_context: unknown;
Expand Down Expand Up @@ -209,6 +219,11 @@ export interface Image {
initial_context?: Uint8Array;
status: string;
checksum: ImageChecksum | null;
metadata: {
values: {
[key: string]: string;
};
};
}
export interface ImageChecksum {
x: Uint8Array;
Expand Down
4 changes: 4 additions & 0 deletions src/helper/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ export class ZkWasmUtil {
message += params.description_url;
message += params.avator_url;
message += params.circuit_size;
message += params.metadata_keys;
message += params.metadata_vals;
// Additional params afterwards
if (params.initial_context) {
message += params.initial_context_md5;
Expand Down Expand Up @@ -231,6 +233,8 @@ export class ZkWasmUtil {
message += params.md5;
message += params.circuit_size;
message += params.user_address;
message += params.metadata_keys;
message += params.metadata_vals;
if (params.reset_context) {
message += params.reset_context_md5;
}
Expand Down
7 changes: 7 additions & 0 deletions src/interface/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export interface BaseAddImageParams {
description_url: string;
avator_url: string;
circuit_size: number;
metadata_keys: string[];
metadata_vals: string[];
}

export interface WithInitialContext {
Expand Down Expand Up @@ -140,6 +142,8 @@ export interface BaseResetImageParams {
md5: string;
circuit_size: number;
user_address: string;
metadata_keys: string[];
metadata_vals: string[];
}

export interface WithResetContext {
Expand Down Expand Up @@ -260,6 +264,9 @@ export interface Image {
initial_context?: Uint8Array;
status: string;
checksum: ImageChecksum | null;
metadata : {
values : { [key: string]: string }
};
}

export interface ImageChecksum {
Expand Down