@dorafactory/maci-sdk 0.0.12 → 0.0.13

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.
Files changed (60) hide show
  1. package/dist/browser.d.mts +2007 -0
  2. package/dist/browser.d.ts +2007 -0
  3. package/dist/browser.js +30833 -0
  4. package/dist/browser.js.map +1 -0
  5. package/dist/browser.mjs +30844 -0
  6. package/dist/browser.mjs.map +1 -0
  7. package/dist/index.d.mts +2008 -0
  8. package/dist/index.d.ts +2006 -14
  9. package/dist/index.js +4 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +1 -1
  12. package/dist/index.mjs.map +1 -1
  13. package/package.json +31 -12
  14. package/src/browser.ts +17 -0
  15. package/src/libs/maci/maci.ts +1 -1
  16. package/src/polyfills/browser-polyfills.ts +9 -0
  17. package/dist/libs/circom/circomlib.d.ts +0 -39
  18. package/dist/libs/circom/index.d.ts +0 -10
  19. package/dist/libs/circom/tree.d.ts +0 -23
  20. package/dist/libs/circom/types.d.ts +0 -7
  21. package/dist/libs/const.d.ts +0 -117
  22. package/dist/libs/contract/config.d.ts +0 -29
  23. package/dist/libs/contract/contract.d.ts +0 -43
  24. package/dist/libs/contract/index.d.ts +0 -1
  25. package/dist/libs/contract/ts/AMaci.client.d.ts +0 -216
  26. package/dist/libs/contract/ts/AMaci.types.d.ts +0 -203
  27. package/dist/libs/contract/ts/Maci.client.d.ts +0 -180
  28. package/dist/libs/contract/ts/Maci.types.d.ts +0 -226
  29. package/dist/libs/contract/ts/OracleMaci.client.d.ts +0 -206
  30. package/dist/libs/contract/ts/OracleMaci.types.d.ts +0 -263
  31. package/dist/libs/contract/ts/Registry.client.d.ts +0 -128
  32. package/dist/libs/contract/ts/Registry.types.d.ts +0 -110
  33. package/dist/libs/contract/types.d.ts +0 -39
  34. package/dist/libs/contract/utils.d.ts +0 -59
  35. package/dist/libs/contract/vars.d.ts +0 -63
  36. package/dist/libs/errors/index.d.ts +0 -28
  37. package/dist/libs/errors/types.d.ts +0 -15
  38. package/dist/libs/http/http.d.ts +0 -16
  39. package/dist/libs/http/index.d.ts +0 -1
  40. package/dist/libs/index.d.ts +0 -7
  41. package/dist/libs/indexer/index.d.ts +0 -1
  42. package/dist/libs/indexer/indexer.d.ts +0 -142
  43. package/dist/libs/indexer/types.d.ts +0 -7
  44. package/dist/libs/maci/index.d.ts +0 -1
  45. package/dist/libs/maci/maci.d.ts +0 -121
  46. package/dist/libs/maci/types.d.ts +0 -6
  47. package/dist/libs/oracle-certificate/index.d.ts +0 -1
  48. package/dist/libs/oracle-certificate/oracle-certificate.d.ts +0 -7
  49. package/dist/libs/oracle-certificate/types.d.ts +0 -17
  50. package/dist/libs/query/account.d.ts +0 -7
  51. package/dist/libs/query/circuit.d.ts +0 -8
  52. package/dist/libs/query/event.d.ts +0 -7
  53. package/dist/libs/query/index.d.ts +0 -7
  54. package/dist/libs/query/operator.d.ts +0 -9
  55. package/dist/libs/query/proof.d.ts +0 -7
  56. package/dist/libs/query/round.d.ts +0 -11
  57. package/dist/libs/query/transaction.d.ts +0 -9
  58. package/dist/maci.d.ts +0 -157
  59. package/dist/types/index.d.ts +0 -294
  60. package/dist/utils/index.d.ts +0 -17
