@@ -27,82 +27,62 @@ export const AddChainRequestParams = z
27
27
. strict ( ) ;
28
28
29
29
// Params
30
- export const RequestWithContext = z . object ( {
31
- context : z . record ( z . any ( ) ) . default ( { } ) . optional ( )
32
- } ) . strict ( )
33
- export const AccountsRequestParamsSchema = RequestWithContext
34
- . extend ( {
35
- method : z . literal ( "mina_accounts" ) ,
36
- } )
37
- . strict ( ) ;
38
- export const RequestAccountsRequestParamsSchema = RequestWithContext
39
- . extend ( {
40
- method : z . literal ( "mina_requestAccounts" ) ,
41
- } )
42
- . strict ( ) ;
43
- export const ChainIdRequestParamsSchema = RequestWithContext
44
- . extend ( { method : z . literal ( "mina_chainId" ) } )
45
- . strict ( ) ;
46
- export const ChainInformationRequestParamsSchema = RequestWithContext
47
- . extend ( { method : z . literal ( "mina_chainInformation" ) } )
48
- . strict ( ) ;
49
- export const GetBalanceRequestParamsSchema = RequestWithContext
50
- . extend ( { method : z . literal ( "mina_getBalance" ) } )
51
- . strict ( ) ;
52
- export const SignRequestParamsSchema = RequestWithContext
53
- . extend ( {
54
- method : z . literal ( "mina_sign" ) ,
55
- params : z . array ( z . string ( ) ) ,
56
- } )
57
- . strict ( ) ;
58
- export const SignFieldsRequestParamsSchema = RequestWithContext
59
- . extend ( {
60
- method : z . literal ( "mina_signFields" ) ,
61
- params : z . array ( z . array ( FieldSchema ) ) ,
62
- } )
63
- . strict ( ) ;
64
- export const SignTransactionRequestParamsSchema = RequestWithContext
65
- . extend ( {
66
- method : z . literal ( "mina_signTransaction" ) ,
67
- params : z . array ( z . union ( [ TransactionPayload , ZkAppCommandPayload ] ) ) ,
68
- } )
69
- . strict ( ) ;
70
- export const SendTransactionRequestParamsSchema = RequestWithContext
71
- . extend ( {
72
- method : z . literal ( "mina_sendTransaction" ) ,
73
- params : z . array ( SignedTransactionSchema ) ,
74
- } )
75
- . strict ( ) ;
76
- export const CreateNullifierRequestParamsSchema = RequestWithContext
77
- . extend ( {
78
- method : z . literal ( "mina_createNullifier" ) ,
79
- params : z . array ( z . array ( FieldSchema ) ) ,
80
- } )
81
- . strict ( ) ;
82
- export const SwitchChainRequestParamsSchema = RequestWithContext
83
- . extend ( {
84
- method : z . literal ( "mina_switchChain" ) ,
85
- params : z . array ( z . string ( ) ) ,
86
- } )
87
- . strict ( ) ;
88
- export const AddChainRequestParamsSchema = RequestWithContext
89
- . extend ( {
90
- method : z . literal ( "mina_addChain" ) ,
91
- params : z . array ( AddChainRequestParams ) ,
92
- } )
93
- . strict ( ) ;
94
- export const SetStateRequestParamsSchema = RequestWithContext
95
- . extend ( {
96
- method : z . literal ( "mina_setState" ) ,
97
- params : z . array ( JsonSchema ) ,
98
- } )
99
- . strict ( ) ;
100
- export const GetStateRequestParamsSchema = RequestWithContext
101
- . extend ( {
102
- method : z . literal ( "mina_getState" ) ,
103
- params : z . array ( z . string ( ) ) ,
30
+ export const RequestWithContext = z
31
+ . object ( {
32
+ context : z . record ( z . any ( ) ) . default ( { } ) . optional ( ) ,
104
33
} )
105
34
. strict ( ) ;
35
+ export const AccountsRequestParamsSchema = RequestWithContext . extend ( {
36
+ method : z . literal ( "mina_accounts" ) ,
37
+ } ) . strict ( ) ;
38
+ export const RequestAccountsRequestParamsSchema = RequestWithContext . extend ( {
39
+ method : z . literal ( "mina_requestAccounts" ) ,
40
+ } ) . strict ( ) ;
41
+ export const ChainIdRequestParamsSchema = RequestWithContext . extend ( {
42
+ method : z . literal ( "mina_chainId" ) ,
43
+ } ) . strict ( ) ;
44
+ export const ChainInformationRequestParamsSchema = RequestWithContext . extend ( {
45
+ method : z . literal ( "mina_chainInformation" ) ,
46
+ } ) . strict ( ) ;
47
+ export const GetBalanceRequestParamsSchema = RequestWithContext . extend ( {
48
+ method : z . literal ( "mina_getBalance" ) ,
49
+ } ) . strict ( ) ;
50
+ export const SignRequestParamsSchema = RequestWithContext . extend ( {
51
+ method : z . literal ( "mina_sign" ) ,
52
+ params : z . array ( z . string ( ) ) ,
53
+ } ) . strict ( ) ;
54
+ export const SignFieldsRequestParamsSchema = RequestWithContext . extend ( {
55
+ method : z . literal ( "mina_signFields" ) ,
56
+ params : z . array ( z . array ( FieldSchema ) ) ,
57
+ } ) . strict ( ) ;
58
+ export const SignTransactionRequestParamsSchema = RequestWithContext . extend ( {
59
+ method : z . literal ( "mina_signTransaction" ) ,
60
+ params : z . array ( z . union ( [ TransactionPayload , ZkAppCommandPayload ] ) ) ,
61
+ } ) . strict ( ) ;
62
+ export const SendTransactionRequestParamsSchema = RequestWithContext . extend ( {
63
+ method : z . literal ( "mina_sendTransaction" ) ,
64
+ params : z . array ( SignedTransactionSchema ) ,
65
+ } ) . strict ( ) ;
66
+ export const CreateNullifierRequestParamsSchema = RequestWithContext . extend ( {
67
+ method : z . literal ( "mina_createNullifier" ) ,
68
+ params : z . array ( z . array ( FieldSchema ) ) ,
69
+ } ) . strict ( ) ;
70
+ export const SwitchChainRequestParamsSchema = RequestWithContext . extend ( {
71
+ method : z . literal ( "mina_switchChain" ) ,
72
+ params : z . array ( z . string ( ) ) ,
73
+ } ) . strict ( ) ;
74
+ export const AddChainRequestParamsSchema = RequestWithContext . extend ( {
75
+ method : z . literal ( "mina_addChain" ) ,
76
+ params : z . array ( AddChainRequestParams ) ,
77
+ } ) . strict ( ) ;
78
+ export const SetStateRequestParamsSchema = RequestWithContext . extend ( {
79
+ method : z . literal ( "mina_setState" ) ,
80
+ params : z . array ( JsonSchema ) ,
81
+ } ) . strict ( ) ;
82
+ export const GetStateRequestParamsSchema = RequestWithContext . extend ( {
83
+ method : z . literal ( "mina_getState" ) ,
84
+ params : z . array ( z . string ( ) ) ,
85
+ } ) . strict ( ) ;
106
86
107
87
// Returns
108
88
export const AccountsRequestReturnSchema = z
0 commit comments