timelock-sdk 0.0.106 → 0.0.107

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/client.cjs CHANGED
@@ -838,9 +838,9 @@ var PerpsOperator = class {
838
838
  const { message } = await this.#request("api/auth/gen", { userAddr });
839
839
  return message;
840
840
  };
841
- validateAuthMessage = async (authMessage, signature) => {
841
+ validateAuthMessage = async (message, signature) => {
842
842
  const { address, createdAt, validUntil } = await this.#request("api/auth/validate", {
843
- authMessage,
843
+ message,
844
844
  signature
845
845
  });
846
846
  return {
@@ -849,9 +849,9 @@ var PerpsOperator = class {
849
849
  validUntil
850
850
  };
851
851
  };
852
- setAuth = (authMessage, signature) => {
852
+ setAuth = (message, signature) => {
853
853
  this.auth = {
854
- authMessage,
854
+ message,
855
855
  signature
856
856
  };
857
857
  };
@@ -872,8 +872,8 @@ var PerpsOperator = class {
872
872
  if (!this.auth) throw new Error("Authentication required. Call setAuth() with authMessage and signature before exercising perps.");
873
873
  const { txHash, optionId } = await this.#request("api/positions/mint", {
874
874
  ...body,
875
- ...this.auth,
876
- amount: body.amount.toString()
875
+ amount: body.amount.toString(),
876
+ auth: this.auth
877
877
  });
878
878
  return {
879
879
  txHash,
@@ -884,9 +884,9 @@ var PerpsOperator = class {
884
884
  if (!this.auth) throw new Error("Authentication required. Call setAuth() with authMessage and signature before exercising perps.");
885
885
  const { txHash, optionId } = await this.#request("api/positions/exercise", {
886
886
  ...body,
887
- ...this.auth,
888
887
  optionId: body.optionId.toString(),
889
- liquidities: body.liquidities.map((l) => l.toString())
888
+ liquidities: body.liquidities.map((l) => l.toString()),
889
+ auth: this.auth
890
890
  });
891
891
  return {
892
892
  txHash,