File tree Expand file tree Collapse file tree 8 files changed +18
-9
lines changed Expand file tree Collapse file tree 8 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 13
13
},
14
14
"files" : [" dist" ],
15
15
"scripts" : {
16
- "build" : " tsup" ,
16
+ "build" : " tsc --noEmit && tsup" ,
17
17
"test" : " bun test" ,
18
18
"cleanup" : " rimraf dist .turbo"
19
19
},
Original file line number Diff line number Diff line change 17
17
},
18
18
"files" : [" dist" ],
19
19
"scripts" : {
20
- "build" : " tsup" ,
20
+ "build" : " tsc --noEmit && tsup" ,
21
21
"test" : " bun test --rerun-each 3" ,
22
22
"cleanup" : " rimraf dist .turbo"
23
23
},
Original file line number Diff line number Diff line change 13
13
},
14
14
"files" : [" dist" ],
15
15
"scripts" : {
16
- "build" : " tsup" ,
16
+ "build" : " tsc --noEmit && tsup" ,
17
17
"test" : " bun test --rerun-each 3" ,
18
18
"cleanup" : " rimraf dist .turbo"
19
19
},
Original file line number Diff line number Diff line change 13
13
},
14
14
"files" : [" dist" ],
15
15
"scripts" : {
16
- "build" : " tsup" ,
16
+ "build" : " tsc --noEmit && tsup" ,
17
17
"test" : " bun test" ,
18
18
"cleanup" : " rimraf dist .turbo"
19
19
},
Original file line number Diff line number Diff line change 13
13
},
14
14
"files" : [" dist" ],
15
15
"scripts" : {
16
- "build" : " tsup" ,
16
+ "build" : " tsc --noEmit && tsup" ,
17
17
"test" : " bun test" ,
18
18
"cleanup" : " rimraf dist .turbo"
19
19
},
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import type {
11
11
TransactionBodySchema ,
12
12
TransactionPayloadSchema ,
13
13
TransactionReceiptSchema ,
14
+ ZkAppCommandBodySchema ,
14
15
ZkAppCommandPayload ,
15
16
} from "./validation" ;
16
17
@@ -24,6 +25,7 @@ export type PrivateKey = z.infer<typeof PrivateKeySchema>;
24
25
export type TransactionBody = z . infer < typeof TransactionBodySchema > ;
25
26
export type TransactionPayload = z . infer < typeof TransactionPayloadSchema > ;
26
27
export type PartialTransaction = z . infer < typeof PartialTransactionSchema > ;
28
+ export type ZkAppCommandBody = z . infer < typeof ZkAppCommandBodySchema > ;
27
29
export type ZkAppCommandProperties = z . infer < typeof ZkAppCommandPayload > ;
28
30
29
31
/**
Original file line number Diff line number Diff line change @@ -55,18 +55,24 @@ export const TransactionPayloadSchema = z
55
55
} )
56
56
. strict ( ) ;
57
57
58
- export const PartialTransactionSchema = TransactionPayloadSchema . extend ( {
58
+ export const PartialTransactionSchema = TransactionBodySchema . extend ( {
59
59
fee : z . coerce . string ( ) . optional ( ) ,
60
60
nonce : z . coerce . string ( ) . optional ( ) ,
61
61
} ) ;
62
62
63
- export const ZkAppCommandPayload = z
63
+ export const ZkAppCommandBodySchema = z
64
64
. object ( {
65
65
zkappCommand : JsonSchema ,
66
66
feePayer : FeePayerSchema ,
67
67
} )
68
68
. strict ( ) ;
69
69
70
+ export const ZkAppCommandPayload = z
71
+ . object ( {
72
+ command : ZkAppCommandBodySchema ,
73
+ } )
74
+ . strict ( ) ;
75
+
70
76
/**
71
77
* Return type schemas
72
78
*/
@@ -112,7 +118,7 @@ export const SignedTransactionSchema = z
112
118
. object ( {
113
119
signature : SignatureSchema ,
114
120
publicKey : PublicKeySchema ,
115
- data : z . union ( [ TransactionBodySchema , ZkAppCommandPayload ] ) ,
121
+ data : z . union ( [ TransactionBodySchema , ZkAppCommandBodySchema ] ) ,
116
122
} )
117
123
. strict ( ) ;
118
124
Original file line number Diff line number Diff line change 1
1
{
2
- "extends" : " @tsconfig/bun/tsconfig.json"
2
+ "extends" : " @tsconfig/bun/tsconfig.json" ,
3
+ "exclude" : [" apps" ]
3
4
}
You can’t perform that action at this time.
0 commit comments