@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
@@ -1,203 +0,0 @@
1
- /**
2
- * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
3
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
- * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
5
- */
6
- export type Addr = string;
7
- export type Uint256 = string;
8
- export type Timestamp = Uint64;
9
- export type Uint64 = string;
10
- export interface InstantiateMsg {
11
- admin: Addr;
12
- certification_system: Uint256;
13
- circuit_type: Uint256;
14
- coordinator: PubKey;
15
- max_vote_options: Uint256;
16
- operator: Addr;
17
- parameters: MaciParameters;
18
- pre_deactivate_root: Uint256;
19
- round_info: RoundInfo;
20
- voice_credit_amount: Uint256;
21
- voting_time: VotingTime;
22
- whitelist?: Whitelist | null;
23
- }
24
- export interface PubKey {
25
- x: Uint256;
26
- y: Uint256;
27
- }
28
- export interface MaciParameters {
29
- int_state_tree_depth: Uint256;
30
- message_batch_size: Uint256;
31
- state_tree_depth: Uint256;
32
- vote_option_tree_depth: Uint256;
33
- }
34
- export interface RoundInfo {
35
- description: string;
36
- link: string;
37
- title: string;
38
- }
39
- export interface VotingTime {
40
- end_time: Timestamp;
41
- start_time: Timestamp;
42
- }
43
- export interface Whitelist {
44
- users: WhitelistConfig[];
45
- }
46
- export interface WhitelistConfig {
47
- addr: Addr;
48
- }
49
- export type ExecuteMsg = {
50
- set_round_info: {
51
- round_info: RoundInfo;
52
- };
53
- } | {
54
- set_whitelists: {
55
- whitelists: Whitelist;
56
- };
57
- } | {
58
- set_vote_options_map: {
59
- vote_option_map: string[];
60
- };
61
- } | {
62
- sign_up: {
63
- pubkey: PubKey;
64
- };
65
- } | {
66
- start_process_period: {};
67
- } | {
68
- publish_deactivate_message: {
69
- enc_pub_key: PubKey;
70
- message: MessageData;
71
- };
72
- } | {
73
- process_deactivate_message: {
74
- groth16_proof: Groth16ProofType;
75
- new_deactivate_commitment: Uint256;
76
- new_deactivate_root: Uint256;
77
- size: Uint256;
78
- };
79
- } | {
80
- add_new_key: {
81
- d: [Uint256, Uint256, Uint256, Uint256];
82
- groth16_proof: Groth16ProofType;
83
- nullifier: Uint256;
84
- pubkey: PubKey;
85
- };
86
- } | {
87
- pre_add_new_key: {
88
- d: [Uint256, Uint256, Uint256, Uint256];
89
- groth16_proof: Groth16ProofType;
90
- nullifier: Uint256;
91
- pubkey: PubKey;
92
- };
93
- } | {
94
- publish_message: {
95
- enc_pub_key: PubKey;
96
- message: MessageData;
97
- };
98
- } | {
99
- process_message: {
100
- groth16_proof: Groth16ProofType;
101
- new_state_commitment: Uint256;
102
- };
103
- } | {
104
- stop_processing_period: {};
105
- } | {
106
- process_tally: {
107
- groth16_proof: Groth16ProofType;
108
- new_tally_commitment: Uint256;
109
- };
110
- } | {
111
- stop_tallying_period: {
112
- results: Uint256[];
113
- salt: Uint256;
114
- };
115
- } | {
116
- grant: {
117
- max_amount: Uint128;
118
- };
119
- } | {
120
- revoke: {};
121
- } | {
122
- bond: {};
123
- } | {
124
- withdraw: {
125
- amount?: Uint128 | null;
126
- };
127
- };
128
- export type Uint128 = string;
129
- export interface MessageData {
130
- data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
131
- }
132
- export interface Groth16ProofType {
133
- a: string;
134
- b: string;
135
- c: string;
136
- }
137
- export type QueryMsg = {
138
- admin: {};
139
- } | {
140
- operator: {};
141
- } | {
142
- get_round_info: {};
143
- } | {
144
- get_voting_time: {};
145
- } | {
146
- get_period: {};
147
- } | {
148
- get_num_sign_up: {};
149
- } | {
150
- get_msg_chain_length: {};
151
- } | {
152
- get_d_msg_chain_length: {};
153
- } | {
154
- get_processed_d_msg_count: {};
155
- } | {
156
- get_processed_msg_count: {};
157
- } | {
158
- get_processed_user_count: {};
159
- } | {
160
- get_result: {
161
- index: Uint256;
162
- };
163
- } | {
164
- get_all_result: {};
165
- } | {
166
- get_state_idx_inc: {
167
- address: Addr;
168
- };
169
- } | {
170
- get_voice_credit_balance: {
171
- index: Uint256;
172
- };
173
- } | {
174
- get_voice_credit_amount: {};
175
- } | {
176
- white_list: {};
177
- } | {
178
- is_white_list: {
179
- sender: Addr;
180
- };
181
- } | {
182
- signuped: {
183
- pubkey_x: Uint256;
184
- };
185
- } | {
186
- vote_option_map: {};
187
- } | {
188
- max_vote_options: {};
189
- } | {
190
- query_total_fee_grant: {};
191
- } | {
192
- query_circuit_type: {};
193
- } | {
194
- query_cert_system: {};
195
- } | {
196
- query_pre_deactivate_root: {};
197
- };
198
- export type PeriodStatus = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
199
- export interface Period {
200
- status: PeriodStatus;
201
- }
202
- export type Boolean = boolean;
203
- export type ArrayOfString = string[];
@@ -1,180 +0,0 @@
1
- /**
2
- * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
3
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
- * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
5
- */
6
- import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from '@cosmjs/cosmwasm-stargate';
7
- import { Coin, StdFee } from '@cosmjs/amino';
8
- import { Uint256, PubKey, RoundInfo, VotingTime, Whitelist, Uint128, MessageData, Groth16ProofType, PlonkProofType, Addr, Period, Boolean, ArrayOfString } from './Maci.types';
9
- export interface MaciReadOnlyInterface {
10
- contractAddress: string;
11
- getRoundInfo: () => Promise<RoundInfo>;
12
- getVotingTime: () => Promise<VotingTime>;
13
- getPeriod: () => Promise<Period>;
14
- getNumSignUp: () => Promise<Uint256>;
15
- getMsgChainLength: () => Promise<Uint256>;
16
- getProcessedMsgCount: () => Promise<Uint256>;
17
- getProcessedUserCount: () => Promise<Uint256>;
18
- getResult: ({ index }: {
19
- index: Uint256;
20
- }) => Promise<Uint256>;
21
- getAllResult: () => Promise<Uint256>;
22
- getStateIdxInc: ({ address }: {
23
- address: Addr;
24
- }) => Promise<Uint256>;
25
- getVoiceCreditBalance: ({ index }: {
26
- index: Uint256;
27
- }) => Promise<Uint256>;
28
- whiteList: () => Promise<Whitelist>;
29
- isWhiteList: ({ sender }: {
30
- sender: string;
31
- }) => Promise<Boolean>;
32
- whiteBalanceOf: ({ sender }: {
33
- sender: string;
34
- }) => Promise<Uint256>;
35
- voteOptionMap: () => Promise<ArrayOfString>;
36
- maxVoteOptions: () => Promise<Uint256>;
37
- queryTotalFeeGrant: () => Promise<Uint128>;
38
- queryCircuitType: () => Promise<Uint256>;
39
- queryCertSystem: () => Promise<Uint256>;
40
- }
41
- export declare class MaciQueryClient implements MaciReadOnlyInterface {
42
- client: CosmWasmClient;
43
- contractAddress: string;
44
- constructor(client: CosmWasmClient, contractAddress: string);
45
- getRoundInfo: () => Promise<RoundInfo>;
46
- getVotingTime: () => Promise<VotingTime>;
47
- getPeriod: () => Promise<Period>;
48
- getNumSignUp: () => Promise<Uint256>;
49
- getMsgChainLength: () => Promise<Uint256>;
50
- getProcessedMsgCount: () => Promise<Uint256>;
51
- getProcessedUserCount: () => Promise<Uint256>;
52
- getResult: ({ index }: {
53
- index: Uint256;
54
- }) => Promise<Uint256>;
55
- getAllResult: () => Promise<Uint256>;
56
- getStateIdxInc: ({ address }: {
57
- address: Addr;
58
- }) => Promise<Uint256>;
59
- getVoiceCreditBalance: ({ index, }: {
60
- index: Uint256;
61
- }) => Promise<Uint256>;
62
- whiteList: () => Promise<Whitelist>;
63
- isWhiteList: ({ sender }: {
64
- sender: string;
65
- }) => Promise<Boolean>;
66
- whiteBalanceOf: ({ sender }: {
67
- sender: string;
68
- }) => Promise<Uint256>;
69
- voteOptionMap: () => Promise<ArrayOfString>;
70
- maxVoteOptions: () => Promise<Uint256>;
71
- queryTotalFeeGrant: () => Promise<Uint128>;
72
- queryCircuitType: () => Promise<Uint256>;
73
- queryCertSystem: () => Promise<Uint256>;
74
- }
75
- export interface MaciInterface extends MaciReadOnlyInterface {
76
- contractAddress: string;
77
- sender: string;
78
- setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
79
- intStateTreeDepth: Uint256;
80
- messageBatchSize: Uint256;
81
- stateTreeDepth: Uint256;
82
- voteOptionTreeDepth: Uint256;
83
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
84
- setRoundInfo: ({ roundInfo, }: {
85
- roundInfo: RoundInfo;
86
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
87
- setWhitelists: ({ whitelists, }: {
88
- whitelists: Whitelist;
89
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
90
- setVoteOptionsMap: ({ voteOptionMap, }: {
91
- voteOptionMap: string[];
92
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
93
- startVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
94
- signUp: ({ pubkey, }: {
95
- pubkey: PubKey;
96
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
97
- startProcessPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
98
- stopVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
99
- publishMessage: ({ encPubKey, message, }: {
100
- encPubKey: PubKey;
101
- message: MessageData;
102
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
103
- processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
104
- groth16Proof?: Groth16ProofType;
105
- newStateCommitment: Uint256;
106
- plonkProof?: PlonkProofType;
107
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
108
- stopProcessingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
109
- processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
110
- groth16Proof?: Groth16ProofType;
111
- newTallyCommitment: Uint256;
112
- plonkProof?: PlonkProofType;
113
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
114
- stopTallyingPeriod: ({ results, salt, }: {
115
- results: Uint256[];
116
- salt: Uint256;
117
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
118
- grant: ({ maxAmount, }: {
119
- maxAmount: Uint128;
120
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
121
- revoke: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
122
- bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
123
- withdraw: ({ amount, }: {
124
- amount?: Uint128;
125
- }, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
126
- }
127
- export declare class MaciClient extends MaciQueryClient implements MaciInterface {
128
- client: SigningCosmWasmClient;
129
- sender: string;
130
- contractAddress: string;
131
- constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
132
- setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
133
- intStateTreeDepth: Uint256;
134
- messageBatchSize: Uint256;
135
- stateTreeDepth: Uint256;
136
- voteOptionTreeDepth: Uint256;
137
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
138
- setRoundInfo: ({ roundInfo, }: {
139
- roundInfo: RoundInfo;
140
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
141
- setWhitelists: ({ whitelists, }: {
142
- whitelists: Whitelist;
143
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
144
- setVoteOptionsMap: ({ voteOptionMap, }: {
145
- voteOptionMap: string[];
146
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
147
- startVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
148
- signUp: ({ pubkey, }: {
149
- pubkey: PubKey;
150
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
151
- startProcessPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
152
- stopVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
153
- publishMessage: ({ encPubKey, message, }: {
154
- encPubKey: PubKey;
155
- message: MessageData;
156
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
157
- processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
158
- groth16Proof?: Groth16ProofType;
159
- newStateCommitment: Uint256;
160
- plonkProof?: PlonkProofType;
161
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
162
- stopProcessingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
163
- processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
164
- groth16Proof?: Groth16ProofType;
165
- newTallyCommitment: Uint256;
166
- plonkProof?: PlonkProofType;
167
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
168
- stopTallyingPeriod: ({ results, salt, }: {
169
- results: Uint256[];
170
- salt: Uint256;
171
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
172
- grant: ({ maxAmount, }: {
173
- maxAmount: Uint128;
174
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
175
- revoke: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
176
- bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
177
- withdraw: ({ amount, }: {
178
- amount?: Uint128;
179
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
180
- }
@@ -1,226 +0,0 @@
1
- /**
2
- * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
3
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
- * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
5
- */
6
- export type Uint256 = string;
7
- export type Timestamp = Uint64;
8
- export type Uint64 = string;
9
- export interface InstantiateMsg {
10
- certification_system: Uint256;
11
- circuit_type: Uint256;
12
- coordinator: PubKey;
13
- groth16_process_vkey?: Groth16VKeyType | null;
14
- groth16_tally_vkey?: Groth16VKeyType | null;
15
- max_vote_options: Uint256;
16
- parameters: MaciParameters;
17
- plonk_process_vkey?: PlonkVKeyType | null;
18
- plonk_tally_vkey?: PlonkVKeyType | null;
19
- qtr_lib: QuinaryTreeRoot;
20
- round_info: RoundInfo;
21
- voting_time?: VotingTime | null;
22
- whitelist?: Whitelist | null;
23
- }
24
- export interface PubKey {
25
- x: Uint256;
26
- y: Uint256;
27
- }
28
- export interface Groth16VKeyType {
29
- vk_alpha1: string;
30
- vk_beta_2: string;
31
- vk_delta_2: string;
32
- vk_gamma_2: string;
33
- vk_ic0: string;
34
- vk_ic1: string;
35
- }
36
- export interface MaciParameters {
37
- int_state_tree_depth: Uint256;
38
- message_batch_size: Uint256;
39
- state_tree_depth: Uint256;
40
- vote_option_tree_depth: Uint256;
41
- }
42
- export interface PlonkVKeyType {
43
- g2_elements: string[];
44
- n: number;
45
- next_step_selector_commitments: string[];
46
- non_residues: string[];
47
- num_inputs: number;
48
- permutation_commitments: string[];
49
- selector_commitments: string[];
50
- }
51
- export interface QuinaryTreeRoot {
52
- zeros: [
53
- Uint256,
54
- Uint256,
55
- Uint256,
56
- Uint256,
57
- Uint256,
58
- Uint256,
59
- Uint256,
60
- Uint256,
61
- Uint256
62
- ];
63
- }
64
- export interface RoundInfo {
65
- description: string;
66
- link: string;
67
- title: string;
68
- }
69
- export interface VotingTime {
70
- end_time?: Timestamp | null;
71
- start_time?: Timestamp | null;
72
- }
73
- export interface Whitelist {
74
- users: WhitelistConfig[];
75
- }
76
- export interface WhitelistConfig {
77
- addr: string;
78
- balance: Uint256;
79
- }
80
- export type ExecuteMsg = {
81
- set_params: {
82
- int_state_tree_depth: Uint256;
83
- message_batch_size: Uint256;
84
- state_tree_depth: Uint256;
85
- vote_option_tree_depth: Uint256;
86
- };
87
- } | {
88
- set_round_info: {
89
- round_info: RoundInfo;
90
- };
91
- } | {
92
- set_whitelists: {
93
- whitelists: Whitelist;
94
- };
95
- } | {
96
- set_vote_options_map: {
97
- vote_option_map: string[];
98
- };
99
- } | {
100
- start_voting_period: {};
101
- } | {
102
- sign_up: {
103
- pubkey: PubKey;
104
- };
105
- } | {
106
- start_process_period: {};
107
- } | {
108
- stop_voting_period: {};
109
- } | {
110
- publish_message: {
111
- enc_pub_key: PubKey;
112
- message: MessageData;
113
- };
114
- } | {
115
- process_message: {
116
- groth16_proof?: Groth16ProofType | null;
117
- new_state_commitment: Uint256;
118
- plonk_proof?: PlonkProofType | null;
119
- };
120
- } | {
121
- stop_processing_period: {};
122
- } | {
123
- process_tally: {
124
- groth16_proof?: Groth16ProofType | null;
125
- new_tally_commitment: Uint256;
126
- plonk_proof?: PlonkProofType | null;
127
- };
128
- } | {
129
- stop_tallying_period: {
130
- results: Uint256[];
131
- salt: Uint256;
132
- };
133
- } | {
134
- grant: {
135
- max_amount: Uint128;
136
- };
137
- } | {
138
- revoke: {};
139
- } | {
140
- bond: {};
141
- } | {
142
- withdraw: {
143
- amount?: Uint128 | null;
144
- };
145
- };
146
- export type Uint128 = string;
147
- export interface MessageData {
148
- data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
149
- }
150
- export interface Groth16ProofType {
151
- a: string;
152
- b: string;
153
- c: string;
154
- }
155
- export interface PlonkProofType {
156
- grand_product_at_z_omega: string;
157
- grand_product_commitment: string;
158
- input_values: string[];
159
- linearization_polynomial_at_z: string;
160
- n: number;
161
- num_inputs: number;
162
- opening_at_z_omega_proof: string;
163
- opening_at_z_proof: string;
164
- permutation_polynomials_at_z: string[];
165
- quotient_poly_commitments: string[];
166
- quotient_polynomial_at_z: string;
167
- wire_commitments: string[];
168
- wire_values_at_z: string[];
169
- wire_values_at_z_omega: string[];
170
- }
171
- export type QueryMsg = {
172
- get_round_info: {};
173
- } | {
174
- get_voting_time: {};
175
- } | {
176
- get_period: {};
177
- } | {
178
- get_num_sign_up: {};
179
- } | {
180
- get_msg_chain_length: {};
181
- } | {
182
- get_processed_msg_count: {};
183
- } | {
184
- get_processed_user_count: {};
185
- } | {
186
- get_result: {
187
- index: Uint256;
188
- };
189
- } | {
190
- get_all_result: {};
191
- } | {
192
- get_state_idx_inc: {
193
- address: Addr;
194
- };
195
- } | {
196
- get_voice_credit_balance: {
197
- index: Uint256;
198
- };
199
- } | {
200
- white_list: {};
201
- } | {
202
- is_white_list: {
203
- sender: string;
204
- };
205
- } | {
206
- white_balance_of: {
207
- sender: string;
208
- };
209
- } | {
210
- vote_option_map: {};
211
- } | {
212
- max_vote_options: {};
213
- } | {
214
- query_total_fee_grant: {};
215
- } | {
216
- query_circuit_type: {};
217
- } | {
218
- query_cert_system: {};
219
- };
220
- export type Addr = string;
221
- export type PeriodStatus = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
222
- export interface Period {
223
- status: PeriodStatus;
224
- }
225
- export type Boolean = boolean;
226
- export type ArrayOfString = string[];