@dorafactory/maci-sdk 0.1.3-pre.46.beta.11 → 0.1.3-pre.46.beta.12

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
@@ -6720,8 +6720,10 @@ var MaciApiClient = class {
6720
6720
  * WARNING: secretKey is returned only once and cannot be retrieved again.
6721
6721
  */
6722
6722
  async claimMaciKey(params) {
6723
- return this.fetch(`/v1/rounds/${params.contractAddress}/claim-key`, {
6724
- method: "POST"
6723
+ const { contractAddress, ...body } = params;
6724
+ return this.fetch(`/v1/rounds/${contractAddress}/claim-key`, {
6725
+ method: "POST",
6726
+ body: JSON.stringify(body)
6725
6727
  });
6726
6728
  }
6727
6729
  /**
@@ -7312,19 +7314,6 @@ var MaciClient = class {
7312
7314
  }
7313
7315
  return await this.saasApiClient.setVoteOptions(params);
7314
7316
  }
7315
- /**
7316
- * Claim the next available pre-generated MACI key pair for an AMACI round via SaaS API.
7317
- * The key is assigned on a first-come-first-served basis.
7318
- * WARNING: secretKey is returned only once — save it immediately, it cannot be retrieved again.
7319
- * @param contractAddress - Round contract address
7320
- * @returns Claimed key pair with full deactivate Merkle proof
7321
- */
7322
- async saasClaimKey(contractAddress) {
7323
- if (!this.saasApiClient) {
7324
- throw new Error("SaaS API client not initialized");
7325
- }
7326
- return await this.saasApiClient.claimMaciKey({ contractAddress });
7327
- }
7328
7317
  };
7329
7318
 
7330
7319
  // src/voter.ts
@@ -8768,6 +8757,19 @@ var VoterClient = class _VoterClient {
8768
8757
  account: newVoterClient
8769
8758
  };
8770
8759
  }
8760
+ /**
8761
+ * Claim the next available pre-generated MACI key pair for an AMACI round via SaaS API.
8762
+ * The key is assigned on a first-come-first-served basis.
8763
+ * WARNING: secretKey is returned only once — save it immediately, it cannot be retrieved again.
8764
+ * @param params - Parameters including contractAddress and ticket
8765
+ * @returns Claimed key pair with full deactivate Merkle proof
8766
+ */
8767
+ async saasClaimKey(params) {
8768
+ if (!this.saasApiClient) {
8769
+ throw new Error("SaaS API client not initialized");
8770
+ }
8771
+ return await this.saasApiClient.claimMaciKey(params);
8772
+ }
8771
8773
  /**
8772
8774
  * Vote via SaaS API with automatic payload building
8773
8775
  * @param params - Parameters including contract address, operator pubkey, vote options, and ticket