@dorafactory/maci-sdk 0.1.3-pre.46.beta.17 → 0.1.3-pre.46.beta.18

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.js CHANGED
@@ -6730,10 +6730,9 @@ var MaciApiClient = class {
6730
6730
  * The caller should mix the real leaf index with decoy indices to preserve privacy.
6731
6731
  */
6732
6732
  async getPreDeactivateProof(contractAddress, indices) {
6733
- return this.fetch(
6734
- `/v1/pre-deactivate/${contractAddress}/proof?indices=${indices}`,
6735
- { method: "GET" }
6736
- );
6733
+ return this.fetch(`/v1/pre-deactivate/${contractAddress}/proof?indices=${indices}`, {
6734
+ method: "GET"
6735
+ });
6737
6736
  }
6738
6737
  // ==================== Claim Key APIs ====================
6739
6738
  /**
@@ -6762,6 +6761,14 @@ var MaciApiClient = class {
6762
6761
  method: "GET"
6763
6762
  });
6764
6763
  }
6764
+ /**
6765
+ * Get pre-deactivate data by contract address
6766
+ */
6767
+ async getPreDeactivate(params) {
6768
+ return this.fetch(`/v1/pre-deactivate/${params.contractAddress}`, {
6769
+ method: "GET"
6770
+ });
6771
+ }
6765
6772
  };
6766
6773
 
6767
6774
  // src/maci.ts
@@ -7902,7 +7909,14 @@ var VoterClient = class _VoterClient {
7902
7909
  this.apiEndpoint = apiEndpoint || defaultParams.apiEndpoint;
7903
7910
  this.saasApiEndpoint = saasApiEndpoint || defaultParams.saasApiEndpoint;
7904
7911
  this.registryAddress = registryAddress || defaultParams.registryAddress;
7905
- this.http = new Http(this.apiEndpoint, restUrls, customFetch, defaultOptions, retries, retryDelay);
7912
+ this.http = new Http(
7913
+ this.apiEndpoint,
7914
+ restUrls,
7915
+ customFetch,
7916
+ defaultOptions,
7917
+ retries,
7918
+ retryDelay
7919
+ );
7906
7920
  this.indexer = new Indexer({
7907
7921
  restEndpoint: restUrls[0],
7908
7922
  apiEndpoint: this.apiEndpoint,
@@ -8196,7 +8210,9 @@ var VoterClient = class _VoterClient {
8196
8210
  };
8197
8211
  }
8198
8212
  if (!newPubkey) {
8199
- throw new Error("buildPreAddNewKeyPayload: `newPubkey` is required when `pollId` is provided");
8213
+ throw new Error(
8214
+ "buildPreAddNewKeyPayload: `newPubkey` is required when `pollId` is provided"
8215
+ );
8200
8216
  }
8201
8217
  const coordPubKey = [coordPubkeyX, coordPubkeyY];
8202
8218
  let resolvedDeactivates;
@@ -8696,6 +8712,16 @@ var VoterClient = class _VoterClient {
8696
8712
  }
8697
8713
  return await this.saasApiClient.createAmaciRound(params);
8698
8714
  }
8715
+ /**
8716
+ * Get pre-deactivate data via SaaS API
8717
+ * @param contractAddress - Contract address
8718
+ */
8719
+ async saasGetPreDeactivate(contractAddress) {
8720
+ if (!this.saasApiClient) {
8721
+ throw new Error("SaaS API client not initialized");
8722
+ }
8723
+ return await this.saasApiClient.getPreDeactivate({ contractAddress });
8724
+ }
8699
8725
  /**
8700
8726
  * Signup via SaaS API
8701
8727
  * @param params - Signup parameters (including ticket)