@limitless-exchange/sdk 1.0.4 → 1.0.5

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.mjs CHANGED
@@ -53,6 +53,7 @@ var Side = /* @__PURE__ */ ((Side2) => {
53
53
  })(Side || {});
54
54
  var OrderType = /* @__PURE__ */ ((OrderType2) => {
55
55
  OrderType2["FOK"] = "FOK";
56
+ OrderType2["FAK"] = "FAK";
56
57
  OrderType2["GTC"] = "GTC";
57
58
  return OrderType2;
58
59
  })(OrderType || {});
@@ -166,8 +167,8 @@ function isNodeRuntime() {
166
167
  return typeof process !== "undefined" && !!process.versions?.node;
167
168
  }
168
169
  function resolveSdkVersion() {
169
- if ("1.0.4") {
170
- return "1.0.4";
170
+ if ("1.0.5") {
171
+ return "1.0.5";
171
172
  }
172
173
  return "0.0.0";
173
174
  }
@@ -1238,6 +1239,7 @@ var DelegatedOrderService = class {
1238
1239
  const feeRateBps = params.feeRateBps && params.feeRateBps > 0 ? params.feeRateBps : DEFAULT_DELEGATED_FEE_RATE_BPS;
1239
1240
  const builder = new OrderBuilder(ZERO_ADDRESS, feeRateBps);
1240
1241
  const unsignedOrder = builder.buildOrder(params.args);
1242
+ const postOnly = params.orderType === "GTC" /* GTC */ && "postOnly" in params.args && params.args.postOnly !== void 0 ? params.args.postOnly : void 0;
1241
1243
  const payload = {
1242
1244
  order: {
1243
1245
  salt: unsignedOrder.salt,
@@ -1257,7 +1259,8 @@ var DelegatedOrderService = class {
1257
1259
  orderType: params.orderType,
1258
1260
  marketSlug: params.marketSlug,
1259
1261
  ownerId: params.onBehalfOf,
1260
- onBehalfOf: params.onBehalfOf
1262
+ onBehalfOf: params.onBehalfOf,
1263
+ ...postOnly !== void 0 ? { postOnly } : {}
1261
1264
  };
1262
1265
  this.logger.debug("Creating delegated order", {
1263
1266
  marketSlug: params.marketSlug,
@@ -2078,6 +2081,7 @@ var OrderClient = class {
2078
2081
  takerAmount: unsignedOrder.takerAmount
2079
2082
  });
2080
2083
  const signature = await this.orderSigner.signOrder(unsignedOrder, dynamicSigningConfig);
2084
+ const postOnly = params.orderType === "GTC" /* GTC */ && "postOnly" in params && params.postOnly !== void 0 ? params.postOnly : void 0;
2081
2085
  const payload = {
2082
2086
  order: {
2083
2087
  ...unsignedOrder,
@@ -2085,7 +2089,8 @@ var OrderClient = class {
2085
2089
  },
2086
2090
  orderType: params.orderType,
2087
2091
  marketSlug: params.marketSlug,
2088
- ownerId: userData.userId
2092
+ ownerId: userData.userId,
2093
+ ...postOnly !== void 0 ? { postOnly } : {}
2089
2094
  };
2090
2095
  this.logger.debug("Submitting order to API", payload);
2091
2096
  const apiResponse = await this.httpClient.post("/orders", payload);