@dorafactory/maci-sdk 0.0.21 → 0.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dorafactory/maci-sdk",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "SDK for interacting with maci",
5
5
  "keywords": [
6
6
  "maci",
@@ -18,6 +18,7 @@ import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx.js';
18
18
  import { CertificateEcosystem, ErrorResponse } from '../../types';
19
19
  import { SignatureResponse } from '../oracle-certificate/types';
20
20
  import { OracleWhitelistConfig } from '../contract/ts/OracleMaci.types';
21
+ import { getAMaciRoundCircuitFee } from '../contract/utils';
21
22
 
22
23
  export function isErrorResponse(response: unknown): response is ErrorResponse {
23
24
  return (
@@ -313,6 +314,17 @@ export class MACI {
313
314
  }
314
315
  }
315
316
 
317
+ async queryAMaciChargeFee({
318
+ maxVoter,
319
+ maxOption,
320
+ }: {
321
+ maxVoter: number;
322
+ maxOption: number;
323
+ }) {
324
+ const fee = getAMaciRoundCircuitFee(maxVoter, maxOption);
325
+ return fee;
326
+ }
327
+
316
328
  async queryRoundGasStation({ contractAddress }: { contractAddress: string }) {
317
329
  const roundInfo = await this.getRoundInfo({ contractAddress });
318
330