File tree Expand file tree Collapse file tree 6 files changed +49
-0
lines changed
Expand file tree Collapse file tree 6 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ class ZkWasmUtil {
126126 message += params . description_url ;
127127 message += params . avator_url ;
128128 message += params . circuit_size ;
129+ message += params . metadata_keys ;
130+ message += params . metadata_vals ;
129131 // Additional params afterwards
130132 if ( params . initial_context ) {
131133 message += params . initial_context_md5 ;
@@ -162,6 +164,8 @@ class ZkWasmUtil {
162164 message += params . md5 ;
163165 message += params . circuit_size ;
164166 message += params . user_address ;
167+ message += params . metadata_keys ;
168+ message += params . metadata_vals ;
165169 if ( params . reset_context ) {
166170 message += params . reset_context_md5 ;
167171 }
Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ export interface VerifierContracts {
4747 circuit_size : number ;
4848}
4949export type TaskType = "Setup" | "Prove" | "Reset" ;
50+ /**
51+ * Image status:
52+ * Received: Server received setup task of the image but haven’t been done successfully.
53+ * Initialized: Server received setup task of the image and it is done successfully. No proof task had been done successfully for this image.
54+ * Verified: At least one of the proof task had been done successfully for the image.
55+ **/
5056export type ImageStatus = "Received" | "Initialized" | "Verified" ;
5157export type TaskStatus = "Pending" | "Processing" | "DryRunFailed" | "Done" | "Fail" | "Stale" ;
5258export interface PaginationResult < T > {
@@ -61,6 +67,8 @@ export interface BaseAddImageParams {
6167 description_url : string ;
6268 avator_url : string ;
6369 circuit_size : number ;
70+ metadata_keys : string [ ] ;
71+ metadata_vals : string [ ] ;
6472}
6573export interface WithInitialContext {
6674 initial_context : unknown ;
@@ -102,6 +110,8 @@ export interface BaseResetImageParams {
102110 md5 : string ;
103111 circuit_size : number ;
104112 user_address : string ;
113+ metadata_keys : string [ ] ;
114+ metadata_vals : string [ ] ;
105115}
106116export interface WithResetContext {
107117 reset_context : unknown ;
@@ -209,6 +219,11 @@ export interface Image {
209219 initial_context ?: Uint8Array ;
210220 status : string ;
211221 checksum : ImageChecksum | null ;
222+ metadata : {
223+ values : {
224+ [ key : string ] : string ;
225+ } ;
226+ } ;
212227}
213228export interface ImageChecksum {
214229 x : Uint8Array ;
Original file line number Diff line number Diff line change @@ -156,6 +156,8 @@ export class ZkWasmUtil {
156156 message += params . description_url ;
157157 message += params . avator_url ;
158158 message += params . circuit_size ;
159+ message += params . metadata_keys ;
160+ message += params . metadata_vals ;
159161 // Additional params afterwards
160162 if ( params . initial_context ) {
161163 message += params . initial_context_md5 ;
@@ -192,6 +194,8 @@ export class ZkWasmUtil {
192194 message += params . md5 ;
193195 message += params . circuit_size ;
194196 message += params . user_address ;
197+ message += params . metadata_keys ;
198+ message += params . metadata_vals ;
195199 if ( params . reset_context ) {
196200 message += params . reset_context_md5 ;
197201 }
Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ export interface VerifierContracts {
4747 circuit_size : number ;
4848}
4949export type TaskType = "Setup" | "Prove" | "Reset" ;
50+ /**
51+ * Image status:
52+ * Received: Server received setup task of the image but haven’t been done successfully.
53+ * Initialized: Server received setup task of the image and it is done successfully. No proof task had been done successfully for this image.
54+ * Verified: At least one of the proof task had been done successfully for the image.
55+ **/
5056export type ImageStatus = "Received" | "Initialized" | "Verified" ;
5157export type TaskStatus = "Pending" | "Processing" | "DryRunFailed" | "Done" | "Fail" | "Stale" ;
5258export interface PaginationResult < T > {
@@ -61,6 +67,8 @@ export interface BaseAddImageParams {
6167 description_url : string ;
6268 avator_url : string ;
6369 circuit_size : number ;
70+ metadata_keys : string [ ] ;
71+ metadata_vals : string [ ] ;
6472}
6573export interface WithInitialContext {
6674 initial_context : unknown ;
@@ -102,6 +110,8 @@ export interface BaseResetImageParams {
102110 md5 : string ;
103111 circuit_size : number ;
104112 user_address : string ;
113+ metadata_keys : string [ ] ;
114+ metadata_vals : string [ ] ;
105115}
106116export interface WithResetContext {
107117 reset_context : unknown ;
@@ -209,6 +219,11 @@ export interface Image {
209219 initial_context ?: Uint8Array ;
210220 status : string ;
211221 checksum : ImageChecksum | null ;
222+ metadata : {
223+ values : {
224+ [ key : string ] : string ;
225+ } ;
226+ } ;
212227}
213228export interface ImageChecksum {
214229 x : Uint8Array ;
Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ export class ZkWasmUtil {
186186 message += params . description_url ;
187187 message += params . avator_url ;
188188 message += params . circuit_size ;
189+ message += params . metadata_keys ;
190+ message += params . metadata_vals ;
189191 // Additional params afterwards
190192 if ( params . initial_context ) {
191193 message += params . initial_context_md5 ;
@@ -231,6 +233,8 @@ export class ZkWasmUtil {
231233 message += params . md5 ;
232234 message += params . circuit_size ;
233235 message += params . user_address ;
236+ message += params . metadata_keys ;
237+ message += params . metadata_vals ;
234238 if ( params . reset_context ) {
235239 message += params . reset_context_md5 ;
236240 }
Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ export interface BaseAddImageParams {
8383 description_url : string ;
8484 avator_url : string ;
8585 circuit_size : number ;
86+ metadata_keys : string [ ] ;
87+ metadata_vals : string [ ] ;
8688}
8789
8890export interface WithInitialContext {
@@ -140,6 +142,8 @@ export interface BaseResetImageParams {
140142 md5 : string ;
141143 circuit_size : number ;
142144 user_address : string ;
145+ metadata_keys : string [ ] ;
146+ metadata_vals : string [ ] ;
143147}
144148
145149export interface WithResetContext {
@@ -260,6 +264,9 @@ export interface Image {
260264 initial_context ?: Uint8Array ;
261265 status : string ;
262266 checksum : ImageChecksum | null ;
267+ metadata : {
268+ values : { [ key : string ] : string }
269+ } ;
263270}
264271
265272export interface ImageChecksum {
You can’t perform that action at this time.
0 commit comments