package/dist/index.d.ts CHANGED
@@ -1,16 +1,2008 @@
1
- export * from './libs';
2
- export type * from './types';
3
- export * from './types';
4
- export * from './libs/const';
5
- export { MaciClient } from './maci';
6
- export { Http } from './libs/http';
7
- export { Round } from './libs/query';
8
- export { UserAccount } from './libs/query';
9
- export { Circuit } from './libs/query';
10
- export { Operator } from './libs/query';
11
- export { Proof } from './libs/query';
12
- export { Transaction } from './libs/query';
13
- export * from './libs/circom';
14
- export * from './utils';
1
+ import * as _cosmjs_cosmwasm_stargate from '@cosmjs/cosmwasm-stargate';
2
+ import { CosmWasmClient, ExecuteResult, SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate';
3
+ import { StdFee, Coin } from '@cosmjs/amino';
4
+ import { OfflineSigner } from '@cosmjs/proto-signing';
15
5
  export { Scalar, utils } from 'ffjavascript';
16
6
  export { default as createBlakeHash } from 'blake-hash';
7
+
8
+ type FetchOptions = RequestInit & {
9
+ next?: {
10
+ revalidate?: boolean | number;
11
+ };
12
+ };
13
+ declare class Http {
14
+ private customFetch?;
15
+ private apiEndpoint;
16
+ private restEndpoint;
17
+ private defaultOptions?;
18
+ constructor(apiEndpoint: string, restEndpoint: string, customFetch?: typeof fetch | undefined, defaultOptions?: FetchOptions);
19
+ private getFetch;
20
+ fetch(url: string, options?: any): Promise<Response>;
21
+ fetchGraphql<T>(query: string, after: string, limit?: number | null): Promise<T>;
22
+ fetchRest(path: string): Promise<any>;
23
+ }
24
+
25
+ /**
26
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
27
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
28
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
29
+ */
30
+ type Addr$3 = string;
31
+ type Uint256$3 = string;
32
+ type Timestamp$3 = Uint64$3;
33
+ type Uint64$3 = string;
34
+ interface PubKey$3 {
35
+ x: Uint256$3;
36
+ y: Uint256$3;
37
+ }
38
+ interface RoundInfo$3 {
39
+ description: string;
40
+ link: string;
41
+ title: string;
42
+ }
43
+ interface VotingTime$3 {
44
+ end_time: Timestamp$3;
45
+ start_time: Timestamp$3;
46
+ }
47
+ interface Whitelist$2 {
48
+ users: WhitelistConfig$3[];
49
+ }
50
+ interface WhitelistConfig$3 {
51
+ addr: Addr$3;
52
+ }
53
+ interface ValidatorSet {
54
+ addresses: Addr$3[];
55
+ }
56
+ interface AdminResponse {
57
+ admin: Addr$3;
58
+ }
59
+ type String = string;
60
+ type Boolean$3 = boolean;
61
+
62
+ /**
63
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
64
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
65
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
66
+ */
67
+ type Uint256$2 = string;
68
+ type Timestamp$2 = Uint64$2;
69
+ type Uint64$2 = string;
70
+ interface PubKey$2 {
71
+ x: Uint256$2;
72
+ y: Uint256$2;
73
+ }
74
+ interface RoundInfo$2 {
75
+ description: string;
76
+ link: string;
77
+ title: string;
78
+ }
79
+ interface VotingTime$2 {
80
+ end_time?: Timestamp$2 | null;
81
+ start_time?: Timestamp$2 | null;
82
+ }
83
+ interface Whitelist$1 {
84
+ users: WhitelistConfig$2[];
85
+ }
86
+ interface WhitelistConfig$2 {
87
+ addr: string;
88
+ balance: Uint256$2;
89
+ }
90
+ type Uint128$2 = string;
91
+ interface MessageData$2 {
92
+ data: [Uint256$2, Uint256$2, Uint256$2, Uint256$2, Uint256$2, Uint256$2, Uint256$2];
93
+ }
94
+ interface Groth16ProofType$2 {
95
+ a: string;
96
+ b: string;
97
+ c: string;
98
+ }
99
+ interface PlonkProofType$1 {
100
+ grand_product_at_z_omega: string;
101
+ grand_product_commitment: string;
102
+ input_values: string[];
103
+ linearization_polynomial_at_z: string;
104
+ n: number;
105
+ num_inputs: number;
106
+ opening_at_z_omega_proof: string;
107
+ opening_at_z_proof: string;
108
+ permutation_polynomials_at_z: string[];
109
+ quotient_poly_commitments: string[];
110
+ quotient_polynomial_at_z: string;
111
+ wire_commitments: string[];
112
+ wire_values_at_z: string[];
113
+ wire_values_at_z_omega: string[];
114
+ }
115
+ type Addr$2 = string;
116
+ type PeriodStatus$2 = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
117
+ interface Period$2 {
118
+ status: PeriodStatus$2;
119
+ }
120
+ type Boolean$2 = boolean;
121
+ type ArrayOfString$2 = string[];
122
+
123
+ type CreateRoundParams = {
124
+ signer: OfflineSigner;
125
+ title: string;
126
+ description?: string;
127
+ link?: string;
128
+ startVoting: Date;
129
+ endVoting: Date;
130
+ circuitType: MaciCircuitType;
131
+ };
132
+ type CreateAMaciRoundParams = {
133
+ maxVoter: string;
134
+ maxOption: string;
135
+ operator: string;
136
+ whitelist: Whitelist$2;
137
+ voiceCreditAmount: string;
138
+ preDeactivateRoot?: string;
139
+ } & CreateRoundParams;
140
+ type CreateMaciRoundParams = {
141
+ maxVoter: string;
142
+ maxOption: string;
143
+ operatorPubkey: string;
144
+ whitelist: Whitelist$1;
145
+ certSystemType: MaciCertSystemType;
146
+ } & CreateRoundParams;
147
+ type CreateOracleMaciRoundParams = {
148
+ voteOptionMap: string[];
149
+ operatorPubkey: string;
150
+ whitelistEcosystem: CertificateEcosystem;
151
+ whitelistSnapshotHeight: string;
152
+ whitelistVotingPowerArgs: {
153
+ mode: 'slope' | 'threshold';
154
+ slope: string;
155
+ threshold: string;
156
+ };
157
+ } & CreateRoundParams;
158
+
159
+ declare enum MaciCircuitType {
160
+ IP1V = "0",
161
+ QV = "1"
162
+ }
163
+ declare enum MaciCertSystemType {
164
+ GROTH16 = "groth16",
165
+ PLONK = "plonk"
166
+ }
167
+ declare enum MaciRoundType {
168
+ MACI = "0",
169
+ AMACI = "1",
170
+ ORACLE_MACI = "2"
171
+ }
172
+ type CertificateEcosystem = 'cosmoshub' | 'doravota';
173
+ type ClientParams = {
174
+ network: 'mainnet' | 'testnet';
175
+ rpcEndpoint?: string;
176
+ restEndpoint?: string;
177
+ apiEndpoint?: string;
178
+ certificateApiEndpoint?: string;
179
+ registryAddress?: string;
180
+ maciCodeId?: number;
181
+ oracleCodeId?: number;
182
+ customFetch?: typeof fetch;
183
+ defaultOptions?: FetchOptions;
184
+ feegrantOperator?: string;
185
+ whitelistBackendPubkey?: string;
186
+ };
187
+ type ContractParams = {
188
+ rpcEndpoint: string;
189
+ registryAddress: string;
190
+ maciCodeId: number;
191
+ oracleCodeId: number;
192
+ whitelistBackendPubkey: string;
193
+ feegrantOperator: string;
194
+ };
195
+ type TransactionType = {
196
+ id: string;
197
+ blockHeight: string;
198
+ txHash: string;
199
+ timestamp: string;
200
+ type: string;
201
+ status: string;
202
+ circuitName: string;
203
+ fee: string;
204
+ gasUsed: string;
205
+ gasWanted: string;
206
+ caller: string;
207
+ contractAddress: string;
208
+ };
209
+ type RoundType = {
210
+ id: string;
211
+ blockHeight: string;
212
+ txHash: string;
213
+ caller: string;
214
+ admin: string;
215
+ operator: string;
216
+ contractAddress: string;
217
+ circuitName: string;
218
+ timestamp: string;
219
+ votingStart: string;
220
+ votingEnd: string;
221
+ status: string;
222
+ period: string;
223
+ actionType: string;
224
+ roundTitle: string;
225
+ roundDescription: string;
226
+ roundLink: string;
227
+ coordinatorPubkeyX: string;
228
+ coordinatorPubkeyY: string;
229
+ voteOptionMap: string;
230
+ results: string;
231
+ allResult: string;
232
+ gasStationEnable: boolean;
233
+ totalGrant: string;
234
+ baseGrant: string;
235
+ totalBond: string;
236
+ circuitType: string;
237
+ circuitPower: string;
238
+ certificationSystem: string;
239
+ codeId: string;
240
+ maciType: string;
241
+ voiceCreditAmount: string;
242
+ preDeactivateRoot: string;
243
+ identity: string;
244
+ operatorLogoUrl?: string;
245
+ operatorMoniker?: string;
246
+ resultsList?: {
247
+ v: number;
248
+ v2: number;
249
+ }[];
250
+ };
251
+ type ProofType = {
252
+ nodes: {
253
+ id: string;
254
+ blockHeight: string;
255
+ txHash: string;
256
+ contractAddress: string;
257
+ timestamp: string;
258
+ actionType: string;
259
+ commitment: string;
260
+ proof: string;
261
+ }[];
262
+ };
263
+ type OperatorType = {
264
+ id: string;
265
+ validatorAddress: string;
266
+ operatorAddress: string;
267
+ coordinatorPubkeyX: string;
268
+ coordinatorPubkeyY: string;
269
+ identity: string;
270
+ logoUrl: string;
271
+ moniker: string;
272
+ activeRoundsCount: number;
273
+ completedRoundsCount: number;
274
+ };
275
+ type CircuitType = {
276
+ maciType: string;
277
+ circuitType: string;
278
+ displayName: string;
279
+ repoUrl: string;
280
+ zipUrl: string;
281
+ roundCount?: number;
282
+ };
283
+ type SignUpEventType = {
284
+ id: string;
285
+ blockHeight: string;
286
+ txHash: string;
287
+ contractAddress: string;
288
+ timestamp: string;
289
+ pubKey: string;
290
+ stateIdx: number;
291
+ balance: string;
292
+ };
293
+ type CircuitsCountGraphqlResponse = {
294
+ data: {
295
+ rounds: {
296
+ totalCount: number;
297
+ };
298
+ };
299
+ };
300
+ type ErrorResponse = {
301
+ code: number;
302
+ error: {
303
+ message: string;
304
+ type: string;
305
+ };
306
+ };
307
+ type SuccessResponse<T> = {
308
+ code: 200;
309
+ data: T;
310
+ };
311
+ type CircuitResponse = SuccessResponse<{
312
+ circuit: CircuitType;
313
+ }> | ErrorResponse;
314
+ type CircuitsResponse = SuccessResponse<{
315
+ circuits: CircuitType[];
316
+ }> | ErrorResponse;
317
+ type BalanceResponse = SuccessResponse<{
318
+ balance: string;
319
+ }> | ErrorResponse;
320
+ type OperatorResponse = SuccessResponse<{
321
+ operator: OperatorType;
322
+ }> | ErrorResponse;
323
+ type OperatorsResponse = SuccessResponse<{
324
+ operators: {
325
+ pageInfo: {
326
+ endCursor: string;
327
+ hasNextPage: boolean;
328
+ };
329
+ edges: {
330
+ cursor: string;
331
+ node: OperatorType;
332
+ }[];
333
+ totalCount: number;
334
+ };
335
+ }> | ErrorResponse;
336
+ type OperatorsGraphqlResponse = {
337
+ data: {
338
+ operators: {
339
+ pageInfo: {
340
+ endCursor: string;
341
+ hasNextPage: boolean;
342
+ };
343
+ edges: {
344
+ cursor: string;
345
+ node: OperatorType;
346
+ }[];
347
+ totalCount: number;
348
+ };
349
+ };
350
+ };
351
+ type RoundsCountGraphqlResponse = {
352
+ data: {
353
+ activeRoundsCount: {
354
+ totalCount: number;
355
+ };
356
+ completedRoundsCount: {
357
+ totalCount: number;
358
+ };
359
+ };
360
+ };
361
+ type TransactionGraphqlResponse = {
362
+ data: {
363
+ transaction: TransactionType;
364
+ };
365
+ };
366
+ type TransactionResponse = SuccessResponse<{
367
+ transaction: TransactionType;
368
+ }> | ErrorResponse;
369
+ type TransactionsGraphqlResponse = {
370
+ data: {
371
+ transactions: {
372
+ pageInfo: {
373
+ endCursor: string;
374
+ hasNextPage: boolean;
375
+ };
376
+ edges: {
377
+ cursor: string;
378
+ node: TransactionType;
379
+ }[];
380
+ totalCount: number;
381
+ };
382
+ };
383
+ };
384
+ type TransactionsResponse = SuccessResponse<{
385
+ transactions: {
386
+ pageInfo: {
387
+ endCursor: string;
388
+ hasNextPage: boolean;
389
+ };
390
+ edges: {
391
+ cursor: string;
392
+ node: TransactionType;
393
+ }[];
394
+ totalCount: number;
395
+ };
396
+ }> | ErrorResponse;
397
+ type RoundResponse = SuccessResponse<{
398
+ round: RoundType;
399
+ }> | ErrorResponse;
400
+ type RoundsResponse = SuccessResponse<{
401
+ rounds: {
402
+ pageInfo: {
403
+ endCursor: string;
404
+ hasNextPage: boolean;
405
+ };
406
+ edges: {
407
+ cursor: string;
408
+ node: RoundType;
409
+ }[];
410
+ totalCount: number;
411
+ };
412
+ }> | ErrorResponse;
413
+ type RoundGraphqlResponse = {
414
+ data: {
415
+ round: RoundType;
416
+ };
417
+ };
418
+ type RoundsGraphqlResponse = {
419
+ data: {
420
+ rounds: {
421
+ pageInfo: {
422
+ endCursor: string;
423
+ hasNextPage: boolean;
424
+ };
425
+ edges: {
426
+ cursor: string;
427
+ node: RoundType;
428
+ }[];
429
+ totalCount: number;
430
+ };
431
+ };
432
+ };
433
+ type ProofResponse = SuccessResponse<{
434
+ proofData: ProofType;
435
+ }> | ErrorResponse;
436
+ type ProofGraphqlResponse = {
437
+ data: {
438
+ proofData: ProofType;
439
+ };
440
+ };
441
+ type SignUpEventsResponse = SuccessResponse<{
442
+ signUpEvents: SignUpEventType[];
443
+ }> | ErrorResponse;
444
+ type SignUpEventsGraphqlResponse = {
445
+ data: {
446
+ signUpEvents: {
447
+ nodes: SignUpEventType[];
448
+ };
449
+ };
450
+ };
451
+
452
+ declare class UserAccount {
453
+ http: Http;
454
+ constructor(http: Http);
455
+ balanceOf(address: string): Promise<BalanceResponse>;
456
+ }
457
+
458
+ declare class Circuit {
459
+ http: Http;
460
+ constructor(http: Http);
461
+ getCircuitByName(name: string): Promise<CircuitResponse>;
462
+ getCircuits(): Promise<CircuitsResponse>;
463
+ }
464
+
465
+ declare class Operator {
466
+ http: Http;
467
+ amaciRegistryContract: string;
468
+ constructor(http: Http, amaciRegistryContract: string);
469
+ getOperatorByAddress(address: string): Promise<OperatorResponse>;
470
+ getOperators(after: string, limit?: number): Promise<OperatorsResponse>;
471
+ }
472
+
473
+ declare class Round {
474
+ http: Http;
475
+ constructor(http: Http);
476
+ getRoundById(address: string): Promise<RoundResponse>;
477
+ getRounds(after: string, limit?: number): Promise<RoundsResponse>;
478
+ getRoundsByCircuitName(circuitName: string, after: string, limit?: number): Promise<RoundsResponse>;
479
+ getRoundsByStatus(status: string, after: string, limit?: number): Promise<RoundsResponse>;
480
+ getRoundsByOperator(operator: string, after: string, limit?: number): Promise<RoundsResponse>;
481
+ }
482
+
483
+ declare class Transaction {
484
+ http: Http;
485
+ constructor(http: Http);
486
+ getTransactionByHash(txHash: string): Promise<TransactionResponse>;
487
+ getTransactions(after: string, limit?: number): Promise<TransactionsResponse>;
488
+ getTransactionsByContractAddress(address: string, after: string, limit?: number): Promise<TransactionsResponse>;
489
+ }
490
+
491
+ declare class Proof {
492
+ http: Http;
493
+ constructor(http: Http);
494
+ getProofByContractAddress(address: string): Promise<ProofResponse>;
495
+ }
496
+
497
+ declare class Event {
498
+ http: Http;
499
+ constructor(http: Http);
500
+ getSignUpEventByPubKey(contractAddress: string, pubKey: bigint[]): Promise<SignUpEventsResponse>;
501
+ }
502
+
503
+ type IndexerParams = {
504
+ restEndpoint: string;
505
+ apiEndpoint: string;
506
+ registryAddress: string;
507
+ http: Http;
508
+ };
509
+
510
+ /**
511
+ * @class Indexer
512
+ * @description This class is used to interact with Maci Indexer.
513
+ */
514
+ declare class Indexer {
515
+ restEndpoint: string;
516
+ apiEndpoint: string;
517
+ registryAddress: string;
518
+ http: Http;
519
+ round: Round;
520
+ account: UserAccount;
521
+ circuit: Circuit;
522
+ operator: Operator;
523
+ proof: Proof;
524
+ transaction: Transaction;
525
+ event: Event;
526
+ /**
527
+ * @constructor
528
+ * @param {IndexerParams} params - The parameters for the Maci Indexer instance.
529
+ */
530
+ constructor({ restEndpoint, apiEndpoint, registryAddress, http, }: IndexerParams);
531
+ /**
532
+ * @method balanceOf
533
+ * @description Get the balance of a specific address.
534
+ * @param {string} address - The address to check the balance for.
535
+ * @returns {Promise<BalanceResponse>} The balance response.
536
+ */
537
+ balanceOf(address: string): Promise<BalanceResponse>;
538
+ /**
539
+ * @method getRoundById
540
+ * @description Get a round by its ID.
541
+ * @param {string} id - The ID of the round.
542
+ * @returns {Promise<RoundResponse>} The round response.
543
+ */
544
+ getRoundById(id: string): Promise<RoundResponse>;
545
+ /**
546
+ * @method getRounds
547
+ * @description Get multiple rounds.
548
+ * @param {string} after - The cursor to start after.
549
+ * @param {number} [limit] - The number of rounds to retrieve.
550
+ * @returns {Promise<RoundsResponse>} The rounds response.
551
+ */
552
+ getRounds(after: string, limit?: number): Promise<RoundsResponse>;
553
+ /**
554
+ * @method getRoundsByStatus
555
+ * @description Get rounds by their status.
556
+ * @param {string} status - The status of the rounds to retrieve.
557
+ * @param {string} after - The cursor to start after.
558
+ * @param {number} [limit] - The number of rounds to retrieve.
559
+ * @returns {Promise<RoundsResponse>} The rounds response.
560
+ */
561
+ getRoundsByStatus(status: string, after: string, limit?: number): Promise<RoundsResponse>;
562
+ /**
563
+ * @method getRoundsByCircuitName
564
+ * @description Get rounds by their circuit name.
565
+ * @param {string} name - The name of the circuit.
566
+ * @param {string} after - The cursor to start after.
567
+ * @param {number} [limit] - The number of rounds to retrieve.
568
+ * @returns {Promise<RoundsResponse>} The rounds response.
569
+ */
570
+ getRoundsByCircuitName(name: string, after: string, limit?: number): Promise<RoundsResponse>;
571
+ /**
572
+ * @method getRoundsByOperator
573
+ * @description Get rounds by their operator address.
574
+ * @param {string} address - The address of the operator.
575
+ * @param {string} after - The cursor to start after.
576
+ * @param {number} [limit] - The number of rounds to retrieve.
577
+ * @returns {Promise<RoundsResponse>} The rounds response.
578
+ */
579
+ getRoundsByOperator(address: string, after: string, limit?: number): Promise<RoundsResponse>;
580
+ /**
581
+ * @method getOperatorByAddress
582
+ * @description Get an operator by their address.
583
+ * @param {string} address - The address of the operator.
584
+ * @returns {Promise<OperatorResponse>} The operator response.
585
+ */
586
+ getOperatorByAddress(address: string): Promise<OperatorResponse>;
587
+ /**
588
+ * @method getOperators
589
+ * @description Get multiple operators.
590
+ * @param {string} after - The cursor to start after.
591
+ * @param {number} [limit] - The number of operators to retrieve.
592
+ * @returns {Promise<OperatorsResponse>} The operators response.
593
+ */
594
+ getOperators(after: string, limit?: number): Promise<OperatorsResponse>;
595
+ /**
596
+ * @method getCircuitByName
597
+ * @description Get a circuit by its name.
598
+ * @param {string} name - The name of the circuit.
599
+ * @returns {Promise<CircuitResponse>} The circuit response.
600
+ */
601
+ getCircuitByName(name: string): Promise<CircuitResponse>;
602
+ /**
603
+ * @method getCircuits
604
+ * @description Get all available circuits.
605
+ * @returns {Promise<CircuitsResponse>} The circuits response.
606
+ */
607
+ getCircuits(): Promise<CircuitsResponse>;
608
+ /**
609
+ * @method getTransactionByHash
610
+ * @description Get a transaction by its hash.
611
+ * @param {string} hash - The hash of the transaction.
612
+ * @returns {Promise<TransactionResponse>} The transaction response.
613
+ */
614
+ getTransactionByHash(hash: string): Promise<TransactionResponse>;
615
+ /**
616
+ * @method getTransactions
617
+ * @description Get multiple transactions.
618
+ * @param {string} after - The cursor to start after.
619
+ * @param {number} [limit] - The number of transactions to retrieve.
620
+ * @returns {Promise<TransactionsResponse>} The transactions response.
621
+ */
622
+ getTransactions(after: string, limit?: number): Promise<TransactionsResponse>;
623
+ /**
624
+ * @method getTransactionsByContractAddress
625
+ * @description Get transactions by contract address.
626
+ * @param {string} address - The contract address.
627
+ * @param {string} after - The cursor to start after.
628
+ * @param {number} [limit] - The number of transactions to retrieve.
629
+ * @returns {Promise<TransactionsResponse>} The transactions response.
630
+ */
631
+ getTransactionsByContractAddress(address: string, after: string, limit?: number): Promise<TransactionsResponse>;
632
+ /**
633
+ * @method getProofByContractAddress
634
+ * @description Get proof data by contract address.
635
+ * @param {string} address - The contract address.
636
+ * @returns {Promise<ProofResponse>} The proof response.
637
+ */
638
+ getProofByContractAddress(address: string): Promise<ProofResponse>;
639
+ /**
640
+ * @method getStateIdxByPubKey
641
+ * @description Get the state index of a specific public key.
642
+ * @param {string} contractAddress - The contract address.
643
+ * @param {bigint[]} pubKey - The public key.
644
+ * @returns {Promise<SignUpEventsResponse>} The sign up events response.
645
+ */
646
+ getSignUpEventByPubKey(contractAddress: string, pubKey: bigint[]): Promise<SignUpEventsResponse>;
647
+ }
648
+
649
+ /**
650
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
651
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
652
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
653
+ */
654
+ type Uint256$1 = string;
655
+ type Addr$1 = string;
656
+ type Timestamp$1 = Uint64$1;
657
+ type Uint64$1 = string;
658
+ type VotingPowerMode = 'slope' | 'threshold';
659
+ interface PubKey$1 {
660
+ x: Uint256$1;
661
+ y: Uint256$1;
662
+ }
663
+ interface RoundInfo$1 {
664
+ description: string;
665
+ link: string;
666
+ title: string;
667
+ }
668
+ interface VotingTime$1 {
669
+ end_time?: Timestamp$1 | null;
670
+ start_time?: Timestamp$1 | null;
671
+ }
672
+ type Uint128$1 = string;
673
+ interface MessageData$1 {
674
+ data: [Uint256$1, Uint256$1, Uint256$1, Uint256$1, Uint256$1, Uint256$1, Uint256$1];
675
+ }
676
+ interface Groth16ProofType$1 {
677
+ a: string;
678
+ b: string;
679
+ c: string;
680
+ }
681
+ interface PlonkProofType {
682
+ grand_product_at_z_omega: string;
683
+ grand_product_commitment: string;
684
+ input_values: string[];
685
+ linearization_polynomial_at_z: string;
686
+ n: number;
687
+ num_inputs: number;
688
+ opening_at_z_omega_proof: string;
689
+ opening_at_z_proof: string;
690
+ permutation_polynomials_at_z: string[];
691
+ quotient_poly_commitments: string[];
692
+ quotient_polynomial_at_z: string;
693
+ wire_commitments: string[];
694
+ wire_values_at_z: string[];
695
+ wire_values_at_z_omega: string[];
696
+ }
697
+ type PeriodStatus$1 = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
698
+ interface Period$1 {
699
+ status: PeriodStatus$1;
700
+ }
701
+ interface GrantConfig {
702
+ fee_amount: Uint128$1;
703
+ fee_grant: boolean;
704
+ }
705
+ type Boolean$1 = boolean;
706
+ type Binary = string;
707
+ interface OracleWhitelistConfig {
708
+ backend_pubkey: Binary;
709
+ ecosystem: string;
710
+ slope: Uint256$1;
711
+ snapshot_height: Uint256$1;
712
+ threshold: Uint256$1;
713
+ voting_power_mode: VotingPowerMode;
714
+ }
715
+ type ArrayOfString$1 = string[];
716
+ interface WhitelistConfig$1 {
717
+ balance: Uint256$1;
718
+ fee_amount: Uint128$1;
719
+ fee_grant: boolean;
720
+ is_register: boolean;
721
+ }
722
+
723
+ /**
724
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
725
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
726
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
727
+ */
728
+
729
+ interface OracleMaciReadOnlyInterface {
730
+ contractAddress: string;
731
+ getRoundInfo: () => Promise<RoundInfo$1>;
732
+ getVotingTime: () => Promise<VotingTime$1>;
733
+ getPeriod: () => Promise<Period$1>;
734
+ getNumSignUp: () => Promise<Uint256$1>;
735
+ getMsgChainLength: () => Promise<Uint256$1>;
736
+ getProcessedMsgCount: () => Promise<Uint256$1>;
737
+ getProcessedUserCount: () => Promise<Uint256$1>;
738
+ getResult: ({ index }: {
739
+ index: Uint256$1;
740
+ }) => Promise<Uint256$1>;
741
+ getAllResult: () => Promise<Uint256$1>;
742
+ getStateIdxInc: ({ address }: {
743
+ address: Addr$1;
744
+ }) => Promise<Uint256$1>;
745
+ getVoiceCreditBalance: ({ index }: {
746
+ index: Uint256$1;
747
+ }) => Promise<Uint256$1>;
748
+ isWhiteList: ({ amount, certificate, sender, }: {
749
+ amount: Uint256$1;
750
+ certificate: string;
751
+ sender: string;
752
+ }) => Promise<Boolean$1>;
753
+ whiteBalanceOf: ({ amount, certificate, sender, }: {
754
+ amount: Uint256$1;
755
+ certificate: string;
756
+ sender: string;
757
+ }) => Promise<Uint256$1>;
758
+ whiteInfo: ({ sender }: {
759
+ sender: string;
760
+ }) => Promise<WhitelistConfig$1>;
761
+ grantInfo: ({ grantee }: {
762
+ grantee: string;
763
+ }) => Promise<GrantConfig>;
764
+ maxWhitelistNum: () => Promise<Uint128$1>;
765
+ voteOptionMap: () => Promise<ArrayOfString$1>;
766
+ maxVoteOptions: () => Promise<Uint256$1>;
767
+ queryTotalFeeGrant: () => Promise<Uint128$1>;
768
+ queryCircuitType: () => Promise<Uint256$1>;
769
+ queryCertSystem: () => Promise<Uint256$1>;
770
+ queryOracleWhitelistConfig: () => Promise<OracleWhitelistConfig>;
771
+ }
772
+ declare class OracleMaciQueryClient implements OracleMaciReadOnlyInterface {
773
+ client: CosmWasmClient;
774
+ contractAddress: string;
775
+ constructor(client: CosmWasmClient, contractAddress: string);
776
+ getRoundInfo: () => Promise<RoundInfo$1>;
777
+ getVotingTime: () => Promise<VotingTime$1>;
778
+ getPeriod: () => Promise<Period$1>;
779
+ getNumSignUp: () => Promise<Uint256$1>;
780
+ getMsgChainLength: () => Promise<Uint256$1>;
781
+ getProcessedMsgCount: () => Promise<Uint256$1>;
782
+ getProcessedUserCount: () => Promise<Uint256$1>;
783
+ getResult: ({ index }: {
784
+ index: Uint256$1;
785
+ }) => Promise<Uint256$1>;
786
+ getAllResult: () => Promise<Uint256$1>;
787
+ getStateIdxInc: ({ address }: {
788
+ address: Addr$1;
789
+ }) => Promise<Uint256$1>;
790
+ getVoiceCreditBalance: ({ index, }: {
791
+ index: Uint256$1;
792
+ }) => Promise<Uint256$1>;
793
+ isWhiteList: ({ amount, certificate, sender, }: {
794
+ amount: Uint256$1;
795
+ certificate: string;
796
+ sender: string;
797
+ }) => Promise<Boolean$1>;
798
+ whiteBalanceOf: ({ amount, certificate, sender, }: {
799
+ amount: Uint256$1;
800
+ certificate: string;
801
+ sender: string;
802
+ }) => Promise<Uint256$1>;
803
+ whiteInfo: ({ sender, }: {
804
+ sender: string;
805
+ }) => Promise<WhitelistConfig$1>;
806
+ grantInfo: ({ grantee, }: {
807
+ grantee: string;
808
+ }) => Promise<GrantConfig>;
809
+ maxWhitelistNum: () => Promise<Uint128$1>;
810
+ voteOptionMap: () => Promise<ArrayOfString$1>;
811
+ maxVoteOptions: () => Promise<Uint256$1>;
812
+ queryTotalFeeGrant: () => Promise<Uint128$1>;
813
+ queryCircuitType: () => Promise<Uint256$1>;
814
+ queryCertSystem: () => Promise<Uint256$1>;
815
+ queryOracleWhitelistConfig: () => Promise<OracleWhitelistConfig>;
816
+ }
817
+ interface OracleMaciInterface extends OracleMaciReadOnlyInterface {
818
+ contractAddress: string;
819
+ sender: string;
820
+ setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
821
+ intStateTreeDepth: Uint256$1;
822
+ messageBatchSize: Uint256$1;
823
+ stateTreeDepth: Uint256$1;
824
+ voteOptionTreeDepth: Uint256$1;
825
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
826
+ setRoundInfo: ({ roundInfo, }: {
827
+ roundInfo: RoundInfo$1;
828
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
829
+ setVoteOptionsMap: ({ voteOptionMap, }: {
830
+ voteOptionMap: string[];
831
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
832
+ startVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
833
+ signUp: ({ amount, certificate, pubkey, }: {
834
+ amount: Uint256$1;
835
+ certificate: string;
836
+ pubkey: PubKey$1;
837
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
838
+ startProcessPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
839
+ stopVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
840
+ publishMessage: ({ encPubKey, message, }: {
841
+ encPubKey: PubKey$1;
842
+ message: MessageData$1;
843
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
844
+ processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
845
+ groth16Proof?: Groth16ProofType$1;
846
+ newStateCommitment: Uint256$1;
847
+ plonkProof?: PlonkProofType;
848
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
849
+ stopProcessingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
850
+ processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
851
+ groth16Proof?: Groth16ProofType$1;
852
+ newTallyCommitment: Uint256$1;
853
+ plonkProof?: PlonkProofType;
854
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
855
+ stopTallyingPeriod: ({ results, salt, }: {
856
+ results: Uint256$1[];
857
+ salt: Uint256$1;
858
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
859
+ grant: ({ baseAmount, grantee, }: {
860
+ baseAmount: Uint128$1;
861
+ grantee: Addr$1;
862
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
863
+ revoke: ({ grantee, }: {
864
+ grantee: Addr$1;
865
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
866
+ bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
867
+ withdraw: ({ amount, }: {
868
+ amount?: Uint128$1;
869
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
870
+ }
871
+ declare class OracleMaciClient extends OracleMaciQueryClient implements OracleMaciInterface {
872
+ client: SigningCosmWasmClient;
873
+ sender: string;
874
+ contractAddress: string;
875
+ constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
876
+ setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
877
+ intStateTreeDepth: Uint256$1;
878
+ messageBatchSize: Uint256$1;
879
+ stateTreeDepth: Uint256$1;
880
+ voteOptionTreeDepth: Uint256$1;
881
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
882
+ setRoundInfo: ({ roundInfo, }: {
883
+ roundInfo: RoundInfo$1;
884
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
885
+ setVoteOptionsMap: ({ voteOptionMap, }: {
886
+ voteOptionMap: string[];
887
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
888
+ startVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
889
+ signUp: ({ amount, certificate, pubkey, }: {
890
+ amount: Uint256$1;
891
+ certificate: string;
892
+ pubkey: PubKey$1;
893
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
894
+ startProcessPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
895
+ stopVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
896
+ publishMessage: ({ encPubKey, message, }: {
897
+ encPubKey: PubKey$1;
898
+ message: MessageData$1;
899
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
900
+ processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
901
+ groth16Proof?: Groth16ProofType$1;
902
+ newStateCommitment: Uint256$1;
903
+ plonkProof?: PlonkProofType;
904
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
905
+ stopProcessingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
906
+ processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
907
+ groth16Proof?: Groth16ProofType$1;
908
+ newTallyCommitment: Uint256$1;
909
+ plonkProof?: PlonkProofType;
910
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
911
+ stopTallyingPeriod: ({ results, salt, }: {
912
+ results: Uint256$1[];
913
+ salt: Uint256$1;
914
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
915
+ grant: ({ baseAmount, grantee, }: {
916
+ baseAmount: Uint128$1;
917
+ grantee: Addr$1;
918
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
919
+ revoke: ({ grantee, }: {
920
+ grantee: Addr$1;
921
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
922
+ bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
923
+ withdraw: ({ amount, }: {
924
+ amount?: Uint128$1;
925
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
926
+ }
927
+
928
+ /**
929
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
930
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
931
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
932
+ */
933
+
934
+ interface MaciReadOnlyInterface {
935
+ contractAddress: string;
936
+ getRoundInfo: () => Promise<RoundInfo$2>;
937
+ getVotingTime: () => Promise<VotingTime$2>;
938
+ getPeriod: () => Promise<Period$2>;
939
+ getNumSignUp: () => Promise<Uint256$2>;
940
+ getMsgChainLength: () => Promise<Uint256$2>;
941
+ getProcessedMsgCount: () => Promise<Uint256$2>;
942
+ getProcessedUserCount: () => Promise<Uint256$2>;
943
+ getResult: ({ index }: {
944
+ index: Uint256$2;
945
+ }) => Promise<Uint256$2>;
946
+ getAllResult: () => Promise<Uint256$2>;
947
+ getStateIdxInc: ({ address }: {
948
+ address: Addr$2;
949
+ }) => Promise<Uint256$2>;
950
+ getVoiceCreditBalance: ({ index }: {
951
+ index: Uint256$2;
952
+ }) => Promise<Uint256$2>;
953
+ whiteList: () => Promise<Whitelist$1>;
954
+ isWhiteList: ({ sender }: {
955
+ sender: string;
956
+ }) => Promise<Boolean$2>;
957
+ whiteBalanceOf: ({ sender }: {
958
+ sender: string;
959
+ }) => Promise<Uint256$2>;
960
+ voteOptionMap: () => Promise<ArrayOfString$2>;
961
+ maxVoteOptions: () => Promise<Uint256$2>;
962
+ queryTotalFeeGrant: () => Promise<Uint128$2>;
963
+ queryCircuitType: () => Promise<Uint256$2>;
964
+ queryCertSystem: () => Promise<Uint256$2>;
965
+ }
966
+ declare class MaciQueryClient implements MaciReadOnlyInterface {
967
+ client: CosmWasmClient;
968
+ contractAddress: string;
969
+ constructor(client: CosmWasmClient, contractAddress: string);
970
+ getRoundInfo: () => Promise<RoundInfo$2>;
971
+ getVotingTime: () => Promise<VotingTime$2>;
972
+ getPeriod: () => Promise<Period$2>;
973
+ getNumSignUp: () => Promise<Uint256$2>;
974
+ getMsgChainLength: () => Promise<Uint256$2>;
975
+ getProcessedMsgCount: () => Promise<Uint256$2>;
976
+ getProcessedUserCount: () => Promise<Uint256$2>;
977
+ getResult: ({ index }: {
978
+ index: Uint256$2;
979
+ }) => Promise<Uint256$2>;
980
+ getAllResult: () => Promise<Uint256$2>;
981
+ getStateIdxInc: ({ address }: {
982
+ address: Addr$2;
983
+ }) => Promise<Uint256$2>;
984
+ getVoiceCreditBalance: ({ index, }: {
985
+ index: Uint256$2;
986
+ }) => Promise<Uint256$2>;
987
+ whiteList: () => Promise<Whitelist$1>;
988
+ isWhiteList: ({ sender }: {
989
+ sender: string;
990
+ }) => Promise<Boolean$2>;
991
+ whiteBalanceOf: ({ sender }: {
992
+ sender: string;
993
+ }) => Promise<Uint256$2>;
994
+ voteOptionMap: () => Promise<ArrayOfString$2>;
995
+ maxVoteOptions: () => Promise<Uint256$2>;
996
+ queryTotalFeeGrant: () => Promise<Uint128$2>;
997
+ queryCircuitType: () => Promise<Uint256$2>;
998
+ queryCertSystem: () => Promise<Uint256$2>;
999
+ }
1000
+ interface MaciInterface extends MaciReadOnlyInterface {
1001
+ contractAddress: string;
1002
+ sender: string;
1003
+ setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
1004
+ intStateTreeDepth: Uint256$2;
1005
+ messageBatchSize: Uint256$2;
1006
+ stateTreeDepth: Uint256$2;
1007
+ voteOptionTreeDepth: Uint256$2;
1008
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1009
+ setRoundInfo: ({ roundInfo, }: {
1010
+ roundInfo: RoundInfo$2;
1011
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1012
+ setWhitelists: ({ whitelists, }: {
1013
+ whitelists: Whitelist$1;
1014
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1015
+ setVoteOptionsMap: ({ voteOptionMap, }: {
1016
+ voteOptionMap: string[];
1017
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1018
+ startVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1019
+ signUp: ({ pubkey, }: {
1020
+ pubkey: PubKey$2;
1021
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1022
+ startProcessPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1023
+ stopVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1024
+ publishMessage: ({ encPubKey, message, }: {
1025
+ encPubKey: PubKey$2;
1026
+ message: MessageData$2;
1027
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1028
+ processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
1029
+ groth16Proof?: Groth16ProofType$2;
1030
+ newStateCommitment: Uint256$2;
1031
+ plonkProof?: PlonkProofType$1;
1032
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1033
+ stopProcessingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1034
+ processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
1035
+ groth16Proof?: Groth16ProofType$2;
1036
+ newTallyCommitment: Uint256$2;
1037
+ plonkProof?: PlonkProofType$1;
1038
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1039
+ stopTallyingPeriod: ({ results, salt, }: {
1040
+ results: Uint256$2[];
1041
+ salt: Uint256$2;
1042
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1043
+ grant: ({ maxAmount, }: {
1044
+ maxAmount: Uint128$2;
1045
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1046
+ revoke: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1047
+ bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1048
+ withdraw: ({ amount, }: {
1049
+ amount?: Uint128$2;
1050
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1051
+ }
1052
+ declare class MaciClient$1 extends MaciQueryClient implements MaciInterface {
1053
+ client: SigningCosmWasmClient;
1054
+ sender: string;
1055
+ contractAddress: string;
1056
+ constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
1057
+ setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
1058
+ intStateTreeDepth: Uint256$2;
1059
+ messageBatchSize: Uint256$2;
1060
+ stateTreeDepth: Uint256$2;
1061
+ voteOptionTreeDepth: Uint256$2;
1062
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1063
+ setRoundInfo: ({ roundInfo, }: {
1064
+ roundInfo: RoundInfo$2;
1065
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1066
+ setWhitelists: ({ whitelists, }: {
1067
+ whitelists: Whitelist$1;
1068
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1069
+ setVoteOptionsMap: ({ voteOptionMap, }: {
1070
+ voteOptionMap: string[];
1071
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1072
+ startVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1073
+ signUp: ({ pubkey, }: {
1074
+ pubkey: PubKey$2;
1075
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1076
+ startProcessPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1077
+ stopVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1078
+ publishMessage: ({ encPubKey, message, }: {
1079
+ encPubKey: PubKey$2;
1080
+ message: MessageData$2;
1081
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1082
+ processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
1083
+ groth16Proof?: Groth16ProofType$2;
1084
+ newStateCommitment: Uint256$2;
1085
+ plonkProof?: PlonkProofType$1;
1086
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1087
+ stopProcessingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1088
+ processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
1089
+ groth16Proof?: Groth16ProofType$2;
1090
+ newTallyCommitment: Uint256$2;
1091
+ plonkProof?: PlonkProofType$1;
1092
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1093
+ stopTallyingPeriod: ({ results, salt, }: {
1094
+ results: Uint256$2[];
1095
+ salt: Uint256$2;
1096
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1097
+ grant: ({ maxAmount, }: {
1098
+ maxAmount: Uint128$2;
1099
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1100
+ revoke: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1101
+ bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1102
+ withdraw: ({ amount, }: {
1103
+ amount?: Uint128$2;
1104
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1105
+ }
1106
+
1107
+ /**
1108
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
1109
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
1110
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
1111
+ */
1112
+ type Addr = string;
1113
+ type Uint256 = string;
1114
+ type Timestamp = Uint64;
1115
+ type Uint64 = string;
1116
+ interface PubKey {
1117
+ x: Uint256;
1118
+ y: Uint256;
1119
+ }
1120
+ interface RoundInfo {
1121
+ description: string;
1122
+ link: string;
1123
+ title: string;
1124
+ }
1125
+ interface VotingTime {
1126
+ end_time: Timestamp;
1127
+ start_time: Timestamp;
1128
+ }
1129
+ interface Whitelist {
1130
+ users: WhitelistConfig[];
1131
+ }
1132
+ interface WhitelistConfig {
1133
+ addr: Addr;
1134
+ }
1135
+ type Uint128 = string;
1136
+ interface MessageData {
1137
+ data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
1138
+ }
1139
+ interface Groth16ProofType {
1140
+ a: string;
1141
+ b: string;
1142
+ c: string;
1143
+ }
1144
+ type PeriodStatus = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
1145
+ interface Period {
1146
+ status: PeriodStatus;
1147
+ }
1148
+ type Boolean = boolean;
1149
+ type ArrayOfString = string[];
1150
+
1151
+ /**
1152
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
1153
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
1154
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
1155
+ */
1156
+
1157
+ interface AMaciReadOnlyInterface {
1158
+ contractAddress: string;
1159
+ admin: () => Promise<Addr>;
1160
+ operator: () => Promise<Addr>;
1161
+ getRoundInfo: () => Promise<RoundInfo>;
1162
+ getVotingTime: () => Promise<VotingTime>;
1163
+ getPeriod: () => Promise<Period>;
1164
+ getNumSignUp: () => Promise<Uint256>;
1165
+ getMsgChainLength: () => Promise<Uint256>;
1166
+ getDMsgChainLength: () => Promise<Uint256>;
1167
+ getProcessedDMsgCount: () => Promise<Uint256>;
1168
+ getProcessedMsgCount: () => Promise<Uint256>;
1169
+ getProcessedUserCount: () => Promise<Uint256>;
1170
+ getResult: ({ index }: {
1171
+ index: Uint256;
1172
+ }) => Promise<Uint256>;
1173
+ getAllResult: () => Promise<Uint256>;
1174
+ getStateIdxInc: ({ address }: {
1175
+ address: Addr;
1176
+ }) => Promise<Uint256>;
1177
+ getVoiceCreditBalance: ({ index }: {
1178
+ index: Uint256;
1179
+ }) => Promise<Uint256>;
1180
+ getVoiceCreditAmount: () => Promise<Uint256>;
1181
+ whiteList: () => Promise<Whitelist>;
1182
+ isWhiteList: ({ sender }: {
1183
+ sender: Addr;
1184
+ }) => Promise<Boolean>;
1185
+ signuped: ({ pubkeyX }: {
1186
+ pubkeyX: Uint256;
1187
+ }) => Promise<Uint256>;
1188
+ voteOptionMap: () => Promise<ArrayOfString>;
1189
+ maxVoteOptions: () => Promise<Uint256>;
1190
+ queryTotalFeeGrant: () => Promise<Uint128>;
1191
+ queryCircuitType: () => Promise<Uint256>;
1192
+ queryCertSystem: () => Promise<Uint256>;
1193
+ queryPreDeactivateRoot: () => Promise<Uint256>;
1194
+ }
1195
+ declare class AMaciQueryClient implements AMaciReadOnlyInterface {
1196
+ client: CosmWasmClient;
1197
+ contractAddress: string;
1198
+ constructor(client: CosmWasmClient, contractAddress: string);
1199
+ admin: () => Promise<Addr>;
1200
+ operator: () => Promise<Addr>;
1201
+ getRoundInfo: () => Promise<RoundInfo>;
1202
+ getVotingTime: () => Promise<VotingTime>;
1203
+ getPeriod: () => Promise<Period>;
1204
+ getNumSignUp: () => Promise<Uint256>;
1205
+ getMsgChainLength: () => Promise<Uint256>;
1206
+ getDMsgChainLength: () => Promise<Uint256>;
1207
+ getProcessedDMsgCount: () => Promise<Uint256>;
1208
+ getProcessedMsgCount: () => Promise<Uint256>;
1209
+ getProcessedUserCount: () => Promise<Uint256>;
1210
+ getResult: ({ index }: {
1211
+ index: Uint256;
1212
+ }) => Promise<Uint256>;
1213
+ getAllResult: () => Promise<Uint256>;
1214
+ getStateIdxInc: ({ address }: {
1215
+ address: Addr;
1216
+ }) => Promise<Uint256>;
1217
+ getVoiceCreditBalance: ({ index, }: {
1218
+ index: Uint256;
1219
+ }) => Promise<Uint256>;
1220
+ getVoiceCreditAmount: () => Promise<Uint256>;
1221
+ whiteList: () => Promise<Whitelist>;
1222
+ isWhiteList: ({ sender }: {
1223
+ sender: Addr;
1224
+ }) => Promise<Boolean>;
1225
+ signuped: ({ pubkeyX }: {
1226
+ pubkeyX: Uint256;
1227
+ }) => Promise<Uint256>;
1228
+ voteOptionMap: () => Promise<ArrayOfString>;
1229
+ maxVoteOptions: () => Promise<Uint256>;
1230
+ queryTotalFeeGrant: () => Promise<Uint128>;
1231
+ queryCircuitType: () => Promise<Uint256>;
1232
+ queryCertSystem: () => Promise<Uint256>;
1233
+ queryPreDeactivateRoot: () => Promise<Uint256>;
1234
+ }
1235
+ interface AMaciInterface extends AMaciReadOnlyInterface {
1236
+ contractAddress: string;
1237
+ sender: string;
1238
+ setRoundInfo: ({ roundInfo, }: {
1239
+ roundInfo: RoundInfo;
1240
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1241
+ setWhitelists: ({ whitelists, }: {
1242
+ whitelists: Whitelist;
1243
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1244
+ setVoteOptionsMap: ({ voteOptionMap, }: {
1245
+ voteOptionMap: string[];
1246
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1247
+ signUp: ({ pubkey, }: {
1248
+ pubkey: PubKey;
1249
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1250
+ startProcessPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1251
+ publishDeactivateMessage: ({ encPubKey, message, }: {
1252
+ encPubKey: PubKey;
1253
+ message: MessageData;
1254
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1255
+ processDeactivateMessage: ({ groth16Proof, newDeactivateCommitment, newDeactivateRoot, size, }: {
1256
+ groth16Proof: Groth16ProofType;
1257
+ newDeactivateCommitment: Uint256;
1258
+ newDeactivateRoot: Uint256;
1259
+ size: Uint256;
1260
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1261
+ addNewKey: ({ d, groth16Proof, nullifier, pubkey, }: {
1262
+ d: Uint256[];
1263
+ groth16Proof: Groth16ProofType;
1264
+ nullifier: Uint256;
1265
+ pubkey: PubKey;
1266
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1267
+ preAddNewKey: ({ d, groth16Proof, nullifier, pubkey, }: {
1268
+ d: Uint256[];
1269
+ groth16Proof: Groth16ProofType;
1270
+ nullifier: Uint256;
1271
+ pubkey: PubKey;
1272
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1273
+ publishMessage: ({ encPubKey, message, }: {
1274
+ encPubKey: PubKey;
1275
+ message: MessageData;
1276
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1277
+ processMessage: ({ groth16Proof, newStateCommitment, }: {
1278
+ groth16Proof: Groth16ProofType;
1279
+ newStateCommitment: Uint256;
1280
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1281
+ stopProcessingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1282
+ processTally: ({ groth16Proof, newTallyCommitment, }: {
1283
+ groth16Proof: Groth16ProofType;
1284
+ newTallyCommitment: Uint256;
1285
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1286
+ stopTallyingPeriod: ({ results, salt, }: {
1287
+ results: Uint256[];
1288
+ salt: Uint256;
1289
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1290
+ grant: ({ maxAmount, }: {
1291
+ maxAmount: Uint128;
1292
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1293
+ revoke: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1294
+ bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1295
+ withdraw: ({ amount, }: {
1296
+ amount?: Uint128;
1297
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1298
+ }
1299
+ declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
1300
+ client: SigningCosmWasmClient;
1301
+ sender: string;
1302
+ contractAddress: string;
1303
+ constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
1304
+ setRoundInfo: ({ roundInfo, }: {
1305
+ roundInfo: RoundInfo;
1306
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1307
+ setWhitelists: ({ whitelists, }: {
1308
+ whitelists: Whitelist;
1309
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1310
+ setVoteOptionsMap: ({ voteOptionMap, }: {
1311
+ voteOptionMap: string[];
1312
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1313
+ signUp: ({ pubkey, }: {
1314
+ pubkey: PubKey;
1315
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1316
+ startProcessPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1317
+ publishDeactivateMessage: ({ encPubKey, message, }: {
1318
+ encPubKey: PubKey;
1319
+ message: MessageData;
1320
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1321
+ processDeactivateMessage: ({ groth16Proof, newDeactivateCommitment, newDeactivateRoot, size, }: {
1322
+ groth16Proof: Groth16ProofType;
1323
+ newDeactivateCommitment: Uint256;
1324
+ newDeactivateRoot: Uint256;
1325
+ size: Uint256;
1326
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1327
+ addNewKey: ({ d, groth16Proof, nullifier, pubkey, }: {
1328
+ d: Uint256[];
1329
+ groth16Proof: Groth16ProofType;
1330
+ nullifier: Uint256;
1331
+ pubkey: PubKey;
1332
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1333
+ preAddNewKey: ({ d, groth16Proof, nullifier, pubkey, }: {
1334
+ d: Uint256[];
1335
+ groth16Proof: Groth16ProofType;
1336
+ nullifier: Uint256;
1337
+ pubkey: PubKey;
1338
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1339
+ publishMessage: ({ encPubKey, message, }: {
1340
+ encPubKey: PubKey;
1341
+ message: MessageData;
1342
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1343
+ processMessage: ({ groth16Proof, newStateCommitment, }: {
1344
+ groth16Proof: Groth16ProofType;
1345
+ newStateCommitment: Uint256;
1346
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1347
+ stopProcessingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1348
+ processTally: ({ groth16Proof, newTallyCommitment, }: {
1349
+ groth16Proof: Groth16ProofType;
1350
+ newTallyCommitment: Uint256;
1351
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1352
+ stopTallyingPeriod: ({ results, salt, }: {
1353
+ results: Uint256[];
1354
+ salt: Uint256;
1355
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1356
+ grant: ({ maxAmount, }: {
1357
+ maxAmount: Uint128;
1358
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1359
+ revoke: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1360
+ bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1361
+ withdraw: ({ amount, }: {
1362
+ amount?: Uint128;
1363
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1364
+ }
1365
+
1366
+ /**
1367
+ * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
1368
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
1369
+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
1370
+ */
1371
+
1372
+ interface RegistryReadOnlyInterface {
1373
+ contractAddress: string;
1374
+ admin: () => Promise<AdminResponse>;
1375
+ operator: () => Promise<Addr$3>;
1376
+ isMaciOperator: ({ address }: {
1377
+ address: Addr$3;
1378
+ }) => Promise<Boolean$3>;
1379
+ isValidator: ({ address }: {
1380
+ address: Addr$3;
1381
+ }) => Promise<Boolean$3>;
1382
+ getValidators: () => Promise<ValidatorSet>;
1383
+ getValidatorOperator: ({ address }: {
1384
+ address: Addr$3;
1385
+ }) => Promise<Addr$3>;
1386
+ getMaciOperatorPubkey: ({ address }: {
1387
+ address: Addr$3;
1388
+ }) => Promise<PubKey$3>;
1389
+ getMaciOperatorIdentity: ({ address }: {
1390
+ address: Addr$3;
1391
+ }) => Promise<String>;
1392
+ }
1393
+ declare class RegistryQueryClient implements RegistryReadOnlyInterface {
1394
+ client: CosmWasmClient;
1395
+ contractAddress: string;
1396
+ constructor(client: CosmWasmClient, contractAddress: string);
1397
+ admin: () => Promise<AdminResponse>;
1398
+ operator: () => Promise<Addr$3>;
1399
+ isMaciOperator: ({ address }: {
1400
+ address: Addr$3;
1401
+ }) => Promise<Boolean$3>;
1402
+ isValidator: ({ address }: {
1403
+ address: Addr$3;
1404
+ }) => Promise<Boolean$3>;
1405
+ getValidators: () => Promise<ValidatorSet>;
1406
+ getValidatorOperator: ({ address, }: {
1407
+ address: Addr$3;
1408
+ }) => Promise<Addr$3>;
1409
+ getMaciOperatorPubkey: ({ address, }: {
1410
+ address: Addr$3;
1411
+ }) => Promise<PubKey$3>;
1412
+ getMaciOperatorIdentity: ({ address, }: {
1413
+ address: Addr$3;
1414
+ }) => Promise<String>;
1415
+ }
1416
+ interface RegistryInterface extends RegistryReadOnlyInterface {
1417
+ contractAddress: string;
1418
+ sender: string;
1419
+ setMaciOperator: ({ operator, }: {
1420
+ operator: Addr$3;
1421
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1422
+ setMaciOperatorPubkey: ({ pubkey, }: {
1423
+ pubkey: PubKey$3;
1424
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1425
+ setMaciOperatorIdentity: ({ identity, }: {
1426
+ identity: string;
1427
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1428
+ createRound: ({ certificationSystem, circuitType, maxOption, maxVoter, operator, preDeactivateRoot, roundInfo, voiceCreditAmount, votingTime, whitelist, }: {
1429
+ certificationSystem: Uint256$3;
1430
+ circuitType: Uint256$3;
1431
+ maxOption: Uint256$3;
1432
+ maxVoter: Uint256$3;
1433
+ operator: Addr$3;
1434
+ preDeactivateRoot: Uint256$3;
1435
+ roundInfo: RoundInfo$3;
1436
+ voiceCreditAmount: Uint256$3;
1437
+ votingTime: VotingTime$3;
1438
+ whitelist?: Whitelist$2;
1439
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1440
+ setValidators: ({ addresses, }: {
1441
+ addresses: ValidatorSet;
1442
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1443
+ removeValidator: ({ address, }: {
1444
+ address: Addr$3;
1445
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1446
+ updateAmaciCodeId: ({ amaciCodeId, }: {
1447
+ amaciCodeId: number;
1448
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1449
+ changeOperator: ({ address, }: {
1450
+ address: Addr$3;
1451
+ }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1452
+ }
1453
+ declare class RegistryClient extends RegistryQueryClient implements RegistryInterface {
1454
+ client: SigningCosmWasmClient;
1455
+ sender: string;
1456
+ contractAddress: string;
1457
+ constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
1458
+ setMaciOperator: ({ operator, }: {
1459
+ operator: Addr$3;
1460
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1461
+ setMaciOperatorPubkey: ({ pubkey, }: {
1462
+ pubkey: PubKey$3;
1463
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1464
+ setMaciOperatorIdentity: ({ identity, }: {
1465
+ identity: string;
1466
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1467
+ createRound: ({ certificationSystem, circuitType, maxOption, maxVoter, operator, preDeactivateRoot, roundInfo, voiceCreditAmount, votingTime, whitelist, }: {
1468
+ certificationSystem: Uint256$3;
1469
+ circuitType: Uint256$3;
1470
+ maxOption: Uint256$3;
1471
+ maxVoter: Uint256$3;
1472
+ operator: Addr$3;
1473
+ preDeactivateRoot: Uint256$3;
1474
+ roundInfo: RoundInfo$3;
1475
+ voiceCreditAmount: Uint256$3;
1476
+ votingTime: VotingTime$3;
1477
+ whitelist?: Whitelist$2;
1478
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1479
+ setValidators: ({ addresses, }: {
1480
+ addresses: ValidatorSet;
1481
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1482
+ removeValidator: ({ address, }: {
1483
+ address: Addr$3;
1484
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1485
+ updateAmaciCodeId: ({ amaciCodeId, }: {
1486
+ amaciCodeId: number;
1487
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1488
+ changeOperator: ({ address, }: {
1489
+ address: Addr$3;
1490
+ }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
1491
+ }
1492
+
1493
+ declare class Contract {
1494
+ rpcEndpoint: string;
1495
+ registryAddress: string;
1496
+ maciCodeId: number;
1497
+ oracleCodeId: number;
1498
+ feegrantOperator: string;
1499
+ whitelistBackendPubkey: string;
1500
+ constructor({ rpcEndpoint, registryAddress, maciCodeId, oracleCodeId, feegrantOperator, whitelistBackendPubkey, }: ContractParams);
1501
+ createAMaciRound({ signer, startVoting, endVoting, operator, whitelist, title, description, link, maxVoter, maxOption, voiceCreditAmount, circuitType, preDeactivateRoot, }: CreateAMaciRoundParams): Promise<string>;
1502
+ createMaciRound({ signer, operatorPubkey, startVoting, endVoting, whitelist, title, description, link, maxVoter, maxOption, circuitType, certSystemType, }: CreateMaciRoundParams): Promise<_cosmjs_cosmwasm_stargate.InstantiateResult>;
1503
+ createOracleMaciRound({ signer, operatorPubkey, startVoting, endVoting, title, description, link, voteOptionMap, circuitType, whitelistEcosystem, whitelistSnapshotHeight, whitelistVotingPowerArgs, }: CreateOracleMaciRoundParams): Promise<_cosmjs_cosmwasm_stargate.InstantiateResult>;
1504
+ queryRoundInfo({ signer, roundAddress, }: {
1505
+ signer: OfflineSigner;
1506
+ roundAddress: string;
1507
+ }): Promise<RoundInfo$2>;
1508
+ oracleMaciClient({ signer, contractAddress, }: {
1509
+ signer: OfflineSigner;
1510
+ contractAddress: string;
1511
+ }): Promise<OracleMaciClient>;
1512
+ registryClient({ signer, contractAddress, }: {
1513
+ signer: OfflineSigner;
1514
+ contractAddress: string;
1515
+ }): Promise<RegistryClient>;
1516
+ maciClient({ signer, contractAddress, }: {
1517
+ signer: OfflineSigner;
1518
+ contractAddress: string;
1519
+ }): Promise<MaciClient$1>;
1520
+ amaciClient({ signer, contractAddress, }: {
1521
+ signer: OfflineSigner;
1522
+ contractAddress: string;
1523
+ }): Promise<AMaciClient>;
1524
+ contractClient({ signer }: {
1525
+ signer: OfflineSigner;
1526
+ }): Promise<SigningCosmWasmClient>;
1527
+ }
1528
+
1529
+ type OracleCertificateParams = {
1530
+ certificateApiEndpoint: string;
1531
+ http: Http;
1532
+ };
1533
+ type SignatureRequest = {
1534
+ ecosystem: CertificateEcosystem;
1535
+ address: string;
1536
+ height: string;
1537
+ contractAddress: string;
1538
+ };
1539
+ type SignatureResponse = {
1540
+ signature: string;
1541
+ amount: string;
1542
+ snapshotHeight: string;
1543
+ };
1544
+
1545
+ declare class OracleCertificate {
1546
+ private certificateApiEndpoint;
1547
+ private http;
1548
+ constructor({ certificateApiEndpoint, http }: OracleCertificateParams);
1549
+ sign(data: SignatureRequest): Promise<SignatureResponse>;
1550
+ }
1551
+
1552
+ type MixedData<T> = T | Array<MixedData<T>> | {
1553
+ [key: string]: MixedData<T>;
1554
+ };
1555
+ type PrivateKey = bigint;
1556
+ type PublicKey = [bigint, bigint];
1557
+ interface Account {
1558
+ privKey: PrivateKey;
1559
+ pubKey: PublicKey;
1560
+ formatedPrivKey: PrivateKey;
1561
+ }
1562
+ declare const stringizing: (o: MixedData<bigint>, path?: MixedData<bigint>[]) => MixedData<string>;
1563
+ declare const genKeypair: (pkey?: PrivateKey) => Account;
1564
+ declare const genEcdhSharedKey: (privKey: PrivateKey, pubKey: PublicKey) => PublicKey;
1565
+ declare const genMessageFactory: (stateIdx: number, signPriKey: PrivateKey, signPubKey: PublicKey, coordPubKey: PublicKey) => (encPriKey: PrivateKey, nonce: number, voIdx: number, newVotes: number, isLastCmd: boolean, salt?: bigint) => bigint[];
1566
+ declare const batchGenMessage: (stateIdx: number, account: Account, coordPubKey: PublicKey, plan: [number, number][]) => {
1567
+ msg: bigint[];
1568
+ encPubkeys: PublicKey;
1569
+ }[];
1570
+ declare const privateKeyFromTxt: (txt: string) => Account | undefined;
1571
+ declare const genAddKeyProof: (depth: number, { coordPubKey, oldKey, deactivates, }: {
1572
+ coordPubKey: PublicKey;
1573
+ oldKey: Account;
1574
+ deactivates: bigint[][];
1575
+ }) => Promise<{
1576
+ inputHash: bigint;
1577
+ coordPubKey: PublicKey;
1578
+ deactivateRoot: any;
1579
+ deactivateIndex: number;
1580
+ deactivateLeaf: any;
1581
+ c1: bigint[];
1582
+ c2: bigint[];
1583
+ randomVal: bigint;
1584
+ d1: bigint[];
1585
+ d2: bigint[];
1586
+ deactivateLeafPathElements: any;
1587
+ nullifier: any;
1588
+ oldPrivateKey: bigint;
1589
+ } | null>;
1590
+
1591
+ type CircomParams = {
1592
+ network: 'mainnet' | 'testnet';
1593
+ };
1594
+ type SignResult = {
1595
+ signature: string;
1596
+ pubkey: Uint8Array;
1597
+ };
1598
+
1599
+ declare class Circom {
1600
+ private network;
1601
+ private chainId;
1602
+ constructor({ network }: CircomParams);
1603
+ signMessage(signer: OfflineSigner, address: string, message: string): Promise<SignResult>;
1604
+ genKeypairFromSign(signer: OfflineSigner, address: string): Promise<Account>;
1605
+ }
1606
+
1607
+ declare class MACI {
1608
+ circom: Circom;
1609
+ contract: Contract;
1610
+ indexer: Indexer;
1611
+ oracleCertificate: OracleCertificate;
1612
+ constructor({ circom, contract, indexer, oracleCertificate, }: {
1613
+ circom: Circom;
1614
+ contract: Contract;
1615
+ indexer: Indexer;
1616
+ oracleCertificate: OracleCertificate;
1617
+ });
1618
+ getStateIdxInc({ signer, address, contractAddress, }: {
1619
+ signer: OfflineSigner;
1620
+ address: string;
1621
+ contractAddress: string;
1622
+ }): Promise<string>;
1623
+ getVoiceCreditBalance({ signer, stateIdx, contractAddress, }: {
1624
+ signer: OfflineSigner;
1625
+ stateIdx: number;
1626
+ contractAddress: string;
1627
+ }): Promise<string>;
1628
+ getStateIdxByPubKey({ contractAddress, pubKey, }: {
1629
+ contractAddress: string;
1630
+ pubKey: bigint[];
1631
+ }): Promise<number>;
1632
+ queryWhitelistBalanceOf({ signer, address, contractAddress, certificate, mode, }: {
1633
+ signer: OfflineSigner;
1634
+ address: string;
1635
+ contractAddress: string;
1636
+ certificate?: string;
1637
+ mode?: 'maci' | 'amaci';
1638
+ }): Promise<string>;
1639
+ isWhitelisted({ signer, address, contractAddress, }: {
1640
+ signer: OfflineSigner;
1641
+ address: string;
1642
+ contractAddress: string;
1643
+ }): Promise<boolean>;
1644
+ getOracleWhitelistConfig({ signer, contractAddress, }: {
1645
+ signer: OfflineSigner;
1646
+ contractAddress: string;
1647
+ }): Promise<OracleWhitelistConfig>;
1648
+ getRoundInfo({ contractAddress }: {
1649
+ contractAddress: string;
1650
+ }): Promise<RoundType>;
1651
+ getRoundCircuitType({ contractAddress }: {
1652
+ contractAddress: string;
1653
+ }): Promise<string>;
1654
+ queryRoundIsQv({ contractAddress }: {
1655
+ contractAddress: string;
1656
+ }): Promise<boolean>;
1657
+ queryRoundGasStation({ contractAddress }: {
1658
+ contractAddress: string;
1659
+ }): Promise<boolean>;
1660
+ requestOracleCertificate({ signer, ecosystem, address, contractAddress, }: {
1661
+ signer: OfflineSigner;
1662
+ ecosystem: CertificateEcosystem;
1663
+ address: string;
1664
+ contractAddress: string;
1665
+ }): Promise<SignatureResponse>;
1666
+ signup({ signer, address, contractAddress, oracleCertificate, gasStation, }: {
1667
+ signer: OfflineSigner;
1668
+ address: string;
1669
+ contractAddress: string;
1670
+ oracleCertificate?: {
1671
+ amount: string;
1672
+ signature: string;
1673
+ };
1674
+ gasStation?: boolean;
1675
+ }): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
1676
+ private processVoteOptions;
1677
+ vote({ signer, address, stateIdx, contractAddress, selectedOptions, operatorCoordPubKey, gasStation, }: {
1678
+ signer: OfflineSigner;
1679
+ address: string;
1680
+ stateIdx: number;
1681
+ contractAddress: string;
1682
+ selectedOptions: {
1683
+ idx: number;
1684
+ vc: number;
1685
+ }[];
1686
+ operatorCoordPubKey: PublicKey;
1687
+ gasStation?: boolean;
1688
+ }): Promise<_cosmjs_cosmwasm_stargate.DeliverTxResponse>;
1689
+ publishMessage({ client, address, payload, contractAddress, gasStation, }: {
1690
+ client: SigningCosmWasmClient;
1691
+ address: string;
1692
+ payload: {
1693
+ msg: bigint[];
1694
+ encPubkeys: PublicKey;
1695
+ }[];
1696
+ contractAddress: string;
1697
+ gasStation: boolean;
1698
+ }): Promise<_cosmjs_cosmwasm_stargate.DeliverTxResponse>;
1699
+ signupSimple({ client, address, pubKey, contractAddress, gasStation, }: {
1700
+ client: SigningCosmWasmClient;
1701
+ address: string;
1702
+ pubKey: PublicKey;
1703
+ contractAddress: string;
1704
+ gasStation?: boolean;
1705
+ }): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
1706
+ signupOracle({ client, address, pubKey, contractAddress, oracleCertificate, gasStation, }: {
1707
+ client: SigningCosmWasmClient;
1708
+ address: string;
1709
+ pubKey: PublicKey;
1710
+ contractAddress: string;
1711
+ oracleCertificate: {
1712
+ amount: string;
1713
+ signature: string;
1714
+ };
1715
+ gasStation?: boolean;
1716
+ }): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
1717
+ }
1718
+
1719
+ declare const circuits: Record<string, CircuitType>;
1720
+ declare const validator_operator_set: {
1721
+ doravaloper12yk434ut3un4wx0rult2aww89rsrel8nhmp387: {
1722
+ operator_address: string;
1723
+ account_address: string;
1724
+ allocation: string;
1725
+ allocation_dora: number;
1726
+ moniker: string;
1727
+ program_voting_power: number;
1728
+ tokens: string;
1729
+ };
1730
+ doravaloper15frh0nn3v4yp3vv6sk4pn6jg9l8rt82f7uqfk5: {
1731
+ operator_address: string;
1732
+ account_address: string;
1733
+ allocation: string;
1734
+ allocation_dora: number;
1735
+ moniker: string;
1736
+ program_voting_power: number;
1737
+ tokens: string;
1738
+ };
1739
+ doravaloper1ddewp74vd2w8jhth2p0uazmc8ajgtcuf3ntqgn: {
1740
+ operator_address: string;
1741
+ account_address: string;
1742
+ allocation: string;
1743
+ allocation_dora: number;
1744
+ moniker: string;
1745
+ program_voting_power: number;
1746
+ tokens: string;
1747
+ };
1748
+ doravaloper1gh8j89jtc2vx6d3y4ehllcdlvluwa49w6xmjsm: {
1749
+ operator_address: string;
1750
+ account_address: string;
1751
+ allocation: string;
1752
+ allocation_dora: number;
1753
+ moniker: string;
1754
+ program_voting_power: number;
1755
+ tokens: string;
1756
+ };
1757
+ doravaloper1j8ru7p8zctup6grfwuga6ndrjj7v88wzn407x7: {
1758
+ operator_address: string;
1759
+ account_address: string;
1760
+ allocation: string;
1761
+ allocation_dora: number;
1762
+ moniker: string;
1763
+ program_voting_power: number;
1764
+ tokens: string;
1765
+ };
1766
+ doravaloper1l5zz0kkjt2n7nllsrymy96mc2v2gehda0zc85s: {
1767
+ operator_address: string;
1768
+ account_address: string;
1769
+ allocation: string;
1770
+ allocation_dora: number;
1771
+ moniker: string;
1772
+ program_voting_power: number;
1773
+ tokens: string;
1774
+ };
1775
+ doravaloper1m9v3txhhtadjxpv09gwjhhs344qsxgfscwxjkg: {
1776
+ operator_address: string;
1777
+ account_address: string;
1778
+ allocation: string;
1779
+ allocation_dora: number;
1780
+ moniker: string;
1781
+ program_voting_power: number;
1782
+ tokens: string;
1783
+ };
1784
+ doravaloper1tu8006g60t62zwgwf5knkaujv0uzhp2a6wh94h: {
1785
+ operator_address: string;
1786
+ account_address: string;
1787
+ allocation: string;
1788
+ allocation_dora: number;
1789
+ moniker: string;
1790
+ program_voting_power: number;
1791
+ tokens: string;
1792
+ };
1793
+ doravaloper1x5z0tkafrgyeuqkrwfjr933vghjxchqnqlhcdw: {
1794
+ operator_address: string;
1795
+ account_address: string;
1796
+ allocation: string;
1797
+ allocation_dora: number;
1798
+ moniker: string;
1799
+ program_voting_power: number;
1800
+ tokens: string;
1801
+ };
1802
+ doravaloper1z6kfew2nhuh02szc2hdecw4fqey2d32auucvux: {
1803
+ operator_address: string;
1804
+ account_address: string;
1805
+ allocation: string;
1806
+ allocation_dora: number;
1807
+ moniker: string;
1808
+ program_voting_power: number;
1809
+ tokens: string;
1810
+ };
1811
+ doravaloper1zzne8ufazycklx4j6mgc987t8ykd6wxu63223v: {
1812
+ operator_address: string;
1813
+ account_address: string;
1814
+ allocation: string;
1815
+ allocation_dora: number;
1816
+ moniker: string;
1817
+ program_voting_power: number;
1818
+ tokens: string;
1819
+ };
1820
+ };
1821
+ interface NetworkConfig {
1822
+ network: string;
1823
+ chainId: string;
1824
+ rpcEndpoint: string;
1825
+ restEndpoint: string;
1826
+ apiEndpoint: string;
1827
+ certificateApiEndpoint: string;
1828
+ registryAddress: string;
1829
+ maciCodeId: number;
1830
+ oracleCodeId: number;
1831
+ oracleWhitelistBackendPubkey: string;
1832
+ oracleFeegrantOperator: string;
1833
+ }
1834
+ declare function getDefaultParams(network?: 'mainnet' | 'testnet'): NetworkConfig;
1835
+
1836
+ /**
1837
+ * @class MaciClient
1838
+ * @description This class is used to interact with Maci Client.
1839
+ */
1840
+ declare class MaciClient {
1841
+ rpcEndpoint: string;
1842
+ restEndpoint: string;
1843
+ apiEndpoint: string;
1844
+ certificateApiEndpoint: string;
1845
+ registryAddress: string;
1846
+ maciCodeId: number;
1847
+ oracleCodeId: number;
1848
+ feegrantOperator: string;
1849
+ whitelistBackendPubkey: string;
1850
+ http: Http;
1851
+ indexer: Indexer;
1852
+ contract: Contract;
1853
+ circom: Circom;
1854
+ oracleCertificate: OracleCertificate;
1855
+ maci: MACI;
1856
+ /**
1857
+ * @constructor
1858
+ * @param {ClientParams} params - The parameters for the Maci Client instance.
1859
+ */
1860
+ constructor({ network, rpcEndpoint, restEndpoint, apiEndpoint, registryAddress, maciCodeId, oracleCodeId, customFetch, defaultOptions, feegrantOperator, whitelistBackendPubkey, certificateApiEndpoint, }: ClientParams);
1861
+ oracleMaciClient({ signer, contractAddress, }: {
1862
+ signer: OfflineSigner;
1863
+ contractAddress: string;
1864
+ }): Promise<OracleMaciClient>;
1865
+ registryClient({ signer, contractAddress, }: {
1866
+ signer: OfflineSigner;
1867
+ contractAddress: string;
1868
+ }): Promise<RegistryClient>;
1869
+ maciClient({ signer, contractAddress, }: {
1870
+ signer: OfflineSigner;
1871
+ contractAddress: string;
1872
+ }): Promise<MaciClient$1>;
1873
+ amaciClient({ signer, contractAddress, }: {
1874
+ signer: OfflineSigner;
1875
+ contractAddress: string;
1876
+ }): Promise<AMaciClient>;
1877
+ createAMaciRound(params: CreateAMaciRoundParams): Promise<string>;
1878
+ createMaciRound(params: CreateMaciRoundParams): Promise<_cosmjs_cosmwasm_stargate.InstantiateResult>;
1879
+ createOracleMaciRound(params: CreateOracleMaciRoundParams): Promise<_cosmjs_cosmwasm_stargate.InstantiateResult>;
1880
+ /**
1881
+ * @method balanceOf
1882
+ * @description Get the balance of a specific address.
1883
+ * @param {string} address - The address to check the balance for.
1884
+ * @returns {Promise<BalanceResponse>} The balance response.
1885
+ */
1886
+ balanceOf(address: string): Promise<BalanceResponse>;
1887
+ /**
1888
+ * @method getRoundById
1889
+ * @description Get a round by its ID.
1890
+ * @param {string} id - The ID of the round.
1891
+ * @returns {Promise<RoundResponse>} The round response.
1892
+ */
1893
+ getRoundById(id: string): Promise<RoundResponse>;
1894
+ /**
1895
+ * @method getRounds
1896
+ * @description Get multiple rounds.
1897
+ * @param {string} after - The cursor to start after.
1898
+ * @param {number} [limit] - The number of rounds to retrieve.
1899
+ * @returns {Promise<RoundsResponse>} The rounds response.
1900
+ */
1901
+ getRounds(after: string, limit?: number): Promise<RoundsResponse>;
1902
+ /**
1903
+ * @method getRoundsByStatus
1904
+ * @description Get rounds by their status.
1905
+ * @param {string} status - The status of the rounds to retrieve.
1906
+ * @param {string} after - The cursor to start after.
1907
+ * @param {number} [limit] - The number of rounds to retrieve.
1908
+ * @returns {Promise<RoundsResponse>} The rounds response.
1909
+ */
1910
+ getRoundsByStatus(status: string, after: string, limit?: number): Promise<RoundsResponse>;
1911
+ /**
1912
+ * @method getRoundsByCircuitName
1913
+ * @description Get rounds by their circuit name.
1914
+ * @param {string} name - The name of the circuit.
1915
+ * @param {string} after - The cursor to start after.
1916
+ * @param {number} [limit] - The number of rounds to retrieve.
1917
+ * @returns {Promise<RoundsResponse>} The rounds response.
1918
+ */
1919
+ getRoundsByCircuitName(name: string, after: string, limit?: number): Promise<RoundsResponse>;
1920
+ /**
1921
+ * @method getRoundsByOperator
1922
+ * @description Get rounds by their operator address.
1923
+ * @param {string} address - The address of the operator.
1924
+ * @param {string} after - The cursor to start after.
1925
+ * @param {number} [limit] - The number of rounds to retrieve.
1926
+ * @returns {Promise<RoundsResponse>} The rounds response.
1927
+ */
1928
+ getRoundsByOperator(address: string, after: string, limit?: number): Promise<RoundsResponse>;
1929
+ /**
1930
+ * @method getOperatorByAddress
1931
+ * @description Get an operator by their address.
1932
+ * @param {string} address - The address of the operator.
1933
+ * @returns {Promise<OperatorResponse>} The operator response.
1934
+ */
1935
+ getOperatorByAddress(address: string): Promise<OperatorResponse>;
1936
+ /**
1937
+ * @method getOperators
1938
+ * @description Get multiple operators.
1939
+ * @param {string} after - The cursor to start after.
1940
+ * @param {number} [limit] - The number of operators to retrieve.
1941
+ * @returns {Promise<OperatorsResponse>} The operators response.
1942
+ */
1943
+ getOperators(after: string, limit?: number): Promise<OperatorsResponse>;
1944
+ /**
1945
+ * @method getCircuitByName
1946
+ * @description Get a circuit by its name.
1947
+ * @param {string} name - The name of the circuit.
1948
+ * @returns {Promise<CircuitResponse>} The circuit response.
1949
+ */
1950
+ getCircuitByName(name: string): Promise<CircuitResponse>;
1951
+ /**
1952
+ * @method getCircuits
1953
+ * @description Get all available circuits.
1954
+ * @returns {Promise<CircuitsResponse>} The circuits response.
1955
+ */
1956
+ getCircuits(): Promise<CircuitsResponse>;
1957
+ /**
1958
+ * @method getTransactionByHash
1959
+ * @description Get a transaction by its hash.
1960
+ * @param {string} hash - The hash of the transaction.
1961
+ * @returns {Promise<TransactionResponse>} The transaction response.
1962
+ */
1963
+ getTransactionByHash(hash: string): Promise<TransactionResponse>;
1964
+ /**
1965
+ * @method getTransactions
1966
+ * @description Get multiple transactions.
1967
+ * @param {string} after - The cursor to start after.
1968
+ * @param {number} [limit] - The number of transactions to retrieve.
1969
+ * @returns {Promise<TransactionsResponse>} The transactions response.
1970
+ */
1971
+ getTransactions(after: string, limit?: number): Promise<TransactionsResponse>;
1972
+ /**
1973
+ * @method getTransactionsByContractAddress
1974
+ * @description Get transactions by contract address.
1975
+ * @param {string} address - The contract address.
1976
+ * @param {string} after - The cursor to start after.
1977
+ * @param {number} [limit] - The number of transactions to retrieve.
1978
+ * @returns {Promise<TransactionsResponse>} The transactions response.
1979
+ */
1980
+ getTransactionsByContractAddress(address: string, after: string, limit?: number): Promise<TransactionsResponse>;
1981
+ /**
1982
+ * @method getProofByContractAddress
1983
+ * @description Get proof data by contract address.
1984
+ * @param {string} address - The contract address.
1985
+ * @returns {Promise<ProofResponse>} The proof response.
1986
+ */
1987
+ getProofByContractAddress(address: string): Promise<ProofResponse>;
1988
+ }
1989
+
1990
+ declare function isValidAddress(address: string): boolean;
1991
+ /**
1992
+ * Converts a hexadecimal string to a decimal string.
1993
+ * @param hexString - The hexadecimal string to convert.
1994
+ * @returns The decimal string representation of the input.
1995
+ */
1996
+ declare function hexToDecimalString(hexString: string): string;
1997
+ /**
1998
+ * Parses a public key string into its x and y coordinates.
1999
+ * @param publickKey - The public key string to parse (128 characters long).
2000
+ * @returns An object containing the x and y coordinates as decimal strings.
2001
+ */
2002
+ declare function decompressPublicKey(compressedPubkey: string): {
2003
+ x: string;
2004
+ y: string;
2005
+ };
2006
+ declare function compressPublicKey(decompressedPubkey: any[]): string;
2007
+
2008
+ export { type Account, type BalanceResponse, type CertificateEcosystem, Circom, Circuit, type CircuitResponse, type CircuitType, type CircuitsCountGraphqlResponse, type CircuitsResponse, type ClientParams, Contract, type ContractParams, type CreateAMaciRoundParams, type CreateMaciRoundParams, type CreateOracleMaciRoundParams, type CreateRoundParams, type ErrorResponse, Event, Http, Indexer, MACI, MaciCertSystemType, MaciCircuitType, MaciClient, MaciRoundType, type NetworkConfig, Operator, type OperatorResponse, type OperatorType, type OperatorsGraphqlResponse, type OperatorsResponse, OracleCertificate, type PrivateKey, Proof, type ProofGraphqlResponse, type ProofResponse, type ProofType, type PublicKey, Round, type RoundGraphqlResponse, type RoundResponse, type RoundType, type RoundsCountGraphqlResponse, type RoundsGraphqlResponse, type RoundsResponse, type SignUpEventType, type SignUpEventsGraphqlResponse, type SignUpEventsResponse, type SuccessResponse, Transaction, type TransactionGraphqlResponse, type TransactionResponse, type TransactionType, type TransactionsGraphqlResponse, type TransactionsResponse, UserAccount, batchGenMessage, circuits, compressPublicKey, decompressPublicKey, genAddKeyProof, genEcdhSharedKey, genKeypair, genMessageFactory, getDefaultParams, hexToDecimalString, isValidAddress, privateKeyFromTxt, stringizing, validator_operator_set };