@dorafactory/maci-sdk 0.0.4 → 0.0.5
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 +22 -7
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/dist/libs/contract/contract.d.ts +4 -2
- package/dist/libs/contract/types.d.ts +2 -4
- package/dist/maci.d.ts +3 -1
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/libs/contract/contract.ts +8 -4
- package/src/libs/contract/types.ts +4 -4
- package/src/maci.ts +11 -0
- package/src/types/index.ts +4 -0
package/dist/index.mjs
CHANGED
|
@@ -3668,12 +3668,16 @@ var Contract = class {
|
|
|
3668
3668
|
rpcEndpoint,
|
|
3669
3669
|
registryAddress,
|
|
3670
3670
|
maciCodeId,
|
|
3671
|
-
oracleCodeId
|
|
3671
|
+
oracleCodeId,
|
|
3672
|
+
feegrantOperator,
|
|
3673
|
+
whitelistBackendPubkey
|
|
3672
3674
|
}) {
|
|
3673
3675
|
this.rpcEndpoint = rpcEndpoint;
|
|
3674
3676
|
this.registryAddress = registryAddress;
|
|
3675
3677
|
this.maciCodeId = maciCodeId;
|
|
3676
3678
|
this.oracleCodeId = oracleCodeId;
|
|
3679
|
+
this.feegrantOperator = feegrantOperator;
|
|
3680
|
+
this.whitelistBackendPubkey = whitelistBackendPubkey;
|
|
3677
3681
|
}
|
|
3678
3682
|
async createAMaciRound({
|
|
3679
3683
|
signer,
|
|
@@ -3805,11 +3809,9 @@ var Contract = class {
|
|
|
3805
3809
|
maxVoter,
|
|
3806
3810
|
maxOption,
|
|
3807
3811
|
circuitType,
|
|
3808
|
-
whitelistBackendPubkey,
|
|
3809
3812
|
whitelistEcosystem,
|
|
3810
3813
|
whitelistSnapshotHeight,
|
|
3811
|
-
whitelistVotingPowerArgs
|
|
3812
|
-
feegrantOperator
|
|
3814
|
+
whitelistVotingPowerArgs
|
|
3813
3815
|
}) {
|
|
3814
3816
|
const start_time = (startVoting.getTime() * 1e6).toString();
|
|
3815
3817
|
const end_time = (endVoting.getTime() * 1e6).toString();
|
|
@@ -3850,14 +3852,14 @@ var Contract = class {
|
|
|
3850
3852
|
plonk_process_vkey: plonkProcessVkey,
|
|
3851
3853
|
plonk_tally_vkey: plonkTallyVkey,
|
|
3852
3854
|
max_vote_options: maxOption,
|
|
3853
|
-
whitelist_backend_pubkey: whitelistBackendPubkey,
|
|
3855
|
+
whitelist_backend_pubkey: this.whitelistBackendPubkey,
|
|
3854
3856
|
whitelist_ecosystem: whitelistEcosystem,
|
|
3855
3857
|
whitelist_snapshot_height: whitelistSnapshotHeight,
|
|
3856
3858
|
whitelist_voting_power_args: whitelistVotingPowerArgs,
|
|
3857
3859
|
circuit_type: maciVoteType,
|
|
3858
3860
|
certification_system: maciCertSystem,
|
|
3859
3861
|
qtr_lib: QTR_LIB,
|
|
3860
|
-
feegrant_operator: feegrantOperator
|
|
3862
|
+
feegrant_operator: this.feegrantOperator
|
|
3861
3863
|
},
|
|
3862
3864
|
"[Oracle MACI]" + title,
|
|
3863
3865
|
"auto"
|
|
@@ -3934,7 +3936,9 @@ var MaciClient2 = class {
|
|
|
3934
3936
|
maciCodeId,
|
|
3935
3937
|
oracleCodeId,
|
|
3936
3938
|
customFetch,
|
|
3937
|
-
defaultOptions
|
|
3939
|
+
defaultOptions,
|
|
3940
|
+
feegrantOperator,
|
|
3941
|
+
whitelistBackendPubkey
|
|
3938
3942
|
}) {
|
|
3939
3943
|
const defaultParams = getDefaultParams(network);
|
|
3940
3944
|
this.rpcEndpoint = rpcEndpoint || defaultParams.rpcEndpoint;
|
|
@@ -3943,6 +3947,8 @@ var MaciClient2 = class {
|
|
|
3943
3947
|
this.registryAddress = registryAddress || defaultParams.registryAddress;
|
|
3944
3948
|
this.maciCodeId = maciCodeId || defaultParams.maciCodeId;
|
|
3945
3949
|
this.oracleCodeId = oracleCodeId || defaultParams.oracleCodeId;
|
|
3950
|
+
this.feegrantOperator = feegrantOperator || defaultParams.oracleFeegrantOperator;
|
|
3951
|
+
this.whitelistBackendPubkey = whitelistBackendPubkey || defaultParams.oracleWhitelistBackendPubkey;
|
|
3946
3952
|
this.http = new Http(
|
|
3947
3953
|
this.apiEndpoint,
|
|
3948
3954
|
this.restEndpoint,
|
|
@@ -3959,7 +3965,9 @@ var MaciClient2 = class {
|
|
|
3959
3965
|
rpcEndpoint: this.rpcEndpoint,
|
|
3960
3966
|
registryAddress: this.registryAddress,
|
|
3961
3967
|
maciCodeId: this.maciCodeId,
|
|
3962
|
-
oracleCodeId: this.oracleCodeId
|
|
3968
|
+
oracleCodeId: this.oracleCodeId,
|
|
3969
|
+
feegrantOperator: this.feegrantOperator,
|
|
3970
|
+
whitelistBackendPubkey: this.whitelistBackendPubkey
|
|
3963
3971
|
});
|
|
3964
3972
|
}
|
|
3965
3973
|
async oracleMaciClient({
|