@dorafactory/maci-sdk 0.0.28 → 0.0.30-rc
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/README.md +5 -3
- package/dist/browser.d.mts +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +12 -9
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +12 -9
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/libs/contract/contract.ts +7 -4
- package/src/libs/contract/types.ts +2 -0
- package/src/libs/query/round.ts +1 -1
- package/src/types/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dorafactory/maci-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30-rc",
|
|
4
4
|
"description": "SDK for interacting with maci",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maci",
|
|
7
7
|
"blockchain"
|
|
8
8
|
],
|
|
9
9
|
"author": "team@dorafactory.org",
|
|
10
|
-
"homepage": "https://github.com/dorafactory/maci
|
|
11
|
-
"bugs": "https://github.com/dorafactory/maci
|
|
10
|
+
"homepage": "https://github.com/dorafactory/maci/tree/main/packages/sdk#readme",
|
|
11
|
+
"bugs": "https://github.com/dorafactory/maci/issues",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/dorafactory/maci
|
|
14
|
+
"url": "https://github.com/dorafactory/maci.git"
|
|
15
15
|
},
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
17
|
"publishConfig": {
|
|
@@ -76,6 +76,7 @@ export class Contract {
|
|
|
76
76
|
voiceCreditAmount,
|
|
77
77
|
circuitType,
|
|
78
78
|
preDeactivateRoot,
|
|
79
|
+
fee = 'auto',
|
|
79
80
|
}: CreateAMaciRoundParams) {
|
|
80
81
|
const start_time = (startVoting.getTime() * 10 ** 6).toString();
|
|
81
82
|
const end_time = (endVoting.getTime() * 10 ** 6).toString();
|
|
@@ -109,7 +110,7 @@ export class Contract {
|
|
|
109
110
|
certificationSystem: '0',
|
|
110
111
|
circuitType,
|
|
111
112
|
},
|
|
112
|
-
|
|
113
|
+
fee,
|
|
113
114
|
undefined,
|
|
114
115
|
[requiredFee]
|
|
115
116
|
);
|
|
@@ -145,6 +146,7 @@ export class Contract {
|
|
|
145
146
|
maxOption,
|
|
146
147
|
circuitType,
|
|
147
148
|
certSystemType,
|
|
149
|
+
fee = 'auto',
|
|
148
150
|
}: CreateMaciRoundParams) {
|
|
149
151
|
const start_time = (startVoting.getTime() * 10 ** 6).toString();
|
|
150
152
|
const end_time = (endVoting.getTime() * 10 ** 6).toString();
|
|
@@ -185,14 +187,14 @@ export class Contract {
|
|
|
185
187
|
groth16_tally_vkey: groth16TallyVkey,
|
|
186
188
|
plonk_process_vkey: plonkProcessVkey,
|
|
187
189
|
plonk_tally_vkey: plonkTallyVkey,
|
|
188
|
-
max_vote_options: maxOption,
|
|
190
|
+
max_vote_options: maxOption.toString(),
|
|
189
191
|
whitelist,
|
|
190
192
|
circuit_type: maciVoteType,
|
|
191
193
|
certification_system: maciCertSystem,
|
|
192
194
|
qtr_lib: QTR_LIB,
|
|
193
195
|
},
|
|
194
196
|
`[MACI] ${title}`,
|
|
195
|
-
|
|
197
|
+
fee
|
|
196
198
|
);
|
|
197
199
|
|
|
198
200
|
return instantiateResponse;
|
|
@@ -211,6 +213,7 @@ export class Contract {
|
|
|
211
213
|
whitelistEcosystem,
|
|
212
214
|
whitelistSnapshotHeight,
|
|
213
215
|
whitelistVotingPowerArgs,
|
|
216
|
+
fee = 'auto',
|
|
214
217
|
}: CreateOracleMaciRoundParams) {
|
|
215
218
|
const start_time = (startVoting.getTime() * 1_000_000).toString();
|
|
216
219
|
const end_time = (endVoting.getTime() * 1_000_000).toString();
|
|
@@ -248,7 +251,7 @@ export class Contract {
|
|
|
248
251
|
feegrant_operator: this.feegrantOperator,
|
|
249
252
|
},
|
|
250
253
|
`[Oracle MACI] ${title}`,
|
|
251
|
-
|
|
254
|
+
fee
|
|
252
255
|
);
|
|
253
256
|
|
|
254
257
|
return instantiateResponse;
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
MaciCertSystemType,
|
|
7
7
|
CertificateEcosystem,
|
|
8
8
|
} from '../../types';
|
|
9
|
+
import { StdFee } from '@cosmjs/amino';
|
|
9
10
|
|
|
10
11
|
export type CreateRoundParams = {
|
|
11
12
|
signer: OfflineSigner;
|
|
@@ -15,6 +16,7 @@ export type CreateRoundParams = {
|
|
|
15
16
|
startVoting: Date;
|
|
16
17
|
endVoting: Date;
|
|
17
18
|
circuitType: MaciCircuitType;
|
|
19
|
+
fee?: number | StdFee | 'auto';
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
export type CreateAMaciRoundParams = {
|
package/src/libs/query/round.ts
CHANGED