@dorafactory/maci-sdk 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.mjs CHANGED
@@ -28274,6 +28274,13 @@ var AMaciQueryClient = class {
28274
28274
  white_list: {}
28275
28275
  });
28276
28276
  };
28277
+ this.canSignUp = async ({ sender }) => {
28278
+ return this.client.queryContractSmart(this.contractAddress, {
28279
+ can_sign_up: {
28280
+ sender
28281
+ }
28282
+ });
28283
+ };
28277
28284
  this.isWhiteList = async ({ sender }) => {
28278
28285
  return this.client.queryContractSmart(this.contractAddress, {
28279
28286
  is_white_list: {
@@ -28281,6 +28288,13 @@ var AMaciQueryClient = class {
28281
28288
  }
28282
28289
  });
28283
28290
  };
28291
+ this.isRegister = async ({ sender }) => {
28292
+ return this.client.queryContractSmart(this.contractAddress, {
28293
+ is_register: {
28294
+ sender
28295
+ }
28296
+ });
28297
+ };
28284
28298
  this.signuped = async ({ pubkeyX }) => {
28285
28299
  return this.client.queryContractSmart(this.contractAddress, {
28286
28300
  signuped: {
@@ -28318,6 +28332,11 @@ var AMaciQueryClient = class {
28318
28332
  query_pre_deactivate_root: {}
28319
28333
  });
28320
28334
  };
28335
+ this.getDelayRecords = async () => {
28336
+ return this.client.queryContractSmart(this.contractAddress, {
28337
+ get_delay_records: {}
28338
+ });
28339
+ };
28321
28340
  this.client = client;
28322
28341
  this.contractAddress = contractAddress;
28323
28342
  this.admin = this.admin.bind(this);
@@ -28337,7 +28356,9 @@ var AMaciQueryClient = class {
28337
28356
  this.getVoiceCreditBalance = this.getVoiceCreditBalance.bind(this);
28338
28357
  this.getVoiceCreditAmount = this.getVoiceCreditAmount.bind(this);
28339
28358
  this.whiteList = this.whiteList.bind(this);
28359
+ this.canSignUp = this.canSignUp.bind(this);
28340
28360
  this.isWhiteList = this.isWhiteList.bind(this);
28361
+ this.isRegister = this.isRegister.bind(this);
28341
28362
  this.signuped = this.signuped.bind(this);
28342
28363
  this.voteOptionMap = this.voteOptionMap.bind(this);
28343
28364
  this.maxVoteOptions = this.maxVoteOptions.bind(this);
@@ -28345,6 +28366,7 @@ var AMaciQueryClient = class {
28345
28366
  this.queryCircuitType = this.queryCircuitType.bind(this);
28346
28367
  this.queryCertSystem = this.queryCertSystem.bind(this);
28347
28368
  this.queryPreDeactivateRoot = this.queryPreDeactivateRoot.bind(this);
28369
+ this.getDelayRecords = this.getDelayRecords.bind(this);
28348
28370
  }
28349
28371
  };
28350
28372
  var AMaciClient = class extends AMaciQueryClient {
@@ -28594,56 +28616,12 @@ var AMaciClient = class extends AMaciQueryClient {
28594
28616
  _funds
28595
28617
  );
28596
28618
  };
28597
- this.grant = async ({
28598
- maxAmount
28599
- }, fee = "auto", memo, _funds) => {
28600
- return await this.client.execute(
28601
- this.sender,
28602
- this.contractAddress,
28603
- {
28604
- grant: {
28605
- max_amount: maxAmount
28606
- }
28607
- },
28608
- fee,
28609
- memo,
28610
- _funds
28611
- );
28612
- };
28613
- this.revoke = async (fee = "auto", memo, _funds) => {
28614
- return await this.client.execute(
28615
- this.sender,
28616
- this.contractAddress,
28617
- {
28618
- revoke: {}
28619
- },
28620
- fee,
28621
- memo,
28622
- _funds
28623
- );
28624
- };
28625
- this.bond = async (fee = "auto", memo, _funds) => {
28619
+ this.claim = async (fee = "auto", memo, _funds) => {
28626
28620
  return await this.client.execute(
28627
28621
  this.sender,
28628
28622
  this.contractAddress,
28629
28623
  {
28630
- bond: {}
28631
- },
28632
- fee,
28633
- memo,
28634
- _funds
28635
- );
28636
- };
28637
- this.withdraw = async ({
28638
- amount
28639
- }, fee = "auto", memo, _funds) => {
28640
- return await this.client.execute(
28641
- this.sender,
28642
- this.contractAddress,
28643
- {
28644
- withdraw: {
28645
- amount
28646
- }
28624
+ claim: {}
28647
28625
  },
28648
28626
  fee,
28649
28627
  memo,
@@ -28667,10 +28645,7 @@ var AMaciClient = class extends AMaciQueryClient {
28667
28645
  this.stopProcessingPeriod = this.stopProcessingPeriod.bind(this);
28668
28646
  this.processTally = this.processTally.bind(this);
28669
28647
  this.stopTallyingPeriod = this.stopTallyingPeriod.bind(this);
28670
- this.grant = this.grant.bind(this);
28671
- this.revoke = this.revoke.bind(this);
28672
- this.bond = this.bond.bind(this);
28673
- this.withdraw = this.withdraw.bind(this);
28648
+ this.claim = this.claim.bind(this);
28674
28649
  }
28675
28650
  };
28676
28651
 
@@ -30688,6 +30663,13 @@ var MACI = class {
30688
30663
  };
30689
30664
  }
30690
30665
  }
30666
+ async queryAMaciChargeFee({
30667
+ maxVoter,
30668
+ maxOption
30669
+ }) {
30670
+ const fee = getAMaciRoundCircuitFee(maxVoter, maxOption);
30671
+ return fee;
30672
+ }
30691
30673
  async queryRoundGasStation({ contractAddress }) {
30692
30674
  const roundInfo = await this.getRoundInfo({ contractAddress });
30693
30675
  return roundInfo.gasStationEnable;
@@ -30984,6 +30966,16 @@ var MACI = class {
30984
30966
  fee
30985
30967
  );
30986
30968
  }
30969
+ async claimAMaciRound({
30970
+ signer,
30971
+ contractAddress
30972
+ }) {
30973
+ const client = await this.contract.amaciClient({
30974
+ signer,
30975
+ contractAddress
30976
+ });
30977
+ return client.claim();
30978
+ }
30987
30979
  };
30988
30980
 
30989
30981
  // src/maci.ts