@dorafactory/maci-sdk 0.0.12 → 0.0.14

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