File tree Expand file tree Collapse file tree 8 files changed +33
-48
lines changed Expand file tree Collapse file tree 8 files changed +33
-48
lines changed Original file line number Diff line number Diff line change 23
23
env :
24
24
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
25
25
- run : mv ./README.md ./zk-states/
26
+ - run : cd zk-states-contracts && yarn npm publish --access public --tolerate-republish
26
27
- run : cd zk-states && yarn npm publish --access public --tolerate-republish
Original file line number Diff line number Diff line change @@ -7427,9 +7427,9 @@ __metadata:
7427
7427
languageName : node
7428
7428
linkType : hard
7429
7429
7430
- " o1js@npm:^0.12.1 " :
7431
- version : 0.12.1
7432
- resolution : " o1js@npm:0.12.1 "
7430
+ " o1js@npm:^0.13.0 " :
7431
+ version : 0.13.0
7432
+ resolution : " o1js@npm:0.13.0 "
7433
7433
dependencies :
7434
7434
blakejs : 1.2.1
7435
7435
detect-gpu : ^5.0.5
@@ -7439,7 +7439,7 @@ __metadata:
7439
7439
tslib : ^2.3.0
7440
7440
bin :
7441
7441
snarky-run : src/build/run.js
7442
- checksum : 50b21fa4a69490ca2018f850a17336a71cf4c6e2bd1607acf3f24394ca86e22065c68c6bf323ecd3fb7adabcc8c258b7be78db5b6ccf1ba60ea7b104a3a90098
7442
+ checksum : d5b0f81702fa32d986c77aa3e4d2ed1146d1e32dd9f274d85a921a3401aae497a6d315e9b685e790fa2dc98fb7519f37d1ef3d1269ac76c217e65e54a75d8f2d
7443
7443
languageName : node
7444
7444
linkType : hard
7445
7445
@@ -9856,13 +9856,13 @@ __metadata:
9856
9856
husky : ^7.0.1
9857
9857
jest : ^27.3.1
9858
9858
lint-staged : ^11.0.1
9859
- o1js : ^0.12.1
9859
+ o1js : ^0.13.0
9860
9860
prettier : ^2.3.2
9861
9861
ts-jest : ^27.0.7
9862
9862
typescript : ^4.7.2
9863
9863
zod : ^3.22.2
9864
9864
peerDependencies :
9865
- o1js : 0.12 .*
9865
+ o1js : 0.13 .*
9866
9866
languageName : unknown
9867
9867
linkType : soft
9868
9868
@@ -9913,7 +9913,7 @@ __metadata:
9913
9913
eslint-plugin-react-hooks : ^4.6.0
9914
9914
eslint-plugin-vitest : ^0.2.8
9915
9915
jsdom : ^22.1.0
9916
- o1js : ^0.12.1
9916
+ o1js : ^0.13.0
9917
9917
prettier : ^3.0.0
9918
9918
react : ^18.2.0
9919
9919
react-dom : ^18.2.0
@@ -9931,7 +9931,7 @@ __metadata:
9931
9931
zod : ^3.21.4
9932
9932
zustand : ^4.3.9
9933
9933
peerDependencies :
9934
- o1js : " >=0.12.1 "
9934
+ o1js : " >=0.13.0 "
9935
9935
react : " >=18.0.0"
9936
9936
react-dom : " >=18.0.0"
9937
9937
zustand : " >=4.3.9"
Original file line number Diff line number Diff line change 1
1
# Mina zkApp: Zk States Contract
2
2
3
- This template uses TypeScript.
4
-
5
- ## How to build
6
-
7
- ``` sh
8
- npm run build
9
- ```
10
-
11
- ## How to run tests
12
-
13
- ``` sh
14
- npm run test
15
- npm run testw # watch mode
16
- ```
17
-
18
- ## How to run coverage
19
-
20
- ``` sh
21
- npm run coverage
22
- ```
23
-
24
- ## License
25
-
26
- [ Apache-2.0] ( LICENSE )
3
+ Mina contract and program for [ zk-states] ( https://www.npmjs.com/package/zk-states ) library.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " zk-states-contracts" ,
3
- "version" : " 0.0.0 " ,
3
+ "version" : " 0.0.2 " ,
4
4
"author" : " Marius Sili (https://github.com/silimarius)" ,
5
- "private " : true ,
5
+ "description " : " Mina program and contract for zk-states library " ,
6
6
"keywords" : [
7
7
" mina-zkapp" ,
8
8
" mina-zk-app" ,
12
12
"type" : " module" ,
13
13
"main" : " build/src/index.js" ,
14
14
"types" : " build/src/index.d.ts" ,
15
+ "files" : [
16
+ " build/**/*"
17
+ ],
18
+ "license" : " MIT" ,
15
19
"scripts" : {
16
20
"clean" : " rm -rf build/" ,
17
21
"build" : " tsc" ,
42
46
"husky" : " ^7.0.1" ,
43
47
"jest" : " ^27.3.1" ,
44
48
"lint-staged" : " ^11.0.1" ,
45
- "o1js" : " ^0.12.1 " ,
49
+ "o1js" : " ^0.13.0 " ,
46
50
"prettier" : " ^2.3.2" ,
47
51
"ts-jest" : " ^27.0.7" ,
48
52
"typescript" : " ^4.7.2" ,
49
53
"zod" : " ^3.22.2"
50
54
},
51
55
"peerDependencies" : {
52
- "o1js" : " 0.12 .*"
56
+ "o1js" : " 0.13 .*"
53
57
}
54
58
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " zk-states" ,
3
- "version" : " 0.1.0 " ,
3
+ "version" : " 0.1.1 " ,
4
4
"license" : " MIT" ,
5
5
"description" : " Verifiable state manager for React based on o1js & Mina protocol" ,
6
6
"typesVersions" : {
75
75
"eslint-plugin-react-hooks" : " ^4.6.0" ,
76
76
"eslint-plugin-vitest" : " ^0.2.8" ,
77
77
"jsdom" : " ^22.1.0" ,
78
- "o1js" : " ^0.12.1 " ,
78
+ "o1js" : " ^0.13.0 " ,
79
79
"prettier" : " ^3.0.0" ,
80
80
"react" : " ^18.2.0" ,
81
81
"react-dom" : " ^18.2.0" ,
91
91
"zustand" : " ^4.3.9"
92
92
},
93
93
"peerDependencies" : {
94
- "o1js" : " >=0.12.1 " ,
94
+ "o1js" : " >=0.13.0 " ,
95
95
"react" : " >=18.0.0" ,
96
96
"react-dom" : " >=18.0.0" ,
97
97
"zustand" : " >=4.3.9"
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const createZKState = <T extends object>(
34
34
workerClient : ZkAppWorkerClient ,
35
35
createState : StateCreator < T , [ ] , [ ] > ,
36
36
networkName : MinaNetwork = "berkeley" ,
37
- appPublicKeyBase58 = "B62qrquKapqyBXxtEBGQTUKLzHeD7xJnxG1qro83HjXhFj7rBiLTuXD " ,
37
+ appPublicKeyBase58 = "B62qnQqrPW5Cx71WavaPjUfUzdx1eEgfnFXEqeQV9m8DKJn3bUW4BF8 " ,
38
38
) => {
39
39
const useZKStore = create < T & { rollback : ( oldState : T ) => void } > (
40
40
zkImpl (
@@ -93,7 +93,14 @@ export const createZKState = <T extends object>(
93
93
94
94
const proof = await workerClient . init (
95
95
{ appPublicKey58 : appPublicKeyBase58 } ,
96
- ( ) => { } ,
96
+ ( event ) => {
97
+ switch ( event . updateType ) {
98
+ case "initializationProgress" : {
99
+ setInitializationProgress ( event . status ) ;
100
+ break ;
101
+ }
102
+ }
103
+ } ,
97
104
( payload ) => {
98
105
switch ( payload . updateType ) {
99
106
case "latestProof" : {
@@ -121,10 +128,6 @@ export const createZKState = <T extends object>(
121
128
setProofFailed ( false ) ;
122
129
break ;
123
130
}
124
- case "initializationProgress" : {
125
- setInitializationProgress ( workerRes . status ) ;
126
- break ;
127
- }
128
131
}
129
132
} ,
130
133
) ;
Original file line number Diff line number Diff line change @@ -129,7 +129,6 @@ interface InititializationProgressUpdate {
129
129
}
130
130
131
131
export type UIUpdate =
132
- | InititializationProgressUpdate
133
132
| LatestProofUpdate
134
133
| UpdateQueueUpdate
135
134
| IsProvingUpdate
@@ -140,7 +139,9 @@ interface WorkerErrorUpdate {
140
139
updateType : "workerError" ;
141
140
}
142
141
143
- export type WorkerStateUpdate = WorkerErrorUpdate ;
142
+ export type WorkerStateUpdate =
143
+ | WorkerErrorUpdate
144
+ | InititializationProgressUpdate ;
144
145
145
146
export interface TxRes {
146
147
transaction : string ;
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {
10
10
fetchAccountArgsSchema ,
11
11
initArgsSchema ,
12
12
setMinaNetworkArgsSchema ,
13
- InitializationProgress ,
14
13
} from "./types" ;
15
14
import { logger } from "./utils" ;
16
15
You can’t perform that action at this time.
0 commit comments