@neus/sdk 1.1.6 → 1.1.7

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/cjs/client.cjs CHANGED
@@ -1743,13 +1743,12 @@ ${bytes.length}`;
1743
1743
  }
1744
1744
  throw new ValidationError(`Failed to sign revocation: ${error.message}`);
1745
1745
  }
1746
- const res = await this._makeRequest("POST", `/api/v1/proofs/revoke-self/${qHash}`, {
1746
+ const json = await this._makeRequest("POST", `/api/v1/proofs/revoke-self/${qHash}`, {
1747
1747
  walletAddress: address,
1748
1748
  signature,
1749
1749
  signedTimestamp,
1750
1750
  ...signerIsEvm ? {} : { chain, signatureMethod }
1751
1751
  });
1752
- const json = await res.json();
1753
1752
  if (!json.success) {
1754
1753
  throw new ApiError(json.error?.message || "Failed to revoke proof", json.error);
1755
1754
  }
@@ -1999,7 +1998,7 @@ ${bytes.length}`;
1999
1998
  if (!id || id.length > 80 || !/^[a-zA-Z0-9:_-]+$/.test(id)) {
2000
1999
  throw new ValidationError("Valid gateId is required");
2001
2000
  }
2002
- const response = await this._makeRequest("GET", `/api/v1/gates/${encodeURIComponent(id)}`);
2001
+ const response = await this._makeRequest("GET", `/api/v1/profile/gates/${encodeURIComponent(id)}`);
2003
2002
  if (!response.success || !response.data?.gate) {
2004
2003
  throw new ApiError(`Gate lookup failed: ${response.error?.message || "Gate not found"}`, response.error);
2005
2004
  }
@@ -2036,7 +2035,7 @@ ${bytes.length}`;
2036
2035
  if (paymentTxHash) body.paymentTxHash = paymentTxHash;
2037
2036
  const response = await this._makeRequest(
2038
2037
  "POST",
2039
- `/api/v1/gates/${encodeURIComponent(gateId)}/fulfill`,
2038
+ `/api/v1/profile/gates/${encodeURIComponent(gateId)}/fulfill`,
2040
2039
  body
2041
2040
  );
2042
2041
  if (!response.success) {
package/cjs/index.cjs CHANGED
@@ -2436,13 +2436,12 @@ ${bytes.length}`;
2436
2436
  }
2437
2437
  throw new ValidationError(`Failed to sign revocation: ${error.message}`);
2438
2438
  }
2439
- const res = await this._makeRequest("POST", `/api/v1/proofs/revoke-self/${qHash}`, {
2439
+ const json = await this._makeRequest("POST", `/api/v1/proofs/revoke-self/${qHash}`, {
2440
2440
  walletAddress: address,
2441
2441
  signature,
2442
2442
  signedTimestamp,
2443
2443
  ...signerIsEvm ? {} : { chain, signatureMethod }
2444
2444
  });
2445
- const json = await res.json();
2446
2445
  if (!json.success) {
2447
2446
  throw new ApiError(json.error?.message || "Failed to revoke proof", json.error);
2448
2447
  }
@@ -2692,7 +2691,7 @@ ${bytes.length}`;
2692
2691
  if (!id || id.length > 80 || !/^[a-zA-Z0-9:_-]+$/.test(id)) {
2693
2692
  throw new ValidationError("Valid gateId is required");
2694
2693
  }
2695
- const response = await this._makeRequest("GET", `/api/v1/gates/${encodeURIComponent(id)}`);
2694
+ const response = await this._makeRequest("GET", `/api/v1/profile/gates/${encodeURIComponent(id)}`);
2696
2695
  if (!response.success || !response.data?.gate) {
2697
2696
  throw new ApiError(`Gate lookup failed: ${response.error?.message || "Gate not found"}`, response.error);
2698
2697
  }
@@ -2729,7 +2728,7 @@ ${bytes.length}`;
2729
2728
  if (paymentTxHash) body.paymentTxHash = paymentTxHash;
2730
2729
  const response = await this._makeRequest(
2731
2730
  "POST",
2732
- `/api/v1/gates/${encodeURIComponent(gateId)}/fulfill`,
2731
+ `/api/v1/profile/gates/${encodeURIComponent(gateId)}/fulfill`,
2733
2732
  body
2734
2733
  );
2735
2734
  if (!response.success) {