@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.
- package/dist/browser.d.mts +2007 -0
- package/dist/browser.d.ts +2007 -0
- package/dist/browser.js +30833 -0
- package/dist/browser.js.map +1 -0
- package/dist/browser.mjs +30844 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/index.d.mts +2008 -0
- package/dist/index.d.ts +2006 -14
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +31 -12
- package/src/browser.ts +17 -0
- package/src/libs/maci/maci.ts +1 -1
- package/src/polyfills/browser-polyfills.ts +9 -0
- package/dist/libs/circom/circomlib.d.ts +0 -39
- package/dist/libs/circom/index.d.ts +0 -10
- package/dist/libs/circom/tree.d.ts +0 -23
- package/dist/libs/circom/types.d.ts +0 -7
- package/dist/libs/const.d.ts +0 -117
- package/dist/libs/contract/config.d.ts +0 -29
- package/dist/libs/contract/contract.d.ts +0 -43
- package/dist/libs/contract/index.d.ts +0 -1
- package/dist/libs/contract/ts/AMaci.client.d.ts +0 -216
- package/dist/libs/contract/ts/AMaci.types.d.ts +0 -203
- package/dist/libs/contract/ts/Maci.client.d.ts +0 -180
- package/dist/libs/contract/ts/Maci.types.d.ts +0 -226
- package/dist/libs/contract/ts/OracleMaci.client.d.ts +0 -206
- package/dist/libs/contract/ts/OracleMaci.types.d.ts +0 -263
- package/dist/libs/contract/ts/Registry.client.d.ts +0 -128
- package/dist/libs/contract/ts/Registry.types.d.ts +0 -110
- package/dist/libs/contract/types.d.ts +0 -39
- package/dist/libs/contract/utils.d.ts +0 -59
- package/dist/libs/contract/vars.d.ts +0 -63
- package/dist/libs/errors/index.d.ts +0 -28
- package/dist/libs/errors/types.d.ts +0 -15
- package/dist/libs/http/http.d.ts +0 -16
- package/dist/libs/http/index.d.ts +0 -1
- package/dist/libs/index.d.ts +0 -7
- package/dist/libs/indexer/index.d.ts +0 -1
- package/dist/libs/indexer/indexer.d.ts +0 -142
- package/dist/libs/indexer/types.d.ts +0 -7
- package/dist/libs/maci/index.d.ts +0 -1
- package/dist/libs/maci/maci.d.ts +0 -121
- package/dist/libs/maci/types.d.ts +0 -6
- package/dist/libs/oracle-certificate/index.d.ts +0 -1
- package/dist/libs/oracle-certificate/oracle-certificate.d.ts +0 -7
- package/dist/libs/oracle-certificate/types.d.ts +0 -17
- package/dist/libs/query/account.d.ts +0 -7
- package/dist/libs/query/circuit.d.ts +0 -8
- package/dist/libs/query/event.d.ts +0 -7
- package/dist/libs/query/index.d.ts +0 -7
- package/dist/libs/query/operator.d.ts +0 -9
- package/dist/libs/query/proof.d.ts +0 -7
- package/dist/libs/query/round.d.ts +0 -11
- package/dist/libs/query/transaction.d.ts +0 -9
- package/dist/maci.d.ts +0 -157
- package/dist/types/index.d.ts +0 -294
- package/dist/utils/index.d.ts +0 -17
|
@@ -1,206 +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, Addr, PubKey, RoundInfo, VotingTime, Uint128, MessageData, Groth16ProofType, PlonkProofType, Period, GrantConfig, Boolean, OracleWhitelistConfig, ArrayOfString, WhitelistConfig } from './OracleMaci.types';
|
|
9
|
-
export interface OracleMaciReadOnlyInterface {
|
|
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
|
-
isWhiteList: ({ amount, certificate, sender, }: {
|
|
29
|
-
amount: Uint256;
|
|
30
|
-
certificate: string;
|
|
31
|
-
sender: string;
|
|
32
|
-
}) => Promise<Boolean>;
|
|
33
|
-
whiteBalanceOf: ({ amount, certificate, sender, }: {
|
|
34
|
-
amount: Uint256;
|
|
35
|
-
certificate: string;
|
|
36
|
-
sender: string;
|
|
37
|
-
}) => Promise<Uint256>;
|
|
38
|
-
whiteInfo: ({ sender }: {
|
|
39
|
-
sender: string;
|
|
40
|
-
}) => Promise<WhitelistConfig>;
|
|
41
|
-
grantInfo: ({ grantee }: {
|
|
42
|
-
grantee: string;
|
|
43
|
-
}) => Promise<GrantConfig>;
|
|
44
|
-
maxWhitelistNum: () => Promise<Uint128>;
|
|
45
|
-
voteOptionMap: () => Promise<ArrayOfString>;
|
|
46
|
-
maxVoteOptions: () => Promise<Uint256>;
|
|
47
|
-
queryTotalFeeGrant: () => Promise<Uint128>;
|
|
48
|
-
queryCircuitType: () => Promise<Uint256>;
|
|
49
|
-
queryCertSystem: () => Promise<Uint256>;
|
|
50
|
-
queryOracleWhitelistConfig: () => Promise<OracleWhitelistConfig>;
|
|
51
|
-
}
|
|
52
|
-
export declare class OracleMaciQueryClient implements OracleMaciReadOnlyInterface {
|
|
53
|
-
client: CosmWasmClient;
|
|
54
|
-
contractAddress: string;
|
|
55
|
-
constructor(client: CosmWasmClient, contractAddress: string);
|
|
56
|
-
getRoundInfo: () => Promise<RoundInfo>;
|
|
57
|
-
getVotingTime: () => Promise<VotingTime>;
|
|
58
|
-
getPeriod: () => Promise<Period>;
|
|
59
|
-
getNumSignUp: () => Promise<Uint256>;
|
|
60
|
-
getMsgChainLength: () => Promise<Uint256>;
|
|
61
|
-
getProcessedMsgCount: () => Promise<Uint256>;
|
|
62
|
-
getProcessedUserCount: () => Promise<Uint256>;
|
|
63
|
-
getResult: ({ index }: {
|
|
64
|
-
index: Uint256;
|
|
65
|
-
}) => Promise<Uint256>;
|
|
66
|
-
getAllResult: () => Promise<Uint256>;
|
|
67
|
-
getStateIdxInc: ({ address }: {
|
|
68
|
-
address: Addr;
|
|
69
|
-
}) => Promise<Uint256>;
|
|
70
|
-
getVoiceCreditBalance: ({ index, }: {
|
|
71
|
-
index: Uint256;
|
|
72
|
-
}) => Promise<Uint256>;
|
|
73
|
-
isWhiteList: ({ amount, certificate, sender, }: {
|
|
74
|
-
amount: Uint256;
|
|
75
|
-
certificate: string;
|
|
76
|
-
sender: string;
|
|
77
|
-
}) => Promise<Boolean>;
|
|
78
|
-
whiteBalanceOf: ({ amount, certificate, sender, }: {
|
|
79
|
-
amount: Uint256;
|
|
80
|
-
certificate: string;
|
|
81
|
-
sender: string;
|
|
82
|
-
}) => Promise<Uint256>;
|
|
83
|
-
whiteInfo: ({ sender, }: {
|
|
84
|
-
sender: string;
|
|
85
|
-
}) => Promise<WhitelistConfig>;
|
|
86
|
-
grantInfo: ({ grantee, }: {
|
|
87
|
-
grantee: string;
|
|
88
|
-
}) => Promise<GrantConfig>;
|
|
89
|
-
maxWhitelistNum: () => Promise<Uint128>;
|
|
90
|
-
voteOptionMap: () => Promise<ArrayOfString>;
|
|
91
|
-
maxVoteOptions: () => Promise<Uint256>;
|
|
92
|
-
queryTotalFeeGrant: () => Promise<Uint128>;
|
|
93
|
-
queryCircuitType: () => Promise<Uint256>;
|
|
94
|
-
queryCertSystem: () => Promise<Uint256>;
|
|
95
|
-
queryOracleWhitelistConfig: () => Promise<OracleWhitelistConfig>;
|
|
96
|
-
}
|
|
97
|
-
export interface OracleMaciInterface extends OracleMaciReadOnlyInterface {
|
|
98
|
-
contractAddress: string;
|
|
99
|
-
sender: string;
|
|
100
|
-
setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
|
|
101
|
-
intStateTreeDepth: Uint256;
|
|
102
|
-
messageBatchSize: Uint256;
|
|
103
|
-
stateTreeDepth: Uint256;
|
|
104
|
-
voteOptionTreeDepth: Uint256;
|
|
105
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
106
|
-
setRoundInfo: ({ roundInfo, }: {
|
|
107
|
-
roundInfo: RoundInfo;
|
|
108
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
109
|
-
setVoteOptionsMap: ({ voteOptionMap, }: {
|
|
110
|
-
voteOptionMap: string[];
|
|
111
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
112
|
-
startVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
113
|
-
signUp: ({ amount, certificate, pubkey, }: {
|
|
114
|
-
amount: Uint256;
|
|
115
|
-
certificate: string;
|
|
116
|
-
pubkey: PubKey;
|
|
117
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
118
|
-
startProcessPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
119
|
-
stopVotingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
120
|
-
publishMessage: ({ encPubKey, message, }: {
|
|
121
|
-
encPubKey: PubKey;
|
|
122
|
-
message: MessageData;
|
|
123
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
124
|
-
processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
|
|
125
|
-
groth16Proof?: Groth16ProofType;
|
|
126
|
-
newStateCommitment: Uint256;
|
|
127
|
-
plonkProof?: PlonkProofType;
|
|
128
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
129
|
-
stopProcessingPeriod: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
130
|
-
processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
|
|
131
|
-
groth16Proof?: Groth16ProofType;
|
|
132
|
-
newTallyCommitment: Uint256;
|
|
133
|
-
plonkProof?: PlonkProofType;
|
|
134
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
135
|
-
stopTallyingPeriod: ({ results, salt, }: {
|
|
136
|
-
results: Uint256[];
|
|
137
|
-
salt: Uint256;
|
|
138
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
139
|
-
grant: ({ baseAmount, grantee, }: {
|
|
140
|
-
baseAmount: Uint128;
|
|
141
|
-
grantee: Addr;
|
|
142
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
143
|
-
revoke: ({ grantee, }: {
|
|
144
|
-
grantee: Addr;
|
|
145
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
146
|
-
bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
147
|
-
withdraw: ({ amount, }: {
|
|
148
|
-
amount?: Uint128;
|
|
149
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
150
|
-
}
|
|
151
|
-
export declare class OracleMaciClient extends OracleMaciQueryClient implements OracleMaciInterface {
|
|
152
|
-
client: SigningCosmWasmClient;
|
|
153
|
-
sender: string;
|
|
154
|
-
contractAddress: string;
|
|
155
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
|
|
156
|
-
setParams: ({ intStateTreeDepth, messageBatchSize, stateTreeDepth, voteOptionTreeDepth, }: {
|
|
157
|
-
intStateTreeDepth: Uint256;
|
|
158
|
-
messageBatchSize: Uint256;
|
|
159
|
-
stateTreeDepth: Uint256;
|
|
160
|
-
voteOptionTreeDepth: Uint256;
|
|
161
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
162
|
-
setRoundInfo: ({ roundInfo, }: {
|
|
163
|
-
roundInfo: RoundInfo;
|
|
164
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
165
|
-
setVoteOptionsMap: ({ voteOptionMap, }: {
|
|
166
|
-
voteOptionMap: string[];
|
|
167
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
168
|
-
startVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
169
|
-
signUp: ({ amount, certificate, pubkey, }: {
|
|
170
|
-
amount: Uint256;
|
|
171
|
-
certificate: string;
|
|
172
|
-
pubkey: PubKey;
|
|
173
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
174
|
-
startProcessPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
175
|
-
stopVotingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
176
|
-
publishMessage: ({ encPubKey, message, }: {
|
|
177
|
-
encPubKey: PubKey;
|
|
178
|
-
message: MessageData;
|
|
179
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
180
|
-
processMessage: ({ groth16Proof, newStateCommitment, plonkProof, }: {
|
|
181
|
-
groth16Proof?: Groth16ProofType;
|
|
182
|
-
newStateCommitment: Uint256;
|
|
183
|
-
plonkProof?: PlonkProofType;
|
|
184
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
185
|
-
stopProcessingPeriod: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
186
|
-
processTally: ({ groth16Proof, newTallyCommitment, plonkProof, }: {
|
|
187
|
-
groth16Proof?: Groth16ProofType;
|
|
188
|
-
newTallyCommitment: Uint256;
|
|
189
|
-
plonkProof?: PlonkProofType;
|
|
190
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
191
|
-
stopTallyingPeriod: ({ results, salt, }: {
|
|
192
|
-
results: Uint256[];
|
|
193
|
-
salt: Uint256;
|
|
194
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
195
|
-
grant: ({ baseAmount, grantee, }: {
|
|
196
|
-
baseAmount: Uint128;
|
|
197
|
-
grantee: Addr;
|
|
198
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
199
|
-
revoke: ({ grantee, }: {
|
|
200
|
-
grantee: Addr;
|
|
201
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
202
|
-
bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
203
|
-
withdraw: ({ amount, }: {
|
|
204
|
-
amount?: Uint128;
|
|
205
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
206
|
-
}
|
|
@@ -1,263 +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 Addr = string;
|
|
8
|
-
export type Timestamp = Uint64;
|
|
9
|
-
export type Uint64 = string;
|
|
10
|
-
export type VotingPowerMode = 'slope' | 'threshold';
|
|
11
|
-
export interface InstantiateMsg {
|
|
12
|
-
certification_system: Uint256;
|
|
13
|
-
circuit_type: Uint256;
|
|
14
|
-
coordinator: PubKey;
|
|
15
|
-
feegrant_operator: Addr;
|
|
16
|
-
groth16_process_vkey?: Groth16VKeyType | null;
|
|
17
|
-
groth16_tally_vkey?: Groth16VKeyType | null;
|
|
18
|
-
max_vote_options: Uint256;
|
|
19
|
-
parameters: MaciParameters;
|
|
20
|
-
plonk_process_vkey?: PlonkVKeyType | null;
|
|
21
|
-
plonk_tally_vkey?: PlonkVKeyType | null;
|
|
22
|
-
qtr_lib: QuinaryTreeRoot;
|
|
23
|
-
round_info: RoundInfo;
|
|
24
|
-
voting_time?: VotingTime | null;
|
|
25
|
-
whitelist_backend_pubkey: string;
|
|
26
|
-
whitelist_ecosystem: string;
|
|
27
|
-
whitelist_snapshot_height: Uint256;
|
|
28
|
-
whitelist_voting_power_args: VotingPowerArgs;
|
|
29
|
-
}
|
|
30
|
-
export interface PubKey {
|
|
31
|
-
x: Uint256;
|
|
32
|
-
y: Uint256;
|
|
33
|
-
}
|
|
34
|
-
export interface Groth16VKeyType {
|
|
35
|
-
vk_alpha1: string;
|
|
36
|
-
vk_beta_2: string;
|
|
37
|
-
vk_delta_2: string;
|
|
38
|
-
vk_gamma_2: string;
|
|
39
|
-
vk_ic0: string;
|
|
40
|
-
vk_ic1: string;
|
|
41
|
-
}
|
|
42
|
-
export interface MaciParameters {
|
|
43
|
-
int_state_tree_depth: Uint256;
|
|
44
|
-
message_batch_size: Uint256;
|
|
45
|
-
state_tree_depth: Uint256;
|
|
46
|
-
vote_option_tree_depth: Uint256;
|
|
47
|
-
}
|
|
48
|
-
export interface PlonkVKeyType {
|
|
49
|
-
g2_elements: string[];
|
|
50
|
-
n: number;
|
|
51
|
-
next_step_selector_commitments: string[];
|
|
52
|
-
non_residues: string[];
|
|
53
|
-
num_inputs: number;
|
|
54
|
-
permutation_commitments: string[];
|
|
55
|
-
selector_commitments: string[];
|
|
56
|
-
}
|
|
57
|
-
export interface QuinaryTreeRoot {
|
|
58
|
-
zeros: [
|
|
59
|
-
Uint256,
|
|
60
|
-
Uint256,
|
|
61
|
-
Uint256,
|
|
62
|
-
Uint256,
|
|
63
|
-
Uint256,
|
|
64
|
-
Uint256,
|
|
65
|
-
Uint256,
|
|
66
|
-
Uint256,
|
|
67
|
-
Uint256
|
|
68
|
-
];
|
|
69
|
-
}
|
|
70
|
-
export interface RoundInfo {
|
|
71
|
-
description: string;
|
|
72
|
-
link: string;
|
|
73
|
-
title: string;
|
|
74
|
-
}
|
|
75
|
-
export interface VotingTime {
|
|
76
|
-
end_time?: Timestamp | null;
|
|
77
|
-
start_time?: Timestamp | null;
|
|
78
|
-
}
|
|
79
|
-
export interface VotingPowerArgs {
|
|
80
|
-
mode: VotingPowerMode;
|
|
81
|
-
slope: Uint256;
|
|
82
|
-
threshold: Uint256;
|
|
83
|
-
}
|
|
84
|
-
export type ExecuteMsg = {
|
|
85
|
-
set_params: {
|
|
86
|
-
int_state_tree_depth: Uint256;
|
|
87
|
-
message_batch_size: Uint256;
|
|
88
|
-
state_tree_depth: Uint256;
|
|
89
|
-
vote_option_tree_depth: Uint256;
|
|
90
|
-
};
|
|
91
|
-
} | {
|
|
92
|
-
set_round_info: {
|
|
93
|
-
round_info: RoundInfo;
|
|
94
|
-
};
|
|
95
|
-
} | {
|
|
96
|
-
set_vote_options_map: {
|
|
97
|
-
vote_option_map: string[];
|
|
98
|
-
};
|
|
99
|
-
} | {
|
|
100
|
-
start_voting_period: {};
|
|
101
|
-
} | {
|
|
102
|
-
sign_up: {
|
|
103
|
-
amount: Uint256;
|
|
104
|
-
certificate: string;
|
|
105
|
-
pubkey: PubKey;
|
|
106
|
-
};
|
|
107
|
-
} | {
|
|
108
|
-
start_process_period: {};
|
|
109
|
-
} | {
|
|
110
|
-
stop_voting_period: {};
|
|
111
|
-
} | {
|
|
112
|
-
publish_message: {
|
|
113
|
-
enc_pub_key: PubKey;
|
|
114
|
-
message: MessageData;
|
|
115
|
-
};
|
|
116
|
-
} | {
|
|
117
|
-
process_message: {
|
|
118
|
-
groth16_proof?: Groth16ProofType | null;
|
|
119
|
-
new_state_commitment: Uint256;
|
|
120
|
-
plonk_proof?: PlonkProofType | null;
|
|
121
|
-
};
|
|
122
|
-
} | {
|
|
123
|
-
stop_processing_period: {};
|
|
124
|
-
} | {
|
|
125
|
-
process_tally: {
|
|
126
|
-
groth16_proof?: Groth16ProofType | null;
|
|
127
|
-
new_tally_commitment: Uint256;
|
|
128
|
-
plonk_proof?: PlonkProofType | null;
|
|
129
|
-
};
|
|
130
|
-
} | {
|
|
131
|
-
stop_tallying_period: {
|
|
132
|
-
results: Uint256[];
|
|
133
|
-
salt: Uint256;
|
|
134
|
-
};
|
|
135
|
-
} | {
|
|
136
|
-
grant: {
|
|
137
|
-
base_amount: Uint128;
|
|
138
|
-
grantee: Addr;
|
|
139
|
-
};
|
|
140
|
-
} | {
|
|
141
|
-
revoke: {
|
|
142
|
-
grantee: Addr;
|
|
143
|
-
};
|
|
144
|
-
} | {
|
|
145
|
-
bond: {};
|
|
146
|
-
} | {
|
|
147
|
-
withdraw: {
|
|
148
|
-
amount?: Uint128 | null;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
export type Uint128 = string;
|
|
152
|
-
export interface MessageData {
|
|
153
|
-
data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
|
|
154
|
-
}
|
|
155
|
-
export interface Groth16ProofType {
|
|
156
|
-
a: string;
|
|
157
|
-
b: string;
|
|
158
|
-
c: string;
|
|
159
|
-
}
|
|
160
|
-
export interface PlonkProofType {
|
|
161
|
-
grand_product_at_z_omega: string;
|
|
162
|
-
grand_product_commitment: string;
|
|
163
|
-
input_values: string[];
|
|
164
|
-
linearization_polynomial_at_z: string;
|
|
165
|
-
n: number;
|
|
166
|
-
num_inputs: number;
|
|
167
|
-
opening_at_z_omega_proof: string;
|
|
168
|
-
opening_at_z_proof: string;
|
|
169
|
-
permutation_polynomials_at_z: string[];
|
|
170
|
-
quotient_poly_commitments: string[];
|
|
171
|
-
quotient_polynomial_at_z: string;
|
|
172
|
-
wire_commitments: string[];
|
|
173
|
-
wire_values_at_z: string[];
|
|
174
|
-
wire_values_at_z_omega: string[];
|
|
175
|
-
}
|
|
176
|
-
export type QueryMsg = {
|
|
177
|
-
get_round_info: {};
|
|
178
|
-
} | {
|
|
179
|
-
get_voting_time: {};
|
|
180
|
-
} | {
|
|
181
|
-
get_period: {};
|
|
182
|
-
} | {
|
|
183
|
-
get_num_sign_up: {};
|
|
184
|
-
} | {
|
|
185
|
-
get_msg_chain_length: {};
|
|
186
|
-
} | {
|
|
187
|
-
get_processed_msg_count: {};
|
|
188
|
-
} | {
|
|
189
|
-
get_processed_user_count: {};
|
|
190
|
-
} | {
|
|
191
|
-
get_result: {
|
|
192
|
-
index: Uint256;
|
|
193
|
-
};
|
|
194
|
-
} | {
|
|
195
|
-
get_all_result: {};
|
|
196
|
-
} | {
|
|
197
|
-
get_state_idx_inc: {
|
|
198
|
-
address: Addr;
|
|
199
|
-
};
|
|
200
|
-
} | {
|
|
201
|
-
get_voice_credit_balance: {
|
|
202
|
-
index: Uint256;
|
|
203
|
-
};
|
|
204
|
-
} | {
|
|
205
|
-
is_white_list: {
|
|
206
|
-
amount: Uint256;
|
|
207
|
-
certificate: string;
|
|
208
|
-
sender: string;
|
|
209
|
-
};
|
|
210
|
-
} | {
|
|
211
|
-
white_balance_of: {
|
|
212
|
-
amount: Uint256;
|
|
213
|
-
certificate: string;
|
|
214
|
-
sender: string;
|
|
215
|
-
};
|
|
216
|
-
} | {
|
|
217
|
-
white_info: {
|
|
218
|
-
sender: string;
|
|
219
|
-
};
|
|
220
|
-
} | {
|
|
221
|
-
grant_info: {
|
|
222
|
-
grantee: string;
|
|
223
|
-
};
|
|
224
|
-
} | {
|
|
225
|
-
max_whitelist_num: {};
|
|
226
|
-
} | {
|
|
227
|
-
vote_option_map: {};
|
|
228
|
-
} | {
|
|
229
|
-
max_vote_options: {};
|
|
230
|
-
} | {
|
|
231
|
-
query_total_fee_grant: {};
|
|
232
|
-
} | {
|
|
233
|
-
query_circuit_type: {};
|
|
234
|
-
} | {
|
|
235
|
-
query_cert_system: {};
|
|
236
|
-
} | {
|
|
237
|
-
query_oracle_whitelist_config: {};
|
|
238
|
-
};
|
|
239
|
-
export type PeriodStatus = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
|
|
240
|
-
export interface Period {
|
|
241
|
-
status: PeriodStatus;
|
|
242
|
-
}
|
|
243
|
-
export interface GrantConfig {
|
|
244
|
-
fee_amount: Uint128;
|
|
245
|
-
fee_grant: boolean;
|
|
246
|
-
}
|
|
247
|
-
export type Boolean = boolean;
|
|
248
|
-
export type Binary = string;
|
|
249
|
-
export interface OracleWhitelistConfig {
|
|
250
|
-
backend_pubkey: Binary;
|
|
251
|
-
ecosystem: string;
|
|
252
|
-
slope: Uint256;
|
|
253
|
-
snapshot_height: Uint256;
|
|
254
|
-
threshold: Uint256;
|
|
255
|
-
voting_power_mode: VotingPowerMode;
|
|
256
|
-
}
|
|
257
|
-
export type ArrayOfString = string[];
|
|
258
|
-
export interface WhitelistConfig {
|
|
259
|
-
balance: Uint256;
|
|
260
|
-
fee_amount: Uint128;
|
|
261
|
-
fee_grant: boolean;
|
|
262
|
-
is_register: boolean;
|
|
263
|
-
}
|
|
@@ -1,128 +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 { Addr, Uint256, PubKey, RoundInfo, VotingTime, Whitelist, ValidatorSet, AdminResponse, String, Boolean } from './Registry.types';
|
|
9
|
-
export interface RegistryReadOnlyInterface {
|
|
10
|
-
contractAddress: string;
|
|
11
|
-
admin: () => Promise<AdminResponse>;
|
|
12
|
-
operator: () => Promise<Addr>;
|
|
13
|
-
isMaciOperator: ({ address }: {
|
|
14
|
-
address: Addr;
|
|
15
|
-
}) => Promise<Boolean>;
|
|
16
|
-
isValidator: ({ address }: {
|
|
17
|
-
address: Addr;
|
|
18
|
-
}) => Promise<Boolean>;
|
|
19
|
-
getValidators: () => Promise<ValidatorSet>;
|
|
20
|
-
getValidatorOperator: ({ address }: {
|
|
21
|
-
address: Addr;
|
|
22
|
-
}) => Promise<Addr>;
|
|
23
|
-
getMaciOperatorPubkey: ({ address }: {
|
|
24
|
-
address: Addr;
|
|
25
|
-
}) => Promise<PubKey>;
|
|
26
|
-
getMaciOperatorIdentity: ({ address }: {
|
|
27
|
-
address: Addr;
|
|
28
|
-
}) => Promise<String>;
|
|
29
|
-
}
|
|
30
|
-
export declare class RegistryQueryClient implements RegistryReadOnlyInterface {
|
|
31
|
-
client: CosmWasmClient;
|
|
32
|
-
contractAddress: string;
|
|
33
|
-
constructor(client: CosmWasmClient, contractAddress: string);
|
|
34
|
-
admin: () => Promise<AdminResponse>;
|
|
35
|
-
operator: () => Promise<Addr>;
|
|
36
|
-
isMaciOperator: ({ address }: {
|
|
37
|
-
address: Addr;
|
|
38
|
-
}) => Promise<Boolean>;
|
|
39
|
-
isValidator: ({ address }: {
|
|
40
|
-
address: Addr;
|
|
41
|
-
}) => Promise<Boolean>;
|
|
42
|
-
getValidators: () => Promise<ValidatorSet>;
|
|
43
|
-
getValidatorOperator: ({ address, }: {
|
|
44
|
-
address: Addr;
|
|
45
|
-
}) => Promise<Addr>;
|
|
46
|
-
getMaciOperatorPubkey: ({ address, }: {
|
|
47
|
-
address: Addr;
|
|
48
|
-
}) => Promise<PubKey>;
|
|
49
|
-
getMaciOperatorIdentity: ({ address, }: {
|
|
50
|
-
address: Addr;
|
|
51
|
-
}) => Promise<String>;
|
|
52
|
-
}
|
|
53
|
-
export interface RegistryInterface extends RegistryReadOnlyInterface {
|
|
54
|
-
contractAddress: string;
|
|
55
|
-
sender: string;
|
|
56
|
-
setMaciOperator: ({ operator, }: {
|
|
57
|
-
operator: Addr;
|
|
58
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
59
|
-
setMaciOperatorPubkey: ({ pubkey, }: {
|
|
60
|
-
pubkey: PubKey;
|
|
61
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
62
|
-
setMaciOperatorIdentity: ({ identity, }: {
|
|
63
|
-
identity: string;
|
|
64
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
65
|
-
createRound: ({ certificationSystem, circuitType, maxOption, maxVoter, operator, preDeactivateRoot, roundInfo, voiceCreditAmount, votingTime, whitelist, }: {
|
|
66
|
-
certificationSystem: Uint256;
|
|
67
|
-
circuitType: Uint256;
|
|
68
|
-
maxOption: Uint256;
|
|
69
|
-
maxVoter: Uint256;
|
|
70
|
-
operator: Addr;
|
|
71
|
-
preDeactivateRoot: Uint256;
|
|
72
|
-
roundInfo: RoundInfo;
|
|
73
|
-
voiceCreditAmount: Uint256;
|
|
74
|
-
votingTime: VotingTime;
|
|
75
|
-
whitelist?: Whitelist;
|
|
76
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
77
|
-
setValidators: ({ addresses, }: {
|
|
78
|
-
addresses: ValidatorSet;
|
|
79
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
80
|
-
removeValidator: ({ address, }: {
|
|
81
|
-
address: Addr;
|
|
82
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
83
|
-
updateAmaciCodeId: ({ amaciCodeId, }: {
|
|
84
|
-
amaciCodeId: number;
|
|
85
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
86
|
-
changeOperator: ({ address, }: {
|
|
87
|
-
address: Addr;
|
|
88
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
89
|
-
}
|
|
90
|
-
export declare class RegistryClient extends RegistryQueryClient implements RegistryInterface {
|
|
91
|
-
client: SigningCosmWasmClient;
|
|
92
|
-
sender: string;
|
|
93
|
-
contractAddress: string;
|
|
94
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string);
|
|
95
|
-
setMaciOperator: ({ operator, }: {
|
|
96
|
-
operator: Addr;
|
|
97
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
98
|
-
setMaciOperatorPubkey: ({ pubkey, }: {
|
|
99
|
-
pubkey: PubKey;
|
|
100
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
101
|
-
setMaciOperatorIdentity: ({ identity, }: {
|
|
102
|
-
identity: string;
|
|
103
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
104
|
-
createRound: ({ certificationSystem, circuitType, maxOption, maxVoter, operator, preDeactivateRoot, roundInfo, voiceCreditAmount, votingTime, whitelist, }: {
|
|
105
|
-
certificationSystem: Uint256;
|
|
106
|
-
circuitType: Uint256;
|
|
107
|
-
maxOption: Uint256;
|
|
108
|
-
maxVoter: Uint256;
|
|
109
|
-
operator: Addr;
|
|
110
|
-
preDeactivateRoot: Uint256;
|
|
111
|
-
roundInfo: RoundInfo;
|
|
112
|
-
voiceCreditAmount: Uint256;
|
|
113
|
-
votingTime: VotingTime;
|
|
114
|
-
whitelist?: Whitelist;
|
|
115
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
116
|
-
setValidators: ({ addresses, }: {
|
|
117
|
-
addresses: ValidatorSet;
|
|
118
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
119
|
-
removeValidator: ({ address, }: {
|
|
120
|
-
address: Addr;
|
|
121
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
122
|
-
updateAmaciCodeId: ({ amaciCodeId, }: {
|
|
123
|
-
amaciCodeId: number;
|
|
124
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
125
|
-
changeOperator: ({ address, }: {
|
|
126
|
-
address: Addr;
|
|
127
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
128
|
-
}
|
|
@@ -1,110 +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 interface InstantiateMsg {
|
|
8
|
-
admin: Addr;
|
|
9
|
-
amaci_code_id: number;
|
|
10
|
-
operator: Addr;
|
|
11
|
-
}
|
|
12
|
-
export type ExecuteMsg = {
|
|
13
|
-
set_maci_operator: {
|
|
14
|
-
operator: Addr;
|
|
15
|
-
};
|
|
16
|
-
} | {
|
|
17
|
-
set_maci_operator_pubkey: {
|
|
18
|
-
pubkey: PubKey;
|
|
19
|
-
};
|
|
20
|
-
} | {
|
|
21
|
-
set_maci_operator_identity: {
|
|
22
|
-
identity: string;
|
|
23
|
-
};
|
|
24
|
-
} | {
|
|
25
|
-
create_round: {
|
|
26
|
-
certification_system: Uint256;
|
|
27
|
-
circuit_type: Uint256;
|
|
28
|
-
max_option: Uint256;
|
|
29
|
-
max_voter: Uint256;
|
|
30
|
-
operator: Addr;
|
|
31
|
-
pre_deactivate_root: Uint256;
|
|
32
|
-
round_info: RoundInfo;
|
|
33
|
-
voice_credit_amount: Uint256;
|
|
34
|
-
voting_time: VotingTime;
|
|
35
|
-
whitelist?: Whitelist | null;
|
|
36
|
-
};
|
|
37
|
-
} | {
|
|
38
|
-
set_validators: {
|
|
39
|
-
addresses: ValidatorSet;
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
|
-
remove_validator: {
|
|
43
|
-
address: Addr;
|
|
44
|
-
};
|
|
45
|
-
} | {
|
|
46
|
-
update_amaci_code_id: {
|
|
47
|
-
amaci_code_id: number;
|
|
48
|
-
};
|
|
49
|
-
} | {
|
|
50
|
-
change_operator: {
|
|
51
|
-
address: Addr;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export type Uint256 = string;
|
|
55
|
-
export type Timestamp = Uint64;
|
|
56
|
-
export type Uint64 = string;
|
|
57
|
-
export interface PubKey {
|
|
58
|
-
x: Uint256;
|
|
59
|
-
y: Uint256;
|
|
60
|
-
}
|
|
61
|
-
export interface RoundInfo {
|
|
62
|
-
description: string;
|
|
63
|
-
link: string;
|
|
64
|
-
title: string;
|
|
65
|
-
}
|
|
66
|
-
export interface VotingTime {
|
|
67
|
-
end_time: Timestamp;
|
|
68
|
-
start_time: Timestamp;
|
|
69
|
-
}
|
|
70
|
-
export interface Whitelist {
|
|
71
|
-
users: WhitelistConfig[];
|
|
72
|
-
}
|
|
73
|
-
export interface WhitelistConfig {
|
|
74
|
-
addr: Addr;
|
|
75
|
-
}
|
|
76
|
-
export interface ValidatorSet {
|
|
77
|
-
addresses: Addr[];
|
|
78
|
-
}
|
|
79
|
-
export type QueryMsg = {
|
|
80
|
-
admin: {};
|
|
81
|
-
} | {
|
|
82
|
-
operator: {};
|
|
83
|
-
} | {
|
|
84
|
-
is_maci_operator: {
|
|
85
|
-
address: Addr;
|
|
86
|
-
};
|
|
87
|
-
} | {
|
|
88
|
-
is_validator: {
|
|
89
|
-
address: Addr;
|
|
90
|
-
};
|
|
91
|
-
} | {
|
|
92
|
-
get_validators: {};
|
|
93
|
-
} | {
|
|
94
|
-
get_validator_operator: {
|
|
95
|
-
address: Addr;
|
|
96
|
-
};
|
|
97
|
-
} | {
|
|
98
|
-
get_maci_operator_pubkey: {
|
|
99
|
-
address: Addr;
|
|
100
|
-
};
|
|
101
|
-
} | {
|
|
102
|
-
get_maci_operator_identity: {
|
|
103
|
-
address: Addr;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
export interface AdminResponse {
|
|
107
|
-
admin: Addr;
|
|
108
|
-
}
|
|
109
|
-
export type String = string;
|
|
110
|
-
export type Boolean = boolean;
|