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