@dorafactory/maci-sdk 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -7
- package/dist/index.js +751 -187
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +748 -187
- package/dist/index.mjs.map +1 -1
- package/dist/libs/circom/tree.d.ts +20 -20
- package/dist/libs/contract/ts/AMaci.client.d.ts +1 -1
- package/dist/libs/contract/ts/Maci.client.d.ts +21 -47
- package/dist/libs/contract/ts/Maci.types.d.ts +40 -31
- package/dist/libs/contract/ts/OracleMaci.client.d.ts +52 -52
- package/dist/libs/contract/ts/OracleMaci.types.d.ts +17 -7
- package/dist/libs/contract/ts/Registry.client.d.ts +2 -2
- package/dist/libs/contract/types.d.ts +2 -2
- package/dist/libs/errors/types.d.ts +1 -0
- package/dist/libs/http/http.d.ts +1 -1
- package/dist/libs/index.d.ts +3 -0
- package/dist/libs/indexer/indexer.d.ts +11 -2
- package/dist/libs/maci/index.d.ts +1 -0
- package/dist/libs/maci/maci.d.ts +64 -5
- package/dist/libs/oracle-certificate/oracle-certificate.d.ts +1 -21
- package/dist/libs/oracle-certificate/types.d.ts +12 -0
- package/dist/libs/query/event.d.ts +7 -0
- package/dist/libs/query/index.d.ts +1 -0
- package/dist/maci.d.ts +7 -5
- package/dist/types/index.d.ts +22 -0
- package/package.json +1 -1
- package/src/libs/const.ts +3 -2
- package/src/libs/contract/contract.ts +2 -6
- package/src/libs/contract/ts/AMaci.client.ts +868 -874
- package/src/libs/contract/ts/AMaci.types.ts +216 -216
- package/src/libs/contract/ts/Maci.client.ts +748 -888
- package/src/libs/contract/ts/Maci.types.ts +229 -224
- package/src/libs/contract/ts/OracleMaci.client.ts +623 -348
- package/src/libs/contract/ts/OracleMaci.types.ts +191 -138
- package/src/libs/contract/ts/Registry.client.ts +438 -446
- package/src/libs/contract/ts/Registry.types.ts +97 -97
- package/src/libs/contract/types.ts +6 -2
- package/src/libs/contract/utils.ts +9 -0
- package/src/libs/errors/types.ts +1 -0
- package/src/libs/http/http.ts +3 -7
- package/src/libs/index.ts +3 -0
- package/src/libs/indexer/indexer.ts +18 -0
- package/src/libs/maci/index.ts +1 -0
- package/src/libs/maci/maci.ts +302 -10
- package/src/libs/oracle-certificate/oracle-certificate.ts +19 -73
- package/src/libs/oracle-certificate/types.ts +15 -1
- package/src/libs/query/event.ts +78 -0
- package/src/libs/query/index.ts +1 -0
- package/src/maci.ts +27 -5
- package/src/types/index.ts +28 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
|
|
3
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
|
-
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
|
5
|
-
*/
|
|
2
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
|
|
3
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
|
+
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
|
5
|
+
*/
|
|
6
6
|
|
|
7
7
|
export type Uint256 = string;
|
|
8
8
|
export type Addr = string;
|
|
9
9
|
export type Timestamp = Uint64;
|
|
10
10
|
export type Uint64 = string;
|
|
11
|
-
export type VotingPowerMode =
|
|
11
|
+
export type VotingPowerMode = 'slope' | 'threshold';
|
|
12
12
|
export interface InstantiateMsg {
|
|
13
13
|
certification_system: Uint256;
|
|
14
14
|
circuit_type: Uint256;
|
|
@@ -56,7 +56,17 @@ export interface PlonkVKeyType {
|
|
|
56
56
|
selector_commitments: string[];
|
|
57
57
|
}
|
|
58
58
|
export interface QuinaryTreeRoot {
|
|
59
|
-
zeros: [
|
|
59
|
+
zeros: [
|
|
60
|
+
Uint256,
|
|
61
|
+
Uint256,
|
|
62
|
+
Uint256,
|
|
63
|
+
Uint256,
|
|
64
|
+
Uint256,
|
|
65
|
+
Uint256,
|
|
66
|
+
Uint256,
|
|
67
|
+
Uint256,
|
|
68
|
+
Uint256
|
|
69
|
+
];
|
|
60
70
|
}
|
|
61
71
|
export interface RoundInfo {
|
|
62
72
|
description: string;
|
|
@@ -72,73 +82,89 @@ export interface VotingPowerArgs {
|
|
|
72
82
|
slope: Uint256;
|
|
73
83
|
threshold: Uint256;
|
|
74
84
|
}
|
|
75
|
-
export type ExecuteMsg =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
85
|
+
export type ExecuteMsg =
|
|
86
|
+
| {
|
|
87
|
+
set_params: {
|
|
88
|
+
int_state_tree_depth: Uint256;
|
|
89
|
+
message_batch_size: Uint256;
|
|
90
|
+
state_tree_depth: Uint256;
|
|
91
|
+
vote_option_tree_depth: Uint256;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
| {
|
|
95
|
+
set_round_info: {
|
|
96
|
+
round_info: RoundInfo;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
| {
|
|
100
|
+
set_vote_options_map: {
|
|
101
|
+
vote_option_map: string[];
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
| {
|
|
105
|
+
start_voting_period: {};
|
|
106
|
+
}
|
|
107
|
+
| {
|
|
108
|
+
sign_up: {
|
|
109
|
+
amount: Uint256;
|
|
110
|
+
certificate: string;
|
|
111
|
+
pubkey: PubKey;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
| {
|
|
115
|
+
start_process_period: {};
|
|
116
|
+
}
|
|
117
|
+
| {
|
|
118
|
+
stop_voting_period: {};
|
|
119
|
+
}
|
|
120
|
+
| {
|
|
121
|
+
publish_message: {
|
|
122
|
+
enc_pub_key: PubKey;
|
|
123
|
+
message: MessageData;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
| {
|
|
127
|
+
process_message: {
|
|
128
|
+
groth16_proof?: Groth16ProofType | null;
|
|
129
|
+
new_state_commitment: Uint256;
|
|
130
|
+
plonk_proof?: PlonkProofType | null;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
| {
|
|
134
|
+
stop_processing_period: {};
|
|
135
|
+
}
|
|
136
|
+
| {
|
|
137
|
+
process_tally: {
|
|
138
|
+
groth16_proof?: Groth16ProofType | null;
|
|
139
|
+
new_tally_commitment: Uint256;
|
|
140
|
+
plonk_proof?: PlonkProofType | null;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
| {
|
|
144
|
+
stop_tallying_period: {
|
|
145
|
+
results: Uint256[];
|
|
146
|
+
salt: Uint256;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
| {
|
|
150
|
+
grant: {
|
|
151
|
+
base_amount: Uint128;
|
|
152
|
+
grantee: Addr;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
| {
|
|
156
|
+
revoke: {
|
|
157
|
+
grantee: Addr;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
| {
|
|
161
|
+
bond: {};
|
|
162
|
+
}
|
|
163
|
+
| {
|
|
164
|
+
withdraw: {
|
|
165
|
+
amount?: Uint128 | null;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
142
168
|
export type Uint128 = string;
|
|
143
169
|
export interface MessageData {
|
|
144
170
|
data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
|
|
@@ -164,70 +190,97 @@ export interface PlonkProofType {
|
|
|
164
190
|
wire_values_at_z: string[];
|
|
165
191
|
wire_values_at_z_omega: string[];
|
|
166
192
|
}
|
|
167
|
-
export type QueryMsg =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
};
|
|
230
|
-
|
|
193
|
+
export type QueryMsg =
|
|
194
|
+
| {
|
|
195
|
+
get_round_info: {};
|
|
196
|
+
}
|
|
197
|
+
| {
|
|
198
|
+
get_voting_time: {};
|
|
199
|
+
}
|
|
200
|
+
| {
|
|
201
|
+
get_period: {};
|
|
202
|
+
}
|
|
203
|
+
| {
|
|
204
|
+
get_num_sign_up: {};
|
|
205
|
+
}
|
|
206
|
+
| {
|
|
207
|
+
get_msg_chain_length: {};
|
|
208
|
+
}
|
|
209
|
+
| {
|
|
210
|
+
get_processed_msg_count: {};
|
|
211
|
+
}
|
|
212
|
+
| {
|
|
213
|
+
get_processed_user_count: {};
|
|
214
|
+
}
|
|
215
|
+
| {
|
|
216
|
+
get_result: {
|
|
217
|
+
index: Uint256;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
| {
|
|
221
|
+
get_all_result: {};
|
|
222
|
+
}
|
|
223
|
+
| {
|
|
224
|
+
get_state_idx_inc: {
|
|
225
|
+
address: Addr;
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
| {
|
|
229
|
+
get_voice_credit_balance: {
|
|
230
|
+
index: Uint256;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
| {
|
|
234
|
+
is_white_list: {
|
|
235
|
+
amount: Uint256;
|
|
236
|
+
certificate: string;
|
|
237
|
+
sender: string;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
| {
|
|
241
|
+
white_balance_of: {
|
|
242
|
+
amount: Uint256;
|
|
243
|
+
certificate: string;
|
|
244
|
+
sender: string;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
| {
|
|
248
|
+
white_info: {
|
|
249
|
+
sender: string;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
| {
|
|
253
|
+
grant_info: {
|
|
254
|
+
grantee: string;
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
| {
|
|
258
|
+
max_whitelist_num: {};
|
|
259
|
+
}
|
|
260
|
+
| {
|
|
261
|
+
vote_option_map: {};
|
|
262
|
+
}
|
|
263
|
+
| {
|
|
264
|
+
max_vote_options: {};
|
|
265
|
+
}
|
|
266
|
+
| {
|
|
267
|
+
query_total_fee_grant: {};
|
|
268
|
+
}
|
|
269
|
+
| {
|
|
270
|
+
query_circuit_type: {};
|
|
271
|
+
}
|
|
272
|
+
| {
|
|
273
|
+
query_cert_system: {};
|
|
274
|
+
}
|
|
275
|
+
| {
|
|
276
|
+
query_oracle_whitelist_config: {};
|
|
277
|
+
};
|
|
278
|
+
export type PeriodStatus =
|
|
279
|
+
| 'pending'
|
|
280
|
+
| 'voting'
|
|
281
|
+
| 'processing'
|
|
282
|
+
| 'tallying'
|
|
283
|
+
| 'ended';
|
|
231
284
|
export interface Period {
|
|
232
285
|
status: PeriodStatus;
|
|
233
286
|
}
|
|
@@ -251,4 +304,4 @@ export interface WhitelistConfig {
|
|
|
251
304
|
fee_amount: Uint128;
|
|
252
305
|
fee_grant: boolean;
|
|
253
306
|
is_register: boolean;
|
|
254
|
-
}
|
|
307
|
+
}
|